datastake-daf 0.6.845 → 0.6.846
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 +2340 -2255
- package/dist/hooks/index.js +12 -22
- package/dist/pages/index.js +4119 -4543
- package/dist/utils/index.js +9 -1
- 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 +59 -77
- package/src/@daf/core/components/Screens/Admin/AdminViews/index.jsx +1 -8
- package/src/@daf/hooks/useSources.js +6 -4
- package/src/@daf/hooks/useWidgetFetch.js +3 -14
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/config.js +3 -0
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/hook.js +69 -4
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/index.js +29 -92
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/ProblemSolver/hook.js +59 -34
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/ProblemSolver/index.js +36 -69
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/hook.js +56 -0
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/index.js +50 -75
- package/src/@daf/pages/Dashboards/ConflictManagement/index.js +11 -11
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/GenderDistribution/index.js +46 -51
- 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 +26 -2
- package/src/@daf/pages/Dashboards/SupplyChain/index.jsx +0 -1
- package/src/@daf/pages/Dashboards/UserDashboard/components/DataChainOfCustody/index.jsx +2 -1
- package/src/@daf/pages/Dashboards/UserDashboard/index.jsx +1 -0
- package/src/@daf/pages/Dashboards/helper.js +25 -20
- package/src/constants/locales/fr/translation.js +9 -0
- package/src/constants/locales/sp/translation.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
|
@@ -4,6 +4,7 @@ import LineChart from '../../../../../../../core/components/Charts/LineChart/ind
|
|
|
4
4
|
import { Select } from 'antd';
|
|
5
5
|
import { useIdentification } from './hook';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
+
import { findOptions } from '../../../../../../../../helpers/StringHelper.js';
|
|
7
8
|
|
|
8
9
|
function Identification({
|
|
9
10
|
selectedSources = {},
|
|
@@ -25,7 +26,7 @@ function Identification({
|
|
|
25
26
|
[t],
|
|
26
27
|
);
|
|
27
28
|
|
|
28
|
-
const chartConfig = useIdentification({ data, theme, options });
|
|
29
|
+
const { chartConfig, colors, allSeenProducts, graphData } = useIdentification({ data, theme, options });
|
|
29
30
|
|
|
30
31
|
return (
|
|
31
32
|
<Widget
|
|
@@ -45,7 +46,30 @@ function Identification({
|
|
|
45
46
|
</>
|
|
46
47
|
}
|
|
47
48
|
>
|
|
48
|
-
<LineChart
|
|
49
|
+
<LineChart
|
|
50
|
+
{...chartConfig}
|
|
51
|
+
height="400px"
|
|
52
|
+
t={t}
|
|
53
|
+
renderTooltipContent={(title, items) => {
|
|
54
|
+
if (Array.isArray(items) && items[0]) {
|
|
55
|
+
const title = items[0].title;
|
|
56
|
+
const values = graphData.filter((d) => d.date === title);
|
|
57
|
+
return {
|
|
58
|
+
title: "Products",
|
|
59
|
+
items: values.map((val) => {
|
|
60
|
+
return{
|
|
61
|
+
label: findOptions(val.typeOfProduct, options?.mineralOptions) || val.typeOfProduct,
|
|
62
|
+
color: colors[
|
|
63
|
+
allSeenProducts.indexOf(val.typeOfProduct) % colors.length
|
|
64
|
+
],
|
|
65
|
+
value: val.value.toLocaleString(),
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return { title: "", items: [] };
|
|
71
|
+
}}
|
|
72
|
+
/>
|
|
49
73
|
</Widget>
|
|
50
74
|
)
|
|
51
75
|
}
|
|
@@ -5,7 +5,6 @@ import Header from '../../../core/components/Header/index.jsx';
|
|
|
5
5
|
import Multiselect from '../../../core/components/Select/MultiSelect/index.jsx';
|
|
6
6
|
import KeyIndicators from './components/KeyIndicators';
|
|
7
7
|
import SupplyChainMap from './components/SupplyChainMap';
|
|
8
|
-
import TradeRelationships from './components/TradeRelationships';
|
|
9
8
|
import ChartsContainer from './components/ChartsContainer';
|
|
10
9
|
|
|
11
10
|
function SupplyChain({
|
|
@@ -18,13 +18,14 @@ function DataChainOfCustody({
|
|
|
18
18
|
goTo = () => {},
|
|
19
19
|
options = {},
|
|
20
20
|
hardcodedData = [],
|
|
21
|
+
APP
|
|
21
22
|
}) {
|
|
22
23
|
const fetchConfig = useMemo(() => ({
|
|
23
24
|
...defaultFetchConfig,}),[],
|
|
24
25
|
);
|
|
25
26
|
const { data, loading } = useWidgetFetch({config: fetchConfig});
|
|
26
27
|
|
|
27
|
-
const mappedData = mapDataForChainOfCustody(Object.keys(data)?.length > 0 ? data : hardcodedData, options, goTo);
|
|
28
|
+
const mappedData = mapDataForChainOfCustody(Object.keys(data)?.length > 0 ? data : hardcodedData, options, goTo, APP);
|
|
28
29
|
|
|
29
30
|
return (
|
|
30
31
|
<Widget
|
|
@@ -9,24 +9,29 @@ const kycIcon = <CustomIcon name="KYC" color="#6C737F" width={18} height={18} />
|
|
|
9
9
|
const buildingIcon = <CustomIcon name="Building" color="#6C737F" width={18} height={18} />;
|
|
10
10
|
const individualIcon = <CustomIcon name="UserCircle" color="#6C737F" width={18} height={18} />;
|
|
11
11
|
const csIcon = <CustomIcon name="CivilSociety" color="#6C737F" width={18} height={18} />;
|
|
12
|
-
const leftIcon = (
|
|
13
|
-
<CustomIcon
|
|
14
|
-
name="WaziDarkIcon"
|
|
15
|
-
color={theme.colorPrimary8}
|
|
16
|
-
width={16}
|
|
17
|
-
height={16}
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
20
|
-
const middleIcon = (
|
|
21
|
-
<CustomIcon
|
|
22
|
-
name="WaziDarkIcon"
|
|
23
|
-
color={theme.colorPrimary2}
|
|
24
|
-
width={16}
|
|
25
|
-
height={16}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
12
|
|
|
29
|
-
const
|
|
13
|
+
const directionIcons = {
|
|
14
|
+
nashiriki: {
|
|
15
|
+
left: "NashirikiSmallLogo",
|
|
16
|
+
right: "NashirikiSmallLogo",
|
|
17
|
+
middle: "NashirikiSmallLogo",
|
|
18
|
+
},
|
|
19
|
+
wazi: {
|
|
20
|
+
left: "WaziDarkIcon",
|
|
21
|
+
right: "WaziDarkIcon",
|
|
22
|
+
middle: "WaziDarkIcon",
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const directionColors = {
|
|
27
|
+
left: theme.colorPrimary8,
|
|
28
|
+
right: "white",
|
|
29
|
+
middle: theme.colorPrimary2,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const getDirectionIcon = (APP, direction) => {
|
|
33
|
+
return <CustomIcon name={directionIcons[APP][direction]} color={directionColors[direction]} width={16} height={16} />;
|
|
34
|
+
}
|
|
30
35
|
|
|
31
36
|
const mapIcon = (category) => {
|
|
32
37
|
switch (category) {
|
|
@@ -45,7 +50,7 @@ const mapIcon = (category) => {
|
|
|
45
50
|
const leftBackground = theme.colorPrimary3;
|
|
46
51
|
const rightBackground = theme.colorPrimary6;
|
|
47
52
|
|
|
48
|
-
export const mapDataForChainOfCustody = (data = {}, options = {}, goTo = () => {}) => {
|
|
53
|
+
export const mapDataForChainOfCustody = (data = {}, options = {}, goTo = () => {}, APP) => {
|
|
49
54
|
const mapChildren = (items, type, parentId, isDirect = true) => {
|
|
50
55
|
return (items ?? []).map((item) => {
|
|
51
56
|
return {
|
|
@@ -54,7 +59,7 @@ export const mapDataForChainOfCustody = (data = {}, options = {}, goTo = () => {
|
|
|
54
59
|
name: item.name,
|
|
55
60
|
sources: parentId ? [parentId] : [],
|
|
56
61
|
subTitle: findOptions(item?.category, options?.categoriesOptions || options?.category || []),
|
|
57
|
-
leftIcon: type === "client" ?
|
|
62
|
+
leftIcon: getDirectionIcon(APP, type === "client" ? "right" : "left"),
|
|
58
63
|
leftBackground: type === "client" ? rightBackground : leftBackground,
|
|
59
64
|
topIcon: mapIcon(item.category),
|
|
60
65
|
children: mapChildren(item.sources ?? item.clients ?? [], type, item.id, false),
|
|
@@ -71,7 +76,7 @@ export const mapDataForChainOfCustody = (data = {}, options = {}, goTo = () => {
|
|
|
71
76
|
number: 0,
|
|
72
77
|
name: data.name,
|
|
73
78
|
subTitle: findOptions(data?.category, options?.categoriesOptions || options?.category || []),
|
|
74
|
-
leftIcon:
|
|
79
|
+
leftIcon: getDirectionIcon(APP, "middle"),
|
|
75
80
|
leftBackground: theme.colorPrimary10,
|
|
76
81
|
topIcon: mapIcon(data.category),
|
|
77
82
|
left: mapChildren(data.sources, "source", data.id),
|
|
@@ -162,6 +162,9 @@ const fr = {
|
|
|
162
162
|
"under-development": "Under development",
|
|
163
163
|
"under-development-description": "Our team is actively building this feature. It will be available in an upcoming release.",
|
|
164
164
|
"Confirm new subject": "Confirmer nouveau sujet",
|
|
165
|
+
"registration":"Enregistrement",
|
|
166
|
+
"scrutiny":"Contrôle",
|
|
167
|
+
"Organisation Policies" : "Politiques Organisationnelles",
|
|
165
168
|
affirmations: {
|
|
166
169
|
"subject-created-successfully": "Sujet créé avec succès.",
|
|
167
170
|
"information-saved-successfully": "Information sauvegardée avec succès.",
|
|
@@ -2189,6 +2192,12 @@ const fr = {
|
|
|
2189
2192
|
"last-active": "Dernière Activité",
|
|
2190
2193
|
"key-indicators": "Indicateurs Clés",
|
|
2191
2194
|
},
|
|
2195
|
+
"Armed Groups": "Groupes Armés",
|
|
2196
|
+
"Identified Armed Groups":"Groupes Armés Identifiés",
|
|
2197
|
+
"Reported Incidents": "Incidents Signalés",
|
|
2198
|
+
"Conflict Map":"Carte des Conflits",
|
|
2199
|
+
"Conflict Management": "Gestion des Conflits"
|
|
2200
|
+
|
|
2192
2201
|
};
|
|
2193
2202
|
|
|
2194
2203
|
export default fr;
|
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