datastake-daf 0.6.798 → 0.6.799
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 +3158 -985
- package/dist/context/index.js +6 -6
- package/dist/pages/index.js +252 -13
- package/dist/services/index.js +112 -9
- package/dist/utils/index.js +14 -17
- package/package.json +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/hook.js +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/index.jsx +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/hook.js +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/index.jsx +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/AddUser/index.jsx +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/columns.js +79 -0
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/helper.js +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/index.jsx +18 -8
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineSubjects/index.jsx +6 -6
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewAccount/index.jsx +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewUser/index.jsx +61 -38
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Accounts.jsx +1 -4
- package/src/@daf/core/components/Screens/Admin/AdminScreens/AccountsView.jsx +2 -0
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Dashboard.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Location.jsx +6 -7
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Subjects.jsx +2 -3
- package/src/@daf/core/components/Screens/Admin/AdminScreens/SubjectsView.jsx +395 -0
- package/src/@daf/core/components/Screens/Admin/AdminScreens/index.js +1 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/index.jsx +1 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/column.js +223 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/helper.js +65 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/index.jsx +73 -45
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/columns.js +37 -37
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/index.jsx +48 -22
- package/src/@daf/core/components/Screens/Admin/AdminTables/UserTable/index.jsx +1 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditLocation/configTransformer.js +137 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditLocation/index.js +9 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditLocation/index.jsx +196 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditStakeholder/configTransformer.js +216 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditStakeholder/index.js +7 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditStakeholder/index.jsx +184 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/config.js +64 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/helpers.js +13 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/index.jsx +77 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/config.js +51 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/helpers.js +0 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/index.jsx +75 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Edit/index.jsx +7 -1
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/SidebarMenu/index.jsx +5 -3
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/helper.js +13 -8
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/index.jsx +16 -10
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/View/index.jsx +2 -1
- package/src/@daf/core/components/Screens/Admin/AdminViews/index.jsx +66 -26
- package/src/@daf/core/components/Screens/Admin/AppInvitation/index.jsx +193 -0
- package/src/@daf/core/components/Screens/Admin/adminRoutes.js +81 -2
- package/src/@daf/layouts/AppLayout/index.jsx +0 -1
- package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/columns.js +180 -0
- package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/config.js +0 -0
- package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/index.jsx +27 -0
- package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/columns.js +157 -0
- package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/config.js +31 -0
- package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/index.js +77 -0
- package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/columns.js +117 -0
- package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/index.jsx +54 -0
- package/src/@daf/pages/SelfAssesment/index.jsx +0 -0
- package/src/@daf/pages/View/hooks/usePrepareForm.js +11 -1
- package/src/@daf/pages/View/index.jsx +13 -2
- package/src/@daf/services/AdminService.js +111 -7
- package/src/@daf/services/AuthenticationService.js +1 -0
- package/src/@daf/services/DashboardService.js +2 -1
- package/src/@daf/utils/filters.js +15 -13
- package/src/constants/locales/en/translation.js +7 -0
- package/src/constants/locales/fr/translation.js +1 -1
- package/src/constants/locales/sp/translation.js +1 -1
- package/src/index.js +1 -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
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip, Tag } from 'antd';
|
|
3
|
+
import { findOptions } from '../../../../helpers/StringHelper.js';
|
|
4
|
+
import { renderDateFormatted } from '../../../../helpers/Forms.js';
|
|
5
|
+
import NavigationAction from '../../../core/components/Table/NavigationAction/index.jsx';
|
|
6
|
+
import AvatarGroup from '../../../core/components/AvatarGroup/index.jsx';
|
|
7
|
+
import sourceAvatarConfig from '../../../../helpers/sourceAvatarConfig.js';
|
|
8
|
+
import { renderStatusTag } from '../../../utils/tags.js';
|
|
9
|
+
|
|
10
|
+
export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data, applications}) => [
|
|
11
|
+
{
|
|
12
|
+
dataIndex: 'datastakeId',
|
|
13
|
+
title: t('ID'),
|
|
14
|
+
ellipsis: true,
|
|
15
|
+
show: true,
|
|
16
|
+
render: (v, all) => {
|
|
17
|
+
if (all.empty) {
|
|
18
|
+
return <div className="daf-default-cell" />
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return <Tooltip title={v}>{v}</Tooltip>;
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
dataIndex: 'name',
|
|
26
|
+
title: t('Name'),
|
|
27
|
+
ellipsis: true,
|
|
28
|
+
show: true,
|
|
29
|
+
render: (v, all) => {
|
|
30
|
+
if (all.empty) {
|
|
31
|
+
return <div className="daf-default-cell" />
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return <Tooltip title={v}>{v}</Tooltip>;
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
dataIndex: 'category',
|
|
39
|
+
title: t('Type'),
|
|
40
|
+
ellipsis: true,
|
|
41
|
+
show: true,
|
|
42
|
+
render: (v, all) => {
|
|
43
|
+
if (all.empty) {
|
|
44
|
+
return <div className="daf-default-cell" />
|
|
45
|
+
}
|
|
46
|
+
const category = findOptions(v, options?.locationCategories);
|
|
47
|
+
|
|
48
|
+
return <Tooltip title={category}>{category}</Tooltip>;
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
dataIndex: 'region',
|
|
53
|
+
title: t('Region'),
|
|
54
|
+
ellipsis: true,
|
|
55
|
+
show: true,
|
|
56
|
+
render: (v, all) => {
|
|
57
|
+
if (all.empty) {
|
|
58
|
+
return <div className="daf-default-cell" />
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const region = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
|
|
62
|
+
|
|
63
|
+
return region ? <Tooltip title={region}>{region}</Tooltip> : '-';
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
dataIndex: 'district',
|
|
68
|
+
title: t('District'),
|
|
69
|
+
ellipsis: true,
|
|
70
|
+
show: true,
|
|
71
|
+
render: (v, all) => {
|
|
72
|
+
if (all.empty) {
|
|
73
|
+
return <div className="daf-default-cell" />
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const district = getLinkValue(all?.administrativeLevel2, all?.linking?.SCL);
|
|
77
|
+
|
|
78
|
+
return district ? <Tooltip title={district}>{district}</Tooltip> : '-';
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: t("Last Update"),
|
|
83
|
+
dataIndex: "updatedAt",
|
|
84
|
+
key: "updatedAt",
|
|
85
|
+
width: 125,
|
|
86
|
+
render: (date, all) => {
|
|
87
|
+
if (all.empty) {
|
|
88
|
+
return <div className="daf-default-cell" />;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
|
|
92
|
+
return <Tooltip title={_date}>{_date}</Tooltip>;
|
|
93
|
+
},
|
|
94
|
+
ellipsis: true,
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
{
|
|
98
|
+
id: 'actions',
|
|
99
|
+
title: "",
|
|
100
|
+
width: 60,
|
|
101
|
+
render: (_, all) => {
|
|
102
|
+
if (all.empty) {
|
|
103
|
+
return <div className="daf-default-cell" />;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const onClick = () => {
|
|
107
|
+
let link = `/app/view/${subject}/${all.datastakeId}`;
|
|
108
|
+
if (activeTab === "shared") {
|
|
109
|
+
link += `?sourceId=${all?.authorId?.id}`;
|
|
110
|
+
}
|
|
111
|
+
goTo(getRedirectLink(link));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
return <NavigationAction onClick={onClick} theme={theme} />;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
].filter((column) => column.show !== false);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TablePage from '../../../TablePage/index.jsx';
|
|
3
|
+
import { getColumns } from './columns.js';
|
|
4
|
+
|
|
5
|
+
const ProductionSiteTable = ({
|
|
6
|
+
t = () => {},
|
|
7
|
+
goTo = () => {},
|
|
8
|
+
user = {},
|
|
9
|
+
options = {},
|
|
10
|
+
getRedirectLink = () => {},
|
|
11
|
+
theme = {},
|
|
12
|
+
loading = false,
|
|
13
|
+
data = {},
|
|
14
|
+
isMobile,
|
|
15
|
+
APP,
|
|
16
|
+
location,
|
|
17
|
+
getData = () => {},
|
|
18
|
+
getApiBaseUrl = () => {},
|
|
19
|
+
getAppHeader = () => {},
|
|
20
|
+
applications = [],
|
|
21
|
+
subjectClear = () => {},
|
|
22
|
+
breadcrumbs = [],
|
|
23
|
+
extendingFilters = {},
|
|
24
|
+
createDefaultValues = {},
|
|
25
|
+
}) => {
|
|
26
|
+
return (
|
|
27
|
+
<TablePage
|
|
28
|
+
t={t}
|
|
29
|
+
goTo={goTo}
|
|
30
|
+
user={user}
|
|
31
|
+
options={options}
|
|
32
|
+
getRedirectLink={getRedirectLink}
|
|
33
|
+
theme={theme}
|
|
34
|
+
loading={loading}
|
|
35
|
+
data={data}
|
|
36
|
+
isMobile={isMobile}
|
|
37
|
+
APP={APP}
|
|
38
|
+
location={location}
|
|
39
|
+
applications={applications}
|
|
40
|
+
subject="production-sites"
|
|
41
|
+
getData={getData}
|
|
42
|
+
getApiBaseUrl={getApiBaseUrl}
|
|
43
|
+
getAppHeader={getAppHeader}
|
|
44
|
+
subjectClear={subjectClear}
|
|
45
|
+
extendingFilters={extendingFilters}
|
|
46
|
+
breadcrumbs={breadcrumbs}
|
|
47
|
+
formConfig={formConfig}
|
|
48
|
+
defaultValues={createDefaultValues}
|
|
49
|
+
onDownload={() => console.log("download")}
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default ProductionSiteTable
|
|
File without changes
|
|
@@ -17,10 +17,16 @@ export const usePrepareForm = ({
|
|
|
17
17
|
const [linkingForms, setLinkingForms] = useState({});
|
|
18
18
|
const [loading, setLoading] = useState(true);
|
|
19
19
|
const [notFound, setNotFound] = useState(false);
|
|
20
|
+
|
|
21
|
+
console.log({form, data, groups, linkingForms, loading, notFound})
|
|
20
22
|
|
|
21
23
|
const prepareForm = (currentView) => {
|
|
22
24
|
const dKey = namespaceConfig?.dataKey;
|
|
23
25
|
const nKey = `${APP}-${currentView}`;
|
|
26
|
+
console.log({dKey, nKey, allData})
|
|
27
|
+
|
|
28
|
+
console.log({condition1: hasKeyInObject(allData, dKey)})
|
|
29
|
+
console.log({condition2: hasKeyInObject(allData[dKey], nKey)})
|
|
24
30
|
|
|
25
31
|
if (hasKeyInObject(allData, dKey) && hasKeyInObject(allData[dKey], nKey)) {
|
|
26
32
|
const {
|
|
@@ -29,8 +35,10 @@ export const usePrepareForm = ({
|
|
|
29
35
|
config = {},
|
|
30
36
|
linkingForms = {},
|
|
31
37
|
} = JSON.parse(JSON.stringify(allData[dKey][nKey] || {}));
|
|
38
|
+
console.log("here", dKey, nKey)
|
|
32
39
|
|
|
33
|
-
if (data.datastakeId === id || id === "user") {
|
|
40
|
+
if (data.datastakeId === id || id === "user" || data.id === id) {
|
|
41
|
+
console.log("here2", data.datastakeId, id, data.id)
|
|
34
42
|
// if (viewConfig.linkingSubjects.includes(namespace)) {
|
|
35
43
|
setForm({
|
|
36
44
|
...form,
|
|
@@ -58,6 +66,8 @@ export const usePrepareForm = ({
|
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
68
|
}
|
|
69
|
+
|
|
70
|
+
console.log('data', data)
|
|
61
71
|
};
|
|
62
72
|
|
|
63
73
|
const getCertainData = allData?.[namespaceConfig?.dataKey];
|
|
@@ -54,7 +54,7 @@ const View = ({
|
|
|
54
54
|
}) => {
|
|
55
55
|
const getNamespaceConfig = (namespace) => namespaceConfiguration?.[namespace] || {};
|
|
56
56
|
const [openRecordsModal, setOpenRecordsModal] = useState(false);
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
// HANDLES THE URL PARAMS FOR THE VIEW PAGE
|
|
59
59
|
const {
|
|
60
60
|
namespace,
|
|
@@ -116,7 +116,11 @@ const View = ({
|
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
const groupForm = useMemo(() => {
|
|
119
|
-
|
|
119
|
+
// If no group is specified, use the first available group
|
|
120
|
+
const formKeys = Object.keys(form || {});
|
|
121
|
+
const selectedGroup = group || (formKeys.length > 0 ? formKeys[0] : null);
|
|
122
|
+
const gF = selectedGroup ? (form[selectedGroup] || {}) : {};
|
|
123
|
+
|
|
120
124
|
if (subsection) {
|
|
121
125
|
const sectionForms = groupSubsections(gF);
|
|
122
126
|
if (sectionForms[subsection]) {
|
|
@@ -215,6 +219,13 @@ const View = ({
|
|
|
215
219
|
: pageActions;
|
|
216
220
|
}, [groupForm, pageActions]);
|
|
217
221
|
|
|
222
|
+
console.log({namespaceConfiguration, namespaceConfig, allData, namespace, id, group, subsection,
|
|
223
|
+
version,
|
|
224
|
+
source,
|
|
225
|
+
isSupported,
|
|
226
|
+
notFound
|
|
227
|
+
})
|
|
228
|
+
|
|
218
229
|
if(!isSupported || notFound) {
|
|
219
230
|
return <Loading />
|
|
220
231
|
}
|
|
@@ -15,6 +15,14 @@ class AdminService extends BaseService {
|
|
|
15
15
|
})
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
|
|
19
|
+
inviteCompanyAccount({ companyId, data }) {
|
|
20
|
+
return this.apiPost({
|
|
21
|
+
url: `/accounts/${companyId}/invite`,
|
|
22
|
+
data,
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
inviteAccount(data) {
|
|
19
27
|
return this.apiPost({
|
|
20
28
|
url: `/accounts/inviteAccount`,
|
|
@@ -69,18 +77,114 @@ class AdminService extends BaseService {
|
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
getSubjects({ subject, params }) {
|
|
72
|
-
|
|
73
|
-
url:
|
|
80
|
+
return this.apiGet({
|
|
81
|
+
url: `/management/subjects/${subject}`,
|
|
74
82
|
params,
|
|
75
|
-
|
|
83
|
+
});
|
|
76
84
|
}
|
|
77
85
|
|
|
78
|
-
|
|
86
|
+
|
|
87
|
+
mergeLocations({ ids, data }) {
|
|
88
|
+
const [id1, id2, ...remainingIds] = ids || [];
|
|
89
|
+
|
|
90
|
+
if (!id1 || !id2) {
|
|
91
|
+
throw new Error('At least two IDs are required for merging');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const url = `/management/merge/location/${id1}/${id2}`;
|
|
95
|
+
|
|
96
|
+
const payload = {
|
|
97
|
+
...data,
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
if (remainingIds.length > 0) {
|
|
101
|
+
payload.additionalIds = remainingIds;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return this.apiPost({
|
|
105
|
+
url,
|
|
106
|
+
data: payload,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
mergeSubjects({ subject, ids, data }) {
|
|
114
|
+
const [id1, id2, ...remainingIds] = ids || [];
|
|
115
|
+
|
|
116
|
+
if (!id1 || !id2) {
|
|
117
|
+
throw new Error('At least two IDs are required for merging');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const url = `/management/merge/${subject}/${id1}/${id2}`;
|
|
121
|
+
|
|
122
|
+
const payload = {
|
|
123
|
+
...data,
|
|
124
|
+
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
if (remainingIds.length > 0) {
|
|
128
|
+
payload.additionalIds = remainingIds;
|
|
129
|
+
}
|
|
130
|
+
|
|
79
131
|
return this.apiPost({
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
132
|
+
url,
|
|
133
|
+
data: payload,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
getSubjectForm({ subject, scope = 'global' }) {
|
|
138
|
+
return this.apiGet({
|
|
139
|
+
url: `/forms/${subject}`,
|
|
140
|
+
params: { scope },
|
|
141
|
+
});
|
|
83
142
|
}
|
|
143
|
+
|
|
144
|
+
getSubjectData({ subject, id }) {
|
|
145
|
+
return this.apiGet({
|
|
146
|
+
url: `/management/subject/${subject}/${id}`,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
viewLocation({ id }) {
|
|
152
|
+
return this.apiGet({
|
|
153
|
+
url: `/management/subject/location/${id}`,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
viewStakeholder({ id }) {
|
|
158
|
+
return this.apiGet({
|
|
159
|
+
url: `/management/subject/stakeholder/${id}`,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
updateSubject({ subject, id, data }) {
|
|
165
|
+
const type = subject === 'location' ? 'location' : 'stakeholder';
|
|
166
|
+
return this.apiPut({
|
|
167
|
+
url: `/management/subject/${type}/${id}`,
|
|
168
|
+
data,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
deleteSubject({ subject, id }) {
|
|
173
|
+
const type = subject === 'location' ? 'location' : 'stakeholder';
|
|
174
|
+
return this.apiDelete({
|
|
175
|
+
url: `/management/subject/${type}/${id}`,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
getUserGrowth(activeFilter) {
|
|
180
|
+
return this.apiGet({
|
|
181
|
+
url: `/accounts/dashboard/user-growth`,
|
|
182
|
+
isUserManager: true,
|
|
183
|
+
params: { activeFilter },
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
84
188
|
}
|
|
85
189
|
|
|
86
190
|
export default createLazyService(AdminService);
|
|
@@ -63,19 +63,29 @@ export const getDefaultActiveFilters = (
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
const NEW_PAGINATION_APPS = ["nashiriki"];
|
|
66
|
+
|
|
66
67
|
export const filterParams = (value, module) => {
|
|
67
68
|
const { activeFilters, ...rest } = value;
|
|
68
69
|
|
|
69
|
-
const {
|
|
70
|
-
|
|
70
|
+
const {
|
|
71
|
+
page = 1,
|
|
72
|
+
pageSize = 20,
|
|
73
|
+
sortDir,
|
|
74
|
+
sortBy,
|
|
75
|
+
search,
|
|
76
|
+
searchParams,
|
|
77
|
+
...filters
|
|
78
|
+
} = activeFilters || {};
|
|
71
79
|
|
|
72
80
|
const params = {};
|
|
73
|
-
|
|
81
|
+
|
|
74
82
|
params.pagination = JSON.stringify({
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
page,
|
|
84
|
+
pageSize,
|
|
77
85
|
});
|
|
78
86
|
|
|
87
|
+
params.filters = JSON.stringify(filters);
|
|
88
|
+
|
|
79
89
|
if (search && searchParams) {
|
|
80
90
|
params.search = JSON.stringify({
|
|
81
91
|
qs: search,
|
|
@@ -90,14 +100,6 @@ export const filterParams = (value, module) => {
|
|
|
90
100
|
});
|
|
91
101
|
}
|
|
92
102
|
|
|
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
|
-
|
|
101
103
|
return { ...rest, ...params };
|
|
102
104
|
};
|
|
103
105
|
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
const en = {
|
|
2
2
|
"All Data": "All Data",
|
|
3
|
+
"sbg-admin::remove-user-title":"Remove User Title",
|
|
4
|
+
"sbg-admin::remove-user-body":"Remove User Body",
|
|
5
|
+
"Administrative-level-1": "Administrative Level 1",
|
|
6
|
+
"Administrative-level-2": "Administrative Level 2",
|
|
7
|
+
"merge-output": "Merge Output",
|
|
8
|
+
"admin::current_subjects": "Current Subjects",
|
|
9
|
+
"add-account":"Add Account",
|
|
3
10
|
"Site": "Site",
|
|
4
11
|
"Production Sites": "Production Sites",
|
|
5
12
|
"Type of account": "Type of account",
|
package/src/index.js
CHANGED
|
@@ -152,6 +152,7 @@ export { default as StakeholderMappings } from "./@daf/core/components/Graphs/St
|
|
|
152
152
|
//* ------------------------------ Screens ------------------------------
|
|
153
153
|
export { default as BaseScreen } from "./@daf/core/components/Screens/BaseScreen/index.jsx";
|
|
154
154
|
// Admin - Base Components
|
|
155
|
+
export { default as AppInvitation } from "./@daf/core/components/Screens/Admin/AppInvitation/index.jsx";
|
|
155
156
|
export { default as AdminDashboard } from "./@daf/core/components/Screens/Admin/AdminDashboard/index.jsx";
|
|
156
157
|
export { default as UserTable } from "./@daf/core/components/Screens/Admin/AdminTables/UserTable/index.jsx";
|
|
157
158
|
export { default as AccountTable } from "./@daf/core/components/Screens/Admin/AdminTables/AccountTable/index.jsx";
|
package/build/favicon.ico
DELETED
|
Binary file
|
package/build/logo192.png
DELETED
|
Binary file
|
package/build/logo512.png
DELETED
|
Binary file
|
package/build/manifest.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "React App",
|
|
3
|
-
"name": "Create React App Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "logo192.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "192x192"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"src": "logo512.png",
|
|
17
|
-
"type": "image/png",
|
|
18
|
-
"sizes": "512x512"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"start_url": ".",
|
|
22
|
-
"display": "standalone",
|
|
23
|
-
"theme_color": "#000000",
|
|
24
|
-
"background_color": "#ffffff"
|
|
25
|
-
}
|
package/build/robots.txt
DELETED