@frontegg/redux-store 6.82.0-alpha.0 → 6.82.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth/ProfileState/saga.js +6 -3
- package/auth/TeamState/saga.js +3 -1
- package/auth/dummy.js +1 -1
- package/index.js +1 -1
- package/node/auth/ProfileState/saga.js +6 -3
- package/node/auth/TeamState/saga.js +3 -1
- package/node/auth/dummy.js +1 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
|
@@ -73,7 +73,8 @@ function* saveProfile(_ref) {
|
|
|
73
73
|
payload = _objectWithoutPropertiesLoose(_ref.payload, _excluded);
|
|
74
74
|
yield put(actions.setProfileState({
|
|
75
75
|
saving: true,
|
|
76
|
-
error: null
|
|
76
|
+
error: null,
|
|
77
|
+
loading: true
|
|
77
78
|
}));
|
|
78
79
|
try {
|
|
79
80
|
const oldProfileData = yield select(state => state.auth.profileState.profile);
|
|
@@ -99,13 +100,15 @@ function* saveProfile(_ref) {
|
|
|
99
100
|
yield put(actions.setUser(_extends({}, currentUser, profile)));
|
|
100
101
|
yield put(actions.setProfileState({
|
|
101
102
|
profile,
|
|
102
|
-
saving: false
|
|
103
|
+
saving: false,
|
|
104
|
+
loading: false
|
|
103
105
|
}));
|
|
104
106
|
callback == null ? void 0 : callback(newProfileData);
|
|
105
107
|
} catch (e) {
|
|
106
108
|
yield put(actions.setProfileState({
|
|
107
109
|
saving: false,
|
|
108
|
-
error: e.message
|
|
110
|
+
error: e.message,
|
|
111
|
+
loading: false
|
|
109
112
|
}));
|
|
110
113
|
callback == null ? void 0 : callback(null, e);
|
|
111
114
|
}
|
package/auth/TeamState/saga.js
CHANGED
|
@@ -971,7 +971,9 @@ function* addUserMock({
|
|
|
971
971
|
})
|
|
972
972
|
}));
|
|
973
973
|
yield delay();
|
|
974
|
-
const newUser = _extends({}, userTeamDemo,
|
|
974
|
+
const newUser = _extends({}, userTeamDemo, {
|
|
975
|
+
groups: []
|
|
976
|
+
}, body, {
|
|
975
977
|
id: `${uuidv4()}`
|
|
976
978
|
});
|
|
977
979
|
callback == null ? void 0 : callback(newUser);
|
package/auth/dummy.js
CHANGED
|
@@ -416,7 +416,7 @@ export const allGroupsDummy = [{
|
|
|
416
416
|
color: '#9AE0FF',
|
|
417
417
|
description: 'Executives',
|
|
418
418
|
users: generateGroupUsers(5),
|
|
419
|
-
roles: [generateRoleByName('Admin')
|
|
419
|
+
roles: [generateRoleByName('Admin')],
|
|
420
420
|
managedBy: GroupManagedByEnum.FRONTEGG
|
|
421
421
|
}, {
|
|
422
422
|
id: 'id5',
|
package/index.js
CHANGED
|
@@ -81,7 +81,8 @@ function* saveProfile(_ref) {
|
|
|
81
81
|
payload = (0, _objectWithoutPropertiesLoose2.default)(_ref.payload, _excluded);
|
|
82
82
|
yield (0, _effects.put)(_reducer.actions.setProfileState({
|
|
83
83
|
saving: true,
|
|
84
|
-
error: null
|
|
84
|
+
error: null,
|
|
85
|
+
loading: true
|
|
85
86
|
}));
|
|
86
87
|
try {
|
|
87
88
|
const oldProfileData = yield (0, _effects.select)(state => state.auth.profileState.profile);
|
|
@@ -107,13 +108,15 @@ function* saveProfile(_ref) {
|
|
|
107
108
|
yield (0, _effects.put)(_reducer.actions.setUser((0, _extends2.default)({}, currentUser, profile)));
|
|
108
109
|
yield (0, _effects.put)(_reducer.actions.setProfileState({
|
|
109
110
|
profile,
|
|
110
|
-
saving: false
|
|
111
|
+
saving: false,
|
|
112
|
+
loading: false
|
|
111
113
|
}));
|
|
112
114
|
callback == null ? void 0 : callback(newProfileData);
|
|
113
115
|
} catch (e) {
|
|
114
116
|
yield (0, _effects.put)(_reducer.actions.setProfileState({
|
|
115
117
|
saving: false,
|
|
116
|
-
error: e.message
|
|
118
|
+
error: e.message,
|
|
119
|
+
loading: false
|
|
117
120
|
}));
|
|
118
121
|
callback == null ? void 0 : callback(null, e);
|
|
119
122
|
}
|
|
@@ -979,7 +979,9 @@ function* addUserMock({
|
|
|
979
979
|
})
|
|
980
980
|
}));
|
|
981
981
|
yield (0, _utils.delay)();
|
|
982
|
-
const newUser = (0, _extends2.default)({}, _dummy.userTeamDemo,
|
|
982
|
+
const newUser = (0, _extends2.default)({}, _dummy.userTeamDemo, {
|
|
983
|
+
groups: []
|
|
984
|
+
}, body, {
|
|
983
985
|
id: `${(0, _uuid.v4)()}`
|
|
984
986
|
});
|
|
985
987
|
callback == null ? void 0 : callback(newUser);
|
package/node/auth/dummy.js
CHANGED
|
@@ -450,7 +450,7 @@ const allGroupsDummy = [{
|
|
|
450
450
|
color: '#9AE0FF',
|
|
451
451
|
description: 'Executives',
|
|
452
452
|
users: generateGroupUsers(5),
|
|
453
|
-
roles: [generateRoleByName('Admin')
|
|
453
|
+
roles: [generateRoleByName('Admin')],
|
|
454
454
|
managedBy: _restApi.GroupManagedByEnum.FRONTEGG
|
|
455
455
|
}, {
|
|
456
456
|
id: 'id5',
|
package/node/index.js
CHANGED