datastake-daf 0.6.808 → 0.6.809
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/dist/components/index.js +2104 -1654
- package/dist/hooks/index.js +11 -4
- package/dist/pages/index.js +222 -208
- package/dist/services/index.js +19 -5
- package/dist/utils/index.js +24 -5
- package/package.json +1 -1
- package/src/@daf/core/components/AuthForm/index.jsx +12 -3
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/index.jsx +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/hook.js +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/index.jsx +1 -3
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/index.jsx +51 -51
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineSubjects/index.jsx +6 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewAccount/index.jsx +47 -12
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewUser/index.jsx +36 -10
- package/src/@daf/core/components/Screens/Admin/AdminModals/TransferRights/index.jsx +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Accounts.jsx +1 -0
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Dashboard.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/helper.js +22 -30
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/index.jsx +4 -3
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/index.jsx +6 -2
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/index.jsx +14 -12
- package/src/@daf/core/components/Screens/Admin/AdminTables/UserTable/index.jsx +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminTables/hook.js +3 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Edit/index.jsx +12 -9
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/index.jsx +16 -4
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/View/helpers.js +9 -17
- package/src/@daf/core/components/Screens/Admin/AdminViews/index.jsx +9 -8
- package/src/@daf/core/components/Screens/Admin/AppInvitation/index.jsx +124 -99
- package/src/@daf/hooks/useAdminDashboard.js +7 -4
- package/src/@daf/services/AdminService.js +15 -4
- package/src/@daf/services/DashboardService.js +3 -3
- package/src/@daf/utils/filters.js +13 -15
- package/src/constants/locales/en/translation.js +9 -0
- package/build/favicon.ico +0 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +0 -25
- package/build/robots.txt +0 -3
package/dist/hooks/index.js
CHANGED
|
@@ -2229,14 +2229,17 @@ class DashboardService extends BaseService {
|
|
|
2229
2229
|
isApp: true
|
|
2230
2230
|
});
|
|
2231
2231
|
}
|
|
2232
|
-
getUserGrowth(activeFilter) {
|
|
2233
|
-
|
|
2232
|
+
async getUserGrowth(activeFilter) {
|
|
2233
|
+
const {
|
|
2234
|
+
data
|
|
2235
|
+
} = await this.apiGet({
|
|
2234
2236
|
url: `/accounts/dashboard/user-growth`,
|
|
2235
2237
|
isUserManager: true,
|
|
2236
2238
|
params: {
|
|
2237
2239
|
activeFilter
|
|
2238
2240
|
}
|
|
2239
2241
|
});
|
|
2242
|
+
return data;
|
|
2240
2243
|
}
|
|
2241
2244
|
getAdminDashboard() {
|
|
2242
2245
|
return this.apiGet({
|
|
@@ -2338,14 +2341,18 @@ function useAdminDashboard({
|
|
|
2338
2341
|
setLoading(false);
|
|
2339
2342
|
}
|
|
2340
2343
|
}, [dashboardService, onError]);
|
|
2341
|
-
const fetchUserGrowth = React.useCallback(async
|
|
2344
|
+
const fetchUserGrowth = React.useCallback(async activeFilter => {
|
|
2342
2345
|
if (!dashboardService?.getUserGrowth) {
|
|
2343
2346
|
console.warn("dashboardService.getUserGrowth not provided");
|
|
2344
2347
|
return;
|
|
2345
2348
|
}
|
|
2349
|
+
if (activeFilter === undefined || activeFilter === null) {
|
|
2350
|
+
console.warn("activeFilter not provided to fetchUserGrowth");
|
|
2351
|
+
return;
|
|
2352
|
+
}
|
|
2346
2353
|
setUserGrowthDataLoading(true);
|
|
2347
2354
|
try {
|
|
2348
|
-
const response = await dashboardService.getUserGrowth(
|
|
2355
|
+
const response = await dashboardService.getUserGrowth(activeFilter);
|
|
2349
2356
|
setUserGrowthData(response || []);
|
|
2350
2357
|
} catch (err) {
|
|
2351
2358
|
if (onError) {
|
package/dist/pages/index.js
CHANGED
|
@@ -7390,14 +7390,17 @@ class DashboardService extends BaseService {
|
|
|
7390
7390
|
isApp: true
|
|
7391
7391
|
});
|
|
7392
7392
|
}
|
|
7393
|
-
getUserGrowth(activeFilter) {
|
|
7394
|
-
|
|
7393
|
+
async getUserGrowth(activeFilter) {
|
|
7394
|
+
const {
|
|
7395
|
+
data
|
|
7396
|
+
} = await this.apiGet({
|
|
7395
7397
|
url: `/accounts/dashboard/user-growth`,
|
|
7396
7398
|
isUserManager: true,
|
|
7397
7399
|
params: {
|
|
7398
7400
|
activeFilter
|
|
7399
7401
|
}
|
|
7400
7402
|
});
|
|
7403
|
+
return data;
|
|
7401
7404
|
}
|
|
7402
7405
|
getAdminDashboard() {
|
|
7403
7406
|
return this.apiGet({
|
|
@@ -51472,6 +51475,209 @@ styled__default["default"].div`
|
|
|
51472
51475
|
}
|
|
51473
51476
|
`;
|
|
51474
51477
|
|
|
51478
|
+
class AuthenticationService extends BaseService {
|
|
51479
|
+
register(form) {
|
|
51480
|
+
return this.apiPost({
|
|
51481
|
+
url: '/register',
|
|
51482
|
+
data: form
|
|
51483
|
+
});
|
|
51484
|
+
}
|
|
51485
|
+
login(username, password, firebaseToken, rest) {
|
|
51486
|
+
const headers = {
|
|
51487
|
+
CheckApplicationAccess: rest?.invited ? false : undefined
|
|
51488
|
+
};
|
|
51489
|
+
if (firebaseToken) {
|
|
51490
|
+
headers.FbToken = firebaseToken;
|
|
51491
|
+
headers.Platform = 'web';
|
|
51492
|
+
}
|
|
51493
|
+
return this.apiPost({
|
|
51494
|
+
url: rest?.invited ? '/auth/app-invitation' : '/login',
|
|
51495
|
+
data: rest?.invited ? {
|
|
51496
|
+
email: username,
|
|
51497
|
+
password,
|
|
51498
|
+
...rest,
|
|
51499
|
+
invited: undefined
|
|
51500
|
+
} : {
|
|
51501
|
+
email: username,
|
|
51502
|
+
password
|
|
51503
|
+
},
|
|
51504
|
+
headers
|
|
51505
|
+
});
|
|
51506
|
+
}
|
|
51507
|
+
updateCompany(id, data) {
|
|
51508
|
+
return this.apiPut({
|
|
51509
|
+
url: `/companies/${id}`,
|
|
51510
|
+
data,
|
|
51511
|
+
isDaf: true
|
|
51512
|
+
});
|
|
51513
|
+
}
|
|
51514
|
+
getApplications() {
|
|
51515
|
+
return this.apiGet({
|
|
51516
|
+
url: '/applications',
|
|
51517
|
+
isDaf: true
|
|
51518
|
+
});
|
|
51519
|
+
}
|
|
51520
|
+
getRegistrationData(code) {
|
|
51521
|
+
return this.apiGet({
|
|
51522
|
+
url: `requests/registration-data/${code}`,
|
|
51523
|
+
isUserManager: true
|
|
51524
|
+
});
|
|
51525
|
+
}
|
|
51526
|
+
getRegistrationOptions(data) {
|
|
51527
|
+
return this.apiPost({
|
|
51528
|
+
url: '/auth/registration-options',
|
|
51529
|
+
isDaf: true,
|
|
51530
|
+
data
|
|
51531
|
+
});
|
|
51532
|
+
}
|
|
51533
|
+
verify(code) {
|
|
51534
|
+
return this.apiGet({
|
|
51535
|
+
url: '/register/confirm',
|
|
51536
|
+
params: {
|
|
51537
|
+
token: code
|
|
51538
|
+
},
|
|
51539
|
+
isDaf: true
|
|
51540
|
+
});
|
|
51541
|
+
}
|
|
51542
|
+
exitImpersonation() {
|
|
51543
|
+
return this.apiGet({
|
|
51544
|
+
url: '/users/impersonate/exit'
|
|
51545
|
+
});
|
|
51546
|
+
}
|
|
51547
|
+
resetPasswordRequest(payload) {
|
|
51548
|
+
const lang = StorageManager.get('datastakeLng') || 'en';
|
|
51549
|
+
const req = {
|
|
51550
|
+
...payload,
|
|
51551
|
+
language: lang
|
|
51552
|
+
};
|
|
51553
|
+
return this.apiPut({
|
|
51554
|
+
url: '/profile/reset-password',
|
|
51555
|
+
data: req,
|
|
51556
|
+
headers: {
|
|
51557
|
+
Language: lang
|
|
51558
|
+
}
|
|
51559
|
+
});
|
|
51560
|
+
}
|
|
51561
|
+
changePassword(payload) {
|
|
51562
|
+
return this.apiPut({
|
|
51563
|
+
url: '/profile/change-password',
|
|
51564
|
+
data: payload
|
|
51565
|
+
});
|
|
51566
|
+
}
|
|
51567
|
+
resetPassword(payload) {
|
|
51568
|
+
return this.apiPut({
|
|
51569
|
+
url: '/forgot-password/reset',
|
|
51570
|
+
data: payload
|
|
51571
|
+
});
|
|
51572
|
+
}
|
|
51573
|
+
updateLanguage(language) {
|
|
51574
|
+
return this.apiPut({
|
|
51575
|
+
url: '/profile',
|
|
51576
|
+
data: {
|
|
51577
|
+
language
|
|
51578
|
+
}
|
|
51579
|
+
});
|
|
51580
|
+
}
|
|
51581
|
+
resendVerification() {
|
|
51582
|
+
return this.apiGet({
|
|
51583
|
+
url: '/auth/rverification'
|
|
51584
|
+
});
|
|
51585
|
+
}
|
|
51586
|
+
getInvitedUsers(id) {
|
|
51587
|
+
return this.apiGet({
|
|
51588
|
+
url: `/companies/${id}`
|
|
51589
|
+
});
|
|
51590
|
+
}
|
|
51591
|
+
inviteUser(payload, id) {
|
|
51592
|
+
if (id) {
|
|
51593
|
+
return this.apiPost({
|
|
51594
|
+
url: `/companies/${id}/invite`,
|
|
51595
|
+
data: payload
|
|
51596
|
+
});
|
|
51597
|
+
}
|
|
51598
|
+
return this.apiPost({
|
|
51599
|
+
url: '/companies/invite',
|
|
51600
|
+
data: payload
|
|
51601
|
+
});
|
|
51602
|
+
}
|
|
51603
|
+
confirmInvitation({
|
|
51604
|
+
password,
|
|
51605
|
+
mailUpdates
|
|
51606
|
+
}, token, code = {}) {
|
|
51607
|
+
return this.apiPost({
|
|
51608
|
+
url: `/register/${code.companyCode}/sub-user/${code.userCode}`,
|
|
51609
|
+
data: {
|
|
51610
|
+
password: password || '',
|
|
51611
|
+
mailUpdates
|
|
51612
|
+
},
|
|
51613
|
+
headers: token ? {
|
|
51614
|
+
Authorization: `Bearer ${token}`
|
|
51615
|
+
} : undefined
|
|
51616
|
+
});
|
|
51617
|
+
}
|
|
51618
|
+
getUserFromInvitation(code = {}) {
|
|
51619
|
+
return this.apiGet({
|
|
51620
|
+
url: `/companies/${code.companyCode}/sub-user/${code.userCode}`
|
|
51621
|
+
});
|
|
51622
|
+
}
|
|
51623
|
+
demoLogin(token) {
|
|
51624
|
+
return this.apiGet({
|
|
51625
|
+
url: `/demo/${token}`
|
|
51626
|
+
});
|
|
51627
|
+
}
|
|
51628
|
+
demoSignup(payload) {
|
|
51629
|
+
return this.apiPost({
|
|
51630
|
+
url: '/demo-signup',
|
|
51631
|
+
data: payload
|
|
51632
|
+
});
|
|
51633
|
+
}
|
|
51634
|
+
resendEmail(email) {
|
|
51635
|
+
return this.apiPost({
|
|
51636
|
+
url: `/register/resendConfirmation`,
|
|
51637
|
+
data: {
|
|
51638
|
+
email
|
|
51639
|
+
}
|
|
51640
|
+
});
|
|
51641
|
+
}
|
|
51642
|
+
editUserSettings(data = {}) {
|
|
51643
|
+
return this.apiPut({
|
|
51644
|
+
url: `/profile`,
|
|
51645
|
+
data
|
|
51646
|
+
});
|
|
51647
|
+
}
|
|
51648
|
+
editSubUser(data = {}) {
|
|
51649
|
+
return this.apiPut({
|
|
51650
|
+
url: `/users/updateRole/${data.id}`,
|
|
51651
|
+
data
|
|
51652
|
+
});
|
|
51653
|
+
}
|
|
51654
|
+
removeSubUser(companyId, userId) {
|
|
51655
|
+
return this.apiPut({
|
|
51656
|
+
url: `/companies/${companyId}/remove-user/${userId}`
|
|
51657
|
+
});
|
|
51658
|
+
}
|
|
51659
|
+
resendSubUserInvite(id) {
|
|
51660
|
+
return this.apiPost({
|
|
51661
|
+
url: `/companies/resendInvitation/${id}`
|
|
51662
|
+
});
|
|
51663
|
+
}
|
|
51664
|
+
getFormOptions({
|
|
51665
|
+
references = ['countries', 'categoriesOptions', 'subCategoriesOptions', 'locationCategoriesOptions', 'documentationTypesOptions'],
|
|
51666
|
+
language,
|
|
51667
|
+
...params
|
|
51668
|
+
}) {
|
|
51669
|
+
return this.apiPost({
|
|
51670
|
+
url: '/query/form-options',
|
|
51671
|
+
isDaf: true,
|
|
51672
|
+
data: {
|
|
51673
|
+
references,
|
|
51674
|
+
language
|
|
51675
|
+
}
|
|
51676
|
+
});
|
|
51677
|
+
}
|
|
51678
|
+
}
|
|
51679
|
+
createLazyService(AuthenticationService);
|
|
51680
|
+
|
|
51475
51681
|
class AdminService extends BaseService {
|
|
51476
51682
|
updateCompany(id, data) {
|
|
51477
51683
|
return this.apiPut({
|
|
@@ -51649,7 +51855,7 @@ class AdminService extends BaseService {
|
|
|
51649
51855
|
const type = subject === 'location' ? 'location' : 'stakeholder';
|
|
51650
51856
|
return this.apiPut({
|
|
51651
51857
|
url: `/management/subject/${type}/${id}`,
|
|
51652
|
-
data:
|
|
51858
|
+
data: data
|
|
51653
51859
|
});
|
|
51654
51860
|
}
|
|
51655
51861
|
deleteSubject({
|
|
@@ -51661,14 +51867,25 @@ class AdminService extends BaseService {
|
|
|
51661
51867
|
url: `/management/subject/${type}/${id}`
|
|
51662
51868
|
});
|
|
51663
51869
|
}
|
|
51664
|
-
getUserGrowth(activeFilter) {
|
|
51665
|
-
|
|
51870
|
+
async getUserGrowth(activeFilter) {
|
|
51871
|
+
const {
|
|
51872
|
+
data
|
|
51873
|
+
} = await this.apiGet({
|
|
51666
51874
|
url: `/accounts/dashboard/user-growth`,
|
|
51667
51875
|
isUserManager: true,
|
|
51668
51876
|
params: {
|
|
51669
51877
|
activeFilter
|
|
51670
51878
|
}
|
|
51671
51879
|
});
|
|
51880
|
+
return data;
|
|
51881
|
+
}
|
|
51882
|
+
removeUserFromAccount({
|
|
51883
|
+
accountId,
|
|
51884
|
+
userId
|
|
51885
|
+
}) {
|
|
51886
|
+
return this.apiDelete({
|
|
51887
|
+
url: `/accounts/${accountId}/users/${userId}`
|
|
51888
|
+
});
|
|
51672
51889
|
}
|
|
51673
51890
|
}
|
|
51674
51891
|
createLazyService(AdminService);
|
|
@@ -53189,209 +53406,6 @@ const ActivityLocation$1 = ({
|
|
|
53189
53406
|
});
|
|
53190
53407
|
};
|
|
53191
53408
|
|
|
53192
|
-
class AuthenticationService extends BaseService {
|
|
53193
|
-
register(form) {
|
|
53194
|
-
return this.apiPost({
|
|
53195
|
-
url: '/register',
|
|
53196
|
-
data: form
|
|
53197
|
-
});
|
|
53198
|
-
}
|
|
53199
|
-
login(username, password, firebaseToken, rest) {
|
|
53200
|
-
const headers = {
|
|
53201
|
-
CheckApplicationAccess: rest?.invited ? false : undefined
|
|
53202
|
-
};
|
|
53203
|
-
if (firebaseToken) {
|
|
53204
|
-
headers.FbToken = firebaseToken;
|
|
53205
|
-
headers.Platform = 'web';
|
|
53206
|
-
}
|
|
53207
|
-
return this.apiPost({
|
|
53208
|
-
url: rest?.invited ? '/auth/app-invitation' : '/login',
|
|
53209
|
-
data: rest?.invited ? {
|
|
53210
|
-
email: username,
|
|
53211
|
-
password,
|
|
53212
|
-
...rest,
|
|
53213
|
-
invited: undefined
|
|
53214
|
-
} : {
|
|
53215
|
-
email: username,
|
|
53216
|
-
password
|
|
53217
|
-
},
|
|
53218
|
-
headers
|
|
53219
|
-
});
|
|
53220
|
-
}
|
|
53221
|
-
updateCompany(id, data) {
|
|
53222
|
-
return this.apiPut({
|
|
53223
|
-
url: `/companies/${id}`,
|
|
53224
|
-
data,
|
|
53225
|
-
isDaf: true
|
|
53226
|
-
});
|
|
53227
|
-
}
|
|
53228
|
-
getApplications() {
|
|
53229
|
-
return this.apiGet({
|
|
53230
|
-
url: '/applications',
|
|
53231
|
-
isDaf: true
|
|
53232
|
-
});
|
|
53233
|
-
}
|
|
53234
|
-
getRegistrationData(code) {
|
|
53235
|
-
return this.apiGet({
|
|
53236
|
-
url: `requests/registration-data/${code}`,
|
|
53237
|
-
isUserManager: true
|
|
53238
|
-
});
|
|
53239
|
-
}
|
|
53240
|
-
getRegistrationOptions(data) {
|
|
53241
|
-
return this.apiPost({
|
|
53242
|
-
url: '/auth/registration-options',
|
|
53243
|
-
isDaf: true,
|
|
53244
|
-
data
|
|
53245
|
-
});
|
|
53246
|
-
}
|
|
53247
|
-
verify(code) {
|
|
53248
|
-
return this.apiGet({
|
|
53249
|
-
url: '/register/confirm',
|
|
53250
|
-
params: {
|
|
53251
|
-
token: code
|
|
53252
|
-
},
|
|
53253
|
-
isDaf: true
|
|
53254
|
-
});
|
|
53255
|
-
}
|
|
53256
|
-
exitImpersonation() {
|
|
53257
|
-
return this.apiGet({
|
|
53258
|
-
url: '/users/impersonate/exit'
|
|
53259
|
-
});
|
|
53260
|
-
}
|
|
53261
|
-
resetPasswordRequest(payload) {
|
|
53262
|
-
const lang = StorageManager.get('datastakeLng') || 'en';
|
|
53263
|
-
const req = {
|
|
53264
|
-
...payload,
|
|
53265
|
-
language: lang
|
|
53266
|
-
};
|
|
53267
|
-
return this.apiPut({
|
|
53268
|
-
url: '/profile/reset-password',
|
|
53269
|
-
data: req,
|
|
53270
|
-
headers: {
|
|
53271
|
-
Language: lang
|
|
53272
|
-
}
|
|
53273
|
-
});
|
|
53274
|
-
}
|
|
53275
|
-
changePassword(payload) {
|
|
53276
|
-
return this.apiPut({
|
|
53277
|
-
url: '/profile/change-password',
|
|
53278
|
-
data: payload
|
|
53279
|
-
});
|
|
53280
|
-
}
|
|
53281
|
-
resetPassword(payload) {
|
|
53282
|
-
return this.apiPut({
|
|
53283
|
-
url: '/forgot-password/reset',
|
|
53284
|
-
data: payload
|
|
53285
|
-
});
|
|
53286
|
-
}
|
|
53287
|
-
updateLanguage(language) {
|
|
53288
|
-
return this.apiPut({
|
|
53289
|
-
url: '/profile',
|
|
53290
|
-
data: {
|
|
53291
|
-
language
|
|
53292
|
-
}
|
|
53293
|
-
});
|
|
53294
|
-
}
|
|
53295
|
-
resendVerification() {
|
|
53296
|
-
return this.apiGet({
|
|
53297
|
-
url: '/auth/rverification'
|
|
53298
|
-
});
|
|
53299
|
-
}
|
|
53300
|
-
getInvitedUsers(id) {
|
|
53301
|
-
return this.apiGet({
|
|
53302
|
-
url: `/companies/${id}`
|
|
53303
|
-
});
|
|
53304
|
-
}
|
|
53305
|
-
inviteUser(payload, id) {
|
|
53306
|
-
if (id) {
|
|
53307
|
-
return this.apiPost({
|
|
53308
|
-
url: `/companies/${id}/invite`,
|
|
53309
|
-
data: payload
|
|
53310
|
-
});
|
|
53311
|
-
}
|
|
53312
|
-
return this.apiPost({
|
|
53313
|
-
url: '/companies/invite',
|
|
53314
|
-
data: payload
|
|
53315
|
-
});
|
|
53316
|
-
}
|
|
53317
|
-
confirmInvitation({
|
|
53318
|
-
password,
|
|
53319
|
-
mailUpdates
|
|
53320
|
-
}, token, code = {}) {
|
|
53321
|
-
return this.apiPost({
|
|
53322
|
-
url: `/register/${code.companyCode}/sub-user/${code.userCode}`,
|
|
53323
|
-
data: {
|
|
53324
|
-
password: password || '',
|
|
53325
|
-
mailUpdates
|
|
53326
|
-
},
|
|
53327
|
-
headers: token ? {
|
|
53328
|
-
Authorization: `Bearer ${token}`
|
|
53329
|
-
} : undefined
|
|
53330
|
-
});
|
|
53331
|
-
}
|
|
53332
|
-
getUserFromInvitation(code = {}) {
|
|
53333
|
-
return this.apiGet({
|
|
53334
|
-
url: `/companies/${code.companyCode}/sub-user/${code.userCode}`
|
|
53335
|
-
});
|
|
53336
|
-
}
|
|
53337
|
-
demoLogin(token) {
|
|
53338
|
-
return this.apiGet({
|
|
53339
|
-
url: `/demo/${token}`
|
|
53340
|
-
});
|
|
53341
|
-
}
|
|
53342
|
-
demoSignup(payload) {
|
|
53343
|
-
return this.apiPost({
|
|
53344
|
-
url: '/demo-signup',
|
|
53345
|
-
data: payload
|
|
53346
|
-
});
|
|
53347
|
-
}
|
|
53348
|
-
resendEmail(email) {
|
|
53349
|
-
return this.apiPost({
|
|
53350
|
-
url: `/register/resendConfirmation`,
|
|
53351
|
-
data: {
|
|
53352
|
-
email
|
|
53353
|
-
}
|
|
53354
|
-
});
|
|
53355
|
-
}
|
|
53356
|
-
editUserSettings(data = {}) {
|
|
53357
|
-
return this.apiPut({
|
|
53358
|
-
url: `/profile`,
|
|
53359
|
-
data
|
|
53360
|
-
});
|
|
53361
|
-
}
|
|
53362
|
-
editSubUser(data = {}) {
|
|
53363
|
-
return this.apiPut({
|
|
53364
|
-
url: `/users/updateRole/${data.id}`,
|
|
53365
|
-
data
|
|
53366
|
-
});
|
|
53367
|
-
}
|
|
53368
|
-
removeSubUser(companyId, userId) {
|
|
53369
|
-
return this.apiPut({
|
|
53370
|
-
url: `/companies/${companyId}/remove-user/${userId}`
|
|
53371
|
-
});
|
|
53372
|
-
}
|
|
53373
|
-
resendSubUserInvite(id) {
|
|
53374
|
-
return this.apiPost({
|
|
53375
|
-
url: `/companies/resendInvitation/${id}`
|
|
53376
|
-
});
|
|
53377
|
-
}
|
|
53378
|
-
getFormOptions({
|
|
53379
|
-
references = ['countries', 'categoriesOptions', 'subCategoriesOptions', 'locationCategoriesOptions', 'documentationTypesOptions'],
|
|
53380
|
-
language,
|
|
53381
|
-
...params
|
|
53382
|
-
}) {
|
|
53383
|
-
return this.apiPost({
|
|
53384
|
-
url: '/query/form-options',
|
|
53385
|
-
isDaf: true,
|
|
53386
|
-
data: {
|
|
53387
|
-
references,
|
|
53388
|
-
language
|
|
53389
|
-
}
|
|
53390
|
-
});
|
|
53391
|
-
}
|
|
53392
|
-
}
|
|
53393
|
-
createLazyService(AuthenticationService);
|
|
53394
|
-
|
|
53395
53409
|
class NotificationService extends BaseService {
|
|
53396
53410
|
get({
|
|
53397
53411
|
status = 'unread'
|
package/dist/services/index.js
CHANGED
|
@@ -934,7 +934,7 @@ class AdminService extends BaseService {
|
|
|
934
934
|
const type = subject === 'location' ? 'location' : 'stakeholder';
|
|
935
935
|
return this.apiPut({
|
|
936
936
|
url: `/management/subject/${type}/${id}`,
|
|
937
|
-
data:
|
|
937
|
+
data: data
|
|
938
938
|
});
|
|
939
939
|
}
|
|
940
940
|
deleteSubject({
|
|
@@ -946,14 +946,25 @@ class AdminService extends BaseService {
|
|
|
946
946
|
url: `/management/subject/${type}/${id}`
|
|
947
947
|
});
|
|
948
948
|
}
|
|
949
|
-
getUserGrowth(activeFilter) {
|
|
950
|
-
|
|
949
|
+
async getUserGrowth(activeFilter) {
|
|
950
|
+
const {
|
|
951
|
+
data
|
|
952
|
+
} = await this.apiGet({
|
|
951
953
|
url: `/accounts/dashboard/user-growth`,
|
|
952
954
|
isUserManager: true,
|
|
953
955
|
params: {
|
|
954
956
|
activeFilter
|
|
955
957
|
}
|
|
956
958
|
});
|
|
959
|
+
return data;
|
|
960
|
+
}
|
|
961
|
+
removeUserFromAccount({
|
|
962
|
+
accountId,
|
|
963
|
+
userId
|
|
964
|
+
}) {
|
|
965
|
+
return this.apiDelete({
|
|
966
|
+
url: `/accounts/${accountId}/users/${userId}`
|
|
967
|
+
});
|
|
957
968
|
}
|
|
958
969
|
}
|
|
959
970
|
var AdminService$1 = createLazyService(AdminService);
|
|
@@ -1405,14 +1416,17 @@ class DashboardService extends BaseService {
|
|
|
1405
1416
|
isApp: true
|
|
1406
1417
|
});
|
|
1407
1418
|
}
|
|
1408
|
-
getUserGrowth(activeFilter) {
|
|
1409
|
-
|
|
1419
|
+
async getUserGrowth(activeFilter) {
|
|
1420
|
+
const {
|
|
1421
|
+
data
|
|
1422
|
+
} = await this.apiGet({
|
|
1410
1423
|
url: `/accounts/dashboard/user-growth`,
|
|
1411
1424
|
isUserManager: true,
|
|
1412
1425
|
params: {
|
|
1413
1426
|
activeFilter
|
|
1414
1427
|
}
|
|
1415
1428
|
});
|
|
1429
|
+
return data;
|
|
1416
1430
|
}
|
|
1417
1431
|
getAdminDashboard() {
|
|
1418
1432
|
return this.apiGet({
|
package/dist/utils/index.js
CHANGED
|
@@ -7554,14 +7554,15 @@ const getDefaultActiveFilters = (params, selectFiltersConfig, defaultPageSize, d
|
|
|
7554
7554
|
});
|
|
7555
7555
|
return o;
|
|
7556
7556
|
};
|
|
7557
|
+
const NEW_PAGINATION_APPS = ["nashiriki"];
|
|
7557
7558
|
const filterParams = (value, module) => {
|
|
7558
7559
|
const {
|
|
7559
7560
|
activeFilters,
|
|
7560
7561
|
...rest
|
|
7561
7562
|
} = value;
|
|
7562
7563
|
const {
|
|
7563
|
-
page
|
|
7564
|
-
pageSize
|
|
7564
|
+
page,
|
|
7565
|
+
pageSize,
|
|
7565
7566
|
sortDir,
|
|
7566
7567
|
sortBy,
|
|
7567
7568
|
search,
|
|
@@ -7570,10 +7571,9 @@ const filterParams = (value, module) => {
|
|
|
7570
7571
|
} = activeFilters || {};
|
|
7571
7572
|
const params = {};
|
|
7572
7573
|
params.pagination = JSON.stringify({
|
|
7573
|
-
page,
|
|
7574
|
-
pageSize
|
|
7574
|
+
[NEW_PAGINATION_APPS.includes(module) ? "skip" : "page"]: page,
|
|
7575
|
+
[NEW_PAGINATION_APPS.includes(module) ? "take" : "pageSize"]: pageSize
|
|
7575
7576
|
});
|
|
7576
|
-
params.filters = JSON.stringify(filters);
|
|
7577
7577
|
if (search && searchParams) {
|
|
7578
7578
|
params.search = JSON.stringify({
|
|
7579
7579
|
qs: search,
|
|
@@ -7586,6 +7586,16 @@ const filterParams = (value, module) => {
|
|
|
7586
7586
|
by: sortBy
|
|
7587
7587
|
});
|
|
7588
7588
|
}
|
|
7589
|
+
if (Object.keys(filters).length) {
|
|
7590
|
+
if (value.sourceId && value.sourceId === "overview") {
|
|
7591
|
+
params.filters = JSON.stringify(filters);
|
|
7592
|
+
} else {
|
|
7593
|
+
params.filters = JSON.stringify({
|
|
7594
|
+
...filters,
|
|
7595
|
+
authorId: undefined
|
|
7596
|
+
});
|
|
7597
|
+
}
|
|
7598
|
+
}
|
|
7589
7599
|
return {
|
|
7590
7600
|
...rest,
|
|
7591
7601
|
...params
|
|
@@ -7790,6 +7800,15 @@ function getRedirectPath(user, fallback = '', app, isDatastake) {
|
|
|
7790
7800
|
}
|
|
7791
7801
|
|
|
7792
7802
|
const en = {
|
|
7803
|
+
"edit-account": "Edit Account",
|
|
7804
|
+
"Are-you-sure-you-want-to-remove-the-user-from-this-account?": "Are you sure you want to remove the user from this account?",
|
|
7805
|
+
"The-user-will-lose-access-to-the-application-and-to-all-data-created-for-this-account.": "The user will lose access to the application and to all data created for this account.",
|
|
7806
|
+
"merge": "Merge",
|
|
7807
|
+
"Are-you-sure-you-want-to-suspend-this-account?": "Are you sure you want to suspend this account?",
|
|
7808
|
+
"Associated-users-will-lose-access-to-the-application-and-to-all-data-created-for-this-account.": "Associated users will lose access to the application and to all data created for this account.",
|
|
7809
|
+
"current_subjects": "Current Subjects",
|
|
7810
|
+
"merged_output": "Merged Output",
|
|
7811
|
+
"merge-subjects": "Merge Subjects",
|
|
7793
7812
|
"All Data": "All Data",
|
|
7794
7813
|
"sbg-admin::remove-user-title": "Remove User Title",
|
|
7795
7814
|
"sbg-admin::remove-user-body": "Remove User Body",
|
package/package.json
CHANGED
|
@@ -13,13 +13,20 @@ function AuthForm ({
|
|
|
13
13
|
errors,
|
|
14
14
|
t = (key) => key,
|
|
15
15
|
executeRecaptcha = () => {},
|
|
16
|
-
getCurrentStep = () => {}
|
|
16
|
+
getCurrentStep = () => {},
|
|
17
|
+
theme,
|
|
17
18
|
}){
|
|
18
19
|
const [formInstance] = Form.useForm(form);
|
|
19
20
|
const [currentStep, setCurrentStep] = useState(0);
|
|
20
21
|
const [allFormValues, setAllFormValues] = useState(initialValues);
|
|
21
22
|
const [formErrors, setFormErrors] = useState(null);
|
|
22
23
|
|
|
24
|
+
const buttonStyle = theme?.colorPrimary ? {
|
|
25
|
+
backgroundColor: theme.colorPrimary,
|
|
26
|
+
borderColor: theme.colorPrimary,
|
|
27
|
+
} : {};
|
|
28
|
+
|
|
29
|
+
|
|
23
30
|
const isMultiStep = !!steps;
|
|
24
31
|
const currentFields = isMultiStep ? steps?.[currentStep]?.fields : fields || [];
|
|
25
32
|
|
|
@@ -166,6 +173,7 @@ function AuthForm ({
|
|
|
166
173
|
name: field.name,
|
|
167
174
|
label: field.label,
|
|
168
175
|
rules: field.rules,
|
|
176
|
+
dependencies: field.dependencies,
|
|
169
177
|
style: { marginBottom: 0 }
|
|
170
178
|
};
|
|
171
179
|
if (field.valuePropName && field.type !== 'select') {
|
|
@@ -217,6 +225,7 @@ function AuthForm ({
|
|
|
217
225
|
htmlType="submit"
|
|
218
226
|
disabled={isLastStep && !allFieldsFilled}
|
|
219
227
|
block className="normal-br"
|
|
228
|
+
style={buttonStyle}
|
|
220
229
|
>
|
|
221
230
|
{isLastStep ? submitText : t("Next")}
|
|
222
231
|
</BorderedButton>
|
|
@@ -225,14 +234,14 @@ function AuthForm ({
|
|
|
225
234
|
}}
|
|
226
235
|
</Form.Item>
|
|
227
236
|
<div className="buttons" style={{ marginTop: 0}}>
|
|
228
|
-
<BorderedButton onClick={prev} block className="normal-br">
|
|
237
|
+
<BorderedButton onClick={prev} block className="normal-br" style={buttonStyle}>
|
|
229
238
|
{t("Back")}
|
|
230
239
|
</BorderedButton>
|
|
231
240
|
</div>
|
|
232
241
|
</div>
|
|
233
242
|
) : (
|
|
234
243
|
<div className="buttons" style={{ marginTop: isMultiStep ? '16px' : 0}}>
|
|
235
|
-
<BorderedButton type="primary" htmlType="submit" block className="normal-br">
|
|
244
|
+
<BorderedButton type="primary" htmlType="submit" block className="normal-br" style={buttonStyle}>
|
|
236
245
|
{isMultiStep ? t("Next") : submitText}
|
|
237
246
|
</BorderedButton>
|
|
238
247
|
</div>
|