Skip to content

Commit

Permalink
Upgrade dependencies (#1501)
Browse files Browse the repository at this point in the history
* Upgrade set-value dependency

* Add more tests to scene

Co-authored-by: atrovato <1839717+atrovato@users.noreply.github.com>
  • Loading branch information
Pierre-Gilles and atrovato committed Apr 11, 2022
1 parent 7d44dd8 commit 9f64e60
Show file tree
Hide file tree
Showing 11 changed files with 2,466 additions and 853 deletions.
9 changes: 1 addition & 8 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion front/package.json
Expand Up @@ -68,7 +68,6 @@
"react-big-calendar": "^0.40.0",
"react-datepicker": "^3.8.0",
"react-select": "^4.3.1",
"set-value": "^3.0.2",
"unistore": "^3.5.2",
"useragent-parser-js": "^1.0.3",
"uuid": "^3.4.0"
Expand Down
31 changes: 26 additions & 5 deletions server/lib/scene/scene.actions.js
Expand Up @@ -127,7 +127,14 @@ const actionsFunc = {
},
[ACTIONS.DEVICE.GET_VALUE]: async (self, action, scope, columnIndex, rowIndex) => {
const deviceFeature = self.stateManager.get('deviceFeature', action.device_feature);
set(scope, `${columnIndex}.${rowIndex}`, deviceFeature);
set(
scope,
`${columnIndex}`,
{
[rowIndex]: deviceFeature,
},
{ merge: true },
);
},
[ACTIONS.CONDITION.ONLY_CONTINUE_IF]: async (self, action, scope) => {
let oneConditionVerified = false;
Expand Down Expand Up @@ -247,7 +254,14 @@ const actionsFunc = {
parseJsonIfJson(bodyWithVariables),
headersObject,
);
set(scope, `${columnIndex}.${rowIndex}`, response);
set(
scope,
`${columnIndex}`,
{
[rowIndex]: response,
},
{ merge: true },
);
},
[ACTIONS.USER.CHECK_PRESENCE]: async (self, action, scope, columnIndex, rowIndex) => {
let deviceSeenRecently = false;
Expand Down Expand Up @@ -304,9 +318,16 @@ const actionsFunc = {
.locale(eventRaw.calendar.creator.language)
.format('LLL'),
};
set(scope, `${columnIndex}.${rowIndex}`, {
calendarEvent: eventFormatted,
});
set(
scope,
`${columnIndex}`,
{
[rowIndex]: {
calendarEvent: eventFormatted,
},
},
{ merge: true },
);
}
},
};
Expand Down

0 comments on commit 9f64e60

Please sign in to comment.