datastake-daf 0.6.809 → 0.6.810
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/build/favicon.ico +0 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +25 -0
- package/build/robots.txt +3 -0
- package/dist/components/index.js +215 -527
- package/dist/hooks/index.js +4 -11
- package/dist/pages/index.js +228 -224
- package/dist/services/index.js +5 -19
- package/dist/utils/index.js +5 -24
- package/package.json +1 -1
- package/src/@daf/core/components/AuthForm/index.jsx +3 -12
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/index.jsx +1 -0
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/hook.js +1 -0
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/index.jsx +3 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/index.jsx +51 -51
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineSubjects/index.jsx +1 -6
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewAccount/index.jsx +12 -47
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewUser/index.jsx +10 -36
- package/src/@daf/core/components/Screens/Admin/AdminModals/TransferRights/index.jsx +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Accounts.jsx +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Dashboard.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/helper.js +30 -22
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/index.jsx +3 -4
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/index.jsx +2 -6
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/index.jsx +12 -14
- package/src/@daf/core/components/Screens/Admin/AdminTables/UserTable/index.jsx +1 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/hook.js +0 -3
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Edit/index.jsx +9 -12
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/index.jsx +4 -16
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/View/helpers.js +17 -9
- package/src/@daf/core/components/Screens/Admin/AdminViews/index.jsx +8 -9
- package/src/@daf/core/components/Screens/Admin/AppInvitation/index.jsx +99 -124
- package/src/@daf/hooks/useAdminDashboard.js +4 -7
- package/src/@daf/pages/Locations/MineSite/columns.js +18 -1
- package/src/@daf/pages/Locations/MineSite/config.js +2 -2
- package/src/@daf/services/AdminService.js +4 -15
- package/src/@daf/services/DashboardService.js +3 -3
- package/src/@daf/utils/filters.js +15 -13
- package/src/constants/locales/en/translation.js +0 -9
package/dist/hooks/index.js
CHANGED
|
@@ -2229,17 +2229,14 @@ class DashboardService extends BaseService {
|
|
|
2229
2229
|
isApp: true
|
|
2230
2230
|
});
|
|
2231
2231
|
}
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
data
|
|
2235
|
-
} = await this.apiGet({
|
|
2232
|
+
getUserGrowth(activeFilter) {
|
|
2233
|
+
return this.apiGet({
|
|
2236
2234
|
url: `/accounts/dashboard/user-growth`,
|
|
2237
2235
|
isUserManager: true,
|
|
2238
2236
|
params: {
|
|
2239
2237
|
activeFilter
|
|
2240
2238
|
}
|
|
2241
2239
|
});
|
|
2242
|
-
return data;
|
|
2243
2240
|
}
|
|
2244
2241
|
getAdminDashboard() {
|
|
2245
2242
|
return this.apiGet({
|
|
@@ -2341,18 +2338,14 @@ function useAdminDashboard({
|
|
|
2341
2338
|
setLoading(false);
|
|
2342
2339
|
}
|
|
2343
2340
|
}, [dashboardService, onError]);
|
|
2344
|
-
const fetchUserGrowth = React.useCallback(async
|
|
2341
|
+
const fetchUserGrowth = React.useCallback(async params => {
|
|
2345
2342
|
if (!dashboardService?.getUserGrowth) {
|
|
2346
2343
|
console.warn("dashboardService.getUserGrowth not provided");
|
|
2347
2344
|
return;
|
|
2348
2345
|
}
|
|
2349
|
-
if (activeFilter === undefined || activeFilter === null) {
|
|
2350
|
-
console.warn("activeFilter not provided to fetchUserGrowth");
|
|
2351
|
-
return;
|
|
2352
|
-
}
|
|
2353
2346
|
setUserGrowthDataLoading(true);
|
|
2354
2347
|
try {
|
|
2355
|
-
const response = await dashboardService.getUserGrowth(
|
|
2348
|
+
const response = await dashboardService.getUserGrowth(params);
|
|
2356
2349
|
setUserGrowthData(response || []);
|
|
2357
2350
|
} catch (err) {
|
|
2358
2351
|
if (onError) {
|
package/dist/pages/index.js
CHANGED
|
@@ -7390,17 +7390,14 @@ class DashboardService extends BaseService {
|
|
|
7390
7390
|
isApp: true
|
|
7391
7391
|
});
|
|
7392
7392
|
}
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
data
|
|
7396
|
-
} = await this.apiGet({
|
|
7393
|
+
getUserGrowth(activeFilter) {
|
|
7394
|
+
return this.apiGet({
|
|
7397
7395
|
url: `/accounts/dashboard/user-growth`,
|
|
7398
7396
|
isUserManager: true,
|
|
7399
7397
|
params: {
|
|
7400
7398
|
activeFilter
|
|
7401
7399
|
}
|
|
7402
7400
|
});
|
|
7403
|
-
return data;
|
|
7404
7401
|
}
|
|
7405
7402
|
getAdminDashboard() {
|
|
7406
7403
|
return this.apiGet({
|
|
@@ -43834,8 +43831,8 @@ const getFiltersConfig$3 = ({
|
|
|
43834
43831
|
},
|
|
43835
43832
|
category: {
|
|
43836
43833
|
type: 'select',
|
|
43837
|
-
label: '
|
|
43838
|
-
placeholder: () => `${t('Filter by')} ${t('
|
|
43834
|
+
label: 'Category',
|
|
43835
|
+
placeholder: () => `${t('Filter by')} ${t('Category').toLowerCase()}`,
|
|
43839
43836
|
style: {
|
|
43840
43837
|
flex: 1
|
|
43841
43838
|
},
|
|
@@ -44007,6 +44004,24 @@ const getColumns$5 = ({
|
|
|
44007
44004
|
children: v
|
|
44008
44005
|
});
|
|
44009
44006
|
}
|
|
44007
|
+
}, {
|
|
44008
|
+
dataIndex: 'category',
|
|
44009
|
+
title: t('Category'),
|
|
44010
|
+
ellipsis: true,
|
|
44011
|
+
show: true,
|
|
44012
|
+
render: (v, all) => {
|
|
44013
|
+
if (all.empty) {
|
|
44014
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44015
|
+
className: "daf-default-cell"
|
|
44016
|
+
});
|
|
44017
|
+
}
|
|
44018
|
+
const locationCategories = [...(data?.options?.locationCategories || []), ...(options?.productionSiteCategories || [])];
|
|
44019
|
+
const category = findOptions(v, locationCategories);
|
|
44020
|
+
return category ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44021
|
+
title: category,
|
|
44022
|
+
children: category
|
|
44023
|
+
}) : '-';
|
|
44024
|
+
}
|
|
44010
44025
|
}, {
|
|
44011
44026
|
dataIndex: 'region',
|
|
44012
44027
|
title: findOptions(user?.company?.country, options?.administrativeLevel1)?.length > 2 ? findOptions(user?.company?.country, options?.administrativeLevel1) : t("Province"),
|
|
@@ -51475,209 +51490,6 @@ styled__default["default"].div`
|
|
|
51475
51490
|
}
|
|
51476
51491
|
`;
|
|
51477
51492
|
|
|
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
|
-
|
|
51681
51493
|
class AdminService extends BaseService {
|
|
51682
51494
|
updateCompany(id, data) {
|
|
51683
51495
|
return this.apiPut({
|
|
@@ -51855,7 +51667,7 @@ class AdminService extends BaseService {
|
|
|
51855
51667
|
const type = subject === 'location' ? 'location' : 'stakeholder';
|
|
51856
51668
|
return this.apiPut({
|
|
51857
51669
|
url: `/management/subject/${type}/${id}`,
|
|
51858
|
-
data: data
|
|
51670
|
+
data: filterCreateData(data)
|
|
51859
51671
|
});
|
|
51860
51672
|
}
|
|
51861
51673
|
deleteSubject({
|
|
@@ -51867,25 +51679,14 @@ class AdminService extends BaseService {
|
|
|
51867
51679
|
url: `/management/subject/${type}/${id}`
|
|
51868
51680
|
});
|
|
51869
51681
|
}
|
|
51870
|
-
|
|
51871
|
-
|
|
51872
|
-
data
|
|
51873
|
-
} = await this.apiGet({
|
|
51682
|
+
getUserGrowth(activeFilter) {
|
|
51683
|
+
return this.apiGet({
|
|
51874
51684
|
url: `/accounts/dashboard/user-growth`,
|
|
51875
51685
|
isUserManager: true,
|
|
51876
51686
|
params: {
|
|
51877
51687
|
activeFilter
|
|
51878
51688
|
}
|
|
51879
51689
|
});
|
|
51880
|
-
return data;
|
|
51881
|
-
}
|
|
51882
|
-
removeUserFromAccount({
|
|
51883
|
-
accountId,
|
|
51884
|
-
userId
|
|
51885
|
-
}) {
|
|
51886
|
-
return this.apiDelete({
|
|
51887
|
-
url: `/accounts/${accountId}/users/${userId}`
|
|
51888
|
-
});
|
|
51889
51690
|
}
|
|
51890
51691
|
}
|
|
51891
51692
|
createLazyService(AdminService);
|
|
@@ -53406,6 +53207,209 @@ const ActivityLocation$1 = ({
|
|
|
53406
53207
|
});
|
|
53407
53208
|
};
|
|
53408
53209
|
|
|
53210
|
+
class AuthenticationService extends BaseService {
|
|
53211
|
+
register(form) {
|
|
53212
|
+
return this.apiPost({
|
|
53213
|
+
url: '/register',
|
|
53214
|
+
data: form
|
|
53215
|
+
});
|
|
53216
|
+
}
|
|
53217
|
+
login(username, password, firebaseToken, rest) {
|
|
53218
|
+
const headers = {
|
|
53219
|
+
CheckApplicationAccess: rest?.invited ? false : undefined
|
|
53220
|
+
};
|
|
53221
|
+
if (firebaseToken) {
|
|
53222
|
+
headers.FbToken = firebaseToken;
|
|
53223
|
+
headers.Platform = 'web';
|
|
53224
|
+
}
|
|
53225
|
+
return this.apiPost({
|
|
53226
|
+
url: rest?.invited ? '/auth/app-invitation' : '/login',
|
|
53227
|
+
data: rest?.invited ? {
|
|
53228
|
+
email: username,
|
|
53229
|
+
password,
|
|
53230
|
+
...rest,
|
|
53231
|
+
invited: undefined
|
|
53232
|
+
} : {
|
|
53233
|
+
email: username,
|
|
53234
|
+
password
|
|
53235
|
+
},
|
|
53236
|
+
headers
|
|
53237
|
+
});
|
|
53238
|
+
}
|
|
53239
|
+
updateCompany(id, data) {
|
|
53240
|
+
return this.apiPut({
|
|
53241
|
+
url: `/companies/${id}`,
|
|
53242
|
+
data,
|
|
53243
|
+
isDaf: true
|
|
53244
|
+
});
|
|
53245
|
+
}
|
|
53246
|
+
getApplications() {
|
|
53247
|
+
return this.apiGet({
|
|
53248
|
+
url: '/applications',
|
|
53249
|
+
isDaf: true
|
|
53250
|
+
});
|
|
53251
|
+
}
|
|
53252
|
+
getRegistrationData(code) {
|
|
53253
|
+
return this.apiGet({
|
|
53254
|
+
url: `requests/registration-data/${code}`,
|
|
53255
|
+
isUserManager: true
|
|
53256
|
+
});
|
|
53257
|
+
}
|
|
53258
|
+
getRegistrationOptions(data) {
|
|
53259
|
+
return this.apiPost({
|
|
53260
|
+
url: '/auth/registration-options',
|
|
53261
|
+
isDaf: true,
|
|
53262
|
+
data
|
|
53263
|
+
});
|
|
53264
|
+
}
|
|
53265
|
+
verify(code) {
|
|
53266
|
+
return this.apiGet({
|
|
53267
|
+
url: '/register/confirm',
|
|
53268
|
+
params: {
|
|
53269
|
+
token: code
|
|
53270
|
+
},
|
|
53271
|
+
isDaf: true
|
|
53272
|
+
});
|
|
53273
|
+
}
|
|
53274
|
+
exitImpersonation() {
|
|
53275
|
+
return this.apiGet({
|
|
53276
|
+
url: '/users/impersonate/exit'
|
|
53277
|
+
});
|
|
53278
|
+
}
|
|
53279
|
+
resetPasswordRequest(payload) {
|
|
53280
|
+
const lang = StorageManager.get('datastakeLng') || 'en';
|
|
53281
|
+
const req = {
|
|
53282
|
+
...payload,
|
|
53283
|
+
language: lang
|
|
53284
|
+
};
|
|
53285
|
+
return this.apiPut({
|
|
53286
|
+
url: '/profile/reset-password',
|
|
53287
|
+
data: req,
|
|
53288
|
+
headers: {
|
|
53289
|
+
Language: lang
|
|
53290
|
+
}
|
|
53291
|
+
});
|
|
53292
|
+
}
|
|
53293
|
+
changePassword(payload) {
|
|
53294
|
+
return this.apiPut({
|
|
53295
|
+
url: '/profile/change-password',
|
|
53296
|
+
data: payload
|
|
53297
|
+
});
|
|
53298
|
+
}
|
|
53299
|
+
resetPassword(payload) {
|
|
53300
|
+
return this.apiPut({
|
|
53301
|
+
url: '/forgot-password/reset',
|
|
53302
|
+
data: payload
|
|
53303
|
+
});
|
|
53304
|
+
}
|
|
53305
|
+
updateLanguage(language) {
|
|
53306
|
+
return this.apiPut({
|
|
53307
|
+
url: '/profile',
|
|
53308
|
+
data: {
|
|
53309
|
+
language
|
|
53310
|
+
}
|
|
53311
|
+
});
|
|
53312
|
+
}
|
|
53313
|
+
resendVerification() {
|
|
53314
|
+
return this.apiGet({
|
|
53315
|
+
url: '/auth/rverification'
|
|
53316
|
+
});
|
|
53317
|
+
}
|
|
53318
|
+
getInvitedUsers(id) {
|
|
53319
|
+
return this.apiGet({
|
|
53320
|
+
url: `/companies/${id}`
|
|
53321
|
+
});
|
|
53322
|
+
}
|
|
53323
|
+
inviteUser(payload, id) {
|
|
53324
|
+
if (id) {
|
|
53325
|
+
return this.apiPost({
|
|
53326
|
+
url: `/companies/${id}/invite`,
|
|
53327
|
+
data: payload
|
|
53328
|
+
});
|
|
53329
|
+
}
|
|
53330
|
+
return this.apiPost({
|
|
53331
|
+
url: '/companies/invite',
|
|
53332
|
+
data: payload
|
|
53333
|
+
});
|
|
53334
|
+
}
|
|
53335
|
+
confirmInvitation({
|
|
53336
|
+
password,
|
|
53337
|
+
mailUpdates
|
|
53338
|
+
}, token, code = {}) {
|
|
53339
|
+
return this.apiPost({
|
|
53340
|
+
url: `/register/${code.companyCode}/sub-user/${code.userCode}`,
|
|
53341
|
+
data: {
|
|
53342
|
+
password: password || '',
|
|
53343
|
+
mailUpdates
|
|
53344
|
+
},
|
|
53345
|
+
headers: token ? {
|
|
53346
|
+
Authorization: `Bearer ${token}`
|
|
53347
|
+
} : undefined
|
|
53348
|
+
});
|
|
53349
|
+
}
|
|
53350
|
+
getUserFromInvitation(code = {}) {
|
|
53351
|
+
return this.apiGet({
|
|
53352
|
+
url: `/companies/${code.companyCode}/sub-user/${code.userCode}`
|
|
53353
|
+
});
|
|
53354
|
+
}
|
|
53355
|
+
demoLogin(token) {
|
|
53356
|
+
return this.apiGet({
|
|
53357
|
+
url: `/demo/${token}`
|
|
53358
|
+
});
|
|
53359
|
+
}
|
|
53360
|
+
demoSignup(payload) {
|
|
53361
|
+
return this.apiPost({
|
|
53362
|
+
url: '/demo-signup',
|
|
53363
|
+
data: payload
|
|
53364
|
+
});
|
|
53365
|
+
}
|
|
53366
|
+
resendEmail(email) {
|
|
53367
|
+
return this.apiPost({
|
|
53368
|
+
url: `/register/resendConfirmation`,
|
|
53369
|
+
data: {
|
|
53370
|
+
email
|
|
53371
|
+
}
|
|
53372
|
+
});
|
|
53373
|
+
}
|
|
53374
|
+
editUserSettings(data = {}) {
|
|
53375
|
+
return this.apiPut({
|
|
53376
|
+
url: `/profile`,
|
|
53377
|
+
data
|
|
53378
|
+
});
|
|
53379
|
+
}
|
|
53380
|
+
editSubUser(data = {}) {
|
|
53381
|
+
return this.apiPut({
|
|
53382
|
+
url: `/users/updateRole/${data.id}`,
|
|
53383
|
+
data
|
|
53384
|
+
});
|
|
53385
|
+
}
|
|
53386
|
+
removeSubUser(companyId, userId) {
|
|
53387
|
+
return this.apiPut({
|
|
53388
|
+
url: `/companies/${companyId}/remove-user/${userId}`
|
|
53389
|
+
});
|
|
53390
|
+
}
|
|
53391
|
+
resendSubUserInvite(id) {
|
|
53392
|
+
return this.apiPost({
|
|
53393
|
+
url: `/companies/resendInvitation/${id}`
|
|
53394
|
+
});
|
|
53395
|
+
}
|
|
53396
|
+
getFormOptions({
|
|
53397
|
+
references = ['countries', 'categoriesOptions', 'subCategoriesOptions', 'locationCategoriesOptions', 'documentationTypesOptions'],
|
|
53398
|
+
language,
|
|
53399
|
+
...params
|
|
53400
|
+
}) {
|
|
53401
|
+
return this.apiPost({
|
|
53402
|
+
url: '/query/form-options',
|
|
53403
|
+
isDaf: true,
|
|
53404
|
+
data: {
|
|
53405
|
+
references,
|
|
53406
|
+
language
|
|
53407
|
+
}
|
|
53408
|
+
});
|
|
53409
|
+
}
|
|
53410
|
+
}
|
|
53411
|
+
createLazyService(AuthenticationService);
|
|
53412
|
+
|
|
53409
53413
|
class NotificationService extends BaseService {
|
|
53410
53414
|
get({
|
|
53411
53415
|
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: data
|
|
937
|
+
data: filterCreateData(data)
|
|
938
938
|
});
|
|
939
939
|
}
|
|
940
940
|
deleteSubject({
|
|
@@ -946,25 +946,14 @@ class AdminService extends BaseService {
|
|
|
946
946
|
url: `/management/subject/${type}/${id}`
|
|
947
947
|
});
|
|
948
948
|
}
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
data
|
|
952
|
-
} = await this.apiGet({
|
|
949
|
+
getUserGrowth(activeFilter) {
|
|
950
|
+
return this.apiGet({
|
|
953
951
|
url: `/accounts/dashboard/user-growth`,
|
|
954
952
|
isUserManager: true,
|
|
955
953
|
params: {
|
|
956
954
|
activeFilter
|
|
957
955
|
}
|
|
958
956
|
});
|
|
959
|
-
return data;
|
|
960
|
-
}
|
|
961
|
-
removeUserFromAccount({
|
|
962
|
-
accountId,
|
|
963
|
-
userId
|
|
964
|
-
}) {
|
|
965
|
-
return this.apiDelete({
|
|
966
|
-
url: `/accounts/${accountId}/users/${userId}`
|
|
967
|
-
});
|
|
968
957
|
}
|
|
969
958
|
}
|
|
970
959
|
var AdminService$1 = createLazyService(AdminService);
|
|
@@ -1416,17 +1405,14 @@ class DashboardService extends BaseService {
|
|
|
1416
1405
|
isApp: true
|
|
1417
1406
|
});
|
|
1418
1407
|
}
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
data
|
|
1422
|
-
} = await this.apiGet({
|
|
1408
|
+
getUserGrowth(activeFilter) {
|
|
1409
|
+
return this.apiGet({
|
|
1423
1410
|
url: `/accounts/dashboard/user-growth`,
|
|
1424
1411
|
isUserManager: true,
|
|
1425
1412
|
params: {
|
|
1426
1413
|
activeFilter
|
|
1427
1414
|
}
|
|
1428
1415
|
});
|
|
1429
|
-
return data;
|
|
1430
1416
|
}
|
|
1431
1417
|
getAdminDashboard() {
|
|
1432
1418
|
return this.apiGet({
|
package/dist/utils/index.js
CHANGED
|
@@ -7554,15 +7554,14 @@ const getDefaultActiveFilters = (params, selectFiltersConfig, defaultPageSize, d
|
|
|
7554
7554
|
});
|
|
7555
7555
|
return o;
|
|
7556
7556
|
};
|
|
7557
|
-
const NEW_PAGINATION_APPS = ["nashiriki"];
|
|
7558
7557
|
const filterParams = (value, module) => {
|
|
7559
7558
|
const {
|
|
7560
7559
|
activeFilters,
|
|
7561
7560
|
...rest
|
|
7562
7561
|
} = value;
|
|
7563
7562
|
const {
|
|
7564
|
-
page,
|
|
7565
|
-
pageSize,
|
|
7563
|
+
page = 1,
|
|
7564
|
+
pageSize = 20,
|
|
7566
7565
|
sortDir,
|
|
7567
7566
|
sortBy,
|
|
7568
7567
|
search,
|
|
@@ -7571,9 +7570,10 @@ const filterParams = (value, module) => {
|
|
|
7571
7570
|
} = activeFilters || {};
|
|
7572
7571
|
const params = {};
|
|
7573
7572
|
params.pagination = JSON.stringify({
|
|
7574
|
-
|
|
7575
|
-
|
|
7573
|
+
page,
|
|
7574
|
+
pageSize
|
|
7576
7575
|
});
|
|
7576
|
+
params.filters = JSON.stringify(filters);
|
|
7577
7577
|
if (search && searchParams) {
|
|
7578
7578
|
params.search = JSON.stringify({
|
|
7579
7579
|
qs: search,
|
|
@@ -7586,16 +7586,6 @@ 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
|
-
}
|
|
7599
7589
|
return {
|
|
7600
7590
|
...rest,
|
|
7601
7591
|
...params
|
|
@@ -7800,15 +7790,6 @@ function getRedirectPath(user, fallback = '', app, isDatastake) {
|
|
|
7800
7790
|
}
|
|
7801
7791
|
|
|
7802
7792
|
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",
|
|
7812
7793
|
"All Data": "All Data",
|
|
7813
7794
|
"sbg-admin::remove-user-title": "Remove User Title",
|
|
7814
7795
|
"sbg-admin::remove-user-body": "Remove User Body",
|