datastake-daf 0.6.792 → 0.6.794
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 +4377 -3187
- package/dist/pages/index.js +1401 -589
- package/dist/services/index.js +69 -3
- package/dist/utils/index.js +14 -17
- package/package.json +1 -1
- package/src/@daf/core/components/ProgressBar/ProgressBarWithIcon/index.jsx +23 -0
- 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/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 -2
- package/src/@daf/core/components/Screens/Admin/AdminScreens/SubjectsView.jsx +272 -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/index.jsx +81 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditStakeholder/index.jsx +76 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/config.js +38 -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 +38 -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 +3 -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 +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminViews/index.jsx +3 -4
- package/src/@daf/core/components/Screens/Admin/adminRoutes.js +81 -2
- package/src/@daf/core/components/Table/NavigationAction/index.jsx +5 -3
- package/src/@daf/pages/Dashboards/SelfAssesment/components/AssociatedInformation/columns.js +248 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/components/AssociatedInformation/index.jsx +68 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/components/AssociatedInformation/style.js +29 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/components/OrganisationInformation/columns.js +93 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/components/OrganisationInformation/index.jsx +43 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/components/ProductionSites/columns.js +127 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/components/ProductionSites/index.jsx +52 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/components/ProductionSites/style.js +26 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/index.jsx +39 -0
- 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/services/AdminService.js +79 -7
- 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/src/pages.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
|
@@ -69,18 +69,90 @@ class AdminService extends BaseService {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
getSubjects({ subject, params }) {
|
|
72
|
-
|
|
73
|
-
url:
|
|
72
|
+
return this.apiGet({
|
|
73
|
+
url: `/management/subjects/${subject}`,
|
|
74
74
|
params,
|
|
75
|
-
|
|
75
|
+
});
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
mergeLocations({ ids, data }) {
|
|
79
|
+
const [id1, id2, ...remainingIds] = ids || [];
|
|
80
|
+
|
|
81
|
+
if (!id1 || !id2) {
|
|
82
|
+
throw new Error('At least two IDs are required for merging');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const url = `/management/merge/location/${id1}/${id2}`;
|
|
86
|
+
|
|
87
|
+
const payload = {
|
|
88
|
+
...data,
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
if (remainingIds.length > 0) {
|
|
92
|
+
payload.additionalIds = remainingIds;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return this.apiPost({
|
|
96
|
+
url,
|
|
97
|
+
data: payload,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
mergeSubjects({ subject, ids, data }) {
|
|
104
|
+
const [id1, id2, ...remainingIds] = ids || [];
|
|
105
|
+
|
|
106
|
+
if (!id1 || !id2) {
|
|
107
|
+
throw new Error('At least two IDs are required for merging');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const url = `/management/merge/${subject}/${id1}/${id2}`;
|
|
111
|
+
|
|
112
|
+
const payload = {
|
|
113
|
+
...data,
|
|
114
|
+
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
if (remainingIds.length > 0) {
|
|
118
|
+
payload.additionalIds = remainingIds;
|
|
119
|
+
}
|
|
120
|
+
|
|
79
121
|
return this.apiPost({
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
122
|
+
url,
|
|
123
|
+
data: payload,
|
|
124
|
+
});
|
|
83
125
|
}
|
|
126
|
+
|
|
127
|
+
viewLocation({ id }) {
|
|
128
|
+
return this.apiGet({
|
|
129
|
+
url: `/management/subject/location/${id}`,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
viewStakeholder({ id }) {
|
|
134
|
+
return this.apiGet({
|
|
135
|
+
url: `/management/subject/stakeholder/${id}`,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
updateSubject({ subject, id, data }) {
|
|
140
|
+
const type = subject === 'location' ? 'location' : 'stakeholder';
|
|
141
|
+
return this.apiPut({
|
|
142
|
+
url: `/management/subject/${type}/${id}`,
|
|
143
|
+
data,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
getUserGrowth(activeFilter) {
|
|
148
|
+
return this.apiGet({
|
|
149
|
+
url: `/accounts/dashboard/user-growth`,
|
|
150
|
+
isUserManager: true,
|
|
151
|
+
params: { activeFilter },
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
|
|
84
156
|
}
|
|
85
157
|
|
|
86
158
|
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,13 +100,5 @@ 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
|
};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
const en = {
|
|
2
|
+
"sbg-admin::remove-user-title":"Remove User Title",
|
|
3
|
+
"sbg-admin::remove-user-body":"Remove User Body",
|
|
4
|
+
"Administrative-level-1": "Administrative Level 1",
|
|
5
|
+
"Administrative-level-2": "Administrative Level 2",
|
|
6
|
+
"merge-output": "Merge Output",
|
|
7
|
+
"admin::current_subjects": "Current Subjects",
|
|
8
|
+
"add-account":"Add Account",
|
|
2
9
|
"Site": "Site",
|
|
3
10
|
"Production Sites": "Production Sites",
|
|
4
11
|
"Type of account": "Type of account",
|
package/src/index.js
CHANGED
|
@@ -97,6 +97,7 @@ export { default as ProgressBar } from "./@daf/core/components/ProgressBar/index
|
|
|
97
97
|
export { default as MultiBarProgress } from "./@daf/core/components/ProgressBar/MultiBarProgress/index.jsx";
|
|
98
98
|
export { default as MultiColorProgressBar } from "./@daf/core/components/ProgressBar/MultiColorProgressBar/index.jsx";
|
|
99
99
|
export { default as ProgressBarSideIcon } from "./@daf/core/components/ProgressBar/components/SideIcon/index.jsx";
|
|
100
|
+
export { default as ProgressBarWithIcon } from "./@daf/core/components/ProgressBar/ProgressBarWithIcon/index.jsx";
|
|
100
101
|
export { default as ProgressTabs } from "./@daf/core/components/ProgressTabs/index.jsx";
|
|
101
102
|
|
|
102
103
|
// Data Store
|
package/src/pages.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Dashboards
|
|
2
2
|
export { default as SupplyChainDashboard } from './@daf/pages/Dashboards/SupplyChain/index.jsx';
|
|
3
3
|
export { default as UserDashboard } from './@daf/pages/Dashboards/UserDashboard/index.jsx';
|
|
4
|
+
export { default as SelfAssesment } from './@daf/pages/Dashboards/SelfAssesment/index.jsx';
|
|
4
5
|
export { default as OperatorsTable } from './@daf/pages/Stakeholders/Operators/index.jsx';
|
|
5
6
|
export { default as LocationsTable } from './@daf/pages/Locations/index.jsx';
|
|
6
7
|
export { default as StakeholdersTable } from './@daf/pages/Stakeholders/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