datastake-daf 0.6.819 → 0.6.821
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 +2264 -1099
- package/dist/hooks/index.js +16 -5
- package/dist/pages/index.js +251 -65
- package/dist/services/index.js +104 -9
- package/dist/utils/index.js +75 -8
- package/package.json +1 -1
- package/src/@daf/core/components/AuthForm/index.jsx +12 -3
- package/src/@daf/core/components/DynamicForm/_index.scss +1 -3
- package/src/@daf/core/components/EditForm/_index.scss +0 -4
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/hook.js +27 -1
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/index.jsx +2 -3
- 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/AdminDashboard/components/UserStatistics/index.jsx +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/AddAccount/index.jsx +82 -10
- 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 +53 -31
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewUser/index.jsx +36 -10
- package/src/@daf/core/components/Screens/Admin/AdminModals/TransferRights/index.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Accounts.jsx +37 -10
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Dashboard.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Documents.jsx +81 -0
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Events.jsx +77 -0
- package/src/@daf/core/components/Screens/Admin/AdminScreens/index.js +2 -1
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/helper.js +22 -30
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/index.jsx +28 -16
- package/src/@daf/core/components/Screens/Admin/AdminTables/DocumentsTable/column.js +93 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/DocumentsTable/helper.js +43 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/DocumentsTable/index.jsx +201 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/EventsTable/column.js +113 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/EventsTable/helper.js +58 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/EventsTable/index.jsx +176 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/helper.js +3 -6
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/index.jsx +17 -2
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/helper.js +3 -6
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/index.jsx +27 -13
- package/src/@daf/core/components/Screens/Admin/AdminTables/UserTable/index.jsx +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminTables/components/index.jsx +4 -2
- package/src/@daf/core/components/Screens/Admin/AdminTables/hook.js +3 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Edit/index.jsx +21 -9
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/helper.js +16 -11
- 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 +12 -16
- package/src/@daf/core/components/Screens/Admin/AppInvitation/index.jsx +124 -99
- package/src/@daf/core/components/Screens/Admin/adminRoutes.js +44 -28
- package/src/@daf/hooks/useAdminDashboard.js +7 -4
- package/src/@daf/hooks/useSources.js +2 -1
- package/src/@daf/pages/Events/columns.js +15 -3
- package/src/@daf/pages/Locations/MineSite/columns.js +18 -1
- package/src/@daf/pages/TablePage/columns.js +2 -0
- package/src/@daf/pages/TablePage/hook.js +0 -2
- package/src/@daf/pages/View/hooks/useViewActions.js +13 -0
- package/src/@daf/pages/View/hooks/useViewPermissions.js +16 -0
- package/src/@daf/pages/View/index.jsx +32 -4
- package/src/@daf/services/AdminService.js +80 -8
- package/src/@daf/services/DashboardService.js +3 -3
- package/src/@daf/utils/filters.js +13 -15
- package/src/constants/locales/en/translation.js +24 -4
- package/src/constants/locales/fr/translation.js +17 -0
- package/src/constants/locales/sp/translation.js +28 -7
- package/src/helpers/copyToClipboard.js +60 -0
- package/src/@daf/core/components/Screens/Admin/AdminScreens/SubjectsView.jsx +0 -395
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditLocation/configTransformer.js +0 -137
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditLocation/index.js +0 -9
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditLocation/index.jsx +0 -196
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditStakeholder/configTransformer.js +0 -216
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditStakeholder/index.js +0 -7
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditStakeholder/index.jsx +0 -184
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/config.js +0 -64
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/helpers.js +0 -10
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/index.jsx +0 -77
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/config.js +0 -51
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/helpers.js +0 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/index.jsx +0 -76
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { useMemo, useState, useEffect } from 'react'
|
|
1
|
+
import React, { useMemo, useState, useEffect, useCallback } from 'react'
|
|
2
2
|
import { useViewUrlParams } from './hooks/useViewUrlParams.js'
|
|
3
3
|
import { usePrepareForm } from './hooks/usePrepareForm.js'
|
|
4
4
|
import { useViewPermissions } from './hooks/useViewPermissions.js'
|
|
5
5
|
import { useSubmitSubject } from './hooks/useSubmitSubject.js'
|
|
6
6
|
import { useCallToGetData } from './hooks/useCallToGetData.js'
|
|
7
7
|
import { useViewActions } from './hooks/useViewActions.js'
|
|
8
|
-
|
|
8
|
+
import AdminService from '../../services/AdminService.js'
|
|
9
9
|
import { groupSubsections } from '../../../@daf/core/components/ViewForm/helper.js'
|
|
10
10
|
import Loading from '../../../@daf/core/components/Loading/index.jsx'
|
|
11
11
|
import Header from '../../../@daf/core/components/Header/index.jsx'
|
|
@@ -14,7 +14,8 @@ import ViewFormNavigation from '../../../@daf/core/components/ViewForm/navigatio
|
|
|
14
14
|
import ViewForm from '../../../@daf/core/components/ViewForm/content.jsx'
|
|
15
15
|
import Records from '../../../@daf/core/components/ViewForm/components/Records/index.jsx'
|
|
16
16
|
import { Template } from '../Template/index.jsx'
|
|
17
|
-
|
|
17
|
+
import {message} from 'antd'
|
|
18
|
+
import { handleError } from '../../services/ErrorService.js'
|
|
18
19
|
const View = ({
|
|
19
20
|
push,
|
|
20
21
|
getRedirectLink,
|
|
@@ -54,6 +55,8 @@ const View = ({
|
|
|
54
55
|
}) => {
|
|
55
56
|
const getNamespaceConfig = (namespace) => namespaceConfiguration?.[namespace] || {};
|
|
56
57
|
const [openRecordsModal, setOpenRecordsModal] = useState(false);
|
|
58
|
+
|
|
59
|
+
console.log({partners})
|
|
57
60
|
|
|
58
61
|
// HANDLES THE URL PARAMS FOR THE VIEW PAGE
|
|
59
62
|
const {
|
|
@@ -102,7 +105,7 @@ const View = ({
|
|
|
102
105
|
viewConfig,
|
|
103
106
|
});
|
|
104
107
|
|
|
105
|
-
const { canEdit, isSupported } = useViewPermissions({
|
|
108
|
+
const { canEdit, isSupported, canDelete } = useViewPermissions({
|
|
106
109
|
data,
|
|
107
110
|
id,
|
|
108
111
|
namespace,
|
|
@@ -132,6 +135,28 @@ const View = ({
|
|
|
132
135
|
serviceMap,
|
|
133
136
|
});
|
|
134
137
|
|
|
138
|
+
|
|
139
|
+
const subjects = {
|
|
140
|
+
"management-location": "location",
|
|
141
|
+
"management-stakeholder": "stakeholder",
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
const handleDeleteSubject = useCallback(async () => {
|
|
146
|
+
try {
|
|
147
|
+
await AdminService.deleteSubject({
|
|
148
|
+
subject: subjects[namespace],
|
|
149
|
+
id: id,
|
|
150
|
+
});
|
|
151
|
+
message.success(t("Subject deleted successfully"));
|
|
152
|
+
push(getRedirectLink(`/app/management/subject/${subjects[namespace]}`));
|
|
153
|
+
} catch (error) {
|
|
154
|
+
handleError(error);
|
|
155
|
+
message.error(t("Failed to delete subject"));
|
|
156
|
+
}
|
|
157
|
+
}, [namespace, id, t, push, getRedirectLink]);
|
|
158
|
+
|
|
159
|
+
|
|
135
160
|
const { pageActions, extraPageActions } = useViewActions({
|
|
136
161
|
namespace,
|
|
137
162
|
data,
|
|
@@ -149,6 +174,8 @@ const View = ({
|
|
|
149
174
|
t,
|
|
150
175
|
viewConfig,
|
|
151
176
|
buttonActions,
|
|
177
|
+
canDelete,
|
|
178
|
+
deleteSubject: handleDeleteSubject
|
|
152
179
|
});
|
|
153
180
|
|
|
154
181
|
useEffect(() => {
|
|
@@ -196,6 +223,7 @@ const View = ({
|
|
|
196
223
|
}, [namespace, match, data]);
|
|
197
224
|
|
|
198
225
|
const sourceOptions = useMemo(() => {
|
|
226
|
+
if(!partners ) return [];
|
|
199
227
|
return partners.map((partner) => {
|
|
200
228
|
const isOwnData = partner.id === user?.company?.id;
|
|
201
229
|
|
|
@@ -17,6 +17,8 @@ class AdminService extends BaseService {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
|
|
21
|
+
|
|
20
22
|
inviteCompanyAccount({ companyId, data }) {
|
|
21
23
|
return this.apiPost({
|
|
22
24
|
url: `/accounts/${companyId}/invite`,
|
|
@@ -24,6 +26,21 @@ class AdminService extends BaseService {
|
|
|
24
26
|
})
|
|
25
27
|
}
|
|
26
28
|
|
|
29
|
+
resendInvitation({invitationToken
|
|
30
|
+
}){
|
|
31
|
+
return this.apiPost({
|
|
32
|
+
url: `/accounts/resendInvitation/${invitationToken}`,
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
copyInvitation({invitationToken
|
|
37
|
+
}){
|
|
38
|
+
return this.apiPost({
|
|
39
|
+
url: `/accounts/copyInvitation/${invitationToken}`,
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
27
44
|
inviteAccount(data) {
|
|
28
45
|
return this.apiPost({
|
|
29
46
|
url: `/accounts/inviteAccount`,
|
|
@@ -38,7 +55,14 @@ class AdminService extends BaseService {
|
|
|
38
55
|
})
|
|
39
56
|
}
|
|
40
57
|
|
|
41
|
-
updateAccount({ data, id }) {
|
|
58
|
+
updateAccount({ data, id, isPending=false }) {
|
|
59
|
+
if (isPending) {
|
|
60
|
+
return this.apiPut({
|
|
61
|
+
data,
|
|
62
|
+
url: `/accounts/invitation/${id}`,
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
|
|
42
66
|
return this.apiPut({
|
|
43
67
|
data,
|
|
44
68
|
url: `/accounts/${id}`,
|
|
@@ -51,9 +75,11 @@ class AdminService extends BaseService {
|
|
|
51
75
|
})
|
|
52
76
|
}
|
|
53
77
|
|
|
54
|
-
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
transferAdmin({ companyId, userId }) {
|
|
55
81
|
return this.apiPut({
|
|
56
|
-
url: `/
|
|
82
|
+
url: `/companies/${companyId}/transfer-rights`,
|
|
57
83
|
data: { userId },
|
|
58
84
|
})
|
|
59
85
|
}
|
|
@@ -147,7 +173,43 @@ class AdminService extends BaseService {
|
|
|
147
173
|
url: `/management/subject/${subject}/${id}`,
|
|
148
174
|
});
|
|
149
175
|
}
|
|
176
|
+
|
|
177
|
+
getItems({ item }) {
|
|
178
|
+
return this.apiGet({
|
|
179
|
+
url: `/management/items/${item}`,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
getItemForm({ item ,scope="create"}) {
|
|
183
|
+
return this.apiGet({
|
|
184
|
+
url: `/forms/${item}`,
|
|
185
|
+
params: { scope },
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
getItemData({ item, id }) {
|
|
190
|
+
return this.apiGet({
|
|
191
|
+
url: `/management/item/${item}/${id}`,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
deleteItem({ item, id }) {
|
|
196
|
+
return this.apiDelete({
|
|
197
|
+
url: `/management/item/${item}/${id}`,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
150
200
|
|
|
201
|
+
updateItem({ item, id, data }) {
|
|
202
|
+
return this.apiPut({
|
|
203
|
+
url: `/management/item/${item}/${id}`,
|
|
204
|
+
data,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
viewItem({ item, id }) {
|
|
209
|
+
return this.apiGet({
|
|
210
|
+
url: `/management/item/${item}/${id}`,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
151
213
|
|
|
152
214
|
viewLocation({ id }) {
|
|
153
215
|
return this.apiGet({
|
|
@@ -166,7 +228,7 @@ class AdminService extends BaseService {
|
|
|
166
228
|
const type = subject === 'location' ? 'location' : 'stakeholder';
|
|
167
229
|
return this.apiPut({
|
|
168
230
|
url: `/management/subject/${type}/${id}`,
|
|
169
|
-
data:
|
|
231
|
+
data: data,
|
|
170
232
|
});
|
|
171
233
|
}
|
|
172
234
|
|
|
@@ -177,15 +239,25 @@ class AdminService extends BaseService {
|
|
|
177
239
|
});
|
|
178
240
|
}
|
|
179
241
|
|
|
180
|
-
getUserGrowth(activeFilter) {
|
|
181
|
-
|
|
242
|
+
async getUserGrowth(activeFilter) {
|
|
243
|
+
const { data } = await this.apiGet({
|
|
182
244
|
url: `/accounts/dashboard/user-growth`,
|
|
183
245
|
isUserManager: true,
|
|
184
246
|
params: { activeFilter },
|
|
185
247
|
});
|
|
248
|
+
return data;
|
|
186
249
|
}
|
|
187
250
|
|
|
188
|
-
|
|
251
|
+
removeUserFromAccount({ accountId, userId }) {
|
|
252
|
+
return this.apiPut({
|
|
253
|
+
url: `/companies/${accountId}/remove-user/${userId}`,
|
|
254
|
+
})
|
|
255
|
+
}
|
|
256
|
+
getTopContributors({ params }) {
|
|
257
|
+
return this.apiGet({
|
|
258
|
+
url: `/accounts/dashboard/top-contributors`,
|
|
259
|
+
params,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
189
262
|
}
|
|
190
|
-
|
|
191
263
|
export default createLazyService(AdminService);
|
|
@@ -9,13 +9,13 @@ class DashboardService extends BaseService {
|
|
|
9
9
|
isApp: true,
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return this.apiGet({
|
|
12
|
+
async getUserGrowth(activeFilter) {
|
|
13
|
+
const { data } = await this.apiGet({
|
|
15
14
|
url: `/accounts/dashboard/user-growth`,
|
|
16
15
|
isUserManager: true,
|
|
17
16
|
params: { activeFilter },
|
|
18
17
|
});
|
|
18
|
+
return data;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
getAdminDashboard() {
|
|
@@ -63,29 +63,19 @@ export const getDefaultActiveFilters = (
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
const NEW_PAGINATION_APPS = ["nashiriki"];
|
|
66
|
-
|
|
67
66
|
export const filterParams = (value, module) => {
|
|
68
67
|
const { activeFilters, ...rest } = value;
|
|
69
68
|
|
|
70
|
-
const {
|
|
71
|
-
|
|
72
|
-
pageSize = 20,
|
|
73
|
-
sortDir,
|
|
74
|
-
sortBy,
|
|
75
|
-
search,
|
|
76
|
-
searchParams,
|
|
77
|
-
...filters
|
|
78
|
-
} = activeFilters || {};
|
|
69
|
+
const { page, pageSize, sortDir, sortBy, search, searchParams, ...filters } =
|
|
70
|
+
activeFilters || {};
|
|
79
71
|
|
|
80
72
|
const params = {};
|
|
81
|
-
|
|
73
|
+
|
|
82
74
|
params.pagination = JSON.stringify({
|
|
83
|
-
page,
|
|
84
|
-
pageSize,
|
|
75
|
+
[NEW_PAGINATION_APPS.includes(module) ? "skip" : "page"]: page,
|
|
76
|
+
[NEW_PAGINATION_APPS.includes(module) ? "take" : "pageSize"]: pageSize,
|
|
85
77
|
});
|
|
86
78
|
|
|
87
|
-
params.filters = JSON.stringify(filters);
|
|
88
|
-
|
|
89
79
|
if (search && searchParams) {
|
|
90
80
|
params.search = JSON.stringify({
|
|
91
81
|
qs: search,
|
|
@@ -100,6 +90,14 @@ export const filterParams = (value, module) => {
|
|
|
100
90
|
});
|
|
101
91
|
}
|
|
102
92
|
|
|
93
|
+
if (Object.keys(filters).length) {
|
|
94
|
+
if (value.sourceId && value.sourceId === "overview") {
|
|
95
|
+
params.filters = JSON.stringify(filters);
|
|
96
|
+
} else {
|
|
97
|
+
params.filters = JSON.stringify({ ...filters, authorId: undefined });
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
103
101
|
return { ...rest, ...params };
|
|
104
102
|
};
|
|
105
103
|
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
const en = {
|
|
2
|
+
"admin::events": "Events",
|
|
3
|
+
"admin::Deleted": "Deleted",
|
|
4
|
+
"admin::document": "Documents",
|
|
5
|
+
"events": "Events",
|
|
6
|
+
"merge-locations": "Merge Locations",
|
|
7
|
+
"edit-account": "Edit Account",
|
|
8
|
+
"Are-you-sure-you-want-to-remove-the-user-from-this-account?": "Are you sure you want to remove the user from this account?",
|
|
9
|
+
"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.",
|
|
10
|
+
"merge": "Merge",
|
|
11
|
+
"add-new": "Add new",
|
|
12
|
+
"sbg-admin::remove-user-body":
|
|
13
|
+
"The user will lose access to the application and to all data created for this account.",
|
|
14
|
+
"Are-you-sure-you-want-to-suspend-this-account?": "Are you sure you want to suspend this account?",
|
|
15
|
+
"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.",
|
|
16
|
+
"current_subjects": "Current Subjects",
|
|
17
|
+
"merged_output": "Merged Output",
|
|
18
|
+
"merge-subjects": "Merge Subjects",
|
|
2
19
|
"All Data": "All Data",
|
|
3
|
-
"sbg-admin::remove-user-title":"
|
|
4
|
-
"sbg-admin::remove-user-body":"
|
|
20
|
+
"sbg-admin::remove-user-title":"Are you sure you want to remove the user from this account?",
|
|
21
|
+
"sbg-admin::remove-user-body":"The user will lose access to the application and to all data created for this account.",
|
|
5
22
|
"Administrative-level-1": "Administrative Level 1",
|
|
6
23
|
"Administrative-level-2": "Administrative Level 2",
|
|
7
24
|
"merge-output": "Merge Output",
|
|
@@ -1430,6 +1447,7 @@ const en = {
|
|
|
1430
1447
|
FB00006: "Account successfully activated",
|
|
1431
1448
|
FB00007:
|
|
1432
1449
|
"Make sure that this has been properly communicated, as the account admin holds critical user management privileges.",
|
|
1450
|
+
MD0004: "Are you sure you want to remove this user from this account?",
|
|
1433
1451
|
admin: {
|
|
1434
1452
|
"merge-subjects": "Merge Subjects",
|
|
1435
1453
|
"events": "Events",
|
|
@@ -1459,13 +1477,15 @@ const en = {
|
|
|
1459
1477
|
"reactivate-content":
|
|
1460
1478
|
"All associated users will be able to access the application.",
|
|
1461
1479
|
"transfer-admin-rights": "Transfer admin rights",
|
|
1480
|
+
"transfer-account-admin-rights": "Transfer Account Admin Rights",
|
|
1462
1481
|
"remove-user-from-acc": "Remove user from account",
|
|
1463
1482
|
"remove-user-title":
|
|
1464
1483
|
"Are you sure you want to remove the user from this account?",
|
|
1465
|
-
|
|
1466
|
-
"The user will lose access to the application and to all data created for this account.",
|
|
1484
|
+
|
|
1467
1485
|
"curr-admin": "Current Admin",
|
|
1468
1486
|
"new-admin": "New Admin",
|
|
1487
|
+
"role-after-transfer": "Your New Role",
|
|
1488
|
+
"role-after-transfer-help": "After transferring admin rights, you will be assigned this role",
|
|
1469
1489
|
"new-user": "New User",
|
|
1470
1490
|
"add-user": "Add User",
|
|
1471
1491
|
"edit-user": "Edit User",
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
const fr = {
|
|
2
|
+
"admin::events": "Événements",
|
|
3
|
+
"admin::document": "Documents",
|
|
4
|
+
"events": "Événements",
|
|
5
|
+
"admin::Deleted": "Supprimé",
|
|
6
|
+
"stakeholders": "Parties prenantes",
|
|
7
|
+
"merge-locations": "Fusionner les lieux",
|
|
8
|
+
"edit-account": "Modifier le compte",
|
|
9
|
+
"Are-you-sure-you-want-to-remove-the-user-from-this-account?": "Êtes-vous sûr de vouloir retirer l'utilisateur de ce compte ?",
|
|
10
|
+
"The-user-will-lose-access-to-the-application-and-to-all-data-created-for-this-account.": "L'utilisateur perdra l'accès à l'application et à toutes les données créées pour ce compte.",
|
|
11
|
+
"merge": "Fusionner",
|
|
12
|
+
"Are-you-sure-you-want-to-suspend-this-account?": "Êtes-vous sûr de vouloir suspendre ce compte ?",
|
|
13
|
+
"Associated-users-will-lose-access-to-the-application-and-to-all-data-created-for-this-account.": "Les utilisateurs associés perdront l'accès à l'application et à toutes les données créées pour ce compte.",
|
|
14
|
+
"current_subjects": "Sujets actuels",
|
|
15
|
+
"merged_output": "Résultat fusionné",
|
|
16
|
+
"merge-subjects": "Fusionner les sujets",
|
|
17
|
+
"FB00007": "Assurez-vous que cela a été correctement communiqué, car l’administrateur du compte détient des privilèges critiques de gestion des utilisateurs.",
|
|
18
|
+
"add-new": "Ajouter un nouveau",
|
|
2
19
|
"All Data": "Toutes les données",
|
|
3
20
|
"Site": "Site",
|
|
4
21
|
"Production Sites": "Sites de production",
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
const sp = {
|
|
2
|
+
"admin::events": "Eventos",
|
|
3
|
+
"admin::document": "Documentos",
|
|
4
|
+
"events": "Eventos",
|
|
5
|
+
"admin::Deleted": "Eliminado",
|
|
6
|
+
"stakeholders": "Partes interesadas",
|
|
7
|
+
"merge-locations": "Fusionar ubicaciones",
|
|
8
|
+
"edit-account": "Editar cuenta",
|
|
9
|
+
"Are-you-sure-you-want-to-remove-the-user-from-this-account?": "¿Está seguro de que desea eliminar al usuario de esta cuenta?",
|
|
10
|
+
"The-user-will-lose-access-to-the-application-and-to-all-data-created-for-this-account.": "El usuario perderá el acceso a la aplicación y a todos los datos creados para esta cuenta.",
|
|
11
|
+
"merge": "Fusionar",
|
|
12
|
+
"FB00007": "Asegúrese de que esto se haya comunicado correctamente, ya que el administrador de la cuenta tiene privilegios críticos de gestión de usuarios.",
|
|
13
|
+
"Custodian":"Custodio",
|
|
14
|
+
"add-new": "Añadir nuevo",
|
|
15
|
+
"Are-you-sure-you-want-to-suspend-this-account?": "¿Está seguro de que desea suspender esta cuenta?",
|
|
16
|
+
"Associated-users-will-lose-access-to-the-application-and-to-all-data-created-for-this-account.": "Los usuarios asociados perderán el acceso a la aplicación y a todos los datos creados para esta cuenta.",
|
|
17
|
+
"current_subjects": "Sujetos actuales",
|
|
18
|
+
"merged_output": "Resultado fusionado",
|
|
19
|
+
"merge-subjects": "Fusionar sujetos",
|
|
2
20
|
"All Data": "Todos los datos",
|
|
3
21
|
"Site": "Sitio",
|
|
4
22
|
"Production Sites": "Centros de producción",
|
|
@@ -202,7 +220,7 @@ const sp = {
|
|
|
202
220
|
"Added On": "Agregado en",
|
|
203
221
|
"KYC information has not provided": "La información KYC no ha sido proporcionada",
|
|
204
222
|
"KYC information has been submitted but is incomplete": "La información KYC ha sido enviada pero está incompleta",
|
|
205
|
-
"Although this criterion was assessed as fully compliant, it includes expired documentation."
|
|
223
|
+
"Although this criterion was assessed as fully compliant, it includes expired documentation.": "A pesar que este criterio se evaluó como cumplido, incluye documentación con fechas de vencimiento expiradas",
|
|
206
224
|
"No planning required": "No se requiere planeación",
|
|
207
225
|
"Not Compliant 0%": "No Cumple 0%",
|
|
208
226
|
"In Progress 25% ": "En Proceso 25% ",
|
|
@@ -241,8 +259,8 @@ const sp = {
|
|
|
241
259
|
"Number of Workers": "Número de trabajadores",
|
|
242
260
|
"Sites": "Centros",
|
|
243
261
|
"Site Details": "Datos del centro",
|
|
244
|
-
"Delete Information"
|
|
245
|
-
"Are you sure you want to delete this information"
|
|
262
|
+
"Delete Information": "Borrar información",
|
|
263
|
+
"Are you sure you want to delete this information": "¿Está seguro de que desea eliminar esta información?",
|
|
246
264
|
"Edit site": "Modificar centro",
|
|
247
265
|
"City": "Ciudad",
|
|
248
266
|
"Stakeholders": "Interesados",
|
|
@@ -1936,11 +1954,14 @@ const sp = {
|
|
|
1936
1954
|
"reactivate-title": "¿Está seguro de que desea reactivar esta cuenta?",
|
|
1937
1955
|
"reactivate-content": "Todos los usuarios asociados podrán acceder a la aplicación.",
|
|
1938
1956
|
"transfer-admin-rights": "Transferir derechos de administrador",
|
|
1957
|
+
"transfer-account-admin-rights": "Transferir Derechos de Administrador de Cuenta",
|
|
1939
1958
|
"remove-user-from-acc": "Eliminar usuario de la cuenta",
|
|
1940
1959
|
"remove-user-title": "¿Está seguro de que desea eliminar al usuario de esta cuenta?",
|
|
1941
1960
|
"remove-user-body": "El usuario perderá el acceso a la aplicación y a todos los datos creados para esta cuenta.",
|
|
1942
1961
|
"curr-admin": "Administrador Actual",
|
|
1943
1962
|
"new-admin": "Nuevo Administrador",
|
|
1963
|
+
"role-after-transfer": "Su Nuevo Rol",
|
|
1964
|
+
"role-after-transfer-help": "Después de transferir los derechos de administrador, se le asignará este rol",
|
|
1944
1965
|
"add-user": "Añadir Usuario",
|
|
1945
1966
|
"edit-user": "Editar Usuario",
|
|
1946
1967
|
"edit-account": "Editar Cuenta",
|
|
@@ -1952,10 +1973,10 @@ const sp = {
|
|
|
1952
1973
|
"new-account": "Nueva Cuenta",
|
|
1953
1974
|
"add-user-to-acc": "Añadir Usuario a la Cuenta",
|
|
1954
1975
|
"cancel-inv-title": "¿Está seguro de que desea cancelar esta invitación?",
|
|
1955
|
-
"users"
|
|
1956
|
-
"account"
|
|
1957
|
-
'subjects'
|
|
1958
|
-
"key-indicators"
|
|
1976
|
+
"users": "Usuarios",
|
|
1977
|
+
"account": "Cuenta",
|
|
1978
|
+
'subjects': "Temas",
|
|
1979
|
+
"key-indicators": "Indicadores Clave",
|
|
1959
1980
|
},
|
|
1960
1981
|
}
|
|
1961
1982
|
|
|
@@ -41,3 +41,63 @@ export const copyToClipboard = (id) => {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Copies a string directly to the clipboard.
|
|
47
|
+
*
|
|
48
|
+
* This function takes a string and copies it to the clipboard.
|
|
49
|
+
* It handles browser compatibility issues between IE and modern browsers.
|
|
50
|
+
*
|
|
51
|
+
* @param {string} text - The string to copy to clipboard
|
|
52
|
+
* @returns {Promise<boolean>} - Returns true if copying succeeded, false otherwise
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* copyStringToClipboard('Text to copy'); // Copies "Text to copy" to clipboard
|
|
56
|
+
*/
|
|
57
|
+
export const copyStringToClipboard = async (text) => {
|
|
58
|
+
if (!text) {
|
|
59
|
+
console.warn("No text provided to copy");
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Try modern Clipboard API first
|
|
64
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
65
|
+
try {
|
|
66
|
+
await navigator.clipboard.writeText(text);
|
|
67
|
+
return true;
|
|
68
|
+
} catch (ex) {
|
|
69
|
+
console.warn("Clipboard API failed, trying fallback:", ex);
|
|
70
|
+
// Fall through to fallback methods
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Fallback for older browsers or when Clipboard API fails
|
|
75
|
+
if (window.clipboardData && window.clipboardData.setData) {
|
|
76
|
+
// IE: prevent textarea being shown while dialog is visible
|
|
77
|
+
return window.clipboardData.setData("Text", text);
|
|
78
|
+
} else if (document.queryCommandSupported &&
|
|
79
|
+
document.queryCommandSupported("copy")) {
|
|
80
|
+
var textarea = document.createElement("textarea");
|
|
81
|
+
textarea.textContent = text;
|
|
82
|
+
// Prevent scrolling to bottom of page in MS Edge
|
|
83
|
+
textarea.style.position = "fixed";
|
|
84
|
+
textarea.style.opacity = "0";
|
|
85
|
+
textarea.style.left = "-9999px";
|
|
86
|
+
document.body.appendChild(textarea);
|
|
87
|
+
textarea.select();
|
|
88
|
+
try {
|
|
89
|
+
// Security exception may be thrown by some browsers
|
|
90
|
+
const success = document.execCommand("copy");
|
|
91
|
+
return success;
|
|
92
|
+
} catch (ex) {
|
|
93
|
+
console.warn("Copy to clipboard failed.", ex);
|
|
94
|
+
return false;
|
|
95
|
+
} finally {
|
|
96
|
+
document.body.removeChild(textarea);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|