datastake-daf 0.6.816 → 0.6.817
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 +1196 -1285
- package/dist/pages/index.js +1315 -579
- package/dist/services/index.js +202 -0
- package/dist/utils/index.js +28 -0
- package/package.json +1 -1
- package/src/@daf/core/components/Charts/RadarChart/index.jsx +3 -12
- package/src/@daf/core/components/Charts/style.js +1 -2
- package/src/@daf/core/components/Dashboard/Map/ChainIcon/index.js +123 -104
- package/src/@daf/core/components/Dashboard/Widget/VegetationWidget/index.jsx +4 -0
- package/src/@daf/core/components/Table/index.jsx +11 -6
- package/src/@daf/pages/Events/Activities/columns.js +15 -11
- package/src/@daf/pages/Events/Incidents/columns.js +15 -11
- package/src/@daf/pages/Events/Testimonials/columns.js +173 -0
- package/src/@daf/pages/Events/Testimonials/config.js +175 -0
- package/src/@daf/pages/Events/columns.js +7 -3
- package/src/@daf/pages/Locations/ConflictAreas/columns.js +140 -0
- package/src/@daf/pages/Locations/ConflictAreas/config.js +41 -0
- package/src/@daf/pages/Locations/MineSite/columns.js +21 -12
- package/src/@daf/pages/Locations/MineSite/config.js +2 -1
- package/src/@daf/pages/Locations/columns.js +7 -3
- package/src/@daf/pages/Stakeholders/ArmedGroups/columns.js +110 -0
- package/src/@daf/pages/Stakeholders/ArmedGroups/config.js +41 -0
- package/src/@daf/pages/Stakeholders/Operators/columns.js +30 -14
- package/src/@daf/pages/Stakeholders/Workers/columns.js +23 -13
- package/src/@daf/pages/Stakeholders/columns.js +8 -4
- package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/BiodiversityHabitat/ObservedFauna.jsx +11 -6
- package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/PlantedSpecies.jsx +10 -25
- package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/SeedlingsHeight.jsx +13 -10
- package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/VegetationHealth.jsx +4 -19
- package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/SoilWaterProfile/SoilType.jsx +10 -22
- package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/SoilWaterProfile/WaterQuality.jsx +10 -26
- package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/chartHelpers.js +0 -74
- package/src/@daf/pages/TablePage/config.js +1 -1
- package/src/@daf/pages/TablePage/helper.js +45 -0
- package/src/@daf/services/EventsService.js +115 -0
- package/src/@daf/services/LinkedSubjects.js +1 -0
- package/src/@daf/services/WorkersService.js +80 -0
- package/src/helpers/errorHandling.js +142 -74
- package/src/services.js +3 -1
- package/src/utils.js +1 -1
- package/dist/style/datastake/mapbox-gl.css +0 -330
package/dist/pages/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var reactCollapsed = require('react-collapsed');
|
|
|
16
16
|
var L$1 = require('leaflet');
|
|
17
17
|
var countryCityLocation = require('country-city-location');
|
|
18
18
|
var client = require('react-dom/client');
|
|
19
|
+
var reactDom = require('react-dom');
|
|
19
20
|
require('@elfalem/leaflet-curve');
|
|
20
21
|
var react = require('@xyflow/react');
|
|
21
22
|
var g2plot = require('@antv/g2plot');
|
|
@@ -9401,8 +9402,8 @@ function LocationIcon({
|
|
|
9401
9402
|
activeMarker,
|
|
9402
9403
|
setActiveMarker
|
|
9403
9404
|
}) {
|
|
9404
|
-
const rootsMapRef = React.useRef(new Map());
|
|
9405
9405
|
const markersRef = React.useRef([]);
|
|
9406
|
+
const [portalContainers, setPortalContainers] = React.useState([]);
|
|
9406
9407
|
const isSelected = selectedMarkersId.includes(data.datastakeId);
|
|
9407
9408
|
const Marker = React.useMemo(() => {
|
|
9408
9409
|
if (isMineSite(data.type)) {
|
|
@@ -9410,7 +9411,7 @@ function LocationIcon({
|
|
|
9410
9411
|
}
|
|
9411
9412
|
return VillageMarker;
|
|
9412
9413
|
}, [data.type]);
|
|
9413
|
-
|
|
9414
|
+
React.useState(false);
|
|
9414
9415
|
const linkedNodesData = React.useMemo(() => {
|
|
9415
9416
|
const nodes = [];
|
|
9416
9417
|
const links = data.links || [];
|
|
@@ -9475,31 +9476,32 @@ function LocationIcon({
|
|
|
9475
9476
|
return nodes;
|
|
9476
9477
|
}, [JSON.stringify(allData), JSON.stringify(data.links), JSON.stringify(data.stakeholders), zoom]);
|
|
9477
9478
|
const stakeholdersOfLocation = React.useMemo(() => {
|
|
9478
|
-
return data?.stakeholders || []
|
|
9479
|
-
|
|
9479
|
+
return (data?.stakeholders || []).filter(stakeholder => {
|
|
9480
|
+
if (!stakeholder.links || stakeholder.links.length === 0) {
|
|
9481
|
+
return true;
|
|
9482
|
+
}
|
|
9483
|
+
const locationsWithThisStakeholder = allData.filter(loc => loc.stakeholders?.some(s => s.datastakeId === stakeholder.datastakeId)).map(loc => loc.datastakeId);
|
|
9484
|
+
const primaryLocation = locationsWithThisStakeholder.sort()[0];
|
|
9485
|
+
return data.datastakeId === primaryLocation;
|
|
9486
|
+
});
|
|
9487
|
+
}, [data.stakeholders, data.datastakeId, allData, zoom]);
|
|
9480
9488
|
React.useEffect(() => {
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
currentMarkers.forEach(marker => {
|
|
9484
|
-
if (mapRef.hasLayer(marker)) {
|
|
9489
|
+
markersRef.current.forEach(marker => {
|
|
9490
|
+
if (mapRef && mapRef.hasLayer(marker)) {
|
|
9485
9491
|
mapRef.removeLayer(marker);
|
|
9486
9492
|
}
|
|
9487
9493
|
});
|
|
9488
|
-
currentRoots.forEach(root => {
|
|
9489
|
-
root.unmount();
|
|
9490
|
-
});
|
|
9491
|
-
currentRoots.clear();
|
|
9492
9494
|
markersRef.current = [];
|
|
9493
|
-
|
|
9494
|
-
// Only create stakeholder markers if this location or any of its stakeholders are selected
|
|
9495
|
+
setPortalContainers([]);
|
|
9495
9496
|
const shouldShowStakeholders = isSelected || stakeholdersOfLocation.some(stk => selectedMarkersId.includes(stk.datastakeId));
|
|
9496
9497
|
if (!shouldShowStakeholders || selectedMarkersId.length === 0) {
|
|
9497
9498
|
return;
|
|
9498
9499
|
}
|
|
9499
9500
|
|
|
9500
|
-
// Create
|
|
9501
|
+
// Create markers and store their container references
|
|
9502
|
+
const containers = [];
|
|
9501
9503
|
stakeholdersOfLocation.forEach((stakeholder, index) => {
|
|
9502
|
-
const markerId = `${stakeholder.datastakeId}`;
|
|
9504
|
+
const markerId = `${data.datastakeId}-${stakeholder.datastakeId}`;
|
|
9503
9505
|
const {
|
|
9504
9506
|
x,
|
|
9505
9507
|
y,
|
|
@@ -9522,41 +9524,29 @@ function LocationIcon({
|
|
|
9522
9524
|
const pathLocLatLng = mapRef.layerPointToLatLng(pathLocPoint);
|
|
9523
9525
|
const isForceOpen = activeMarker?.datastakeId === data.datastakeId;
|
|
9524
9526
|
const iconSize = isSmallMarker(zoom) || isExtraSmallMarker(zoom) ? [11, 11] : [25, 25];
|
|
9527
|
+
|
|
9528
|
+
// Create container div
|
|
9529
|
+
const containerDiv = document.createElement('div');
|
|
9530
|
+
containerDiv.id = markerId;
|
|
9525
9531
|
const marker = L__namespace.marker(stakeholderLatLng, {
|
|
9526
9532
|
icon: L__namespace.divIcon({
|
|
9527
|
-
html:
|
|
9533
|
+
html: containerDiv.outerHTML,
|
|
9528
9534
|
className: "marker-chain",
|
|
9529
9535
|
iconSize: iconSize
|
|
9530
9536
|
})
|
|
9531
9537
|
}).addTo(mapRef);
|
|
9532
9538
|
markersRef.current.push(marker);
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
renderTooltip: renderTooltip,
|
|
9545
|
-
onClickLink: onClickLink,
|
|
9546
|
-
selectedMarkersId: selectedMarkersId,
|
|
9547
|
-
handleSelectMarker: handleSelectMarker,
|
|
9548
|
-
mapRef: mapRef,
|
|
9549
|
-
radius: radius,
|
|
9550
|
-
index: index,
|
|
9551
|
-
x: x,
|
|
9552
|
-
y: y,
|
|
9553
|
-
openPopupIdRef: openPopupIdRef,
|
|
9554
|
-
polylinesRef: polylinesRef,
|
|
9555
|
-
isForceOpen: isForceOpen,
|
|
9556
|
-
activeMarker: activeMarker
|
|
9557
|
-
}));
|
|
9558
|
-
}
|
|
9559
|
-
}, 0);
|
|
9539
|
+
|
|
9540
|
+
// Store container info for portal rendering
|
|
9541
|
+
containers.push({
|
|
9542
|
+
markerId,
|
|
9543
|
+
stakeholder,
|
|
9544
|
+
x,
|
|
9545
|
+
y,
|
|
9546
|
+
radius,
|
|
9547
|
+
index,
|
|
9548
|
+
isForceOpen
|
|
9549
|
+
});
|
|
9560
9550
|
setMapMarkers(prev => {
|
|
9561
9551
|
const array = [...prev, {
|
|
9562
9552
|
id: marker._leaflet_id,
|
|
@@ -9588,17 +9578,19 @@ function LocationIcon({
|
|
|
9588
9578
|
animated: true
|
|
9589
9579
|
});
|
|
9590
9580
|
});
|
|
9581
|
+
|
|
9582
|
+
// Update portal containers after markers are created
|
|
9583
|
+
setTimeout(() => {
|
|
9584
|
+
setPortalContainers(containers);
|
|
9585
|
+
}, 0);
|
|
9591
9586
|
return () => {
|
|
9592
9587
|
markersRef.current.forEach(marker => {
|
|
9593
|
-
if (mapRef.hasLayer(marker)) {
|
|
9588
|
+
if (mapRef && mapRef.hasLayer(marker)) {
|
|
9594
9589
|
mapRef.removeLayer(marker);
|
|
9595
9590
|
}
|
|
9596
9591
|
});
|
|
9597
|
-
rootsMapRef.current.forEach(root => {
|
|
9598
|
-
root.unmount();
|
|
9599
|
-
});
|
|
9600
|
-
rootsMapRef.current.clear();
|
|
9601
9592
|
markersRef.current = [];
|
|
9593
|
+
setPortalContainers([]);
|
|
9602
9594
|
};
|
|
9603
9595
|
}, [stakeholdersOfLocation, selectedMarkersId, activeMarker, zoom]);
|
|
9604
9596
|
|
|
@@ -9682,57 +9674,81 @@ function LocationIcon({
|
|
|
9682
9674
|
});
|
|
9683
9675
|
});
|
|
9684
9676
|
}, [linkedNodesData, selectedMarkersId, zoom, stakeholdersOfLocation, isSelected]);
|
|
9685
|
-
return /*#__PURE__*/jsxRuntime.
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
,
|
|
9701
|
-
getPopupContainer: triggerNode => {
|
|
9702
|
-
const mapElement = document.getElementById("map");
|
|
9703
|
-
return mapElement || triggerNode.parentElement || document.body;
|
|
9704
|
-
},
|
|
9705
|
-
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9706
|
-
style: {
|
|
9707
|
-
position: "relative",
|
|
9708
|
-
display: "inline-block"
|
|
9677
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9678
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
|
|
9679
|
+
content: renderTooltipJsx({
|
|
9680
|
+
title: data.name,
|
|
9681
|
+
subTitle: data.subTitle,
|
|
9682
|
+
total: data.sources,
|
|
9683
|
+
className: "pt-0 pb-0",
|
|
9684
|
+
items: renderTooltip(data),
|
|
9685
|
+
link,
|
|
9686
|
+
onClickLink: () => onClickLink(data),
|
|
9687
|
+
isNewTab: true
|
|
9688
|
+
}),
|
|
9689
|
+
getPopupContainer: triggerNode => {
|
|
9690
|
+
const mapElement = document.getElementById("map");
|
|
9691
|
+
return mapElement || triggerNode.parentElement || document.body;
|
|
9709
9692
|
},
|
|
9710
|
-
children:
|
|
9693
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9711
9694
|
style: {
|
|
9712
|
-
position: "
|
|
9713
|
-
|
|
9714
|
-
left: "50%",
|
|
9715
|
-
transform: "translateX(-50%)",
|
|
9716
|
-
width: "12px",
|
|
9717
|
-
height: "6px",
|
|
9718
|
-
background: "rgba(0,0,0,0.15)",
|
|
9719
|
-
borderRadius: "50%",
|
|
9720
|
-
filter: "blur(3px)"
|
|
9721
|
-
}
|
|
9722
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Marker, {
|
|
9723
|
-
isSelected: isSelected,
|
|
9724
|
-
onClick: () => {
|
|
9725
|
-
handleSelectMarker(data);
|
|
9726
|
-
setActiveMarker(isSelected ? null : data);
|
|
9695
|
+
position: "relative",
|
|
9696
|
+
display: "inline-block"
|
|
9727
9697
|
},
|
|
9698
|
+
children: [(isSelected || selectedMarkersId.length === 0) && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
9699
|
+
style: {
|
|
9700
|
+
position: "absolute",
|
|
9701
|
+
bottom: "0",
|
|
9702
|
+
left: "50%",
|
|
9703
|
+
transform: "translateX(-50%)",
|
|
9704
|
+
width: "12px",
|
|
9705
|
+
height: "6px",
|
|
9706
|
+
background: "rgba(0,0,0,0.15)",
|
|
9707
|
+
borderRadius: "50%",
|
|
9708
|
+
filter: "blur(3px)"
|
|
9709
|
+
}
|
|
9710
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Marker, {
|
|
9711
|
+
isSelected: isSelected,
|
|
9712
|
+
onClick: () => {
|
|
9713
|
+
handleSelectMarker(data);
|
|
9714
|
+
setActiveMarker(isSelected ? null : data);
|
|
9715
|
+
},
|
|
9716
|
+
zoom: zoom,
|
|
9717
|
+
selectedMarkersId: selectedMarkersId
|
|
9718
|
+
})]
|
|
9719
|
+
})
|
|
9720
|
+
}), portalContainers.map(({
|
|
9721
|
+
markerId,
|
|
9722
|
+
stakeholder,
|
|
9723
|
+
x,
|
|
9724
|
+
y,
|
|
9725
|
+
radius,
|
|
9726
|
+
index,
|
|
9727
|
+
isForceOpen
|
|
9728
|
+
}) => {
|
|
9729
|
+
const container = document.getElementById(markerId);
|
|
9730
|
+
if (!container) return null;
|
|
9731
|
+
return /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/jsxRuntime.jsx(StakeholderIcon$1, {
|
|
9732
|
+
data: stakeholder,
|
|
9728
9733
|
zoom: zoom,
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9734
|
+
allData: allData,
|
|
9735
|
+
link: link,
|
|
9736
|
+
parentId: data.datastakeId,
|
|
9737
|
+
renderTooltip: renderTooltip,
|
|
9738
|
+
onClickLink: onClickLink,
|
|
9739
|
+
selectedMarkersId: selectedMarkersId,
|
|
9740
|
+
handleSelectMarker: handleSelectMarker,
|
|
9741
|
+
mapRef: mapRef,
|
|
9742
|
+
radius: radius,
|
|
9743
|
+
index: index,
|
|
9744
|
+
x: x,
|
|
9745
|
+
y: y,
|
|
9746
|
+
openPopupIdRef: openPopupIdRef,
|
|
9747
|
+
polylinesRef: polylinesRef,
|
|
9748
|
+
isForceOpen: isForceOpen,
|
|
9749
|
+
activeMarker: activeMarker
|
|
9750
|
+
}, markerId), container);
|
|
9751
|
+
})]
|
|
9736
9752
|
});
|
|
9737
9753
|
}
|
|
9738
9754
|
|
|
@@ -12752,8 +12768,7 @@ const mapDataForChainOfCustody = (data = {}, options = {}, goTo = () => {}) => {
|
|
|
12752
12768
|
|
|
12753
12769
|
const Container$1 = styled__default["default"].div`
|
|
12754
12770
|
height: ${props => props.height || '300px'};
|
|
12755
|
-
width: ${props => props.isPdf ? props.width ? props.width : '1000px' : 'calc(100% - 48px)'};
|
|
12756
|
-
overflow: ${props => props.style?.overflow || 'visible'};
|
|
12771
|
+
width: ${props => props.isPdf ? props.width ? props.width : '1000px' : 'calc(100% - 48px)'};
|
|
12757
12772
|
`;
|
|
12758
12773
|
|
|
12759
12774
|
const useLegendConfig = ({
|
|
@@ -14161,7 +14176,7 @@ const getTabs = t => {
|
|
|
14161
14176
|
label: t("Events")
|
|
14162
14177
|
}];
|
|
14163
14178
|
};
|
|
14164
|
-
const getFiltersConfig$
|
|
14179
|
+
const getFiltersConfig$e = ({
|
|
14165
14180
|
t,
|
|
14166
14181
|
filters,
|
|
14167
14182
|
activeTab,
|
|
@@ -14396,7 +14411,7 @@ function MineSites({
|
|
|
14396
14411
|
config: dataFetchConfig
|
|
14397
14412
|
});
|
|
14398
14413
|
const tabs = React.useMemo(() => getTabs(t), [t]);
|
|
14399
|
-
const filtersConfig = React.useMemo(() => getFiltersConfig$
|
|
14414
|
+
const filtersConfig = React.useMemo(() => getFiltersConfig$e({
|
|
14400
14415
|
t,
|
|
14401
14416
|
filters,
|
|
14402
14417
|
options,
|
|
@@ -15549,7 +15564,12 @@ function DAFTable({
|
|
|
15549
15564
|
doEmptyRows,
|
|
15550
15565
|
...rest
|
|
15551
15566
|
}) {
|
|
15552
|
-
const
|
|
15567
|
+
const source = React.useMemo(() => {
|
|
15568
|
+
if (data && Array.isArray(data)) {
|
|
15569
|
+
return data;
|
|
15570
|
+
}
|
|
15571
|
+
return [];
|
|
15572
|
+
}, [data]);
|
|
15553
15573
|
const projectData = (projects || []).find(p => p.id === selectedProject);
|
|
15554
15574
|
const [filtersInit, setFiltersInit] = React.useState(!loading);
|
|
15555
15575
|
React.useEffect(() => {
|
|
@@ -15594,11 +15614,13 @@ function DAFTable({
|
|
|
15594
15614
|
}
|
|
15595
15615
|
} : filtersConfig;
|
|
15596
15616
|
}, [sourcesKey, sources, filtersConfig, t]);
|
|
15597
|
-
|
|
15598
|
-
|
|
15599
|
-
|
|
15600
|
-
|
|
15601
|
-
}
|
|
15617
|
+
|
|
15618
|
+
// useEffect(() => {
|
|
15619
|
+
// if (data && Array.isArray(data)) {
|
|
15620
|
+
// setSource(data);
|
|
15621
|
+
// }
|
|
15622
|
+
// }, [data, data.length]);
|
|
15623
|
+
|
|
15602
15624
|
const paginationPageSize = pagination?.pageSize;
|
|
15603
15625
|
const dataSource = React.useMemo(() => {
|
|
15604
15626
|
const pageSize = paginationPageSize ? paginationPageSize : source.length > 10 ? source.length : 10;
|
|
@@ -16088,7 +16110,7 @@ const NavigationAction = ({
|
|
|
16088
16110
|
});
|
|
16089
16111
|
};
|
|
16090
16112
|
|
|
16091
|
-
const getColumns$
|
|
16113
|
+
const getColumns$j = ({
|
|
16092
16114
|
t,
|
|
16093
16115
|
data,
|
|
16094
16116
|
user,
|
|
@@ -16214,7 +16236,7 @@ function OrganisationInformation({
|
|
|
16214
16236
|
});
|
|
16215
16237
|
}, [organisationInfo, data]);
|
|
16216
16238
|
const columns = React.useMemo(() => {
|
|
16217
|
-
return getColumns$
|
|
16239
|
+
return getColumns$j({
|
|
16218
16240
|
t,
|
|
16219
16241
|
data: tableData,
|
|
16220
16242
|
user,
|
|
@@ -16345,7 +16367,7 @@ const Style$8 = styled__default["default"].div`
|
|
|
16345
16367
|
}
|
|
16346
16368
|
`;
|
|
16347
16369
|
|
|
16348
|
-
const getColumns$
|
|
16370
|
+
const getColumns$i = ({
|
|
16349
16371
|
t = () => {},
|
|
16350
16372
|
options = {},
|
|
16351
16373
|
user = {},
|
|
@@ -16502,7 +16524,7 @@ function ProductionSites({
|
|
|
16502
16524
|
return productionSites?.length > 5 ? ComponentWithFocus : "div";
|
|
16503
16525
|
}, [productionSites]);
|
|
16504
16526
|
const columns = React.useMemo(() => {
|
|
16505
|
-
return getColumns$
|
|
16527
|
+
return getColumns$i({
|
|
16506
16528
|
t,
|
|
16507
16529
|
options,
|
|
16508
16530
|
user,
|
|
@@ -16736,7 +16758,7 @@ const getAdminLevelName = (data, level) => {
|
|
|
16736
16758
|
return entry?.name || "-";
|
|
16737
16759
|
};
|
|
16738
16760
|
|
|
16739
|
-
const getColumns$
|
|
16761
|
+
const getColumns$h = ({
|
|
16740
16762
|
t,
|
|
16741
16763
|
activeTab,
|
|
16742
16764
|
options,
|
|
@@ -17030,7 +17052,7 @@ function AssociatedInformation$1({
|
|
|
17030
17052
|
console.log({
|
|
17031
17053
|
data
|
|
17032
17054
|
});
|
|
17033
|
-
const columns = React.useMemo(() => getColumns$
|
|
17055
|
+
const columns = React.useMemo(() => getColumns$h({
|
|
17034
17056
|
t,
|
|
17035
17057
|
isMonitoring: false,
|
|
17036
17058
|
activeTab,
|
|
@@ -17414,7 +17436,7 @@ const getPartnershipTypes = t => {
|
|
|
17414
17436
|
}];
|
|
17415
17437
|
};
|
|
17416
17438
|
|
|
17417
|
-
const getColumns$
|
|
17439
|
+
const getColumns$g = ({
|
|
17418
17440
|
t,
|
|
17419
17441
|
accept,
|
|
17420
17442
|
decline,
|
|
@@ -40800,7 +40822,7 @@ const PartnersTable = ({
|
|
|
40800
40822
|
setTotalRequests,
|
|
40801
40823
|
t
|
|
40802
40824
|
});
|
|
40803
|
-
const columns = React.useMemo(() => getColumns$
|
|
40825
|
+
const columns = React.useMemo(() => getColumns$g({
|
|
40804
40826
|
t,
|
|
40805
40827
|
accept,
|
|
40806
40828
|
decline,
|
|
@@ -41037,7 +41059,7 @@ const Create = ({
|
|
|
41037
41059
|
});
|
|
41038
41060
|
};
|
|
41039
41061
|
|
|
41040
|
-
const getFiltersConfig$
|
|
41062
|
+
const getFiltersConfig$d = ({
|
|
41041
41063
|
t
|
|
41042
41064
|
}) => {
|
|
41043
41065
|
return {
|
|
@@ -41068,7 +41090,7 @@ const getFiltersConfig$a = ({
|
|
|
41068
41090
|
}
|
|
41069
41091
|
};
|
|
41070
41092
|
};
|
|
41071
|
-
const getFilterOptions$
|
|
41093
|
+
const getFilterOptions$d = (options, t) => {
|
|
41072
41094
|
const {
|
|
41073
41095
|
countries,
|
|
41074
41096
|
category,
|
|
@@ -41079,13 +41101,13 @@ const getFilterOptions$a = (options, t) => {
|
|
|
41079
41101
|
category: categoriesOptions || category || []
|
|
41080
41102
|
};
|
|
41081
41103
|
};
|
|
41082
|
-
const formConfig$
|
|
41104
|
+
const formConfig$b = {
|
|
41083
41105
|
namespace: 'stakeholders',
|
|
41084
41106
|
view: 'scoping',
|
|
41085
41107
|
scope: 'create',
|
|
41086
41108
|
formType: 'stakeholder'
|
|
41087
41109
|
};
|
|
41088
|
-
const viewConfig$
|
|
41110
|
+
const viewConfig$b = {
|
|
41089
41111
|
title: "Stakeholders",
|
|
41090
41112
|
createTitle: "Create Stakeholder"
|
|
41091
41113
|
};
|
|
@@ -41172,7 +41194,7 @@ function sourceAvatarConfig(items, user, applications) {
|
|
|
41172
41194
|
});
|
|
41173
41195
|
}
|
|
41174
41196
|
|
|
41175
|
-
const getColumns$
|
|
41197
|
+
const getColumns$f = ({
|
|
41176
41198
|
t,
|
|
41177
41199
|
goTo,
|
|
41178
41200
|
user,
|
|
@@ -41225,7 +41247,8 @@ const getColumns$c = ({
|
|
|
41225
41247
|
className: "daf-default-cell"
|
|
41226
41248
|
});
|
|
41227
41249
|
}
|
|
41228
|
-
const
|
|
41250
|
+
const categoriesOptions = [...(options?.categoriesOptions || []), ...(options?.category || [])];
|
|
41251
|
+
const category = findOptions(v, categoriesOptions);
|
|
41229
41252
|
return category ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
41230
41253
|
title: category,
|
|
41231
41254
|
children: category
|
|
@@ -41242,7 +41265,8 @@ const getColumns$c = ({
|
|
|
41242
41265
|
className: "daf-default-cell"
|
|
41243
41266
|
});
|
|
41244
41267
|
}
|
|
41245
|
-
const
|
|
41268
|
+
const subCategoriesOptions = [...(options?.subCategoriesOptions || []), ...(options?.subCategory || [])];
|
|
41269
|
+
const subCategory = findOptions(v, subCategoriesOptions);
|
|
41246
41270
|
return subCategory ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
41247
41271
|
title: subCategory,
|
|
41248
41272
|
children: subCategory
|
|
@@ -41277,7 +41301,7 @@ const getColumns$c = ({
|
|
|
41277
41301
|
});
|
|
41278
41302
|
}
|
|
41279
41303
|
if (!val || val?.length === 0) {
|
|
41280
|
-
return "
|
|
41304
|
+
return "-";
|
|
41281
41305
|
}
|
|
41282
41306
|
const sources = sourceAvatarConfig(val, user, applications);
|
|
41283
41307
|
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
@@ -41326,7 +41350,7 @@ const getColumns$c = ({
|
|
|
41326
41350
|
}
|
|
41327
41351
|
}].filter(column => column.show !== false);
|
|
41328
41352
|
|
|
41329
|
-
const getFiltersConfig$
|
|
41353
|
+
const getFiltersConfig$c = ({
|
|
41330
41354
|
t
|
|
41331
41355
|
}) => {
|
|
41332
41356
|
return {
|
|
@@ -41494,7 +41518,7 @@ const getFiltersConfig$9 = ({
|
|
|
41494
41518
|
}
|
|
41495
41519
|
};
|
|
41496
41520
|
};
|
|
41497
|
-
const getFilterOptions$
|
|
41521
|
+
const getFilterOptions$c = (options, t) => {
|
|
41498
41522
|
const {
|
|
41499
41523
|
statusOptions,
|
|
41500
41524
|
categoryOptions,
|
|
@@ -41516,13 +41540,13 @@ const getFilterOptions$9 = (options, t) => {
|
|
|
41516
41540
|
};
|
|
41517
41541
|
return _default;
|
|
41518
41542
|
};
|
|
41519
|
-
const formConfig$
|
|
41543
|
+
const formConfig$a = {
|
|
41520
41544
|
namespace: 'OPERATOR',
|
|
41521
41545
|
view: ['scoping', 'new'],
|
|
41522
41546
|
scope: 'global',
|
|
41523
41547
|
formType: 'operator'
|
|
41524
41548
|
};
|
|
41525
|
-
const viewConfig$
|
|
41549
|
+
const viewConfig$a = {
|
|
41526
41550
|
title: "Operators",
|
|
41527
41551
|
createTitle: "Create Operator"
|
|
41528
41552
|
};
|
|
@@ -41563,7 +41587,7 @@ const renderStatusTag = ({
|
|
|
41563
41587
|
}
|
|
41564
41588
|
};
|
|
41565
41589
|
|
|
41566
|
-
const getColumns$
|
|
41590
|
+
const getColumns$e = ({
|
|
41567
41591
|
t,
|
|
41568
41592
|
goTo,
|
|
41569
41593
|
user,
|
|
@@ -41621,7 +41645,8 @@ const getColumns$b = ({
|
|
|
41621
41645
|
className: "daf-default-cell"
|
|
41622
41646
|
});
|
|
41623
41647
|
}
|
|
41624
|
-
const
|
|
41648
|
+
const positionSupplyChainOptions = [...(data?.options?.positionSupplyChainOptions || []), ...(options?.positionSupplyChainOptions || []), ...(options?.optionPositionSupplyChain || [])];
|
|
41649
|
+
const country = findOptions(v, positionSupplyChainOptions);
|
|
41625
41650
|
return country ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
41626
41651
|
title: country,
|
|
41627
41652
|
children: country
|
|
@@ -41640,7 +41665,8 @@ const getColumns$b = ({
|
|
|
41640
41665
|
className: "daf-default-cell"
|
|
41641
41666
|
});
|
|
41642
41667
|
}
|
|
41643
|
-
const
|
|
41668
|
+
const subCategoriesOptions = [...(data?.options?.subCategoriesOptions || []), ...(options?.subCategoriesOptions || []), ...(options?.subCategory || [])];
|
|
41669
|
+
const subCategory = findOptions(v, subCategoriesOptions);
|
|
41644
41670
|
return subCategory ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
41645
41671
|
title: subCategory,
|
|
41646
41672
|
children: subCategory
|
|
@@ -41709,6 +41735,9 @@ const getColumns$b = ({
|
|
|
41709
41735
|
className: "daf-default-cell"
|
|
41710
41736
|
});
|
|
41711
41737
|
}
|
|
41738
|
+
if (!val || val?.length === 0) {
|
|
41739
|
+
return "-";
|
|
41740
|
+
}
|
|
41712
41741
|
const sources = sourceAvatarConfig(val, user, applications);
|
|
41713
41742
|
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
41714
41743
|
items: sources
|
|
@@ -41770,7 +41799,7 @@ const getColumns$b = ({
|
|
|
41770
41799
|
}
|
|
41771
41800
|
}].filter(column => column.show !== false);
|
|
41772
41801
|
|
|
41773
|
-
const getFiltersConfig$
|
|
41802
|
+
const getFiltersConfig$b = ({
|
|
41774
41803
|
t
|
|
41775
41804
|
}) => {
|
|
41776
41805
|
return {
|
|
@@ -41911,7 +41940,7 @@ const getFiltersConfig$8 = ({
|
|
|
41911
41940
|
}
|
|
41912
41941
|
};
|
|
41913
41942
|
};
|
|
41914
|
-
const getFilterOptions$
|
|
41943
|
+
const getFilterOptions$b = (options, t) => {
|
|
41915
41944
|
const {
|
|
41916
41945
|
statusOptions,
|
|
41917
41946
|
categoryOptions,
|
|
@@ -41938,18 +41967,18 @@ const getFilterOptions$8 = (options, t) => {
|
|
|
41938
41967
|
};
|
|
41939
41968
|
return _default;
|
|
41940
41969
|
};
|
|
41941
|
-
const formConfig$
|
|
41970
|
+
const formConfig$9 = {
|
|
41942
41971
|
namespace: 'WORKERS',
|
|
41943
41972
|
view: ['scoping', 'new'],
|
|
41944
41973
|
scope: 'global',
|
|
41945
41974
|
formType: 'worker'
|
|
41946
41975
|
};
|
|
41947
|
-
const viewConfig$
|
|
41976
|
+
const viewConfig$9 = {
|
|
41948
41977
|
title: "Workers",
|
|
41949
41978
|
createTitle: "Create Worker"
|
|
41950
41979
|
};
|
|
41951
41980
|
|
|
41952
|
-
const getColumns$
|
|
41981
|
+
const getColumns$d = ({
|
|
41953
41982
|
t,
|
|
41954
41983
|
goTo,
|
|
41955
41984
|
user,
|
|
@@ -42028,7 +42057,8 @@ const getColumns$a = ({
|
|
|
42028
42057
|
className: "daf-default-cell"
|
|
42029
42058
|
});
|
|
42030
42059
|
}
|
|
42031
|
-
const
|
|
42060
|
+
const activityAtSiteOptions = [...(data?.options?.activityAtSiteOptions || []), ...(options?.activityAtSiteOptions || []), ...(options?.activityAtSite || [])];
|
|
42061
|
+
const activity = findOptions(v, activityAtSiteOptions);
|
|
42032
42062
|
return activity ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
42033
42063
|
title: activity,
|
|
42034
42064
|
children: activity
|
|
@@ -42079,6 +42109,9 @@ const getColumns$a = ({
|
|
|
42079
42109
|
className: "daf-default-cell"
|
|
42080
42110
|
});
|
|
42081
42111
|
}
|
|
42112
|
+
if (!val || val?.length === 0) {
|
|
42113
|
+
return "-";
|
|
42114
|
+
}
|
|
42082
42115
|
const sources = sourceAvatarConfig(val, user, applications);
|
|
42083
42116
|
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
42084
42117
|
items: sources
|
|
@@ -42125,7 +42158,175 @@ const getColumns$a = ({
|
|
|
42125
42158
|
}
|
|
42126
42159
|
}].filter(column => column.show !== false);
|
|
42127
42160
|
|
|
42128
|
-
const getFiltersConfig$
|
|
42161
|
+
const getFiltersConfig$a = ({
|
|
42162
|
+
t
|
|
42163
|
+
}) => {
|
|
42164
|
+
return {
|
|
42165
|
+
status: {
|
|
42166
|
+
type: "select",
|
|
42167
|
+
label: "Status",
|
|
42168
|
+
placeholder: () => `${t("Filter by")} ${t("Status").toLowerCase()}`,
|
|
42169
|
+
style: {
|
|
42170
|
+
flex: 1
|
|
42171
|
+
},
|
|
42172
|
+
labelStyle: {
|
|
42173
|
+
fley: 1
|
|
42174
|
+
},
|
|
42175
|
+
getLabel: option => option.label,
|
|
42176
|
+
getValue: option => option.value
|
|
42177
|
+
},
|
|
42178
|
+
timeframe: {
|
|
42179
|
+
type: "timeframe",
|
|
42180
|
+
label: "Timeframe",
|
|
42181
|
+
style: {
|
|
42182
|
+
flex: 1
|
|
42183
|
+
}
|
|
42184
|
+
}
|
|
42185
|
+
};
|
|
42186
|
+
};
|
|
42187
|
+
const getFilterOptions$a = (options, t) => {
|
|
42188
|
+
const _default = {
|
|
42189
|
+
status: getStatusOptions(t) || [],
|
|
42190
|
+
timeframe: []
|
|
42191
|
+
};
|
|
42192
|
+
return _default;
|
|
42193
|
+
};
|
|
42194
|
+
const formConfig$8 = {
|
|
42195
|
+
namespace: 'armed-groups',
|
|
42196
|
+
view: ['scoping', 'new'],
|
|
42197
|
+
scope: 'global',
|
|
42198
|
+
formType: 'armed-group'
|
|
42199
|
+
};
|
|
42200
|
+
const viewConfig$8 = {
|
|
42201
|
+
title: "Armed Groups",
|
|
42202
|
+
createTitle: "New Armed Group"
|
|
42203
|
+
};
|
|
42204
|
+
|
|
42205
|
+
const getColumns$c = ({
|
|
42206
|
+
t,
|
|
42207
|
+
goTo,
|
|
42208
|
+
user,
|
|
42209
|
+
options,
|
|
42210
|
+
activeTab,
|
|
42211
|
+
getRedirectLink,
|
|
42212
|
+
theme,
|
|
42213
|
+
subject,
|
|
42214
|
+
data,
|
|
42215
|
+
applications
|
|
42216
|
+
}) => [{
|
|
42217
|
+
dataIndex: 'datastakeId',
|
|
42218
|
+
title: t('ID'),
|
|
42219
|
+
ellipsis: true,
|
|
42220
|
+
show: true,
|
|
42221
|
+
key: "datastakeId",
|
|
42222
|
+
sorter: () => 0 + 0,
|
|
42223
|
+
render: (v, all) => {
|
|
42224
|
+
if (all.empty) {
|
|
42225
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
42226
|
+
className: "daf-default-cell"
|
|
42227
|
+
});
|
|
42228
|
+
}
|
|
42229
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
42230
|
+
title: v,
|
|
42231
|
+
children: v
|
|
42232
|
+
});
|
|
42233
|
+
}
|
|
42234
|
+
}, {
|
|
42235
|
+
dataIndex: 'name',
|
|
42236
|
+
title: t('Name'),
|
|
42237
|
+
ellipsis: true,
|
|
42238
|
+
show: true,
|
|
42239
|
+
key: "name",
|
|
42240
|
+
sorter: () => 0 + 0,
|
|
42241
|
+
render: (v, all) => {
|
|
42242
|
+
if (all.empty) {
|
|
42243
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
42244
|
+
className: "daf-default-cell"
|
|
42245
|
+
});
|
|
42246
|
+
}
|
|
42247
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
42248
|
+
title: v,
|
|
42249
|
+
children: v
|
|
42250
|
+
});
|
|
42251
|
+
}
|
|
42252
|
+
}, {
|
|
42253
|
+
title: t("Last Update"),
|
|
42254
|
+
dataIndex: "updatedAt",
|
|
42255
|
+
key: "updatedAt",
|
|
42256
|
+
render: (date, all) => {
|
|
42257
|
+
if (all.empty) {
|
|
42258
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
42259
|
+
className: "daf-default-cell"
|
|
42260
|
+
});
|
|
42261
|
+
}
|
|
42262
|
+
const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
|
|
42263
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
42264
|
+
title: _date,
|
|
42265
|
+
children: _date
|
|
42266
|
+
});
|
|
42267
|
+
},
|
|
42268
|
+
ellipsis: true
|
|
42269
|
+
}, {
|
|
42270
|
+
title: t("Sources"),
|
|
42271
|
+
dataIndex: "sources",
|
|
42272
|
+
key: "sources",
|
|
42273
|
+
show: activeTab !== "own",
|
|
42274
|
+
render: (val, all) => {
|
|
42275
|
+
if (all.empty) {
|
|
42276
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
42277
|
+
className: "daf-default-cell"
|
|
42278
|
+
});
|
|
42279
|
+
}
|
|
42280
|
+
if (!val || val?.length === 0) {
|
|
42281
|
+
return "-";
|
|
42282
|
+
}
|
|
42283
|
+
const sources = sourceAvatarConfig(val, user, applications);
|
|
42284
|
+
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
42285
|
+
items: sources
|
|
42286
|
+
});
|
|
42287
|
+
}
|
|
42288
|
+
}, {
|
|
42289
|
+
title: t("Status"),
|
|
42290
|
+
dataIndex: 'status',
|
|
42291
|
+
ellipsis: true,
|
|
42292
|
+
show: activeTab == "own",
|
|
42293
|
+
render: (v, all) => {
|
|
42294
|
+
if (all.empty) {
|
|
42295
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
42296
|
+
className: "daf-default-cell"
|
|
42297
|
+
});
|
|
42298
|
+
}
|
|
42299
|
+
const _val = all?.published || all?.status === "submitted" ? "submitted" : v;
|
|
42300
|
+
return renderStatusTag({
|
|
42301
|
+
value: _val,
|
|
42302
|
+
t
|
|
42303
|
+
});
|
|
42304
|
+
}
|
|
42305
|
+
}, {
|
|
42306
|
+
id: 'actions',
|
|
42307
|
+
title: "",
|
|
42308
|
+
width: 60,
|
|
42309
|
+
render: (_, all) => {
|
|
42310
|
+
if (all.empty) {
|
|
42311
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
42312
|
+
className: "daf-default-cell"
|
|
42313
|
+
});
|
|
42314
|
+
}
|
|
42315
|
+
const onClick = () => {
|
|
42316
|
+
let link = `/app/view/${subject}/${all.datastakeId}`;
|
|
42317
|
+
if (activeTab === "shared") {
|
|
42318
|
+
link += `?sourceId=${all?.authorId?.id}`;
|
|
42319
|
+
}
|
|
42320
|
+
goTo(getRedirectLink(link));
|
|
42321
|
+
};
|
|
42322
|
+
return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
|
|
42323
|
+
onClick: onClick,
|
|
42324
|
+
theme: theme
|
|
42325
|
+
});
|
|
42326
|
+
}
|
|
42327
|
+
}].filter(column => column.show !== false);
|
|
42328
|
+
|
|
42329
|
+
const getFiltersConfig$9 = ({
|
|
42129
42330
|
t
|
|
42130
42331
|
}) => {
|
|
42131
42332
|
return {
|
|
@@ -42277,7 +42478,7 @@ const getFiltersConfig$7 = ({
|
|
|
42277
42478
|
}
|
|
42278
42479
|
};
|
|
42279
42480
|
};
|
|
42280
|
-
const getFilterOptions$
|
|
42481
|
+
const getFilterOptions$9 = (options, t) => {
|
|
42281
42482
|
const {
|
|
42282
42483
|
timeframe = [],
|
|
42283
42484
|
status,
|
|
@@ -42303,13 +42504,13 @@ const getFilterOptions$7 = (options, t) => {
|
|
|
42303
42504
|
}]
|
|
42304
42505
|
};
|
|
42305
42506
|
};
|
|
42306
|
-
const formConfig$
|
|
42507
|
+
const formConfig$7 = {
|
|
42307
42508
|
namespace: 'event',
|
|
42308
42509
|
view: 'scoping',
|
|
42309
42510
|
scope: 'create',
|
|
42310
42511
|
formType: 'event'
|
|
42311
42512
|
};
|
|
42312
|
-
const viewConfig$
|
|
42513
|
+
const viewConfig$7 = {
|
|
42313
42514
|
title: "Events",
|
|
42314
42515
|
createTitle: "Create Event"
|
|
42315
42516
|
};
|
|
@@ -42436,7 +42637,7 @@ MoreTags.propTypes = {
|
|
|
42436
42637
|
limit: PropTypes__default["default"].number
|
|
42437
42638
|
};
|
|
42438
42639
|
|
|
42439
|
-
const getColumns$
|
|
42640
|
+
const getColumns$b = ({
|
|
42440
42641
|
t,
|
|
42441
42642
|
goTo,
|
|
42442
42643
|
user,
|
|
@@ -42598,6 +42799,9 @@ const getColumns$9 = ({
|
|
|
42598
42799
|
className: "daf-default-cell"
|
|
42599
42800
|
});
|
|
42600
42801
|
}
|
|
42802
|
+
if (!val || val?.length === 0) {
|
|
42803
|
+
return "-";
|
|
42804
|
+
}
|
|
42601
42805
|
const sources = sourceAvatarConfig(val, user, applications);
|
|
42602
42806
|
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
42603
42807
|
items: sources
|
|
@@ -42668,7 +42872,7 @@ const getColumns$9 = ({
|
|
|
42668
42872
|
}
|
|
42669
42873
|
}].filter(column => column.show !== false);
|
|
42670
42874
|
|
|
42671
|
-
const getFiltersConfig$
|
|
42875
|
+
const getFiltersConfig$8 = ({
|
|
42672
42876
|
t
|
|
42673
42877
|
}) => {
|
|
42674
42878
|
return {
|
|
@@ -42840,7 +43044,7 @@ const getFiltersConfig$6 = ({
|
|
|
42840
43044
|
}
|
|
42841
43045
|
};
|
|
42842
43046
|
};
|
|
42843
|
-
const getFilterOptions$
|
|
43047
|
+
const getFilterOptions$8 = (options, t) => {
|
|
42844
43048
|
const {
|
|
42845
43049
|
timeframe = [],
|
|
42846
43050
|
statusOptions,
|
|
@@ -42873,13 +43077,13 @@ const getFilterOptions$6 = (options, t) => {
|
|
|
42873
43077
|
};
|
|
42874
43078
|
return _default;
|
|
42875
43079
|
};
|
|
42876
|
-
const formConfig$
|
|
43080
|
+
const formConfig$6 = {
|
|
42877
43081
|
namespace: 'corrective-actions',
|
|
42878
43082
|
view: 'corrective-actions',
|
|
42879
43083
|
scope: 'createActivity',
|
|
42880
43084
|
formType: 'activity'
|
|
42881
43085
|
};
|
|
42882
|
-
const viewConfig$
|
|
43086
|
+
const viewConfig$6 = {
|
|
42883
43087
|
title: "Activities",
|
|
42884
43088
|
createTitle: "Create Activity"
|
|
42885
43089
|
};
|
|
@@ -42893,7 +43097,7 @@ const getEventCategoryBySubject = (eventCategoryObject, subject, isSingular = fa
|
|
|
42893
43097
|
return eventCategoryObject[key] || null;
|
|
42894
43098
|
};
|
|
42895
43099
|
|
|
42896
|
-
const getColumns$
|
|
43100
|
+
const getColumns$a = ({
|
|
42897
43101
|
t,
|
|
42898
43102
|
goTo,
|
|
42899
43103
|
user,
|
|
@@ -43040,6 +43244,9 @@ const getColumns$8 = ({
|
|
|
43040
43244
|
className: "daf-default-cell"
|
|
43041
43245
|
});
|
|
43042
43246
|
}
|
|
43247
|
+
if (!val || val?.length === 0) {
|
|
43248
|
+
return "-";
|
|
43249
|
+
}
|
|
43043
43250
|
const sources = sourceAvatarConfig(val, user, applications);
|
|
43044
43251
|
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
43045
43252
|
items: sources
|
|
@@ -43103,7 +43310,7 @@ const getColumns$8 = ({
|
|
|
43103
43310
|
}
|
|
43104
43311
|
}].filter(column => column.show !== false);
|
|
43105
43312
|
|
|
43106
|
-
const getFiltersConfig$
|
|
43313
|
+
const getFiltersConfig$7 = ({
|
|
43107
43314
|
t
|
|
43108
43315
|
}) => {
|
|
43109
43316
|
return {
|
|
@@ -43274,7 +43481,7 @@ const getFiltersConfig$5 = ({
|
|
|
43274
43481
|
}
|
|
43275
43482
|
};
|
|
43276
43483
|
};
|
|
43277
|
-
const getFilterOptions$
|
|
43484
|
+
const getFilterOptions$7 = (options, t) => {
|
|
43278
43485
|
const {
|
|
43279
43486
|
timeframe = [],
|
|
43280
43487
|
statusOptions,
|
|
@@ -43307,18 +43514,18 @@ const getFilterOptions$5 = (options, t) => {
|
|
|
43307
43514
|
};
|
|
43308
43515
|
return _default;
|
|
43309
43516
|
};
|
|
43310
|
-
const formConfig$
|
|
43517
|
+
const formConfig$5 = {
|
|
43311
43518
|
namespace: 'incident',
|
|
43312
43519
|
view: 'incident',
|
|
43313
43520
|
scope: 'createIncident',
|
|
43314
43521
|
formType: 'incident'
|
|
43315
43522
|
};
|
|
43316
|
-
const viewConfig$
|
|
43523
|
+
const viewConfig$5 = {
|
|
43317
43524
|
title: "Incidents",
|
|
43318
43525
|
createTitle: "Create Incident"
|
|
43319
43526
|
};
|
|
43320
43527
|
|
|
43321
|
-
const getColumns$
|
|
43528
|
+
const getColumns$9 = ({
|
|
43322
43529
|
t,
|
|
43323
43530
|
goTo,
|
|
43324
43531
|
user,
|
|
@@ -43465,6 +43672,9 @@ const getColumns$7 = ({
|
|
|
43465
43672
|
className: "daf-default-cell"
|
|
43466
43673
|
});
|
|
43467
43674
|
}
|
|
43675
|
+
if (!val || val?.length === 0) {
|
|
43676
|
+
return "-";
|
|
43677
|
+
}
|
|
43468
43678
|
const sources = sourceAvatarConfig(val, user, applications);
|
|
43469
43679
|
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
43470
43680
|
items: sources
|
|
@@ -43528,233 +43738,651 @@ const getColumns$7 = ({
|
|
|
43528
43738
|
}
|
|
43529
43739
|
}].filter(column => column.show !== false);
|
|
43530
43740
|
|
|
43531
|
-
const getFiltersConfig$
|
|
43741
|
+
const getFiltersConfig$6 = ({
|
|
43532
43742
|
t
|
|
43533
43743
|
}) => {
|
|
43534
43744
|
return {
|
|
43535
|
-
|
|
43536
|
-
type:
|
|
43537
|
-
|
|
43745
|
+
timeframe: {
|
|
43746
|
+
type: "timeframe",
|
|
43747
|
+
label: "Timeframe",
|
|
43538
43748
|
style: {
|
|
43539
43749
|
flex: 1
|
|
43540
43750
|
},
|
|
43541
|
-
|
|
43542
|
-
flex: 1
|
|
43543
|
-
},
|
|
43544
|
-
getLabel: option => option.label,
|
|
43545
|
-
getValue: option => option.value
|
|
43751
|
+
t: t
|
|
43546
43752
|
},
|
|
43547
|
-
|
|
43548
|
-
type: 'select',
|
|
43549
|
-
label: '
|
|
43550
|
-
placeholder:
|
|
43551
|
-
style: {
|
|
43552
|
-
flex: 1
|
|
43553
|
-
},
|
|
43554
|
-
labelStyle: {
|
|
43555
|
-
flex: 1
|
|
43556
|
-
},
|
|
43557
|
-
getLabel: option => option.label,
|
|
43558
|
-
getValue: option => option.value
|
|
43559
|
-
}
|
|
43560
|
-
|
|
43561
|
-
|
|
43562
|
-
|
|
43563
|
-
|
|
43564
|
-
|
|
43565
|
-
|
|
43566
|
-
|
|
43567
|
-
|
|
43568
|
-
|
|
43569
|
-
|
|
43570
|
-
|
|
43571
|
-
|
|
43572
|
-
|
|
43573
|
-
const
|
|
43574
|
-
|
|
43575
|
-
|
|
43576
|
-
|
|
43577
|
-
|
|
43578
|
-
}
|
|
43579
|
-
|
|
43580
|
-
|
|
43581
|
-
|
|
43582
|
-
}
|
|
43583
|
-
|
|
43584
|
-
|
|
43585
|
-
|
|
43586
|
-
|
|
43587
|
-
|
|
43588
|
-
|
|
43589
|
-
|
|
43590
|
-
|
|
43591
|
-
|
|
43592
|
-
|
|
43593
|
-
|
|
43594
|
-
|
|
43595
|
-
|
|
43596
|
-
|
|
43597
|
-
|
|
43598
|
-
|
|
43599
|
-
|
|
43600
|
-
|
|
43601
|
-
|
|
43602
|
-
|
|
43603
|
-
|
|
43604
|
-
|
|
43605
|
-
|
|
43606
|
-
|
|
43607
|
-
|
|
43608
|
-
|
|
43609
|
-
|
|
43610
|
-
|
|
43611
|
-
|
|
43612
|
-
|
|
43613
|
-
|
|
43614
|
-
|
|
43615
|
-
|
|
43616
|
-
|
|
43617
|
-
|
|
43618
|
-
|
|
43619
|
-
|
|
43620
|
-
|
|
43621
|
-
|
|
43622
|
-
|
|
43623
|
-
|
|
43624
|
-
|
|
43625
|
-
|
|
43626
|
-
|
|
43627
|
-
}
|
|
43628
|
-
|
|
43629
|
-
|
|
43630
|
-
|
|
43631
|
-
|
|
43632
|
-
|
|
43633
|
-
|
|
43634
|
-
|
|
43635
|
-
|
|
43636
|
-
|
|
43637
|
-
|
|
43638
|
-
|
|
43639
|
-
|
|
43640
|
-
|
|
43641
|
-
|
|
43642
|
-
|
|
43643
|
-
|
|
43644
|
-
|
|
43645
|
-
}
|
|
43646
|
-
|
|
43647
|
-
|
|
43648
|
-
|
|
43649
|
-
|
|
43650
|
-
|
|
43651
|
-
|
|
43652
|
-
|
|
43653
|
-
|
|
43654
|
-
|
|
43655
|
-
|
|
43656
|
-
|
|
43657
|
-
|
|
43658
|
-
|
|
43659
|
-
|
|
43660
|
-
|
|
43661
|
-
|
|
43662
|
-
|
|
43663
|
-
|
|
43664
|
-
|
|
43665
|
-
|
|
43666
|
-
|
|
43667
|
-
|
|
43668
|
-
|
|
43669
|
-
|
|
43670
|
-
|
|
43671
|
-
|
|
43672
|
-
|
|
43673
|
-
|
|
43674
|
-
|
|
43675
|
-
|
|
43676
|
-
|
|
43677
|
-
|
|
43678
|
-
|
|
43679
|
-
}
|
|
43680
|
-
|
|
43681
|
-
|
|
43682
|
-
|
|
43683
|
-
|
|
43684
|
-
|
|
43685
|
-
|
|
43686
|
-
|
|
43687
|
-
|
|
43688
|
-
|
|
43689
|
-
|
|
43690
|
-
|
|
43691
|
-
|
|
43692
|
-
|
|
43693
|
-
|
|
43694
|
-
|
|
43695
|
-
|
|
43696
|
-
|
|
43697
|
-
|
|
43698
|
-
|
|
43699
|
-
|
|
43700
|
-
|
|
43701
|
-
|
|
43702
|
-
|
|
43703
|
-
|
|
43704
|
-
|
|
43705
|
-
|
|
43706
|
-
|
|
43707
|
-
|
|
43708
|
-
|
|
43709
|
-
|
|
43710
|
-
|
|
43711
|
-
|
|
43712
|
-
|
|
43713
|
-
|
|
43714
|
-
|
|
43715
|
-
|
|
43716
|
-
|
|
43717
|
-
|
|
43718
|
-
|
|
43719
|
-
|
|
43720
|
-
|
|
43721
|
-
|
|
43722
|
-
|
|
43723
|
-
|
|
43724
|
-
|
|
43725
|
-
|
|
43726
|
-
|
|
43727
|
-
|
|
43728
|
-
|
|
43729
|
-
|
|
43730
|
-
|
|
43731
|
-
|
|
43732
|
-
|
|
43733
|
-
|
|
43734
|
-
|
|
43735
|
-
|
|
43736
|
-
|
|
43737
|
-
|
|
43738
|
-
|
|
43739
|
-
|
|
43740
|
-
|
|
43741
|
-
|
|
43742
|
-
|
|
43743
|
-
|
|
43744
|
-
|
|
43745
|
-
|
|
43746
|
-
|
|
43747
|
-
|
|
43748
|
-
|
|
43749
|
-
|
|
43750
|
-
|
|
43751
|
-
|
|
43752
|
-
|
|
43753
|
-
|
|
43754
|
-
|
|
43755
|
-
|
|
43756
|
-
|
|
43757
|
-
|
|
43753
|
+
country: {
|
|
43754
|
+
type: 'select',
|
|
43755
|
+
label: 'Country',
|
|
43756
|
+
placeholder: () => `${t('Filter by')} ${t('Country').toLowerCase()}`,
|
|
43757
|
+
style: {
|
|
43758
|
+
flex: 1
|
|
43759
|
+
},
|
|
43760
|
+
labelStyle: {
|
|
43761
|
+
flex: 1
|
|
43762
|
+
},
|
|
43763
|
+
getLabel: option => option.label,
|
|
43764
|
+
getValue: option => option.value
|
|
43765
|
+
},
|
|
43766
|
+
administrativeLevel1: {
|
|
43767
|
+
type: 'ajaxSelect',
|
|
43768
|
+
label: ({
|
|
43769
|
+
t = s => s,
|
|
43770
|
+
options = {},
|
|
43771
|
+
filters = {},
|
|
43772
|
+
language = 'en'
|
|
43773
|
+
}) => {
|
|
43774
|
+
const {
|
|
43775
|
+
administrativeLevel1
|
|
43776
|
+
} = options;
|
|
43777
|
+
if (administrativeLevel1) {
|
|
43778
|
+
if (options.country) {
|
|
43779
|
+
const _item = administrativeLevel1[filters.country];
|
|
43780
|
+
if (_item) {
|
|
43781
|
+
if (_item[language]) {
|
|
43782
|
+
return _item[language];
|
|
43783
|
+
}
|
|
43784
|
+
}
|
|
43785
|
+
}
|
|
43786
|
+
}
|
|
43787
|
+
return t('Province');
|
|
43788
|
+
},
|
|
43789
|
+
placeholder: () => `${t('Filter by')} ${t('Province').toLowerCase()}`,
|
|
43790
|
+
filters: data => ({
|
|
43791
|
+
country: data.country,
|
|
43792
|
+
level: 'level_1'
|
|
43793
|
+
}),
|
|
43794
|
+
show: data => !data.country,
|
|
43795
|
+
disabled: data => !data.country,
|
|
43796
|
+
mapper: {
|
|
43797
|
+
label: "name",
|
|
43798
|
+
value: "id"
|
|
43799
|
+
},
|
|
43800
|
+
method: 'getOptions',
|
|
43801
|
+
entity: 'AdministrativeLevel',
|
|
43802
|
+
style: {
|
|
43803
|
+
flex: 1
|
|
43804
|
+
},
|
|
43805
|
+
labelStyle: {
|
|
43806
|
+
flex: 1
|
|
43807
|
+
}
|
|
43808
|
+
},
|
|
43809
|
+
administrativeLevel2: {
|
|
43810
|
+
type: 'ajaxSelect',
|
|
43811
|
+
label: ({
|
|
43812
|
+
t = s => s,
|
|
43813
|
+
options = {},
|
|
43814
|
+
filters = {},
|
|
43815
|
+
language = 'en'
|
|
43816
|
+
}) => {
|
|
43817
|
+
const {
|
|
43818
|
+
administrativeLevel2
|
|
43819
|
+
} = options;
|
|
43820
|
+
if (administrativeLevel2) {
|
|
43821
|
+
if (options.country) {
|
|
43822
|
+
const _item = administrativeLevel2[filters.country];
|
|
43823
|
+
if (_item) {
|
|
43824
|
+
if (_item[language]) {
|
|
43825
|
+
return _item[language];
|
|
43826
|
+
}
|
|
43827
|
+
}
|
|
43828
|
+
}
|
|
43829
|
+
}
|
|
43830
|
+
return t('Province');
|
|
43831
|
+
},
|
|
43832
|
+
show: data => !(data.country && data.administrativeLevel1),
|
|
43833
|
+
placeholder: () => `${t('Filter by')} ${t('Territory').toLowerCase()}`,
|
|
43834
|
+
filters: data => ({
|
|
43835
|
+
country: data.country,
|
|
43836
|
+
level: 'level_2',
|
|
43837
|
+
administrativeLevel1: data.administrativeLevel1
|
|
43838
|
+
}),
|
|
43839
|
+
disabled: data => !(data.country && data.administrativeLevel1),
|
|
43840
|
+
mapper: {
|
|
43841
|
+
label: "name",
|
|
43842
|
+
value: "id"
|
|
43843
|
+
},
|
|
43844
|
+
method: 'getOptions',
|
|
43845
|
+
entity: 'AdministrativeLevel',
|
|
43846
|
+
style: {
|
|
43847
|
+
flex: 1
|
|
43848
|
+
},
|
|
43849
|
+
labelStyle: {
|
|
43850
|
+
flex: 1
|
|
43851
|
+
}
|
|
43852
|
+
},
|
|
43853
|
+
eventCategory: {
|
|
43854
|
+
type: 'select',
|
|
43855
|
+
label: 'Category',
|
|
43856
|
+
placeholder: () => `${t('Filter by')} ${t('Category').toLowerCase()}`,
|
|
43857
|
+
style: {
|
|
43858
|
+
flex: 1
|
|
43859
|
+
},
|
|
43860
|
+
labelStyle: {
|
|
43861
|
+
flex: 1
|
|
43862
|
+
},
|
|
43863
|
+
getLabel: option => option.label,
|
|
43864
|
+
getValue: option => option.value,
|
|
43865
|
+
filterOptions: val => {
|
|
43866
|
+
if (val) {
|
|
43867
|
+
const {
|
|
43868
|
+
option,
|
|
43869
|
+
filters
|
|
43870
|
+
} = val;
|
|
43871
|
+
if (filters && option) {
|
|
43872
|
+
const {
|
|
43873
|
+
filters: optionFilters
|
|
43874
|
+
} = option;
|
|
43875
|
+
if (Array.isArray(optionFilters) && optionFilters.length) {
|
|
43876
|
+
const {
|
|
43877
|
+
value,
|
|
43878
|
+
condition
|
|
43879
|
+
} = optionFilters[0];
|
|
43880
|
+
if (condition === 'includes') {
|
|
43881
|
+
return value.includes('corporation');
|
|
43882
|
+
}
|
|
43883
|
+
}
|
|
43884
|
+
}
|
|
43885
|
+
}
|
|
43886
|
+
return true;
|
|
43887
|
+
}
|
|
43888
|
+
},
|
|
43889
|
+
// positionInTheMineralSupplyChain: {
|
|
43890
|
+
// type: 'select',
|
|
43891
|
+
// label: 'Position',
|
|
43892
|
+
// placeholder: () => `${t('Filter by')} ${t('Position').toLowerCase()}`,
|
|
43893
|
+
// style: { flex: 1 },
|
|
43894
|
+
// labelStyle: { flex: 1 },
|
|
43895
|
+
// getLabel: (option) => option.label,
|
|
43896
|
+
// getValue: (option) => option.value,
|
|
43897
|
+
// },
|
|
43898
|
+
status: {
|
|
43899
|
+
type: "select",
|
|
43900
|
+
label: "Status",
|
|
43901
|
+
placeholder: () => `${t("Filter by")} ${t("Status").toLowerCase()}`,
|
|
43902
|
+
style: {
|
|
43903
|
+
flex: 1
|
|
43904
|
+
},
|
|
43905
|
+
labelStyle: {
|
|
43906
|
+
fley: 1
|
|
43907
|
+
},
|
|
43908
|
+
getLabel: option => option.label,
|
|
43909
|
+
getValue: option => option.value
|
|
43910
|
+
}
|
|
43911
|
+
};
|
|
43912
|
+
};
|
|
43913
|
+
const getFilterOptions$6 = (options, t) => {
|
|
43914
|
+
const {
|
|
43915
|
+
timeframe = [],
|
|
43916
|
+
statusOptions,
|
|
43917
|
+
categoryOptions,
|
|
43918
|
+
countries,
|
|
43919
|
+
subCategory,
|
|
43920
|
+
category,
|
|
43921
|
+
stakeholderCategoryOptions,
|
|
43922
|
+
stakeholderSubCategoriesOptions,
|
|
43923
|
+
administrativeLevel1,
|
|
43924
|
+
administrativeLevel2,
|
|
43925
|
+
positionInMineralSupplyChainOptions,
|
|
43926
|
+
subCategoriesOptions,
|
|
43927
|
+
eventCategoryOptions
|
|
43928
|
+
} = options || {};
|
|
43929
|
+
const _categoryOptions = (eventCategoryOptions || categoryOptions || [])?.map(item => ({
|
|
43930
|
+
value: item.value,
|
|
43931
|
+
label: typeof item.label === 'object' ? Object.values(item.label)[1] : item.label
|
|
43932
|
+
}));
|
|
43933
|
+
const _default = {
|
|
43934
|
+
timeframe: timeframe,
|
|
43935
|
+
status: getStatusOptions(t) || [],
|
|
43936
|
+
eventCategory: _categoryOptions || [],
|
|
43937
|
+
country: countries || [],
|
|
43938
|
+
subCategory: subCategoriesOptions || [],
|
|
43939
|
+
// category: category,
|
|
43940
|
+
administrativeLevel1,
|
|
43941
|
+
administrativeLevel2
|
|
43942
|
+
// positionInTheMineralSupplyChain: positionInMineralSupplyChainOptions || [],
|
|
43943
|
+
};
|
|
43944
|
+
return _default;
|
|
43945
|
+
};
|
|
43946
|
+
const formConfig$4 = {
|
|
43947
|
+
namespace: 'testimonials',
|
|
43948
|
+
view: 'testimonials',
|
|
43949
|
+
scope: 'create',
|
|
43950
|
+
formType: 'testimonial'
|
|
43951
|
+
};
|
|
43952
|
+
const viewConfig$4 = {
|
|
43953
|
+
title: "Testimonials",
|
|
43954
|
+
createTitle: "New Testimonial"
|
|
43955
|
+
};
|
|
43956
|
+
|
|
43957
|
+
const getColumns$8 = ({
|
|
43958
|
+
t,
|
|
43959
|
+
goTo,
|
|
43960
|
+
user,
|
|
43961
|
+
options,
|
|
43962
|
+
activeTab,
|
|
43963
|
+
getRedirectLink,
|
|
43964
|
+
theme,
|
|
43965
|
+
subject,
|
|
43966
|
+
data,
|
|
43967
|
+
applications
|
|
43968
|
+
}) => [{
|
|
43969
|
+
dataIndex: 'datastakeId',
|
|
43970
|
+
title: t('ID'),
|
|
43971
|
+
ellipsis: true,
|
|
43972
|
+
show: true,
|
|
43973
|
+
key: "datastakeId",
|
|
43974
|
+
sorter: () => 0 + 0,
|
|
43975
|
+
render: (v, all) => {
|
|
43976
|
+
if (all.empty) {
|
|
43977
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
43978
|
+
className: "daf-default-cell"
|
|
43979
|
+
});
|
|
43980
|
+
}
|
|
43981
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
43982
|
+
title: v,
|
|
43983
|
+
children: v
|
|
43984
|
+
});
|
|
43985
|
+
}
|
|
43986
|
+
}, {
|
|
43987
|
+
dataIndex: 'name',
|
|
43988
|
+
title: t('Title'),
|
|
43989
|
+
ellipsis: true,
|
|
43990
|
+
show: true,
|
|
43991
|
+
key: "name",
|
|
43992
|
+
sorter: () => 0 + 0,
|
|
43993
|
+
render: (v, all) => {
|
|
43994
|
+
if (all.empty) {
|
|
43995
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
43996
|
+
className: "daf-default-cell"
|
|
43997
|
+
});
|
|
43998
|
+
}
|
|
43999
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44000
|
+
title: v,
|
|
44001
|
+
children: v
|
|
44002
|
+
});
|
|
44003
|
+
}
|
|
44004
|
+
}, {
|
|
44005
|
+
title: t("type"),
|
|
44006
|
+
dataIndex: "typeOfTestimonials",
|
|
44007
|
+
key: "typeOfTestimonials",
|
|
44008
|
+
sorter: () => 0 + 0,
|
|
44009
|
+
show: true,
|
|
44010
|
+
render: (title, all) => {
|
|
44011
|
+
if (all.empty) {
|
|
44012
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44013
|
+
className: "daf-default-cell"
|
|
44014
|
+
});
|
|
44015
|
+
}
|
|
44016
|
+
const type = findOptions(title, data?.options?.testimonialsType);
|
|
44017
|
+
return type ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44018
|
+
title: type,
|
|
44019
|
+
children: type
|
|
44020
|
+
}) : '-';
|
|
44021
|
+
},
|
|
44022
|
+
ellipsis: true
|
|
44023
|
+
}, {
|
|
44024
|
+
title: t("Date"),
|
|
44025
|
+
dataIndex: "date",
|
|
44026
|
+
key: "date",
|
|
44027
|
+
sorter: () => 0 + 0,
|
|
44028
|
+
render: (date, all) => {
|
|
44029
|
+
if (all.empty) {
|
|
44030
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44031
|
+
className: "daf-default-cell"
|
|
44032
|
+
});
|
|
44033
|
+
}
|
|
44034
|
+
const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
|
|
44035
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44036
|
+
title: _date,
|
|
44037
|
+
children: _date
|
|
44038
|
+
});
|
|
44039
|
+
},
|
|
44040
|
+
ellipsis: true
|
|
44041
|
+
}, {
|
|
44042
|
+
dataIndex: 'mineSite',
|
|
44043
|
+
title: t('Location'),
|
|
44044
|
+
ellipsis: true,
|
|
44045
|
+
show: true,
|
|
44046
|
+
render: (v, all) => {
|
|
44047
|
+
if (all.empty) {
|
|
44048
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44049
|
+
className: "daf-default-cell"
|
|
44050
|
+
});
|
|
44051
|
+
}
|
|
44052
|
+
|
|
44053
|
+
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
44054
|
+
const mineSite = all?.location?.name;
|
|
44055
|
+
return mineSite ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44056
|
+
title: mineSite,
|
|
44057
|
+
children: mineSite
|
|
44058
|
+
}) : '-';
|
|
44059
|
+
}
|
|
44060
|
+
}, {
|
|
44061
|
+
dataIndex: 'eventCategory',
|
|
44062
|
+
title: t('Category'),
|
|
44063
|
+
ellipsis: true,
|
|
44064
|
+
show: true,
|
|
44065
|
+
render: (v, all) => {
|
|
44066
|
+
if (all.empty) {
|
|
44067
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44068
|
+
className: "daf-default-cell"
|
|
44069
|
+
});
|
|
44070
|
+
}
|
|
44071
|
+
const eventCategory = findOptions(v, data?.options?.eventCategoryOptions || data?.options?.categoryOptions);
|
|
44072
|
+
const categoryValue = getEventCategoryBySubject(eventCategory, subject);
|
|
44073
|
+
return categoryValue ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44074
|
+
title: categoryValue,
|
|
44075
|
+
children: categoryValue
|
|
44076
|
+
}) : '-';
|
|
44077
|
+
}
|
|
44078
|
+
}, {
|
|
44079
|
+
title: t("Sources"),
|
|
44080
|
+
dataIndex: "sources",
|
|
44081
|
+
key: "sources",
|
|
44082
|
+
show: activeTab !== "own",
|
|
44083
|
+
render: (val, all) => {
|
|
44084
|
+
if (all.empty) {
|
|
44085
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44086
|
+
className: "daf-default-cell"
|
|
44087
|
+
});
|
|
44088
|
+
}
|
|
44089
|
+
if (!val || val?.length === 0) {
|
|
44090
|
+
return "-";
|
|
44091
|
+
}
|
|
44092
|
+
const sources = sourceAvatarConfig(val, user, applications);
|
|
44093
|
+
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
44094
|
+
items: sources
|
|
44095
|
+
});
|
|
44096
|
+
}
|
|
44097
|
+
}, {
|
|
44098
|
+
title: t("Status"),
|
|
44099
|
+
dataIndex: "status",
|
|
44100
|
+
key: "status",
|
|
44101
|
+
show: activeTab === "own",
|
|
44102
|
+
render: (val, all) => {
|
|
44103
|
+
if (all.empty) {
|
|
44104
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44105
|
+
className: "daf-default-cell"
|
|
44106
|
+
});
|
|
44107
|
+
}
|
|
44108
|
+
const _val = all?.published || all?.status === "submitted" ? "submitted" : val;
|
|
44109
|
+
return renderStatusTag({
|
|
44110
|
+
value: _val,
|
|
44111
|
+
t
|
|
44112
|
+
});
|
|
44113
|
+
}
|
|
44114
|
+
}, {
|
|
44115
|
+
title: t("Last Update"),
|
|
44116
|
+
dataIndex: "updatedAt",
|
|
44117
|
+
key: "updatedAt",
|
|
44118
|
+
render: (date, all) => {
|
|
44119
|
+
if (all.empty) {
|
|
44120
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44121
|
+
className: "daf-default-cell"
|
|
44122
|
+
});
|
|
44123
|
+
}
|
|
44124
|
+
const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
|
|
44125
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44126
|
+
title: _date,
|
|
44127
|
+
children: _date
|
|
44128
|
+
});
|
|
44129
|
+
},
|
|
44130
|
+
ellipsis: true
|
|
44131
|
+
}, {
|
|
44132
|
+
id: 'actions',
|
|
44133
|
+
title: "",
|
|
44134
|
+
width: 60,
|
|
44135
|
+
render: (_, all) => {
|
|
44136
|
+
if (all.empty) {
|
|
44137
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44138
|
+
className: "daf-default-cell"
|
|
44139
|
+
});
|
|
44140
|
+
}
|
|
44141
|
+
const onClick = () => {
|
|
44142
|
+
let link = `/app/view/${subject}/${all.datastakeId}`;
|
|
44143
|
+
if (activeTab === "shared") {
|
|
44144
|
+
link += `?sourceId=${all?.authorId?.id}`;
|
|
44145
|
+
}
|
|
44146
|
+
goTo(getRedirectLink(link));
|
|
44147
|
+
};
|
|
44148
|
+
return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
|
|
44149
|
+
onClick: onClick,
|
|
44150
|
+
theme: theme
|
|
44151
|
+
});
|
|
44152
|
+
}
|
|
44153
|
+
}].filter(column => column.show !== false);
|
|
44154
|
+
|
|
44155
|
+
const getFiltersConfig$5 = ({
|
|
44156
|
+
t
|
|
44157
|
+
}) => {
|
|
44158
|
+
return {
|
|
44159
|
+
country: {
|
|
44160
|
+
type: 'select',
|
|
44161
|
+
placeholder: t('Country'),
|
|
44162
|
+
style: {
|
|
44163
|
+
flex: 1
|
|
44164
|
+
},
|
|
44165
|
+
labelStyle: {
|
|
44166
|
+
flex: 1
|
|
44167
|
+
},
|
|
44168
|
+
getLabel: option => option.label,
|
|
44169
|
+
getValue: option => option.value
|
|
44170
|
+
},
|
|
44171
|
+
category: {
|
|
44172
|
+
type: 'select',
|
|
44173
|
+
label: 'Category',
|
|
44174
|
+
placeholder: t => `${t('Filter by')} ${t('Category').toLowerCase()}`,
|
|
44175
|
+
style: {
|
|
44176
|
+
flex: 1
|
|
44177
|
+
},
|
|
44178
|
+
labelStyle: {
|
|
44179
|
+
flex: 1
|
|
44180
|
+
},
|
|
44181
|
+
getLabel: option => option.label,
|
|
44182
|
+
getValue: option => option.value
|
|
44183
|
+
}
|
|
44184
|
+
};
|
|
44185
|
+
};
|
|
44186
|
+
const getFilterOptions$5 = (options, t) => {
|
|
44187
|
+
const {
|
|
44188
|
+
countries,
|
|
44189
|
+
category,
|
|
44190
|
+
locationCategories
|
|
44191
|
+
} = options || {};
|
|
44192
|
+
return {
|
|
44193
|
+
country: countries || [],
|
|
44194
|
+
category: locationCategories || category || []
|
|
44195
|
+
};
|
|
44196
|
+
};
|
|
44197
|
+
const formConfig$3 = {
|
|
44198
|
+
namespace: 'locations',
|
|
44199
|
+
view: 'scoping',
|
|
44200
|
+
scope: 'create',
|
|
44201
|
+
formType: 'location'
|
|
44202
|
+
};
|
|
44203
|
+
const viewConfig$3 = {
|
|
44204
|
+
title: "Locations",
|
|
44205
|
+
createTitle: "Create Location"
|
|
44206
|
+
};
|
|
44207
|
+
|
|
44208
|
+
const getColumns$7 = ({
|
|
44209
|
+
t,
|
|
44210
|
+
goTo,
|
|
44211
|
+
user,
|
|
44212
|
+
options,
|
|
44213
|
+
activeTab,
|
|
44214
|
+
getRedirectLink,
|
|
44215
|
+
theme,
|
|
44216
|
+
subject,
|
|
44217
|
+
data,
|
|
44218
|
+
applications
|
|
44219
|
+
}) => [{
|
|
44220
|
+
dataIndex: 'datastakeId',
|
|
44221
|
+
title: t('ID'),
|
|
44222
|
+
ellipsis: true,
|
|
44223
|
+
show: true,
|
|
44224
|
+
render: (v, all) => {
|
|
44225
|
+
if (all.empty) {
|
|
44226
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44227
|
+
className: "daf-default-cell"
|
|
44228
|
+
});
|
|
44229
|
+
}
|
|
44230
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44231
|
+
title: v,
|
|
44232
|
+
children: v
|
|
44233
|
+
});
|
|
44234
|
+
}
|
|
44235
|
+
}, {
|
|
44236
|
+
dataIndex: 'name',
|
|
44237
|
+
title: t('Name'),
|
|
44238
|
+
ellipsis: true,
|
|
44239
|
+
show: true,
|
|
44240
|
+
render: (v, all) => {
|
|
44241
|
+
if (all.empty) {
|
|
44242
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44243
|
+
className: "daf-default-cell"
|
|
44244
|
+
});
|
|
44245
|
+
}
|
|
44246
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44247
|
+
title: v,
|
|
44248
|
+
children: v
|
|
44249
|
+
});
|
|
44250
|
+
}
|
|
44251
|
+
}, {
|
|
44252
|
+
dataIndex: 'category',
|
|
44253
|
+
title: t('Category'),
|
|
44254
|
+
ellipsis: true,
|
|
44255
|
+
show: true,
|
|
44256
|
+
render: (v, all) => {
|
|
44257
|
+
if (all.empty) {
|
|
44258
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44259
|
+
className: "daf-default-cell"
|
|
44260
|
+
});
|
|
44261
|
+
}
|
|
44262
|
+
const locationCategories = [...(data?.options?.locationCategories || []), ...(options?.productionSiteCategories || [])];
|
|
44263
|
+
const category = findOptions(v, locationCategories);
|
|
44264
|
+
return category ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44265
|
+
title: category,
|
|
44266
|
+
children: category
|
|
44267
|
+
}) : '-';
|
|
44268
|
+
}
|
|
44269
|
+
}, {
|
|
44270
|
+
dataIndex: 'country',
|
|
44271
|
+
title: t('Country'),
|
|
44272
|
+
ellipsis: true,
|
|
44273
|
+
show: true,
|
|
44274
|
+
render: (v, all) => {
|
|
44275
|
+
if (all.empty) {
|
|
44276
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44277
|
+
className: "daf-default-cell"
|
|
44278
|
+
});
|
|
44279
|
+
}
|
|
44280
|
+
const country = findOptions(v, options?.countries);
|
|
44281
|
+
return country ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44282
|
+
title: country,
|
|
44283
|
+
children: country
|
|
44284
|
+
}) : '-';
|
|
44285
|
+
}
|
|
44286
|
+
}, {
|
|
44287
|
+
dataIndex: 'province',
|
|
44288
|
+
title: findOptions(user?.company?.country, options?.administrativeLevel1)?.length > 2 ? findOptions(user?.company?.country, options?.administrativeLevel1) : t("Province"),
|
|
44289
|
+
ellipsis: true,
|
|
44290
|
+
show: true,
|
|
44291
|
+
render: (v, all) => {
|
|
44292
|
+
if (all.empty) {
|
|
44293
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44294
|
+
className: "daf-default-cell"
|
|
44295
|
+
});
|
|
44296
|
+
}
|
|
44297
|
+
const province = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
|
|
44298
|
+
return province ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44299
|
+
title: province,
|
|
44300
|
+
children: province
|
|
44301
|
+
}) : '-';
|
|
44302
|
+
}
|
|
44303
|
+
}, {
|
|
44304
|
+
dataIndex: 'territory',
|
|
44305
|
+
title: findOptions(user?.company?.country, options?.administrativeLevel2)?.length > 2 ? findOptions(user?.company?.country, options?.administrativeLevel2) : t("Territory"),
|
|
44306
|
+
ellipsis: true,
|
|
44307
|
+
show: true,
|
|
44308
|
+
render: (v, all) => {
|
|
44309
|
+
if (all.empty) {
|
|
44310
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44311
|
+
className: "daf-default-cell"
|
|
44312
|
+
});
|
|
44313
|
+
}
|
|
44314
|
+
const territory = getLinkValue(all?.administrativeLevel2, all?.linking?.SCL);
|
|
44315
|
+
return territory ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44316
|
+
title: territory,
|
|
44317
|
+
children: territory
|
|
44318
|
+
}) : '-';
|
|
44319
|
+
}
|
|
44320
|
+
}, {
|
|
44321
|
+
title: t("Sources"),
|
|
44322
|
+
dataIndex: "sources",
|
|
44323
|
+
key: "sources",
|
|
44324
|
+
show: activeTab !== "own",
|
|
44325
|
+
render: (val, all) => {
|
|
44326
|
+
if (all.empty) {
|
|
44327
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44328
|
+
className: "daf-default-cell"
|
|
44329
|
+
});
|
|
44330
|
+
}
|
|
44331
|
+
if (!val || val?.length === 0) {
|
|
44332
|
+
return "-";
|
|
44333
|
+
}
|
|
44334
|
+
const sources = sourceAvatarConfig(val, user, applications);
|
|
44335
|
+
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
44336
|
+
items: sources
|
|
44337
|
+
});
|
|
44338
|
+
}
|
|
44339
|
+
}, {
|
|
44340
|
+
title: t("Last Update"),
|
|
44341
|
+
dataIndex: "updatedAt",
|
|
44342
|
+
key: "updatedAt",
|
|
44343
|
+
width: 125,
|
|
44344
|
+
render: (date, all) => {
|
|
44345
|
+
if (all.empty) {
|
|
44346
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44347
|
+
className: "daf-default-cell"
|
|
44348
|
+
});
|
|
44349
|
+
}
|
|
44350
|
+
const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
|
|
44351
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44352
|
+
title: _date,
|
|
44353
|
+
children: _date
|
|
44354
|
+
});
|
|
44355
|
+
},
|
|
44356
|
+
ellipsis: true
|
|
44357
|
+
}, {
|
|
44358
|
+
id: 'actions',
|
|
44359
|
+
title: "",
|
|
44360
|
+
width: 60,
|
|
44361
|
+
render: (_, all) => {
|
|
44362
|
+
if (all.empty) {
|
|
44363
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44364
|
+
className: "daf-default-cell"
|
|
44365
|
+
});
|
|
44366
|
+
}
|
|
44367
|
+
const onClick = () => {
|
|
44368
|
+
let link = `/app/view/${subject}/${all.datastakeId}`;
|
|
44369
|
+
if (activeTab === "shared") {
|
|
44370
|
+
link += `?sourceId=${all?.authorId?.id}`;
|
|
44371
|
+
}
|
|
44372
|
+
goTo(getRedirectLink(link));
|
|
44373
|
+
};
|
|
44374
|
+
return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
|
|
44375
|
+
onClick: onClick,
|
|
44376
|
+
theme: theme
|
|
44377
|
+
});
|
|
44378
|
+
}
|
|
44379
|
+
}].filter(column => column.show !== false);
|
|
44380
|
+
|
|
44381
|
+
const getFiltersConfig$4 = ({
|
|
44382
|
+
t,
|
|
44383
|
+
screen
|
|
44384
|
+
}) => {
|
|
44385
|
+
return {
|
|
43758
44386
|
country: {
|
|
43759
44387
|
type: 'select',
|
|
43760
44388
|
label: 'Country',
|
|
@@ -43879,7 +44507,8 @@ const getFiltersConfig$3 = ({
|
|
|
43879
44507
|
flex: 1
|
|
43880
44508
|
},
|
|
43881
44509
|
getLabel: option => option.label,
|
|
43882
|
-
getValue: option => option.value
|
|
44510
|
+
getValue: option => option.value,
|
|
44511
|
+
show: () => screen === 'scl'
|
|
43883
44512
|
},
|
|
43884
44513
|
positionInTheMineralSupplyChain: {
|
|
43885
44514
|
type: 'select',
|
|
@@ -43909,7 +44538,7 @@ const getFiltersConfig$3 = ({
|
|
|
43909
44538
|
}
|
|
43910
44539
|
};
|
|
43911
44540
|
};
|
|
43912
|
-
const getFilterOptions$
|
|
44541
|
+
const getFilterOptions$4 = (options, t) => {
|
|
43913
44542
|
const {
|
|
43914
44543
|
statusOptions = [],
|
|
43915
44544
|
categoryOptions = [],
|
|
@@ -43938,13 +44567,13 @@ const getFilterOptions$3 = (options, t) => {
|
|
|
43938
44567
|
};
|
|
43939
44568
|
return _default;
|
|
43940
44569
|
};
|
|
43941
|
-
const formConfig$
|
|
44570
|
+
const formConfig$2 = {
|
|
43942
44571
|
namespace: 'PRODUCTION SITES',
|
|
43943
44572
|
view: ['scoping', 'new'],
|
|
43944
44573
|
scope: 'global',
|
|
43945
44574
|
formType: 'production-sites'
|
|
43946
44575
|
};
|
|
43947
|
-
const viewConfig$
|
|
44576
|
+
const viewConfig$2 = {
|
|
43948
44577
|
title: "Production Sites",
|
|
43949
44578
|
createTitle: "Create Production Site"
|
|
43950
44579
|
};
|
|
@@ -43995,7 +44624,7 @@ MoreOptions.propTypes = {
|
|
|
43995
44624
|
limit: PropTypes__default["default"].number
|
|
43996
44625
|
};
|
|
43997
44626
|
|
|
43998
|
-
const getColumns$
|
|
44627
|
+
const getColumns$6 = ({
|
|
43999
44628
|
t,
|
|
44000
44629
|
goTo,
|
|
44001
44630
|
user,
|
|
@@ -44054,7 +44683,7 @@ const getColumns$5 = ({
|
|
|
44054
44683
|
className: "daf-default-cell"
|
|
44055
44684
|
});
|
|
44056
44685
|
}
|
|
44057
|
-
const locationCategories = [...(data?.options?.locationCategories || []), ...(options?.productionSiteCategories || [])];
|
|
44686
|
+
const locationCategories = [...(data?.options?.locationCategories || []), ...(options?.productionSiteCategories || []), ...(options?.locationCategories || [])];
|
|
44058
44687
|
const category = findOptions(v, locationCategories);
|
|
44059
44688
|
return category ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44060
44689
|
title: category,
|
|
@@ -44167,16 +44796,19 @@ const getColumns$5 = ({
|
|
|
44167
44796
|
}
|
|
44168
44797
|
}, {
|
|
44169
44798
|
title: t("Sources"),
|
|
44170
|
-
dataIndex:
|
|
44171
|
-
|
|
44799
|
+
dataIndex: "sources",
|
|
44800
|
+
key: "sources",
|
|
44172
44801
|
show: activeTab !== "own",
|
|
44173
|
-
render: (
|
|
44802
|
+
render: (val, all) => {
|
|
44174
44803
|
if (all.empty) {
|
|
44175
44804
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44176
44805
|
className: "daf-default-cell"
|
|
44177
44806
|
});
|
|
44178
44807
|
}
|
|
44179
|
-
|
|
44808
|
+
if (!val || val?.length === 0) {
|
|
44809
|
+
return "-";
|
|
44810
|
+
}
|
|
44811
|
+
const sources = sourceAvatarConfig(val, user, applications);
|
|
44180
44812
|
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
44181
44813
|
items: sources
|
|
44182
44814
|
});
|
|
@@ -44222,6 +44854,208 @@ const getColumns$5 = ({
|
|
|
44222
44854
|
}
|
|
44223
44855
|
}].filter(column => column.show !== false);
|
|
44224
44856
|
|
|
44857
|
+
const getFiltersConfig$3 = ({
|
|
44858
|
+
t
|
|
44859
|
+
}) => {
|
|
44860
|
+
return {
|
|
44861
|
+
status: {
|
|
44862
|
+
type: "select",
|
|
44863
|
+
label: "Status",
|
|
44864
|
+
placeholder: () => `${t("Filter by")} ${t("Status").toLowerCase()}`,
|
|
44865
|
+
style: {
|
|
44866
|
+
flex: 1
|
|
44867
|
+
},
|
|
44868
|
+
labelStyle: {
|
|
44869
|
+
fley: 1
|
|
44870
|
+
},
|
|
44871
|
+
getLabel: option => option.label,
|
|
44872
|
+
getValue: option => option.value
|
|
44873
|
+
},
|
|
44874
|
+
timeframe: {
|
|
44875
|
+
type: "timeframe",
|
|
44876
|
+
label: "Timeframe",
|
|
44877
|
+
style: {
|
|
44878
|
+
flex: 1
|
|
44879
|
+
}
|
|
44880
|
+
}
|
|
44881
|
+
};
|
|
44882
|
+
};
|
|
44883
|
+
const getFilterOptions$3 = (options, t) => {
|
|
44884
|
+
const _default = {
|
|
44885
|
+
status: getStatusOptions(t) || [],
|
|
44886
|
+
timeframe: []
|
|
44887
|
+
};
|
|
44888
|
+
return _default;
|
|
44889
|
+
};
|
|
44890
|
+
const formConfig$1 = {
|
|
44891
|
+
namespace: 'conflict-areas',
|
|
44892
|
+
view: ['scoping', 'new'],
|
|
44893
|
+
scope: 'conflictAreaCreate',
|
|
44894
|
+
formType: 'conflict-area'
|
|
44895
|
+
};
|
|
44896
|
+
const viewConfig$1 = {
|
|
44897
|
+
title: "Conflict Areas",
|
|
44898
|
+
createTitle: "New Conflict Area"
|
|
44899
|
+
};
|
|
44900
|
+
|
|
44901
|
+
const getColumns$5 = ({
|
|
44902
|
+
t,
|
|
44903
|
+
goTo,
|
|
44904
|
+
user,
|
|
44905
|
+
options,
|
|
44906
|
+
activeTab,
|
|
44907
|
+
getRedirectLink,
|
|
44908
|
+
theme,
|
|
44909
|
+
subject,
|
|
44910
|
+
data,
|
|
44911
|
+
applications
|
|
44912
|
+
}) => [{
|
|
44913
|
+
dataIndex: 'datastakeId',
|
|
44914
|
+
title: t('ID'),
|
|
44915
|
+
ellipsis: true,
|
|
44916
|
+
show: true,
|
|
44917
|
+
key: "datastakeId",
|
|
44918
|
+
sorter: () => 0 + 0,
|
|
44919
|
+
render: (v, all) => {
|
|
44920
|
+
if (all.empty) {
|
|
44921
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44922
|
+
className: "daf-default-cell"
|
|
44923
|
+
});
|
|
44924
|
+
}
|
|
44925
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44926
|
+
title: v,
|
|
44927
|
+
children: v
|
|
44928
|
+
});
|
|
44929
|
+
}
|
|
44930
|
+
}, {
|
|
44931
|
+
dataIndex: "name",
|
|
44932
|
+
title: t('Name'),
|
|
44933
|
+
ellipsis: true,
|
|
44934
|
+
show: true,
|
|
44935
|
+
key: "name",
|
|
44936
|
+
sorter: () => 0 + 0,
|
|
44937
|
+
render: (v, all) => {
|
|
44938
|
+
if (all.empty) {
|
|
44939
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44940
|
+
className: "daf-default-cell"
|
|
44941
|
+
});
|
|
44942
|
+
}
|
|
44943
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44944
|
+
title: v,
|
|
44945
|
+
children: v
|
|
44946
|
+
});
|
|
44947
|
+
}
|
|
44948
|
+
}, {
|
|
44949
|
+
dataIndex: 'region',
|
|
44950
|
+
title: findOptions(user?.company?.country, options?.administrativeLevel1)?.length > 2 ? findOptions(user?.company?.country, options?.administrativeLevel1) : t("Province"),
|
|
44951
|
+
ellipsis: true,
|
|
44952
|
+
show: true,
|
|
44953
|
+
render: (v, all) => {
|
|
44954
|
+
if (all.empty) {
|
|
44955
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44956
|
+
className: "daf-default-cell"
|
|
44957
|
+
});
|
|
44958
|
+
}
|
|
44959
|
+
const region = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
|
|
44960
|
+
return region ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44961
|
+
title: region,
|
|
44962
|
+
children: region
|
|
44963
|
+
}) : '-';
|
|
44964
|
+
}
|
|
44965
|
+
}, {
|
|
44966
|
+
dataIndex: 'territory',
|
|
44967
|
+
title: findOptions(user?.company?.country, options?.administrativeLevel2)?.length > 2 ? findOptions(user?.company?.country, options?.administrativeLevel2) : t("Territory"),
|
|
44968
|
+
ellipsis: true,
|
|
44969
|
+
show: true,
|
|
44970
|
+
render: (v, all) => {
|
|
44971
|
+
if (all.empty) {
|
|
44972
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44973
|
+
className: "daf-default-cell"
|
|
44974
|
+
});
|
|
44975
|
+
}
|
|
44976
|
+
const district = getLinkValue(all?.administrativeLevel2, all?.linking?.SCL);
|
|
44977
|
+
return district ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44978
|
+
title: district,
|
|
44979
|
+
children: district
|
|
44980
|
+
}) : '-';
|
|
44981
|
+
}
|
|
44982
|
+
}, {
|
|
44983
|
+
title: t("Last Update"),
|
|
44984
|
+
dataIndex: "updatedAt",
|
|
44985
|
+
key: "updatedAt",
|
|
44986
|
+
render: (date, all) => {
|
|
44987
|
+
if (all.empty) {
|
|
44988
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44989
|
+
className: "daf-default-cell"
|
|
44990
|
+
});
|
|
44991
|
+
}
|
|
44992
|
+
const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
|
|
44993
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44994
|
+
title: _date,
|
|
44995
|
+
children: _date
|
|
44996
|
+
});
|
|
44997
|
+
},
|
|
44998
|
+
ellipsis: true
|
|
44999
|
+
}, {
|
|
45000
|
+
title: t("Sources"),
|
|
45001
|
+
dataIndex: "sources",
|
|
45002
|
+
key: "sources",
|
|
45003
|
+
show: activeTab !== "own",
|
|
45004
|
+
render: (val, all) => {
|
|
45005
|
+
if (all.empty) {
|
|
45006
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
45007
|
+
className: "daf-default-cell"
|
|
45008
|
+
});
|
|
45009
|
+
}
|
|
45010
|
+
if (!val || val?.length === 0) {
|
|
45011
|
+
return "-";
|
|
45012
|
+
}
|
|
45013
|
+
const sources = sourceAvatarConfig(val, user, applications);
|
|
45014
|
+
return /*#__PURE__*/jsxRuntime.jsx(AvatarGroup, {
|
|
45015
|
+
items: sources
|
|
45016
|
+
});
|
|
45017
|
+
}
|
|
45018
|
+
}, {
|
|
45019
|
+
title: t("Status"),
|
|
45020
|
+
dataIndex: 'status',
|
|
45021
|
+
ellipsis: true,
|
|
45022
|
+
show: activeTab == "own",
|
|
45023
|
+
render: (v, all) => {
|
|
45024
|
+
if (all.empty) {
|
|
45025
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
45026
|
+
className: "daf-default-cell"
|
|
45027
|
+
});
|
|
45028
|
+
}
|
|
45029
|
+
const _val = all?.published || all?.status === "submitted" ? "submitted" : v;
|
|
45030
|
+
return renderStatusTag({
|
|
45031
|
+
value: _val,
|
|
45032
|
+
t
|
|
45033
|
+
});
|
|
45034
|
+
}
|
|
45035
|
+
}, {
|
|
45036
|
+
id: 'actions',
|
|
45037
|
+
title: "",
|
|
45038
|
+
width: 60,
|
|
45039
|
+
render: (_, all) => {
|
|
45040
|
+
if (all.empty) {
|
|
45041
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
45042
|
+
className: "daf-default-cell"
|
|
45043
|
+
});
|
|
45044
|
+
}
|
|
45045
|
+
const onClick = () => {
|
|
45046
|
+
let link = `/app/view/${subject}/${all.datastakeId}`;
|
|
45047
|
+
if (activeTab === "shared") {
|
|
45048
|
+
link += `?sourceId=${all?.authorId?.id}`;
|
|
45049
|
+
}
|
|
45050
|
+
goTo(getRedirectLink(link));
|
|
45051
|
+
};
|
|
45052
|
+
return /*#__PURE__*/jsxRuntime.jsx(NavigationAction, {
|
|
45053
|
+
onClick: onClick,
|
|
45054
|
+
theme: theme
|
|
45055
|
+
});
|
|
45056
|
+
}
|
|
45057
|
+
}].filter(column => column.show !== false);
|
|
45058
|
+
|
|
44225
45059
|
const getFiltersConfig$2 = ({
|
|
44226
45060
|
t
|
|
44227
45061
|
}) => {
|
|
@@ -44376,62 +45210,83 @@ const getColumns$4 = ({
|
|
|
44376
45210
|
|
|
44377
45211
|
const FILTER_REGISTRY = {
|
|
44378
45212
|
stakeholders: {
|
|
45213
|
+
config: getFiltersConfig$d,
|
|
45214
|
+
options: getFilterOptions$d,
|
|
45215
|
+
formConfig: formConfig$b,
|
|
45216
|
+
viewConfig: viewConfig$b,
|
|
45217
|
+
columns: getColumns$f
|
|
45218
|
+
},
|
|
45219
|
+
workers: {
|
|
45220
|
+
config: getFiltersConfig$b,
|
|
45221
|
+
options: getFilterOptions$b,
|
|
45222
|
+
formConfig: formConfig$9,
|
|
45223
|
+
viewConfig: viewConfig$9,
|
|
45224
|
+
columns: getColumns$d
|
|
45225
|
+
},
|
|
45226
|
+
operators: {
|
|
45227
|
+
config: getFiltersConfig$c,
|
|
45228
|
+
options: getFilterOptions$c,
|
|
45229
|
+
formConfig: formConfig$a,
|
|
45230
|
+
viewConfig: viewConfig$a,
|
|
45231
|
+
columns: getColumns$e
|
|
45232
|
+
},
|
|
45233
|
+
"armed-groups": {
|
|
44379
45234
|
config: getFiltersConfig$a,
|
|
44380
45235
|
options: getFilterOptions$a,
|
|
44381
45236
|
formConfig: formConfig$8,
|
|
44382
45237
|
viewConfig: viewConfig$8,
|
|
44383
45238
|
columns: getColumns$c
|
|
44384
45239
|
},
|
|
44385
|
-
|
|
45240
|
+
events: {
|
|
45241
|
+
config: getFiltersConfig$9,
|
|
45242
|
+
options: getFilterOptions$9,
|
|
45243
|
+
formConfig: formConfig$7,
|
|
45244
|
+
viewConfig: viewConfig$7,
|
|
45245
|
+
columns: getColumns$b
|
|
45246
|
+
},
|
|
45247
|
+
activities: {
|
|
44386
45248
|
config: getFiltersConfig$8,
|
|
44387
45249
|
options: getFilterOptions$8,
|
|
44388
45250
|
formConfig: formConfig$6,
|
|
44389
45251
|
viewConfig: viewConfig$6,
|
|
44390
45252
|
columns: getColumns$a
|
|
44391
45253
|
},
|
|
44392
|
-
|
|
44393
|
-
config: getFiltersConfig$
|
|
44394
|
-
options: getFilterOptions$
|
|
44395
|
-
formConfig: formConfig$
|
|
44396
|
-
viewConfig: viewConfig$
|
|
44397
|
-
columns: getColumns$
|
|
45254
|
+
'corrective-actions': {
|
|
45255
|
+
config: getFiltersConfig$8,
|
|
45256
|
+
options: getFilterOptions$8,
|
|
45257
|
+
formConfig: formConfig$6,
|
|
45258
|
+
viewConfig: viewConfig$6,
|
|
45259
|
+
columns: getColumns$a
|
|
44398
45260
|
},
|
|
44399
|
-
|
|
45261
|
+
incidents: {
|
|
44400
45262
|
config: getFiltersConfig$7,
|
|
44401
45263
|
options: getFilterOptions$7,
|
|
44402
45264
|
formConfig: formConfig$5,
|
|
44403
45265
|
viewConfig: viewConfig$5,
|
|
44404
45266
|
columns: getColumns$9
|
|
44405
45267
|
},
|
|
44406
|
-
|
|
45268
|
+
testimonials: {
|
|
44407
45269
|
config: getFiltersConfig$6,
|
|
44408
45270
|
options: getFilterOptions$6,
|
|
44409
45271
|
formConfig: formConfig$4,
|
|
44410
45272
|
viewConfig: viewConfig$4,
|
|
44411
45273
|
columns: getColumns$8
|
|
44412
45274
|
},
|
|
44413
|
-
|
|
44414
|
-
config: getFiltersConfig$6,
|
|
44415
|
-
options: getFilterOptions$6,
|
|
44416
|
-
formConfig: formConfig$4,
|
|
44417
|
-
viewConfig: viewConfig$4,
|
|
44418
|
-
columns: getColumns$8
|
|
44419
|
-
},
|
|
44420
|
-
incidents: {
|
|
45275
|
+
locations: {
|
|
44421
45276
|
config: getFiltersConfig$5,
|
|
44422
45277
|
options: getFilterOptions$5,
|
|
44423
45278
|
formConfig: formConfig$3,
|
|
44424
45279
|
viewConfig: viewConfig$3,
|
|
44425
45280
|
columns: getColumns$7
|
|
44426
45281
|
},
|
|
44427
|
-
|
|
45282
|
+
'production-sites': {
|
|
44428
45283
|
config: getFiltersConfig$4,
|
|
44429
45284
|
options: getFilterOptions$4,
|
|
44430
45285
|
formConfig: formConfig$2,
|
|
44431
45286
|
viewConfig: viewConfig$2,
|
|
44432
45287
|
columns: getColumns$6
|
|
44433
45288
|
},
|
|
44434
|
-
|
|
45289
|
+
"conflict-areas": {
|
|
44435
45290
|
config: getFiltersConfig$3,
|
|
44436
45291
|
options: getFilterOptions$3,
|
|
44437
45292
|
formConfig: formConfig$1,
|
|
@@ -44439,11 +45294,11 @@ const FILTER_REGISTRY = {
|
|
|
44439
45294
|
columns: getColumns$5
|
|
44440
45295
|
},
|
|
44441
45296
|
scl: {
|
|
44442
|
-
config: getFiltersConfig$
|
|
44443
|
-
options: getFilterOptions$
|
|
45297
|
+
config: getFiltersConfig$4,
|
|
45298
|
+
options: getFilterOptions$4,
|
|
44444
45299
|
formConfig: sclFormConfig,
|
|
44445
45300
|
viewConfig: sclViewConfig,
|
|
44446
|
-
columns: getColumns$
|
|
45301
|
+
columns: getColumns$6
|
|
44447
45302
|
},
|
|
44448
45303
|
documents: {
|
|
44449
45304
|
config: getFiltersConfig$2,
|
|
@@ -44477,7 +45332,8 @@ const getFiltersConfig$1 = ({
|
|
|
44477
45332
|
}) => {
|
|
44478
45333
|
const registry = FILTER_REGISTRY[subject] || FILTER_REGISTRY[DEFAULT_SUBJECT];
|
|
44479
45334
|
return registry?.config({
|
|
44480
|
-
t
|
|
45335
|
+
t,
|
|
45336
|
+
screen: subject
|
|
44481
45337
|
});
|
|
44482
45338
|
};
|
|
44483
45339
|
const getFilterOptions$1 = ({
|
|
@@ -48956,10 +49812,17 @@ function VegetationWidget({
|
|
|
48956
49812
|
...props
|
|
48957
49813
|
}) {
|
|
48958
49814
|
let vegetationConfig = getVegetationConfig();
|
|
49815
|
+
|
|
49816
|
+
// Get all VEGETATION_KEYS values before filtering (needed for mapping check)
|
|
48959
49817
|
const allVegetationKeys = vegetationConfig.map(item => item.key);
|
|
49818
|
+
|
|
49819
|
+
// Filter to show only specific keys if filterKeys is provided
|
|
48960
49820
|
if (filterKeys && Array.isArray(filterKeys)) {
|
|
48961
49821
|
vegetationConfig = vegetationConfig.filter(item => filterKeys.includes(item.key));
|
|
48962
49822
|
}
|
|
49823
|
+
|
|
49824
|
+
// Map growthObservations to VEGETATION_KEYS
|
|
49825
|
+
// Handle both formats: growthObservations keys (e.g., "yellowing_leaves") and VEGETATION_KEYS (e.g., "yellowing")
|
|
48963
49826
|
const mappedGrowthObservations = Array.isArray(growthObservations) ? growthObservations.map(obs => {
|
|
48964
49827
|
// First try to map from growthObservations format
|
|
48965
49828
|
const mapped = GROWTH_OBSERVATIONS_TO_VEGETATION_KEYS[obs];
|
|
@@ -51457,17 +52320,9 @@ const RadarChart = ({
|
|
|
51457
52320
|
...tooltipConfig
|
|
51458
52321
|
},
|
|
51459
52322
|
color: color || token.colorPrimary7,
|
|
51460
|
-
paddingX: 60,
|
|
51461
|
-
paddingY: 60,
|
|
51462
52323
|
xAxis: {
|
|
51463
52324
|
label: {
|
|
51464
|
-
formatter: formattedXAxis
|
|
51465
|
-
offset: 15,
|
|
51466
|
-
style: {
|
|
51467
|
-
fontSize: 12,
|
|
51468
|
-
fill: '#666',
|
|
51469
|
-
textAlign: 'center'
|
|
51470
|
-
}
|
|
52325
|
+
formatter: formattedXAxis
|
|
51471
52326
|
},
|
|
51472
52327
|
line: null,
|
|
51473
52328
|
tickLine: null,
|
|
@@ -51536,23 +52391,12 @@ const RadarChart = ({
|
|
|
51536
52391
|
}, []);
|
|
51537
52392
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
51538
52393
|
className: "flex flex-1 flex-column justify-content-center",
|
|
51539
|
-
style: {
|
|
51540
|
-
overflow: 'visible'
|
|
51541
|
-
},
|
|
51542
52394
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
51543
52395
|
className: "flex justify-content-center",
|
|
51544
|
-
style: {
|
|
51545
|
-
paddingX: '30px',
|
|
51546
|
-
overflow: 'visible',
|
|
51547
|
-
width: '100%'
|
|
51548
|
-
},
|
|
51549
52396
|
children: /*#__PURE__*/jsxRuntime.jsx(Container$1, {
|
|
51550
52397
|
ref: containerRef,
|
|
51551
52398
|
height: height,
|
|
51552
|
-
isPdf: isPdf
|
|
51553
|
-
style: {
|
|
51554
|
-
paddingX: '30px'
|
|
51555
|
-
}
|
|
52399
|
+
isPdf: isPdf
|
|
51556
52400
|
})
|
|
51557
52401
|
}), legendEnabled && legendPosition === 'bottom' && /*#__PURE__*/jsxRuntime.jsx(CustomLegend, {
|
|
51558
52402
|
items: legendItems,
|
|
@@ -56862,20 +57706,7 @@ const MonitoringScopeAndFindings = ({
|
|
|
56862
57706
|
});
|
|
56863
57707
|
};
|
|
56864
57708
|
|
|
56865
|
-
const
|
|
56866
|
-
healthy_leaves: '#6AD99E',
|
|
56867
|
-
white_spots: '#E8F0F0',
|
|
56868
|
-
yellowing_leaves: '#CDC14F',
|
|
56869
|
-
black_spots: '#2E3131',
|
|
56870
|
-
reddish_spots: '#CB2525',
|
|
56871
|
-
leaf_mosaic: '#B59E76',
|
|
56872
|
-
spider_webs: '#F8F6EF',
|
|
56873
|
-
damage_from_insects: '#DE8954',
|
|
56874
|
-
dry_dead_leaves: '#767870',
|
|
56875
|
-
no_leaves: '#F97066',
|
|
56876
|
-
other: '#BDBDBD'
|
|
56877
|
-
};
|
|
56878
|
-
const DEFAULT_COLOR$3 = '#9E9E9E';
|
|
57709
|
+
const COLORS$3 = ['#016C6E', '#F5C2AC', '#F0A888', '#DF571E', '#C04B19', '#9B3D14', '#7A2F0F'];
|
|
56879
57710
|
const VegetationHealth = ({
|
|
56880
57711
|
vegetationHealthChart,
|
|
56881
57712
|
t = s => s,
|
|
@@ -56896,7 +57727,7 @@ const VegetationHealth = ({
|
|
|
56896
57727
|
return data.map((item, index) => ({
|
|
56897
57728
|
value: Number(item?.count) || 0,
|
|
56898
57729
|
percent: total > 0 ? (Number(item?.count) || 0) / total : 0,
|
|
56899
|
-
color:
|
|
57730
|
+
color: COLORS$3[index % COLORS$3.length],
|
|
56900
57731
|
label: optionsMap[item?.name] || item?.name || '',
|
|
56901
57732
|
key: item?.name || `item-${index}`
|
|
56902
57733
|
}));
|
|
@@ -56994,80 +57825,6 @@ const calculateNiceAxisConfig = (data, valueField = 'value', multiplier = 1.2, d
|
|
|
56994
57825
|
};
|
|
56995
57826
|
};
|
|
56996
57827
|
|
|
56997
|
-
/**
|
|
56998
|
-
* Calculate y-axis configuration with natural numbers (integers) only
|
|
56999
|
-
* Always starts from 0 and extends slightly above max for better visualization
|
|
57000
|
-
* @param {number} maxValue - Maximum value from the data
|
|
57001
|
-
* @param {Object} options - Optional configuration
|
|
57002
|
-
* @param {number} options.minTicks - Minimum number of ticks to show (default: 4)
|
|
57003
|
-
* @param {number} options.maxTicks - Maximum number of ticks to show (default: 6)
|
|
57004
|
-
* @returns {Object} Axis configuration with min, max, and tickMethod
|
|
57005
|
-
*/
|
|
57006
|
-
const calculateNaturalAxisConfig = (maxValue, options = {}) => {
|
|
57007
|
-
const {
|
|
57008
|
-
minTicks = 4,
|
|
57009
|
-
maxTicks = 6
|
|
57010
|
-
} = options;
|
|
57011
|
-
if (maxValue <= 0) {
|
|
57012
|
-
return {
|
|
57013
|
-
min: 0,
|
|
57014
|
-
max: 4,
|
|
57015
|
-
tickMethod: () => [0, 1, 2, 3, 4]
|
|
57016
|
-
};
|
|
57017
|
-
}
|
|
57018
|
-
|
|
57019
|
-
// For very small values (max <= 1), always show 0, 1, 2, 3, 4
|
|
57020
|
-
if (maxValue <= 1) {
|
|
57021
|
-
return {
|
|
57022
|
-
min: 0,
|
|
57023
|
-
max: 4,
|
|
57024
|
-
tickMethod: () => [0, 1, 2, 3, 4]
|
|
57025
|
-
};
|
|
57026
|
-
}
|
|
57027
|
-
|
|
57028
|
-
// Calculate appropriate step size based on max value
|
|
57029
|
-
let step = 1;
|
|
57030
|
-
let displayMax = maxValue;
|
|
57031
|
-
if (maxValue <= 5) {
|
|
57032
|
-
// For small values, use step of 1 and extend a bit above
|
|
57033
|
-
step = 1;
|
|
57034
|
-
displayMax = Math.max(5, Math.ceil(maxValue * 1.5));
|
|
57035
|
-
} else if (maxValue <= 10) {
|
|
57036
|
-
// For medium-small values, use step of 2
|
|
57037
|
-
step = 2;
|
|
57038
|
-
displayMax = Math.ceil(maxValue * 1.2 / step) * step;
|
|
57039
|
-
} else if (maxValue <= 20) {
|
|
57040
|
-
// For medium values, use step of 5
|
|
57041
|
-
step = 5;
|
|
57042
|
-
displayMax = Math.ceil(maxValue * 1.2 / step) * step;
|
|
57043
|
-
} else if (maxValue <= 50) {
|
|
57044
|
-
// For larger values, use step of 10
|
|
57045
|
-
step = 10;
|
|
57046
|
-
displayMax = Math.ceil(maxValue * 1.2 / step) * step;
|
|
57047
|
-
} else {
|
|
57048
|
-
// For very large values, calculate step to get 4-6 ticks
|
|
57049
|
-
const targetTicks = Math.min(maxTicks, Math.max(minTicks, Math.ceil(maxValue / 20)));
|
|
57050
|
-
step = Math.ceil(maxValue / targetTicks / 10) * 10; // Round to nearest 10
|
|
57051
|
-
displayMax = Math.ceil(maxValue * 1.2 / step) * step;
|
|
57052
|
-
}
|
|
57053
|
-
|
|
57054
|
-
// Generate ticks from 0 to displayMax
|
|
57055
|
-
const ticks = [];
|
|
57056
|
-
for (let i = 0; i <= displayMax; i += step) {
|
|
57057
|
-
ticks.push(i);
|
|
57058
|
-
}
|
|
57059
|
-
|
|
57060
|
-
// Ensure max value is included if it's close
|
|
57061
|
-
if (ticks[ticks.length - 1] < maxValue && maxValue - ticks[ticks.length - 1] <= step / 2) {
|
|
57062
|
-
ticks.push(maxValue);
|
|
57063
|
-
}
|
|
57064
|
-
return {
|
|
57065
|
-
min: 0,
|
|
57066
|
-
max: displayMax,
|
|
57067
|
-
tickMethod: () => ticks
|
|
57068
|
-
};
|
|
57069
|
-
};
|
|
57070
|
-
|
|
57071
57828
|
/**
|
|
57072
57829
|
* Merge default categories with backend data
|
|
57073
57830
|
* Ensures all categories are displayed even if they have no data
|
|
@@ -57123,11 +57880,13 @@ const SeedlingsHeight$1 = ({
|
|
|
57123
57880
|
return mergeDefaultCategories(seedlingsHeightChart, DEFAULT_HEIGHT_RANGES, 'range', 'count', 'label', 'value');
|
|
57124
57881
|
}, [seedlingsHeightChart]);
|
|
57125
57882
|
const yAxisConfig = React.useMemo(() => {
|
|
57126
|
-
|
|
57127
|
-
|
|
57128
|
-
|
|
57129
|
-
|
|
57130
|
-
|
|
57883
|
+
return calculateNiceAxisConfig(chartData, 'value', 2,
|
|
57884
|
+
// multiplier: double the max value
|
|
57885
|
+
{
|
|
57886
|
+
min: 0,
|
|
57887
|
+
max: 20,
|
|
57888
|
+
tickMethod: () => [0, 5, 10, 15, 20]
|
|
57889
|
+
});
|
|
57131
57890
|
}, [chartData]);
|
|
57132
57891
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
57133
57892
|
title: t("Seedlings Height"),
|
|
@@ -57149,9 +57908,9 @@ const SeedlingsHeight$1 = ({
|
|
|
57149
57908
|
const item = data[0]?.data || data[0];
|
|
57150
57909
|
return {
|
|
57151
57910
|
title: t("Seedlings Height"),
|
|
57911
|
+
subTitle: title,
|
|
57152
57912
|
items: [{
|
|
57153
|
-
|
|
57154
|
-
label: title,
|
|
57913
|
+
label: t("Count"),
|
|
57155
57914
|
value: item?.value || 0
|
|
57156
57915
|
}]
|
|
57157
57916
|
};
|
|
@@ -57162,12 +57921,7 @@ const SeedlingsHeight$1 = ({
|
|
|
57162
57921
|
});
|
|
57163
57922
|
};
|
|
57164
57923
|
|
|
57165
|
-
const
|
|
57166
|
-
rhyzophora_mangle: '#016C6E',
|
|
57167
|
-
rhyzophora: '#00AEB1',
|
|
57168
|
-
rhyzophora_sp: '#A0EBEC'
|
|
57169
|
-
};
|
|
57170
|
-
const DEFAULT_COLOR$2 = '#9E9E9E';
|
|
57924
|
+
const COLORS$2 = ['#6AD99E', '#F5C2AC', '#F0A888', '#DF571E', '#C04B19', '#9B3D14', '#7A2F0F'];
|
|
57171
57925
|
const PlantedSpecies$1 = ({
|
|
57172
57926
|
plantedSpeciesChart,
|
|
57173
57927
|
t = s => s,
|
|
@@ -57188,7 +57942,7 @@ const PlantedSpecies$1 = ({
|
|
|
57188
57942
|
return data.map((item, index) => ({
|
|
57189
57943
|
value: Number(item?.count) || 0,
|
|
57190
57944
|
percent: total > 0 ? (Number(item?.count) || 0) / total : 0,
|
|
57191
|
-
color:
|
|
57945
|
+
color: COLORS$2[index % COLORS$2.length],
|
|
57192
57946
|
label: optionsMap[item?.name] || item?.name || '',
|
|
57193
57947
|
key: item?.name || `item-${index}`
|
|
57194
57948
|
}));
|
|
@@ -57200,22 +57954,15 @@ const PlantedSpecies$1 = ({
|
|
|
57200
57954
|
if (isEmpty) {
|
|
57201
57955
|
return null;
|
|
57202
57956
|
}
|
|
57203
|
-
|
|
57204
|
-
// Calculate total from all items
|
|
57205
|
-
const total = pieData.reduce((sum, dataItem) => sum + (dataItem.value || 0), 0);
|
|
57206
|
-
|
|
57207
|
-
// Show all items in the tooltip, sorted by value (descending)
|
|
57208
|
-
const allItems = pieData.filter(dataItem => dataItem.value > 0).sort((a, b) => b.value - a.value).map(dataItem => ({
|
|
57209
|
-
color: dataItem.color,
|
|
57210
|
-
label: dataItem.label || '',
|
|
57211
|
-
value: dataItem.value || 0
|
|
57212
|
-
}));
|
|
57213
57957
|
return renderTooltipJsx({
|
|
57214
57958
|
title: t("Planted Species"),
|
|
57215
|
-
|
|
57216
|
-
|
|
57959
|
+
items: [{
|
|
57960
|
+
color: item.color,
|
|
57961
|
+
label: item.label || '',
|
|
57962
|
+
value: item.value || 0
|
|
57963
|
+
}]
|
|
57217
57964
|
});
|
|
57218
|
-
}, [t, isEmpty
|
|
57965
|
+
}, [t, isEmpty]);
|
|
57219
57966
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
57220
57967
|
title: t("Planted Species"),
|
|
57221
57968
|
className: "with-border-header h-w-btn-header",
|
|
@@ -57480,8 +58227,13 @@ const ObservedFauna = ({
|
|
|
57480
58227
|
}));
|
|
57481
58228
|
}, [observedFaunaChart, options]);
|
|
57482
58229
|
const xAxisConfig = React.useMemo(() => {
|
|
57483
|
-
|
|
57484
|
-
|
|
58230
|
+
return calculateNiceAxisConfig(chartData, 'value', 1.2,
|
|
58231
|
+
// multiplier: 20% padding
|
|
58232
|
+
{
|
|
58233
|
+
min: 0,
|
|
58234
|
+
max: 10,
|
|
58235
|
+
tickMethod: () => [0, 2, 4, 6, 8, 10]
|
|
58236
|
+
});
|
|
57485
58237
|
}, [chartData]);
|
|
57486
58238
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
57487
58239
|
title: t("Observed Fauna"),
|
|
@@ -57751,13 +58503,7 @@ const Stats = ({
|
|
|
57751
58503
|
});
|
|
57752
58504
|
};
|
|
57753
58505
|
|
|
57754
|
-
const
|
|
57755
|
-
sandy: '#00AEB1',
|
|
57756
|
-
mixed: '#016C6E',
|
|
57757
|
-
clay: '#A0EBEC',
|
|
57758
|
-
muddy: '#4FB3A1'
|
|
57759
|
-
};
|
|
57760
|
-
const DEFAULT_COLOR$1 = '#9E9E9E';
|
|
58506
|
+
const COLORS$1 = ['#016C6E', '#4FB3A1', '#A8E6CF', '#FFD93D', '#F0A888', '#DF571E', '#C04B19'];
|
|
57761
58507
|
const SoilType = ({
|
|
57762
58508
|
soilTypeChart,
|
|
57763
58509
|
t = s => s,
|
|
@@ -57778,7 +58524,7 @@ const SoilType = ({
|
|
|
57778
58524
|
return data.map((item, index) => ({
|
|
57779
58525
|
value: Number(item?.count) || 0,
|
|
57780
58526
|
percent: total > 0 ? (Number(item?.count) || 0) / total : 0,
|
|
57781
|
-
color:
|
|
58527
|
+
color: COLORS$1[index % COLORS$1.length],
|
|
57782
58528
|
label: optionsMap[item?.soilType] || item?.soilType || '',
|
|
57783
58529
|
key: item?.soilType || `item-${index}`
|
|
57784
58530
|
}));
|
|
@@ -57790,18 +58536,15 @@ const SoilType = ({
|
|
|
57790
58536
|
if (isEmpty) {
|
|
57791
58537
|
return null;
|
|
57792
58538
|
}
|
|
57793
|
-
|
|
57794
|
-
// Show all items in the tooltip, sorted by percentage (descending)
|
|
57795
|
-
const allItems = pieData.filter(dataItem => dataItem.value > 0).sort((a, b) => b.percent - a.percent).map(dataItem => ({
|
|
57796
|
-
color: dataItem.color,
|
|
57797
|
-
label: dataItem.label || '',
|
|
57798
|
-
value: renderPercentage(Math.round(dataItem.percent * 100))
|
|
57799
|
-
}));
|
|
57800
58539
|
return renderTooltipJsx({
|
|
57801
58540
|
title: t("Soil Type"),
|
|
57802
|
-
items:
|
|
58541
|
+
items: [{
|
|
58542
|
+
color: item.color,
|
|
58543
|
+
label: optionsMap[item.label] || item.label || '',
|
|
58544
|
+
value: `${renderPercentage(item.percent.toFixed(2) * 100)}`
|
|
58545
|
+
}]
|
|
57803
58546
|
});
|
|
57804
|
-
}, [t, isEmpty,
|
|
58547
|
+
}, [t, isEmpty, optionsMap]);
|
|
57805
58548
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
57806
58549
|
title: t("Soil Type"),
|
|
57807
58550
|
className: "with-border-header h-w-btn-header",
|
|
@@ -57902,16 +58645,7 @@ const SalinityLevels = ({
|
|
|
57902
58645
|
});
|
|
57903
58646
|
};
|
|
57904
58647
|
|
|
57905
|
-
const
|
|
57906
|
-
fairly_clear: '#32D583',
|
|
57907
|
-
turbid: '#FFA940',
|
|
57908
|
-
polluted: '#F97066',
|
|
57909
|
-
oil_traces: '#2B3644',
|
|
57910
|
-
no_water: '#DAD6CE',
|
|
57911
|
-
clear: '#6AD99E',
|
|
57912
|
-
other: '#9E9E9E'
|
|
57913
|
-
};
|
|
57914
|
-
const DEFAULT_COLOR = '#9E9E9E';
|
|
58648
|
+
const COLORS = ['#6AD99E', '#FFD93D', '#F0A888', '#DF571E', '#B0B0B0', '#016C6E', '#4FB3A1'];
|
|
57915
58649
|
const WaterQuality = ({
|
|
57916
58650
|
waterQualityChart,
|
|
57917
58651
|
t = s => s,
|
|
@@ -57932,7 +58666,7 @@ const WaterQuality = ({
|
|
|
57932
58666
|
return data.map((item, index) => ({
|
|
57933
58667
|
value: Number(item?.count) || 0,
|
|
57934
58668
|
percent: total > 0 ? (Number(item?.count) || 0) / total : 0,
|
|
57935
|
-
color:
|
|
58669
|
+
color: COLORS[index % COLORS.length],
|
|
57936
58670
|
label: optionsMap[item?.waterQuality] || item?.waterQuality || '',
|
|
57937
58671
|
key: item?.waterQuality || `item-${index}`
|
|
57938
58672
|
}));
|
|
@@ -57944,18 +58678,15 @@ const WaterQuality = ({
|
|
|
57944
58678
|
if (isEmpty) {
|
|
57945
58679
|
return null;
|
|
57946
58680
|
}
|
|
57947
|
-
|
|
57948
|
-
// Show all items in the tooltip, sorted by percentage (descending)
|
|
57949
|
-
const allItems = pieData.filter(dataItem => dataItem.value > 0).sort((a, b) => b.percent - a.percent).map(dataItem => ({
|
|
57950
|
-
color: dataItem.color,
|
|
57951
|
-
label: dataItem.label || '',
|
|
57952
|
-
value: renderPercentage(Math.round(dataItem.percent * 100))
|
|
57953
|
-
}));
|
|
57954
58681
|
return renderTooltipJsx({
|
|
57955
58682
|
title: t("Water Quality"),
|
|
57956
|
-
items:
|
|
58683
|
+
items: [{
|
|
58684
|
+
color: item.color,
|
|
58685
|
+
label: item.label || '',
|
|
58686
|
+
value: `${Math.round(item.percent * 100)}%`
|
|
58687
|
+
}]
|
|
57957
58688
|
});
|
|
57958
|
-
}, [t, isEmpty
|
|
58689
|
+
}, [t, isEmpty]);
|
|
57959
58690
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
57960
58691
|
title: t("Water Quality"),
|
|
57961
58692
|
className: "with-border-header h-w-btn-header",
|
|
@@ -60634,6 +61365,11 @@ class LinkedSubjectsService extends BaseService {
|
|
|
60634
61365
|
getForm({
|
|
60635
61366
|
namespace
|
|
60636
61367
|
}, language = "en", scope) {
|
|
61368
|
+
console.log({
|
|
61369
|
+
namespace,
|
|
61370
|
+
language,
|
|
61371
|
+
scope
|
|
61372
|
+
});
|
|
60637
61373
|
return this.apiGet({
|
|
60638
61374
|
url: `forms/${namespace === "documents" ? namespace : getNamespace(namespace)}`,
|
|
60639
61375
|
isApp: true,
|