datastake-daf 0.6.794 → 0.6.796
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 +3354 -4327
- package/dist/pages/index.js +2853 -3439
- package/dist/services/index.js +3 -69
- package/dist/style/datastake/mapbox-gl.css +330 -0
- package/dist/utils/index.js +20 -14
- package/package.json +1 -1
- package/public/Vegetation/black-default.svg +23 -0
- package/public/Vegetation/black.svg +12 -0
- package/public/Vegetation/damage-from-insects-default.svg +14 -0
- package/public/Vegetation/damage-from-insects.svg +8 -0
- package/public/Vegetation/dry-or-dead-default.svg +16 -0
- package/public/Vegetation/dry-or-dead.svg +7 -0
- package/public/Vegetation/healthy-default.svg +14 -0
- package/public/Vegetation/healthy.svg +34 -0
- package/public/Vegetation/mosaic-default.svg +17 -0
- package/public/Vegetation/mosaic.svg +9 -0
- package/public/Vegetation/no-leaves-default.svg +6 -0
- package/public/Vegetation/no-leaves.svg +5 -0
- package/public/Vegetation/reddish-default.svg +23 -0
- package/public/Vegetation/reddish.svg +79 -0
- package/public/Vegetation/spider-webs-default.svg +10 -0
- package/public/Vegetation/spider-webs.svg +10 -0
- package/public/Vegetation/white-default.svg +25 -0
- package/public/Vegetation/white.svg +12 -0
- package/public/Vegetation/yellowing-default.svg +7 -0
- package/public/Vegetation/yellowing.svg +8 -0
- package/src/@daf/core/components/Dashboard/Map/hook.js +25 -1
- package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/index.jsx +24 -6
- package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/style.js +2 -6
- package/src/@daf/core/components/Dashboard/Widget/VegetationWidget/VegetationWidget.stories.jsx +76 -0
- package/src/@daf/core/components/Dashboard/Widget/VegetationWidget/config.js +31 -0
- package/src/@daf/core/components/Dashboard/Widget/VegetationWidget/index.jsx +137 -0
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/hook.js +1 -0
- 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 +1 -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 +8 -18
- 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 +7 -6
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Subjects.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminScreens/index.js +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/index.jsx +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/index.jsx +45 -73
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/columns.js +37 -37
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/index.jsx +22 -48
- package/src/@daf/core/components/Screens/Admin/AdminTables/UserTable/index.jsx +0 -1
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Edit/index.jsx +1 -3
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/SidebarMenu/index.jsx +3 -5
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/helper.js +8 -13
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/index.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminViews/index.jsx +4 -3
- package/src/@daf/core/components/Screens/Admin/adminRoutes.js +2 -81
- package/src/@daf/core/components/ViewForm/components/Records/config.js +3 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/components/AssociatedInformation/index.jsx +1 -1
- package/src/@daf/pages/Dashboards/SelfAssesment/components/OrganisationInformation/columns.js +0 -1
- package/src/@daf/pages/Dashboards/SelfAssesment/components/ProductionSites/columns.js +3 -2
- package/src/@daf/pages/Dashboards/SelfAssesment/components/ProductionSites/index.jsx +13 -4
- package/src/@daf/pages/Dashboards/SelfAssesment/index.jsx +22 -20
- package/src/@daf/pages/Events/Activities/columns.js +1 -1
- package/src/@daf/pages/Events/Activities/config.js +23 -30
- package/src/@daf/pages/Events/Incidents/columns.js +1 -1
- package/src/@daf/pages/Events/Incidents/config.js +23 -30
- package/src/@daf/pages/Events/config.js +7 -7
- package/src/@daf/pages/Locations/MineSite/columns.js +3 -3
- package/src/@daf/pages/Locations/MineSite/config.js +20 -14
- package/src/@daf/pages/Locations/config.js +3 -3
- package/src/@daf/pages/Stakeholders/Operators/columns.js +2 -2
- package/src/@daf/pages/Stakeholders/Operators/config.js +9 -16
- package/src/@daf/pages/Stakeholders/Workers/columns.js +1 -1
- package/src/@daf/pages/Stakeholders/Workers/config.js +23 -29
- package/src/@daf/pages/Stakeholders/config.js +3 -3
- package/src/@daf/pages/Summary/Activities/Monitoring/components/ActivityImagery/index.jsx +12 -10
- package/src/@daf/pages/Summary/Activities/Monitoring/components/BiodiversityAndHabitat/helper.js +86 -0
- package/src/@daf/pages/Summary/Activities/Monitoring/components/BiodiversityAndHabitat/index.jsx +65 -0
- package/src/@daf/pages/Summary/Activities/Monitoring/components/EnvironmentalMetrics/index.jsx +30 -0
- package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/PlantedSpecies/index.jsx +15 -28
- package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SeedlingsHeight/index.jsx +17 -30
- package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SurvivalRate/index.jsx +38 -45
- package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/index.jsx +87 -8
- package/src/@daf/pages/Summary/Activities/Monitoring/config.js +21 -4
- package/src/@daf/pages/Summary/Activities/Monitoring/helper.js +7 -1
- package/src/@daf/pages/Summary/Activities/Monitoring/index.jsx +31 -8
- package/src/@daf/pages/Summary/Operator/components/TradeRelationships/helper.js +1 -1
- package/src/@daf/pages/TablePage/helper.js +17 -1
- package/src/@daf/pages/TablePage/hook.js +3 -1
- package/src/@daf/pages/TablePage/index.jsx +8 -6
- package/src/@daf/pages/View/index.jsx +4 -2
- package/src/@daf/services/AdminService.js +7 -79
- package/src/@daf/services/DashboardService.js +1 -2
- package/src/@daf/utils/filters.js +26 -15
- package/src/constants/Vegetation.js +15 -0
- package/src/constants/locales/en/translation.js +1 -7
- package/src/constants/locales/fr/translation.js +2 -1
- package/src/constants/locales/sp/translation.js +2 -1
- package/src/index.js +1 -0
- package/src/pages.js +1 -10
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/columns.js +0 -79
- package/src/@daf/core/components/Screens/Admin/AdminScreens/SubjectsView.jsx +0 -272
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/column.js +0 -223
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/helper.js +0 -65
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditLocation/index.jsx +0 -81
- package/src/@daf/core/components/Screens/Admin/AdminViews/EditStakeholder/index.jsx +0 -76
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/config.js +0 -38
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/helpers.js +0 -13
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/index.jsx +0 -77
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/config.js +0 -38
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/helpers.js +0 -0
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/index.jsx +0 -75
- package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/columns.js +0 -180
- package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/config.js +0 -0
- package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/index.jsx +0 -27
- package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/columns.js +0 -157
- package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/config.js +0 -31
- package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/index.js +0 -77
- package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/columns.js +0 -117
- package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/index.jsx +0 -54
- package/src/@daf/pages/SelfAssesment/index.jsx +0 -0
|
@@ -60,7 +60,8 @@ export const getColumns = ({
|
|
|
60
60
|
return <div className="daf-default-cell" />
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
const region = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
|
|
63
|
+
// const region = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
|
|
64
|
+
const region = Object.values(all?.linking?.SCL || {}).find(obj => obj?.level === 'level_1')?.name
|
|
64
65
|
|
|
65
66
|
return region ? <Tooltip title={region}>{region}</Tooltip> : '-';
|
|
66
67
|
},
|
|
@@ -75,7 +76,7 @@ export const getColumns = ({
|
|
|
75
76
|
return <div className="daf-default-cell" />
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
const district =
|
|
79
|
+
const district = Object.values(all?.linking?.SCL || {}).find(obj => obj?.level === 'level_2')?.name
|
|
79
80
|
|
|
80
81
|
return district ? <Tooltip title={district}>{district}</Tooltip> : '-';
|
|
81
82
|
},
|
|
@@ -11,12 +11,20 @@ function ProductionSites({
|
|
|
11
11
|
user = {},
|
|
12
12
|
goTo = () => {},
|
|
13
13
|
getRedirectLink = () => {},
|
|
14
|
+
data = [],
|
|
15
|
+
loading = false,
|
|
14
16
|
}) {
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
const productionSites = useMemo(() => {
|
|
19
|
+
if(Array.isArray(data?.productionSites)) {
|
|
20
|
+
return data?.productionSites;
|
|
21
|
+
}
|
|
22
|
+
return data?.data?.productionSites || [];
|
|
23
|
+
}, [data?.productionSites, data?.data?.productionSites]);
|
|
16
24
|
|
|
17
25
|
const Wrapper = useMemo(() => {
|
|
18
|
-
return
|
|
19
|
-
}, [
|
|
26
|
+
return productionSites?.length > 5 ? ComponentWithFocus : "div";
|
|
27
|
+
}, [productionSites]);
|
|
20
28
|
|
|
21
29
|
const columns = useMemo(() => {
|
|
22
30
|
return getColumns({ t, options, user, goTo, getRedirectLink });
|
|
@@ -26,6 +34,7 @@ function ProductionSites({
|
|
|
26
34
|
<Widget
|
|
27
35
|
title={t("Production Sites")}
|
|
28
36
|
className="with-border-header no-px-body"
|
|
37
|
+
loading={loading}
|
|
29
38
|
>
|
|
30
39
|
<Wrapper>
|
|
31
40
|
<Style>
|
|
@@ -38,7 +47,7 @@ function ProductionSites({
|
|
|
38
47
|
>
|
|
39
48
|
<StickyTable
|
|
40
49
|
columns={columns}
|
|
41
|
-
dataSource={
|
|
50
|
+
dataSource={productionSites || []}
|
|
42
51
|
hideOnLoading={false}
|
|
43
52
|
doEmptyRows={true}
|
|
44
53
|
/>
|
|
@@ -13,27 +13,29 @@ function SelfAssesment({
|
|
|
13
13
|
getRedirectLink = () => {},
|
|
14
14
|
theme = {},
|
|
15
15
|
options = {},
|
|
16
|
+
data,
|
|
17
|
+
loading
|
|
16
18
|
}) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
return (
|
|
20
|
+
<DashboardLayout
|
|
21
|
+
header={
|
|
22
|
+
<Header
|
|
23
|
+
title={t("Self Assessment")}
|
|
24
|
+
breadcrumbs={breadcrumbs}
|
|
25
|
+
/>
|
|
26
|
+
}
|
|
27
|
+
>
|
|
28
|
+
<section>
|
|
29
|
+
<OrganisationInformation t={t} user={user} goTo={goTo} getRedirectLink={getRedirectLink} theme={theme} data={data} loading={loading}/>
|
|
30
|
+
</section>
|
|
31
|
+
<section>
|
|
32
|
+
<ProductionSites t={t} options={options} user={user} goTo={goTo} getRedirectLink={getRedirectLink} data={data} loading={loading} />
|
|
33
|
+
</section>
|
|
34
|
+
<section>
|
|
35
|
+
<AssociatedInformation t={t} user={user} goTo={goTo} getRedirectLink={getRedirectLink} data={data} loading={loading} />
|
|
36
|
+
</section>
|
|
37
|
+
</DashboardLayout>
|
|
38
|
+
)
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
export default SelfAssesment
|
|
@@ -110,7 +110,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
110
110
|
return <div className="daf-default-cell" />
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
const eventCategory = findOptions(v, data?.options?.eventCategoryOptions);
|
|
113
|
+
const eventCategory = findOptions(v, data?.options?.eventCategoryOptions || data?.options?.categoryOptions);
|
|
114
114
|
const categoryValue = getEventCategoryBySubject(eventCategory, "correctiveActions", true);
|
|
115
115
|
|
|
116
116
|
return categoryValue ? <Tooltip title={categoryValue}>{categoryValue}</Tooltip> : '-';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getStatusOptions } from '../../../utils/filters';
|
|
2
|
+
|
|
1
3
|
export const getFiltersConfig = ({t}) => {
|
|
2
4
|
return {
|
|
3
5
|
timeframe: {
|
|
@@ -102,15 +104,15 @@ export const getFiltersConfig = ({t}) => {
|
|
|
102
104
|
return true;
|
|
103
105
|
},
|
|
104
106
|
},
|
|
105
|
-
positionInTheMineralSupplyChain: {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
107
|
+
// positionInTheMineralSupplyChain: {
|
|
108
|
+
// type: 'select',
|
|
109
|
+
// label: 'Position',
|
|
110
|
+
// placeholder: () => `${t('Filter by')} ${t('Position').toLowerCase()}`,
|
|
111
|
+
// style: { flex: 1 },
|
|
112
|
+
// labelStyle: { flex: 1 },
|
|
113
|
+
// getLabel: (option) => option.label,
|
|
114
|
+
// getValue: (option) => option.value,
|
|
115
|
+
// },
|
|
114
116
|
status: {
|
|
115
117
|
type: "select",
|
|
116
118
|
label: "Status",
|
|
@@ -126,44 +128,35 @@ export const getFiltersConfig = ({t}) => {
|
|
|
126
128
|
export const getFilterOptions = (options, t) => {
|
|
127
129
|
const {
|
|
128
130
|
timeframe = [],
|
|
129
|
-
statusOptions
|
|
130
|
-
categoryOptions
|
|
131
|
-
countries
|
|
132
|
-
subCategory
|
|
133
|
-
category
|
|
131
|
+
statusOptions,
|
|
132
|
+
categoryOptions,
|
|
133
|
+
countries,
|
|
134
|
+
subCategory,
|
|
135
|
+
category,
|
|
134
136
|
stakeholderCategoryOptions,
|
|
135
137
|
stakeholderSubCategoriesOptions,
|
|
136
138
|
administrativeLevel1,
|
|
137
139
|
administrativeLevel2,
|
|
138
140
|
positionInMineralSupplyChainOptions,
|
|
139
141
|
subCategoriesOptions,
|
|
140
|
-
eventCategoryOptions
|
|
142
|
+
eventCategoryOptions,
|
|
141
143
|
} = options || {};
|
|
142
144
|
|
|
143
|
-
const _categoryOptions = eventCategoryOptions?.map((item) => ({
|
|
145
|
+
const _categoryOptions = (eventCategoryOptions || categoryOptions || [])?.map((item) => ({
|
|
144
146
|
value: item.value,
|
|
145
147
|
label: typeof item.label === 'object' ? Object.values(item.label)[1] : item.label,
|
|
146
148
|
}))
|
|
147
149
|
|
|
148
150
|
const _default = {
|
|
149
151
|
timeframe: timeframe,
|
|
150
|
-
status: [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
value: "private",
|
|
157
|
-
label: t("Private"),
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
eventCategory: _categoryOptions,
|
|
161
|
-
country: countries,
|
|
162
|
-
subCategory: subCategoriesOptions,
|
|
152
|
+
status: getStatusOptions(t) || [],
|
|
153
|
+
eventCategory: _categoryOptions || [],
|
|
154
|
+
country: countries || [],
|
|
155
|
+
subCategory: subCategoriesOptions || [],
|
|
163
156
|
// category: category,
|
|
164
157
|
administrativeLevel1,
|
|
165
158
|
administrativeLevel2,
|
|
166
|
-
positionInTheMineralSupplyChain: positionInMineralSupplyChainOptions,
|
|
159
|
+
// positionInTheMineralSupplyChain: positionInMineralSupplyChainOptions || [],
|
|
167
160
|
}
|
|
168
161
|
|
|
169
162
|
return _default;
|
|
@@ -110,7 +110,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
110
110
|
return <div className="daf-default-cell" />
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
const eventCategory = findOptions(v, data?.options?.eventCategoryOptions);
|
|
113
|
+
const eventCategory = findOptions(v, data?.options?.eventCategoryOptions || data?.options?.categoryOptions);
|
|
114
114
|
const categoryValue = getEventCategoryBySubject(eventCategory, subject);
|
|
115
115
|
|
|
116
116
|
return categoryValue ? <Tooltip title={categoryValue}>{categoryValue}</Tooltip> : '-';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getStatusOptions } from '../../../utils/filters';
|
|
2
|
+
|
|
1
3
|
export const getFiltersConfig = ({t}) => {
|
|
2
4
|
return {
|
|
3
5
|
timeframe: {
|
|
@@ -101,15 +103,15 @@ export const getFiltersConfig = ({t}) => {
|
|
|
101
103
|
return true;
|
|
102
104
|
},
|
|
103
105
|
},
|
|
104
|
-
positionInTheMineralSupplyChain: {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
106
|
+
// positionInTheMineralSupplyChain: {
|
|
107
|
+
// type: 'select',
|
|
108
|
+
// label: 'Position',
|
|
109
|
+
// placeholder: (t) => `${t('Filter by')} ${t('Position').toLowerCase()}`,
|
|
110
|
+
// style: { flex: 1 },
|
|
111
|
+
// labelStyle: { flex: 1 },
|
|
112
|
+
// getLabel: (option) => option.label,
|
|
113
|
+
// getValue: (option) => option.value,
|
|
114
|
+
// },
|
|
113
115
|
status: {
|
|
114
116
|
type: "select",
|
|
115
117
|
label: "Status",
|
|
@@ -125,44 +127,35 @@ export const getFiltersConfig = ({t}) => {
|
|
|
125
127
|
export const getFilterOptions = (options, t) => {
|
|
126
128
|
const {
|
|
127
129
|
timeframe = [],
|
|
128
|
-
statusOptions
|
|
129
|
-
categoryOptions
|
|
130
|
-
countries
|
|
131
|
-
subCategory
|
|
132
|
-
category
|
|
130
|
+
statusOptions,
|
|
131
|
+
categoryOptions,
|
|
132
|
+
countries,
|
|
133
|
+
subCategory,
|
|
134
|
+
category,
|
|
133
135
|
stakeholderCategoryOptions,
|
|
134
136
|
stakeholderSubCategoriesOptions,
|
|
135
137
|
administrativeLevel1,
|
|
136
138
|
administrativeLevel2,
|
|
137
139
|
positionInMineralSupplyChainOptions,
|
|
138
140
|
subCategoriesOptions,
|
|
139
|
-
eventCategoryOptions
|
|
141
|
+
eventCategoryOptions,
|
|
140
142
|
} = options || {};
|
|
141
143
|
|
|
142
|
-
const _categoryOptions = eventCategoryOptions?.map((item) => ({
|
|
144
|
+
const _categoryOptions = (eventCategoryOptions || categoryOptions || [])?.map((item) => ({
|
|
143
145
|
value: item.value,
|
|
144
146
|
label: typeof item.label === 'object' ? Object.values(item.label)[0] : item.label,
|
|
145
147
|
}))
|
|
146
148
|
|
|
147
149
|
const _default = {
|
|
148
150
|
timeframe: timeframe,
|
|
149
|
-
status: [
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
value: "private",
|
|
156
|
-
label: t("Private"),
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
eventCategory: _categoryOptions,
|
|
160
|
-
country: countries,
|
|
161
|
-
subCategory: subCategoriesOptions,
|
|
151
|
+
status: getStatusOptions(t) || [],
|
|
152
|
+
eventCategory: _categoryOptions || [],
|
|
153
|
+
country: countries || [],
|
|
154
|
+
subCategory: subCategoriesOptions || [],
|
|
162
155
|
// category: category,
|
|
163
156
|
administrativeLevel1,
|
|
164
157
|
administrativeLevel2,
|
|
165
|
-
positionInTheMineralSupplyChain: positionInMineralSupplyChainOptions,
|
|
158
|
+
// positionInTheMineralSupplyChain: positionInMineralSupplyChainOptions || [],
|
|
166
159
|
}
|
|
167
160
|
|
|
168
161
|
return _default;
|
|
@@ -110,11 +110,11 @@ export const getFiltersConfig = ({t}) => {
|
|
|
110
110
|
export const getFilterOptions = (options, t) => {
|
|
111
111
|
const {
|
|
112
112
|
timeframe = [],
|
|
113
|
-
status
|
|
114
|
-
categoryOptions
|
|
115
|
-
countries
|
|
116
|
-
category
|
|
117
|
-
eventCategoryOptions
|
|
113
|
+
status,
|
|
114
|
+
categoryOptions,
|
|
115
|
+
countries,
|
|
116
|
+
category,
|
|
117
|
+
eventCategoryOptions,
|
|
118
118
|
} = options || {};
|
|
119
119
|
|
|
120
120
|
const catOptions = eventCategoryOptions?.map((item) => ({
|
|
@@ -124,8 +124,8 @@ export const getFilterOptions = (options, t) => {
|
|
|
124
124
|
|
|
125
125
|
return {
|
|
126
126
|
timeframe: timeframe,
|
|
127
|
-
country: countries,
|
|
128
|
-
category: catOptions,
|
|
127
|
+
country: countries || [],
|
|
128
|
+
category: catOptions || [],
|
|
129
129
|
status: [
|
|
130
130
|
{
|
|
131
131
|
value: "submitted",
|
|
@@ -9,7 +9,7 @@ import MoreMenu from '../../../core/components/Table/MoreMenu/index.jsx';
|
|
|
9
9
|
import MoreOptions from '../../../core/components/Table/MoreOptions/index.jsx';
|
|
10
10
|
import { renderStatusTag } from '../../../utils/tags.js';
|
|
11
11
|
|
|
12
|
-
export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data, applications}) => [
|
|
12
|
+
export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data, applications, APP}) => [
|
|
13
13
|
{
|
|
14
14
|
dataIndex: 'datastakeId',
|
|
15
15
|
title: t('ID'),
|
|
@@ -74,7 +74,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
74
74
|
dataIndex: 'category',
|
|
75
75
|
title: t('type'),
|
|
76
76
|
ellipsis: true,
|
|
77
|
-
show:
|
|
77
|
+
show: APP === "wazi",
|
|
78
78
|
render: (v, all) => {
|
|
79
79
|
if (all.empty) {
|
|
80
80
|
return <div className="daf-default-cell" />
|
|
@@ -167,7 +167,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
167
167
|
label: t("Summary"),
|
|
168
168
|
value: "Summary",
|
|
169
169
|
onClick: () => {
|
|
170
|
-
let link = `/app/mine-summary/${all.datastakeId}`
|
|
170
|
+
let link = `/app/${subject === 'scl' ? 'summary/scl' : 'mine-summary'}/${all.datastakeId}`
|
|
171
171
|
if (activeTab === "shared") {
|
|
172
172
|
link += `?sourceId=${all?.authorId?.id}`;
|
|
173
173
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getStatusOptions } from '../../../utils/filters';
|
|
2
|
+
|
|
1
3
|
export const getFiltersConfig = ({t}) => {
|
|
2
4
|
return {
|
|
3
5
|
country: {
|
|
@@ -124,28 +126,20 @@ export const getFilterOptions = (options, t) => {
|
|
|
124
126
|
administrativeLevel1,
|
|
125
127
|
administrativeLevel2,
|
|
126
128
|
mineralOptions,
|
|
129
|
+
minerals,
|
|
127
130
|
productionSiteCategories,
|
|
128
131
|
locationCategories = [],
|
|
129
132
|
} = options || {};
|
|
130
133
|
|
|
131
134
|
const _default = {
|
|
132
135
|
// category: stakeholderCategoryOptions || categoryOptions,
|
|
133
|
-
country: countries,
|
|
134
|
-
product: mineralOptions,
|
|
135
|
-
category: productionSiteCategories || locationCategories,
|
|
136
|
+
country: countries || [],
|
|
137
|
+
product: mineralOptions || minerals || [],
|
|
138
|
+
category: productionSiteCategories || locationCategories || [],
|
|
136
139
|
administrativeLevel1,
|
|
137
140
|
administrativeLevel2,
|
|
138
|
-
subCategory: subCategoriesOptions,
|
|
139
|
-
status: [
|
|
140
|
-
{
|
|
141
|
-
value: "submitted",
|
|
142
|
-
label: t("Submitted"),
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
value: "private",
|
|
146
|
-
label: t("Private"),
|
|
147
|
-
},
|
|
148
|
-
],
|
|
141
|
+
subCategory: subCategoriesOptions || [],
|
|
142
|
+
status: getStatusOptions(t) || [],
|
|
149
143
|
}
|
|
150
144
|
|
|
151
145
|
return _default;
|
|
@@ -161,4 +155,16 @@ export const formConfig = {
|
|
|
161
155
|
export const viewConfig = {
|
|
162
156
|
title: "Production Sites",
|
|
163
157
|
createTitle: "Create Production Site",
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export const sclFormConfig = {
|
|
161
|
+
namespace: 'SCL',
|
|
162
|
+
view: ['scoping', 'new'],
|
|
163
|
+
scope: 'create',
|
|
164
|
+
formType: 'scl',
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export const sclViewConfig = {
|
|
168
|
+
title: "Mine Sites",
|
|
169
|
+
createTitle: "New Mine Site",
|
|
164
170
|
}
|
|
@@ -21,10 +21,10 @@ export const getFiltersConfig = ({t}) => {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export const getFilterOptions = (options, t) => {
|
|
24
|
-
const { countries
|
|
24
|
+
const { countries , category , locationCategories } = options || {};
|
|
25
25
|
return {
|
|
26
|
-
country: countries,
|
|
27
|
-
category: locationCategories || category,
|
|
26
|
+
country: countries || [],
|
|
27
|
+
category: locationCategories || category || [],
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -49,7 +49,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
49
49
|
return <div className="daf-default-cell" />
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
52
|
+
const country = findOptions(v, data?.options?.positionSupplyChainOptions || data?.options?.optionPositionSupplyChain);
|
|
53
53
|
|
|
54
54
|
return country ? <Tooltip title={country}>{country}</Tooltip> : '-';
|
|
55
55
|
},
|
|
@@ -66,7 +66,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
66
66
|
return <div className="daf-default-cell" />
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
const subCategory = findOptions(v, data?.options?.subCategoriesOptions);
|
|
69
|
+
const subCategory = findOptions(v, data?.options?.subCategoriesOptions || data?.options?.subCategory);
|
|
70
70
|
|
|
71
71
|
return subCategory ? <Tooltip title={subCategory}>{subCategory}</Tooltip> : '-';
|
|
72
72
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getStatusOptions } from '../../../utils/filters';
|
|
2
|
+
|
|
1
3
|
export const getFiltersConfig = ({t}) => {
|
|
2
4
|
return {
|
|
3
5
|
country: {
|
|
@@ -75,7 +77,7 @@ export const getFiltersConfig = ({t}) => {
|
|
|
75
77
|
subCategory: {
|
|
76
78
|
type: 'select',
|
|
77
79
|
label: 'Sub Category',
|
|
78
|
-
placeholder: () => `${t('Filter by')} ${t('
|
|
80
|
+
placeholder: () => `${t('Filter by')} ${t('Legal Form').toLowerCase()}`,
|
|
79
81
|
style: { flex: 1 },
|
|
80
82
|
labelStyle: { flex: 1 },
|
|
81
83
|
getLabel: (option) => option.label,
|
|
@@ -119,10 +121,10 @@ export const getFiltersConfig = ({t}) => {
|
|
|
119
121
|
|
|
120
122
|
export const getFilterOptions = (options, t) => {
|
|
121
123
|
const {
|
|
122
|
-
statusOptions
|
|
123
|
-
categoryOptions
|
|
124
|
-
countries
|
|
125
|
-
subCategory
|
|
124
|
+
statusOptions,
|
|
125
|
+
categoryOptions,
|
|
126
|
+
countries,
|
|
127
|
+
subCategory,
|
|
126
128
|
subCategoriesOptions,
|
|
127
129
|
stakeholderCategoryOptions,
|
|
128
130
|
stakeholderSubCategoriesOptions,
|
|
@@ -135,17 +137,8 @@ export const getFilterOptions = (options, t) => {
|
|
|
135
137
|
country: countries,
|
|
136
138
|
administrativeLevel1,
|
|
137
139
|
administrativeLevel2,
|
|
138
|
-
subCategory: subCategoriesOptions,
|
|
139
|
-
status: [
|
|
140
|
-
{
|
|
141
|
-
value: "submitted",
|
|
142
|
-
label: t("Submitted"),
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
value: "private",
|
|
146
|
-
label: t("Private"),
|
|
147
|
-
},
|
|
148
|
-
],
|
|
140
|
+
subCategory: subCategoriesOptions || subCategory,
|
|
141
|
+
status: getStatusOptions(t) || [],
|
|
149
142
|
}
|
|
150
143
|
|
|
151
144
|
return _default;
|
|
@@ -66,7 +66,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
66
66
|
return <div className="daf-default-cell" />
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
const activity = findOptions(v, data?.options?.activityAtSiteOptions);
|
|
69
|
+
const activity = findOptions(v, data?.options?.activityAtSiteOptions || data?.options?.activityAtSite);
|
|
70
70
|
|
|
71
71
|
return activity ? <Tooltip title={activity}>{activity}</Tooltip> : '-';
|
|
72
72
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getStatusOptions } from '../../../utils/filters';
|
|
2
|
+
|
|
1
3
|
export const getFiltersConfig = ({t}) => {
|
|
2
4
|
return {
|
|
3
5
|
country: {
|
|
@@ -81,15 +83,15 @@ export const getFiltersConfig = ({t}) => {
|
|
|
81
83
|
getLabel: (option) => option.label,
|
|
82
84
|
getValue: (option) => option.value,
|
|
83
85
|
},
|
|
84
|
-
positionInTheMineralSupplyChain: {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
},
|
|
86
|
+
// positionInTheMineralSupplyChain: {
|
|
87
|
+
// type: 'select',
|
|
88
|
+
// label: 'Position',
|
|
89
|
+
// placeholder: () => `${t('Filter by')} ${t('Position').toLowerCase()}`,
|
|
90
|
+
// style: { flex: 1 },
|
|
91
|
+
// labelStyle: { flex: 1 },
|
|
92
|
+
// getLabel: (option) => option.label,
|
|
93
|
+
// getValue: (option) => option.value,
|
|
94
|
+
// },
|
|
93
95
|
status: {
|
|
94
96
|
type: "select",
|
|
95
97
|
label: "Status",
|
|
@@ -104,37 +106,29 @@ export const getFiltersConfig = ({t}) => {
|
|
|
104
106
|
|
|
105
107
|
export const getFilterOptions = (options, t) => {
|
|
106
108
|
const {
|
|
107
|
-
statusOptions
|
|
108
|
-
categoryOptions
|
|
109
|
-
countries
|
|
110
|
-
subCategory
|
|
111
|
-
activityAtSiteOptions
|
|
109
|
+
statusOptions,
|
|
110
|
+
categoryOptions,
|
|
111
|
+
countries,
|
|
112
|
+
subCategory,
|
|
113
|
+
activityAtSiteOptions,
|
|
112
114
|
stakeholderCategoryOptions,
|
|
113
115
|
stakeholderSubCategoriesOptions,
|
|
114
116
|
administrativeLevel1,
|
|
115
117
|
administrativeLevel2,
|
|
116
118
|
positionInMineralSupplyChainOptions,
|
|
117
119
|
subCategoriesOptions,
|
|
120
|
+
activityAtSite,
|
|
118
121
|
} = options || {};
|
|
119
122
|
|
|
120
123
|
const _default = {
|
|
121
|
-
status: [
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
{
|
|
127
|
-
value: "private",
|
|
128
|
-
label: t("Private"),
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
category: stakeholderCategoryOptions || categoryOptions,
|
|
132
|
-
country: countries,
|
|
133
|
-
subCategory: subCategoriesOptions,
|
|
134
|
-
activity: activityAtSiteOptions,
|
|
124
|
+
status: getStatusOptions(t) || [],
|
|
125
|
+
// category: stakeholderCategoryOptions || categoryOptions || [],
|
|
126
|
+
country: countries || [],
|
|
127
|
+
// subCategory: subCategoriesOptions || [],
|
|
128
|
+
activity: activityAtSiteOptions || activityAtSite || [],
|
|
135
129
|
administrativeLevel1,
|
|
136
130
|
administrativeLevel2,
|
|
137
|
-
positionInTheMineralSupplyChain: positionInMineralSupplyChainOptions,
|
|
131
|
+
// positionInTheMineralSupplyChain: positionInMineralSupplyChainOptions,
|
|
138
132
|
}
|
|
139
133
|
|
|
140
134
|
return _default;
|
|
@@ -21,10 +21,10 @@ export const getFiltersConfig = ({t}) => {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export const getFilterOptions = (options, t) => {
|
|
24
|
-
const { countries
|
|
24
|
+
const { countries, category, categoriesOptions } = options || {};
|
|
25
25
|
return {
|
|
26
|
-
country: countries,
|
|
27
|
-
category: categoriesOptions || category,
|
|
26
|
+
country: countries || [],
|
|
27
|
+
category: categoriesOptions || category || [],
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -12,16 +12,18 @@ const ActivityImagery = ({
|
|
|
12
12
|
const images = useMemo(() => getActivityImages(activityData), [activityData]);
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<div style={{ maxWidth: "
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
<div style={{ maxWidth: "50%", width: "calc(100% - 405px)" , }}>
|
|
16
|
+
<ImageCarousel
|
|
17
|
+
loading={loading}
|
|
18
|
+
images={images}
|
|
19
|
+
title={t("straatos::activity-imagery")}
|
|
20
|
+
key={`${isCollapsed}-${isNestedSidebarCollapsed}`}
|
|
21
|
+
customArrows={true}
|
|
22
|
+
activeDotColor="#003435"
|
|
23
|
+
height={245}
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
25
27
|
);
|
|
26
28
|
};
|
|
27
29
|
|