datastake-daf 0.6.846 → 0.6.847
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 +58 -16
- package/dist/hooks/index.js +10 -12
- package/dist/pages/index.js +4543 -4120
- package/dist/style/datastake/mapbox-gl.css +330 -0
- package/dist/utils/index.js +1 -9
- package/package.json +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewUser/index.jsx +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/helper.js +77 -59
- package/src/@daf/core/components/Screens/Admin/AdminViews/index.jsx +8 -1
- package/src/@daf/hooks/useSources.js +4 -6
- package/src/@daf/hooks/useWidgetFetch.js +40 -34
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/config.js +0 -3
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/hook.js +4 -69
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/index.js +92 -29
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/ProblemSolver/hook.js +34 -59
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/ProblemSolver/index.js +69 -36
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/index.js +75 -50
- package/src/@daf/pages/Dashboards/ConflictManagement/index.js +11 -11
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/GenderDistribution/index.js +51 -46
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/Identification/hook.js +20 -20
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/Identification/index.js +2 -26
- package/src/@daf/pages/Dashboards/SupplyChain/index.jsx +1 -0
- package/src/@daf/pages/Dashboards/UserDashboard/components/DataChainOfCustody/index.jsx +1 -2
- package/src/@daf/pages/Dashboards/UserDashboard/index.jsx +0 -1
- package/src/@daf/pages/Dashboards/helper.js +20 -25
- package/src/@daf/utils/timeFilterUtils.js +250 -233
- package/src/constants/locales/fr/translation.js +0 -9
- package/src/constants/locales/sp/translation.js +0 -1
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/hook.js +0 -56
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
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
ADDED
package/dist/components/index.js
CHANGED
|
@@ -42171,7 +42171,10 @@ const useCombinedPrefilledValues = (combinedPrefilledValues, values, parentValue
|
|
|
42171
42171
|
}
|
|
42172
42172
|
});
|
|
42173
42173
|
if (hasChanges) {
|
|
42174
|
-
setValues(prevValues =>
|
|
42174
|
+
setValues(prevValues => ({
|
|
42175
|
+
...prevValues,
|
|
42176
|
+
...resolvedValues
|
|
42177
|
+
}));
|
|
42175
42178
|
MainForm.setFieldsValue(resolvedValues);
|
|
42176
42179
|
}
|
|
42177
42180
|
}, [values, parentValues, combinedPrefilledValues, setValues, MainForm]);
|
|
@@ -54422,26 +54425,55 @@ const getColumns$8 = ({
|
|
|
54422
54425
|
onCopyInvitation = () => {},
|
|
54423
54426
|
onResendInvitation = () => {},
|
|
54424
54427
|
onCanelVerification = () => {},
|
|
54425
|
-
setAddAccountVisible = () => {}
|
|
54428
|
+
setAddAccountVisible = () => {},
|
|
54429
|
+
setSelectedAccounts = () => {},
|
|
54430
|
+
selectedAccounts = []
|
|
54426
54431
|
}) => {
|
|
54427
54432
|
const cols = [{
|
|
54433
|
+
title: "",
|
|
54434
|
+
dataIndex: "select",
|
|
54435
|
+
key: "select",
|
|
54436
|
+
width: 50,
|
|
54437
|
+
active: true,
|
|
54438
|
+
pending: true,
|
|
54439
|
+
suspended: true,
|
|
54440
|
+
show: true,
|
|
54441
|
+
render: (v, all) => {
|
|
54442
|
+
if (all.empty) {
|
|
54443
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
54444
|
+
className: "daf-default-cell"
|
|
54445
|
+
});
|
|
54446
|
+
}
|
|
54447
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox, {
|
|
54448
|
+
onChange: () => setSelectedAccounts(prev => {
|
|
54449
|
+
const isSelected = prev.some(p => p.userId === all.userId);
|
|
54450
|
+
if (isSelected) {
|
|
54451
|
+
return prev.filter(p => p.userId !== all.userId);
|
|
54452
|
+
}
|
|
54453
|
+
return [...prev, all];
|
|
54454
|
+
}),
|
|
54455
|
+
checked: selectedAccounts.some(p => p.userId === all.userId),
|
|
54456
|
+
disabled: selectedAccounts.length >= 3 && !selectedAccounts.some(p => p.userId === all.userId)
|
|
54457
|
+
});
|
|
54458
|
+
}
|
|
54459
|
+
}, {
|
|
54428
54460
|
title: t("ID"),
|
|
54461
|
+
dataIndex: "userId",
|
|
54429
54462
|
key: "userId",
|
|
54430
|
-
ellipsis: true,
|
|
54431
|
-
width: 160,
|
|
54432
54463
|
active: true,
|
|
54433
54464
|
pending: true,
|
|
54434
54465
|
suspended: true,
|
|
54435
|
-
|
|
54466
|
+
ellipsis: true,
|
|
54467
|
+
width: 160,
|
|
54468
|
+
render: (v, all) => {
|
|
54436
54469
|
if (all.empty) {
|
|
54437
54470
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
54438
54471
|
className: "daf-default-cell"
|
|
54439
54472
|
});
|
|
54440
54473
|
}
|
|
54441
|
-
const id = all.status === "pending" ? all.users?.[0]?.userId ?? all.invitedUser?.userId ?? all.datastakeId ?? "--" : all.userId ?? "--";
|
|
54442
54474
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
54443
54475
|
className: "daf-default-cell",
|
|
54444
|
-
children:
|
|
54476
|
+
children: v || "--"
|
|
54445
54477
|
});
|
|
54446
54478
|
}
|
|
54447
54479
|
}, {
|
|
@@ -54457,18 +54489,19 @@ const getColumns$8 = ({
|
|
|
54457
54489
|
pending: true,
|
|
54458
54490
|
suspended: true
|
|
54459
54491
|
}, {
|
|
54460
|
-
title: t("
|
|
54461
|
-
|
|
54462
|
-
|
|
54492
|
+
title: t("type"),
|
|
54493
|
+
dataIndex: "apps",
|
|
54494
|
+
key: "apps",
|
|
54495
|
+
render: (apps, all) => {
|
|
54463
54496
|
if (all.empty) {
|
|
54464
54497
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
54465
54498
|
className: "daf-default-cell"
|
|
54466
54499
|
});
|
|
54467
54500
|
}
|
|
54468
|
-
const
|
|
54501
|
+
const sbg = all?.interface ? all : (apps || []).find(a => a.app === module);
|
|
54469
54502
|
return renderTypeTag({
|
|
54470
|
-
value:
|
|
54471
|
-
label: findOptions(
|
|
54503
|
+
value: sbg?.interface,
|
|
54504
|
+
label: findOptions(sbg?.interface, selectOptions.type)
|
|
54472
54505
|
});
|
|
54473
54506
|
},
|
|
54474
54507
|
active: true,
|
|
@@ -54543,8 +54576,7 @@ const getColumns$8 = ({
|
|
|
54543
54576
|
className: "daf-default-cell"
|
|
54544
54577
|
});
|
|
54545
54578
|
}
|
|
54546
|
-
|
|
54547
|
-
return isVerified ? /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
|
|
54579
|
+
return verified ? /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
|
|
54548
54580
|
color: "green",
|
|
54549
54581
|
children: t("Yes")
|
|
54550
54582
|
}) : /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
|
|
@@ -56964,7 +56996,7 @@ function NewUser({
|
|
|
56964
56996
|
const localUserData = {
|
|
56965
56997
|
...apiPayload,
|
|
56966
56998
|
status: 'pending',
|
|
56967
|
-
id: apiPayload.email
|
|
56999
|
+
id: apiPayload.email // Add a unique ID for the table key
|
|
56968
57000
|
// apps: {
|
|
56969
57001
|
// [module]: {
|
|
56970
57002
|
// role: val.role,
|
|
@@ -58030,6 +58062,14 @@ function AdminView(_ref) {
|
|
|
58030
58062
|
id: editData.id,
|
|
58031
58063
|
data: newData
|
|
58032
58064
|
});
|
|
58065
|
+
console.log({
|
|
58066
|
+
data
|
|
58067
|
+
});
|
|
58068
|
+
console.log('Checking for pending users...', {
|
|
58069
|
+
hasPendingUsers: pendingUsers.length > 0,
|
|
58070
|
+
hasInviteFunction: !!inviteCompanyAccount,
|
|
58071
|
+
pendingUsers: pendingUsers
|
|
58072
|
+
});
|
|
58033
58073
|
if (pendingUsers.length > 0 && inviteCompanyAccount) {
|
|
58034
58074
|
console.log('Inviting pending users:', pendingUsers.length);
|
|
58035
58075
|
for (const user of pendingUsers) {
|
|
@@ -58039,6 +58079,8 @@ function AdminView(_ref) {
|
|
|
58039
58079
|
status
|
|
58040
58080
|
} = user,
|
|
58041
58081
|
userDataToInvite = _objectWithoutProperties(user, _excluded2);
|
|
58082
|
+
console.log('Sending invitation for:', user.email, userDataToInvite);
|
|
58083
|
+
// Use the standalone invite function, don't mix it with updateAccount
|
|
58042
58084
|
// await inviteCompanyAccount({
|
|
58043
58085
|
// companyId: editData.id,
|
|
58044
58086
|
// data: {
|
package/dist/hooks/index.js
CHANGED
|
@@ -1732,8 +1732,7 @@ function useSource({
|
|
|
1732
1732
|
user = {},
|
|
1733
1733
|
t = () => {},
|
|
1734
1734
|
getData = () => {},
|
|
1735
|
-
id
|
|
1736
|
-
stop
|
|
1735
|
+
id
|
|
1737
1736
|
}) {
|
|
1738
1737
|
const [loading, setLoading] = React.useState(true);
|
|
1739
1738
|
const [partners, setPartners] = React.useState([]);
|
|
@@ -1787,10 +1786,8 @@ function useSource({
|
|
|
1787
1786
|
console.error("Error fetching partners:", error);
|
|
1788
1787
|
}
|
|
1789
1788
|
}
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
}
|
|
1793
|
-
}, [user.language, id, stop]);
|
|
1789
|
+
fetchPartners();
|
|
1790
|
+
}, [user.language, id]);
|
|
1794
1791
|
function handleSelectedPartnersChange(selected) {
|
|
1795
1792
|
setSelectedPartners(prev => ({
|
|
1796
1793
|
...prev,
|
|
@@ -1816,6 +1813,9 @@ const useSources = ({
|
|
|
1816
1813
|
stop
|
|
1817
1814
|
}) => {
|
|
1818
1815
|
function getData(params) {
|
|
1816
|
+
if (stop) return Promise.resolve({
|
|
1817
|
+
data: []
|
|
1818
|
+
});
|
|
1819
1819
|
if (id !== undefined && id !== null) {
|
|
1820
1820
|
return SourceService$1.getSources({
|
|
1821
1821
|
type,
|
|
@@ -1834,8 +1834,7 @@ const useSources = ({
|
|
|
1834
1834
|
user,
|
|
1835
1835
|
t,
|
|
1836
1836
|
getData: getData,
|
|
1837
|
-
id
|
|
1838
|
-
stop
|
|
1837
|
+
id
|
|
1839
1838
|
});
|
|
1840
1839
|
const informationSources = partners?.length > 0 ? partners?.length - 1 : 0;
|
|
1841
1840
|
return {
|
|
@@ -2295,6 +2294,7 @@ var DashboardService$1 = createLazyService(DashboardService);
|
|
|
2295
2294
|
// url: string
|
|
2296
2295
|
// basePath: string,
|
|
2297
2296
|
// }
|
|
2297
|
+
|
|
2298
2298
|
const useWidgetFetch = ({
|
|
2299
2299
|
config,
|
|
2300
2300
|
getData = DashboardService$1.getWidget,
|
|
@@ -2313,7 +2313,7 @@ const useWidgetFetch = ({
|
|
|
2313
2313
|
const {
|
|
2314
2314
|
data
|
|
2315
2315
|
} = await getData(rest);
|
|
2316
|
-
setData(data);
|
|
2316
|
+
setData(data || defaultData);
|
|
2317
2317
|
if (isErrorResponse(data)) {
|
|
2318
2318
|
const errorMessage = getErrorMessage(data);
|
|
2319
2319
|
antd.message.error(errorMessage);
|
|
@@ -2322,13 +2322,11 @@ const useWidgetFetch = ({
|
|
|
2322
2322
|
onFetch();
|
|
2323
2323
|
} catch (err) {
|
|
2324
2324
|
console.log(err);
|
|
2325
|
-
} finally {
|
|
2326
|
-
setLoading(false);
|
|
2327
2325
|
}
|
|
2326
|
+
setLoading(false);
|
|
2328
2327
|
};
|
|
2329
2328
|
React.useEffect(() => {
|
|
2330
2329
|
if (!stop) {
|
|
2331
|
-
console.log('fetching data');
|
|
2332
2330
|
fetchData();
|
|
2333
2331
|
}
|
|
2334
2332
|
}, [JSON.stringify(config), stop]);
|