datastake-daf 0.6.834 → 0.6.837
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 +2354 -2200
- package/dist/hooks/index.js +7 -8
- package/dist/pages/index.js +441 -234
- package/dist/services/index.js +7 -8
- package/dist/utils/index.js +18 -0
- package/package.json +1 -1
- package/src/@daf/core/components/AuthForm/index.jsx +34 -1
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/hook.js +3 -3
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/index.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/index.jsx +2 -6
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/index.jsx +0 -1
- package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/KeyIndicators/config.js +2 -3
- package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/KeyIndicators/index.js +2 -2
- package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/MineSite/index.js +3 -3
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/config.js +206 -0
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/hook.js +48 -0
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/index.js +154 -0
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/ProblemSolver/hook.js +83 -0
- package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/RisksWidget/components/ProblemSolver/index.js +14 -7
- package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/config.js +10 -0
- package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/index.js +18 -13
- package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/RisksWidget/index.js +1 -1
- package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/index.js +17 -19
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/GenderDistribution/index.js +1 -1
- package/src/@daf/pages/Dashboards/SupplyChain/components/KeyIndicators/config.js +4 -4
- package/src/@daf/pages/Data/Channels/columns.js +1 -1
- package/src/@daf/pages/Events/Activities/columns.js +1 -2
- package/src/@daf/pages/Events/Incidents/columns.js +1 -2
- package/src/@daf/pages/Events/Testimonials/columns.js +1 -2
- package/src/@daf/pages/Events/columns.js +3 -3
- package/src/@daf/pages/Locations/MineSite/columns.js +1 -1
- package/src/@daf/pages/Stakeholders/Operators/columns.js +0 -2
- package/src/@daf/pages/Stakeholders/Workers/columns.js +1 -3
- package/src/@daf/pages/Summary/Operator/components/KeyInformation/config.js +1 -0
- package/src/@daf/pages/TablePage/create.jsx +6 -6
- package/src/@daf/pages/TablePage/index.jsx +1 -7
- package/src/@daf/services/DashboardService.js +8 -8
- package/src/constants/locales/en/translation.js +6 -0
- package/src/constants/locales/fr/translation.js +6 -0
- package/src/constants/locales/sp/translation.js +6 -0
- package/src/pages.js +1 -1
- 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
- package/src/@daf/core/components/Screens/ConflictManagement/components/RisksWidget/components/IncidentsTime/hook.js +0 -32
- package/src/@daf/core/components/Screens/ConflictManagement/components/RisksWidget/components/IncidentsTime/index.js +0 -73
- package/src/@daf/core/components/Screens/ConflictManagement/components/RisksWidget/components/ProblemSolver/hook.js +0 -86
- package/src/@daf/core/components/Screens/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/config.js +0 -34
- /package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/MineSite/helper.js +0 -0
- /package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/RisksWidget/config.js +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState } from "react";
|
|
2
|
+
import DashboardService from "../../../../../../../services/DashboardService.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export default function useProblemSolvers({ t = () => {} } = {}) {
|
|
6
|
+
const [filters, setFilters] = useState({
|
|
7
|
+
administrativeLevel1: "all",
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const [filterOptions, setFilterOptions] = useState([]);
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
async function fetchOptions() {
|
|
15
|
+
try {
|
|
16
|
+
const { data } = await DashboardService.getWidgetConflictManagement(
|
|
17
|
+
"/problem-solvers",
|
|
18
|
+
{},
|
|
19
|
+
"dashboard/conflict-management"
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const all = Object.keys(data);
|
|
23
|
+
|
|
24
|
+
const options = all
|
|
25
|
+
.map((key) => {
|
|
26
|
+
const actions = data[key].actions;
|
|
27
|
+
|
|
28
|
+
return actions.map((action) => {
|
|
29
|
+
if (action.location === undefined) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const administrativeLevel1 = action?.location?.administrativeLevel1;
|
|
33
|
+
const name =
|
|
34
|
+
action?.location?.linking?.SCL?.[administrativeLevel1]?.name;
|
|
35
|
+
return {
|
|
36
|
+
label: name,
|
|
37
|
+
value: administrativeLevel1,
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
})
|
|
41
|
+
.flat()
|
|
42
|
+
.filter((item) => item !== undefined);
|
|
43
|
+
|
|
44
|
+
setFilterOptions(options);
|
|
45
|
+
} catch (err) {
|
|
46
|
+
console.log(err);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
fetchOptions();
|
|
51
|
+
}, []);
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
const filtersConfig = useMemo(
|
|
55
|
+
() => ({
|
|
56
|
+
filtersConfig: {
|
|
57
|
+
administrativeLevel1: {
|
|
58
|
+
type: "select",
|
|
59
|
+
label: "",
|
|
60
|
+
placeholder: t("Select"),
|
|
61
|
+
style: { flex: 1 },
|
|
62
|
+
labelStyle: { flex: 1 },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
onApply: (val) => setFilters(val),
|
|
66
|
+
options: {
|
|
67
|
+
administrativeLevel1: [
|
|
68
|
+
{ label: t("All"), value: "all" },
|
|
69
|
+
...filterOptions,
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
selectedFilters: filters,
|
|
73
|
+
type: "small",
|
|
74
|
+
t,
|
|
75
|
+
}),
|
|
76
|
+
[t, filters, filterOptions]
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
filters,
|
|
81
|
+
filtersConfig,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import React, { useMemo, useCallback } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { renderTooltipJsx } from '
|
|
4
|
-
import Widget from '
|
|
5
|
-
import Chart from '
|
|
6
|
-
import {useWidgetFetch} from '
|
|
3
|
+
import { renderTooltipJsx } from '../../../../../../../utils/tooltip.js';
|
|
4
|
+
import Widget from '../../../../../../../core/components/Dashboard/Widget/index.jsx';
|
|
5
|
+
import Chart from '../../../../../../../core/components/Charts/PieChart/chart.jsx';
|
|
6
|
+
import {useWidgetFetch} from '../../../../../../../hooks/useWidgetFetch.js';
|
|
7
|
+
import DashboardService from '../../../../../../../services/DashboardService.js';
|
|
7
8
|
import useProblemSolvers from './hook.js';
|
|
8
9
|
|
|
9
10
|
const distributionColors = ["#3061A8", "#6698E4", "#A6C3EF", "#D6E3F8", "#E6EEFB"];
|
|
10
11
|
|
|
11
12
|
function ProblemSolvers({ selectedPartners = {}, loading: parentLoading = false, t=()=>{}, theme = {}, selectedRange ,goTo = () => {}, getRedirectLink = () => {}}) {
|
|
12
|
-
const { filters, filtersConfig } = useProblemSolvers();
|
|
13
|
+
const { filters, filtersConfig } = useProblemSolvers({ t });
|
|
13
14
|
|
|
14
15
|
const defaultFetchConfig = useMemo(
|
|
15
16
|
() => ({
|
|
16
|
-
basepath: "conflict-management",
|
|
17
17
|
url: "/problem-solvers",
|
|
18
|
+
basepath: "dashboard/conflict-management",
|
|
18
19
|
filters: {
|
|
19
20
|
...filters,
|
|
20
21
|
period: selectedRange,
|
|
@@ -26,8 +27,14 @@ function ProblemSolvers({ selectedPartners = {}, loading: parentLoading = false,
|
|
|
26
27
|
[filters, selectedRange, selectedPartners],
|
|
27
28
|
);
|
|
28
29
|
|
|
30
|
+
const getData = useCallback(({ url, filters, basepath }) => {
|
|
31
|
+
return DashboardService.getWidgetConflictManagement(url, filters, basepath);
|
|
32
|
+
}, []);
|
|
29
33
|
|
|
30
|
-
const { data, loading } = useWidgetFetch({
|
|
34
|
+
const { data, loading } = useWidgetFetch({
|
|
35
|
+
config: defaultFetchConfig,
|
|
36
|
+
getData
|
|
37
|
+
});
|
|
31
38
|
|
|
32
39
|
const pieData = useMemo(() => {
|
|
33
40
|
if (!data || Array.isArray(data)) return [];
|
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
import React, { useMemo, useCallback } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { renderTooltipJsx } from '
|
|
4
|
-
import Widget from '
|
|
5
|
-
import Chart from '
|
|
6
|
-
import {useWidgetFetch} from '
|
|
3
|
+
import { renderTooltipJsx } from '../../../../../../../utils/tooltip.js';
|
|
4
|
+
import Widget from '../../../../../../../core/components/Dashboard/Widget/index.jsx';
|
|
5
|
+
import Chart from '../../../../../../../core/components/Charts/PieChart/chart.jsx';
|
|
6
|
+
import {useWidgetFetch} from '../../../../../../../hooks/useWidgetFetch.js';
|
|
7
|
+
import DashboardService from '../../../../../../../services/DashboardService.js';
|
|
7
8
|
import { getColors } from './config.js';
|
|
8
|
-
import useTerritorialDistribution from './config.js';
|
|
9
9
|
|
|
10
10
|
function TerritorialDistribution({ selectedPartners = {}, loading: parentLoading = false, t = (s) => s, theme = {}, category = "conflict", selectedRange ,goTo = () => {}, getRedirectLink = () => {}}) {
|
|
11
|
-
const { filters, filtersConfig } = useTerritorialDistribution({ t });
|
|
12
11
|
const colors = getColors(theme);
|
|
13
12
|
|
|
14
13
|
const defaultFetchConfig = useMemo(
|
|
15
14
|
() => ({
|
|
16
15
|
url: "/territorial-distribution",
|
|
16
|
+
basepath: "dashboard/conflict-management",
|
|
17
17
|
filters: {
|
|
18
|
-
...filters,
|
|
19
18
|
category,
|
|
20
19
|
period: selectedRange,
|
|
21
20
|
sources: selectedPartners?.partners || [],
|
|
22
21
|
},
|
|
23
|
-
defaultData:
|
|
22
|
+
defaultData: {},
|
|
24
23
|
stop: selectedPartners?.loading,
|
|
25
24
|
}),
|
|
26
|
-
[
|
|
25
|
+
[category, selectedRange, selectedPartners],
|
|
27
26
|
);
|
|
28
27
|
|
|
29
|
-
const
|
|
28
|
+
const getData = useCallback(({ url, filters, basepath }) => {
|
|
29
|
+
return DashboardService.getWidgetConflictManagement(url, filters, basepath);
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
const { data, loading } = useWidgetFetch({
|
|
33
|
+
config: defaultFetchConfig,
|
|
34
|
+
getData
|
|
35
|
+
});
|
|
30
36
|
|
|
31
37
|
const pieData = useMemo(() => {
|
|
32
38
|
if (!data || Array.isArray(data)) return [];
|
|
@@ -50,7 +56,7 @@ function TerritorialDistribution({ selectedPartners = {}, loading: parentLoading
|
|
|
50
56
|
const isEmpty = !pieData.length;
|
|
51
57
|
|
|
52
58
|
const getTooltipChildren = useCallback((items) => {
|
|
53
|
-
const item = items[0];
|
|
59
|
+
const item = Array.isArray(items) ? items[0] : items;
|
|
54
60
|
|
|
55
61
|
return renderTooltipJsx({
|
|
56
62
|
title: item?.label || t("Undetermined"),
|
|
@@ -58,7 +64,7 @@ function TerritorialDistribution({ selectedPartners = {}, loading: parentLoading
|
|
|
58
64
|
onClickLink: () => {
|
|
59
65
|
if (item?.label) {
|
|
60
66
|
goTo(
|
|
61
|
-
`/app/
|
|
67
|
+
`/app/incidents?administrativeLevel1=${item?.locationData?.administrativeLevel1}&administrativeLevel2=${item?.locationData?.administrativeLevel2}&country=${item?.locationData?.country}`,
|
|
62
68
|
);
|
|
63
69
|
} else {
|
|
64
70
|
goTo("/app/incident");
|
|
@@ -78,7 +84,6 @@ function TerritorialDistribution({ selectedPartners = {}, loading: parentLoading
|
|
|
78
84
|
loading={loading || parentLoading}
|
|
79
85
|
title={t("Territorial Distribution")}
|
|
80
86
|
className="with-border-header"
|
|
81
|
-
filtersConfig={filtersConfig}
|
|
82
87
|
>
|
|
83
88
|
<Chart
|
|
84
89
|
mouseXOffset={10}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Select } from "antd";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import Widget from "../../../../Dashboard/Widget/index.jsx";
|
|
4
3
|
import IncidentsTime from "./components/IncidentsTime/index.js";
|
|
5
4
|
import TerritorialDistribution from "./components/TerritorialDistribution/index.js";
|
|
6
5
|
import ProblemSolver from "./components/ProblemSolver/index.js";
|
|
7
6
|
import { filterOptions } from "./config.js";
|
|
7
|
+
import Widget from "../../../../../core/components/Dashboard/Widget/index.jsx";
|
|
8
8
|
|
|
9
9
|
export default function RisksWidget({
|
|
10
10
|
title = "Analytics",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useMemo, useEffect } from "react";
|
|
2
|
-
import Header from "../../Header/index.jsx";
|
|
3
2
|
import KeyIndicators from "./components/KeyIndicators/index.js";
|
|
4
|
-
import Multiselect from "../../Select/MultiSelect/index.jsx";
|
|
5
3
|
import MineSites from "./components/MineSite/index.js";
|
|
6
4
|
import RisksWidget from "./components/RisksWidget/index.js";
|
|
7
|
-
import { useSources } from "
|
|
8
|
-
import { renderBreadCrumbs } from "
|
|
9
|
-
import CustomIcon from "
|
|
5
|
+
import { useSources } from "../../../hooks/useSources.js";
|
|
6
|
+
import { renderBreadCrumbs } from "../../../../helpers/breadCrumbs.js";
|
|
7
|
+
import CustomIcon from "../../../core/components/Icon/CustomIcon.jsx";
|
|
8
|
+
import { Header, Multiselect } from "../../../../index.js";
|
|
9
|
+
import DashboardLayout from '../../../core/components/Dashboard/DashboardLayout/index.jsx';
|
|
10
10
|
|
|
11
11
|
export default function ConflictManagement({
|
|
12
12
|
t=()=>{},
|
|
@@ -15,7 +15,9 @@ export default function ConflictManagement({
|
|
|
15
15
|
goTo = () => {},
|
|
16
16
|
getRedirectLink = (s) => s,
|
|
17
17
|
theme = {},
|
|
18
|
-
options = {}
|
|
18
|
+
options = {},
|
|
19
|
+
breadcrumbs = [],
|
|
20
|
+
|
|
19
21
|
}) {
|
|
20
22
|
const { partners, selectedPartners, setSelectedPartners, informationSources } =
|
|
21
23
|
useSources({ user, t });
|
|
@@ -45,8 +47,11 @@ export default function ConflictManagement({
|
|
|
45
47
|
}, [partners, user, theme]);
|
|
46
48
|
|
|
47
49
|
return (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
|
|
51
|
+
<DashboardLayout
|
|
52
|
+
|
|
53
|
+
header={
|
|
54
|
+
<Header
|
|
50
55
|
title={t("conflict-management")}
|
|
51
56
|
breadcrumbs={breadCrumbs}
|
|
52
57
|
supportText={
|
|
@@ -63,7 +68,6 @@ export default function ConflictManagement({
|
|
|
63
68
|
}
|
|
64
69
|
addedHeader={
|
|
65
70
|
<div>
|
|
66
|
-
<div className="flex-1" />
|
|
67
71
|
<Multiselect
|
|
68
72
|
options={[...sourceOptions]}
|
|
69
73
|
isAvatarGroup
|
|
@@ -82,12 +86,9 @@ export default function ConflictManagement({
|
|
|
82
86
|
/>
|
|
83
87
|
</div>
|
|
84
88
|
}
|
|
85
|
-
/>
|
|
89
|
+
/>}
|
|
90
|
+
>
|
|
86
91
|
|
|
87
|
-
<div className="content">
|
|
88
|
-
<div className="view-content">
|
|
89
|
-
<div className="daf-analysis-layout">
|
|
90
|
-
<div className="sections-cont w-pt">
|
|
91
92
|
<section>
|
|
92
93
|
<KeyIndicators
|
|
93
94
|
selectedPartners={selectedPartners}
|
|
@@ -126,11 +127,8 @@ export default function ConflictManagement({
|
|
|
126
127
|
options={options}
|
|
127
128
|
/>
|
|
128
129
|
</section>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
130
|
+
|
|
131
|
+
</DashboardLayout>
|
|
134
132
|
);
|
|
135
133
|
}
|
|
136
134
|
|
|
@@ -51,7 +51,7 @@ function GenderDistribution({
|
|
|
51
51
|
items: [
|
|
52
52
|
{
|
|
53
53
|
label:
|
|
54
|
-
options?.optionPositionSupplyChain?.find((o) => {
|
|
54
|
+
(options?.optionPositionSupplyChain || options?.positionSupplyChainOptions || [])?.find((o) => {
|
|
55
55
|
return o.value === item.key;
|
|
56
56
|
}).label || item.key,
|
|
57
57
|
value: data[item.key] || 0,
|
|
@@ -9,7 +9,7 @@ export const getRowConfig = ({ t, data = {}, goTo, getRedirectLink, theme = {},
|
|
|
9
9
|
t={t}
|
|
10
10
|
getRedirectLink={getRedirectLink}
|
|
11
11
|
theme={theme}
|
|
12
|
-
label="Identified Mine Sites"
|
|
12
|
+
label={t("Identified Mine Sites")}
|
|
13
13
|
link={APP === 'nashiriki' ? '/app/scl' : '/app/production-sites'}
|
|
14
14
|
/>
|
|
15
15
|
),
|
|
@@ -23,7 +23,7 @@ export const getRowConfig = ({ t, data = {}, goTo, getRedirectLink, theme = {},
|
|
|
23
23
|
t={t}
|
|
24
24
|
getRedirectLink={getRedirectLink}
|
|
25
25
|
theme={theme}
|
|
26
|
-
label="Identified Operators"
|
|
26
|
+
label={t("Identified Operators")}
|
|
27
27
|
link="/app/operators"
|
|
28
28
|
/>
|
|
29
29
|
),
|
|
@@ -43,7 +43,7 @@ export const getRowConfig = ({ t, data = {}, goTo, getRedirectLink, theme = {},
|
|
|
43
43
|
t={t}
|
|
44
44
|
getRedirectLink={getRedirectLink}
|
|
45
45
|
theme={theme}
|
|
46
|
-
label="Associated Documents"
|
|
46
|
+
label={t("Associated Documents")}
|
|
47
47
|
link="/app/documents"
|
|
48
48
|
/>
|
|
49
49
|
),
|
|
@@ -55,7 +55,7 @@ export const getRowConfig = ({ t, data = {}, goTo, getRedirectLink, theme = {},
|
|
|
55
55
|
t={t}
|
|
56
56
|
getRedirectLink={getRedirectLink}
|
|
57
57
|
theme={theme}
|
|
58
|
-
label="Information Sources"
|
|
58
|
+
label={t("Information Sources")}
|
|
59
59
|
link="/app/partners"
|
|
60
60
|
/>
|
|
61
61
|
),
|
|
@@ -52,7 +52,7 @@ const getLinkValue = (value, linkingObject) => {
|
|
|
52
52
|
return <div className="daf-default-cell" />
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const category = findOptions(v,
|
|
55
|
+
const category = findOptions(v, options?.locationCategories);
|
|
56
56
|
|
|
57
57
|
return category ? <Tooltip title={category}>{category}</Tooltip> : '-';
|
|
58
58
|
},
|
|
@@ -64,7 +64,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
64
64
|
return <div className="daf-default-cell" />
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
68
67
|
const mineSite = all?.location?.name
|
|
69
68
|
|
|
70
69
|
return mineSite ? <Tooltip title={mineSite}>{mineSite}</Tooltip> : '-';
|
|
@@ -113,7 +112,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
113
112
|
"corrective-actions": "correctiveActions",
|
|
114
113
|
"activities": "activity",
|
|
115
114
|
}
|
|
116
|
-
const eventCategory = findOptions(v,
|
|
115
|
+
const eventCategory = findOptions(v, options?.eventCategoryOptions || options?.categoryOptions);
|
|
117
116
|
const categoryValue = getEventCategoryBySubject(eventCategory, subjectMap[subject], true);
|
|
118
117
|
|
|
119
118
|
return categoryValue ? <Tooltip title={categoryValue}>{categoryValue}</Tooltip> : '-';
|
|
@@ -64,7 +64,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
64
64
|
return <div className="daf-default-cell" />
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
68
67
|
const mineSite = all?.location?.name
|
|
69
68
|
|
|
70
69
|
return mineSite ? <Tooltip title={mineSite}>{mineSite}</Tooltip> : '-';
|
|
@@ -110,7 +109,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
110
109
|
return <div className="daf-default-cell" />
|
|
111
110
|
}
|
|
112
111
|
|
|
113
|
-
const eventCategory = findOptions(v,
|
|
112
|
+
const eventCategory = findOptions(v, options?.eventCategoryOptions || options?.categoryOptions);
|
|
114
113
|
const categoryValue = getEventCategoryBySubject(eventCategory, subject);
|
|
115
114
|
|
|
116
115
|
return categoryValue ? <Tooltip title={categoryValue}>{categoryValue}</Tooltip> : '-';
|
|
@@ -81,7 +81,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
81
81
|
return <div className="daf-default-cell" />
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
85
84
|
const mineSite = all?.location?.name
|
|
86
85
|
|
|
87
86
|
return mineSite ? <Tooltip title={mineSite}>{mineSite}</Tooltip> : '-';
|
|
@@ -97,7 +96,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
97
96
|
return <div className="daf-default-cell" />
|
|
98
97
|
}
|
|
99
98
|
|
|
100
|
-
const eventCategory = findOptions(v,
|
|
99
|
+
const eventCategory = findOptions(v, options?.eventCategoryOptions || options?.categoryOptions);
|
|
101
100
|
const categoryValue = getEventCategoryBySubject(eventCategory, subject);
|
|
102
101
|
|
|
103
102
|
return categoryValue ? <Tooltip title={categoryValue}>{categoryValue}</Tooltip> : '-';
|
|
@@ -116,7 +116,7 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
116
116
|
return "-";
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
const categoryOptions = (
|
|
119
|
+
const categoryOptions = (options?.categoryOptions || []).map((c) => {
|
|
120
120
|
const searchTerm = `typeOfEvent is ${all.navigationEventType}`;
|
|
121
121
|
|
|
122
122
|
return {
|
|
@@ -127,8 +127,8 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
127
127
|
|
|
128
128
|
const relaxantOptions = [
|
|
129
129
|
...categoryOptions,
|
|
130
|
-
...(
|
|
131
|
-
...(
|
|
130
|
+
...(options?.eventsType || []),
|
|
131
|
+
...(options?.testimonialsType || []),
|
|
132
132
|
];
|
|
133
133
|
|
|
134
134
|
const title = relaxantOptions.find((v) => v.value === value)?.label || "-";
|
|
@@ -52,7 +52,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
const locationCategories = [
|
|
55
|
-
...(
|
|
55
|
+
...(options?.locationCategories || []),
|
|
56
56
|
...(options?.productionSiteCategories || []),
|
|
57
57
|
...(options?.locationCategories || [])
|
|
58
58
|
]
|
|
@@ -50,7 +50,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
const positionSupplyChainOptions = [
|
|
53
|
-
...(data?.options?.positionSupplyChainOptions || []),
|
|
54
53
|
...(options?.positionSupplyChainOptions || []),
|
|
55
54
|
...(options?.optionPositionSupplyChain || [])
|
|
56
55
|
]
|
|
@@ -73,7 +72,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
const subCategoriesOptions = [
|
|
76
|
-
...(data?.options?.subCategoriesOptions || []),
|
|
77
75
|
...(options?.subCategoriesOptions || []),
|
|
78
76
|
...(options?.subCategory || [])
|
|
79
77
|
]
|
|
@@ -50,7 +50,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
50
50
|
return <div className="daf-default-cell" />
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
54
53
|
const mineSite = all?.location?.name
|
|
55
54
|
|
|
56
55
|
return mineSite ? <Tooltip title={mineSite}>{mineSite}</Tooltip> : '-';
|
|
@@ -67,8 +66,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
const activityAtSiteOptions = [
|
|
70
|
-
...(
|
|
71
|
-
...(options?.activityAtSiteOptions || []),
|
|
69
|
+
...(options?.activityAtSiteOptions || []),
|
|
72
70
|
...(options?.activityAtSite || [])
|
|
73
71
|
]
|
|
74
72
|
|
|
@@ -43,6 +43,7 @@ export const getKeyIndicatorConfig = ({ t, data = {}, options = {} }) => [
|
|
|
43
43
|
label: t("Legal Form"),
|
|
44
44
|
render: () => {
|
|
45
45
|
const subCategory = findOptions(data?.subCategory, options?.subCategoriesOptions || options?.subCategory);
|
|
46
|
+
console.log({subCategory, initialSub: data?.subCategory, options: options?.subCategoriesOptions || options?.subCategory})
|
|
46
47
|
if(subCategory?.length > 22) {
|
|
47
48
|
const _subCategory = truncateString(subCategory, 22);
|
|
48
49
|
return <Tooltip title={subCategory}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect} from 'react'
|
|
1
|
+
import React, { useEffect, useMemo} from 'react'
|
|
2
2
|
import { message } from 'antd';
|
|
3
3
|
import { MessageTypes } from '../../../helpers/messages.js';
|
|
4
4
|
import DynamicForm from '../../core/components/DynamicForm/index.jsx';
|
|
@@ -38,16 +38,16 @@ const Create = ({
|
|
|
38
38
|
data: formValue
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
const language = useMemo(() => user?.language, [user?.language]);
|
|
42
|
+
|
|
41
43
|
useEffect(() => {
|
|
42
|
-
if (
|
|
43
|
-
if (!edit) {
|
|
44
|
+
if (!edit) {
|
|
44
45
|
getData({ namespace, module: APP, view, scope });
|
|
45
|
-
|
|
46
|
+
} else {
|
|
46
47
|
form = formConfig;
|
|
47
48
|
data = formValue;
|
|
48
|
-
}
|
|
49
49
|
}
|
|
50
|
-
}, [edit,
|
|
50
|
+
}, [edit, language, scope, namespace, APP, view]);
|
|
51
51
|
|
|
52
52
|
return (
|
|
53
53
|
<div className="daf-create-form">
|
|
@@ -41,12 +41,6 @@ const TablePage = ({
|
|
|
41
41
|
breadcrumbs = [],
|
|
42
42
|
onDownload,
|
|
43
43
|
}) => {
|
|
44
|
-
const _options = useMemo(() => {
|
|
45
|
-
return {
|
|
46
|
-
...options,
|
|
47
|
-
...data?.options,
|
|
48
|
-
}
|
|
49
|
-
},[options, data?.options])
|
|
50
44
|
|
|
51
45
|
const {
|
|
52
46
|
activeTab,
|
|
@@ -63,7 +57,7 @@ const TablePage = ({
|
|
|
63
57
|
location,
|
|
64
58
|
getData,
|
|
65
59
|
extendingFilters,
|
|
66
|
-
options
|
|
60
|
+
options,
|
|
67
61
|
t,
|
|
68
62
|
goTo,
|
|
69
63
|
user,
|
|
@@ -25,14 +25,14 @@ class DashboardService extends BaseService {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
getWidgetConflictManagement(url, params, basepath = "dashboard/conflict-management") {
|
|
29
|
+
return this.apiGet({
|
|
30
|
+
url: `/${basepath}${url}`,
|
|
31
|
+
params,
|
|
32
|
+
isApp: true,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export default createLazyService(DashboardService);
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
const en = {
|
|
2
|
+
"Identified Mine Sites": "Identified Mine Sites",
|
|
3
|
+
"Associated Documents": "Associated Documents",
|
|
4
|
+
"Male": "Male",
|
|
5
|
+
"Female": "Female",
|
|
6
|
+
"Invalid input": "Invalid input",
|
|
2
7
|
"conflict-management": "Conflict Management",
|
|
3
8
|
"review-requests": "Review Requests",
|
|
4
9
|
"create-account": "Create Account",
|
|
@@ -1430,6 +1435,7 @@ const en = {
|
|
|
1430
1435
|
"max-char": "Maximum {{filled}}/{{chars}} characters.",
|
|
1431
1436
|
"max-items": "Maximum {{chars}} items.",
|
|
1432
1437
|
"max-item": "Maximum {{chars}} item.",
|
|
1438
|
+
"organisation-already-exist": "If your organisation is already active on {{appName}}, your application will not be reviewed. Instead, please contact the account's main user and request an invitation.",
|
|
1433
1439
|
projectInviteBackDesc:
|
|
1434
1440
|
"Are you sure you want to invite this source again?This user will receive a new notification",
|
|
1435
1441
|
DataStore: {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
const fr = {
|
|
2
|
+
"Identified Mine Sites": "Sites miniers identifiés",
|
|
3
|
+
"Associated Documents": "Documents associés",
|
|
4
|
+
"Male": "Masculin",
|
|
5
|
+
"Female": "Féminin",
|
|
6
|
+
"Invalid input": "Entrée invalide",
|
|
2
7
|
"review-requests": "Examiner les demandes",
|
|
3
8
|
"create-account": "Créer un compte",
|
|
4
9
|
"manage-users": "Gérer les utilisateurs",
|
|
@@ -1444,6 +1449,7 @@ const fr = {
|
|
|
1444
1449
|
"Almost There": "On y est presque",
|
|
1445
1450
|
"Help us guide you to the right application":
|
|
1446
1451
|
"Aidez-nous à vous guider vers la bonne application",
|
|
1452
|
+
"organisation-already-exist": "Si votre organisation est déjà active dans {{appName}}, votre requête ne sera pas revue. Prière de contacter l’utilisateur principal et solliciter une invitation.",
|
|
1447
1453
|
"If your organisation is already active on Datastake, your application will not be reviewed. Instead, please contact the account's main user and request an invitation":
|
|
1448
1454
|
"Si votre organisation est déjà active dans Datastake, votre requête ne sera pas revue. Prière de contacter l’utilisateur principal et solliciter une invitation",
|
|
1449
1455
|
"Yes, I understand": "Oui, je comprends",
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
const sp = {
|
|
2
|
+
"Identified Mine Sites": "Sitios mineros identificados",
|
|
3
|
+
"Associated Documents": "Documentos asociados",
|
|
4
|
+
"Male": "Masculino",
|
|
5
|
+
"Female": "Femenino",
|
|
6
|
+
"Invalid input": "Entrada inválida",
|
|
2
7
|
"review-requests": "Revisar solicitudes",
|
|
3
8
|
"create-account": "Crear cuenta",
|
|
4
9
|
"manage-users": "Gestionar usuarios",
|
|
@@ -1005,6 +1010,7 @@ const sp = {
|
|
|
1005
1010
|
"Please introduce yourself": "Preséntese",
|
|
1006
1011
|
"Almost There": "Ya casi está",
|
|
1007
1012
|
"Help us guide you to the right application": "Ayúdenos a guiarle hacia la solicitud correcta",
|
|
1013
|
+
"organisation-already-exist": "Si su organización ya está activa en {{appName}}, su solicitud no será revisada. En su lugar, póngase en contacto con el usuario principal de la cuenta y solicite una invitación.",
|
|
1008
1014
|
"If your organisation is already active on Datastake, your application will not be reviewed. Instead, please contact the account's main user and request an invitation": "Si su organización ya está activa en Datastake, su solicitud no será revisada. En su lugar, póngase en contacto con el usuario principal de la cuenta y solicite una invitación.",
|
|
1009
1015
|
"Yes, I understand": "Sí, entiendo",
|
|
1010
1016
|
"Protect your data assets": "Proteja sus activos de datos",
|
package/src/pages.js
CHANGED
|
@@ -23,4 +23,4 @@ export { default as View } from './@daf/pages/View/index.jsx';
|
|
|
23
23
|
export { default as Edit } from './@daf/pages/Edit/index.jsx';
|
|
24
24
|
|
|
25
25
|
// Conflict Management
|
|
26
|
-
export { default as ConflictManagement } from './@daf/
|
|
26
|
+
export { default as ConflictManagement } from './@daf/pages/Dashboards/ConflictManagement/index.js'
|
package/build/favicon.ico
DELETED
|
Binary file
|
package/build/logo192.png
DELETED
|
Binary file
|
package/build/logo512.png
DELETED
|
Binary file
|