datastake-daf 0.6.771 → 0.6.773
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 +17 -17
- package/dist/pages/index.js +851 -82
- package/dist/services/index.js +4 -2
- package/dist/style/datastake/mapbox-gl.css +330 -0
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Map/hook.js +3 -1
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/AssociatedInformation/config.js +554 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/AssociatedInformation/index.jsx +135 -24
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/JobsTimeline/index.jsx +0 -1
- package/src/@daf/pages/Summary/Activities/PlantingCycle/index.jsx +3 -4
- package/src/@daf/services/OperatorService.js +2 -2
package/dist/components/index.js
CHANGED
|
@@ -9725,19 +9725,18 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
|
|
|
9725
9725
|
return labelConfig || defaultLabel;
|
|
9726
9726
|
};
|
|
9727
9727
|
|
|
9728
|
-
const handleSectionChildren =
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
} = _ref;
|
|
9728
|
+
const handleSectionChildren = ({
|
|
9729
|
+
config,
|
|
9730
|
+
allData,
|
|
9731
|
+
level,
|
|
9732
|
+
t,
|
|
9733
|
+
rootForm,
|
|
9734
|
+
user,
|
|
9735
|
+
getApiBaseUrl = () => {},
|
|
9736
|
+
getAppHeader = () => {},
|
|
9737
|
+
app,
|
|
9738
|
+
TreeNodeComponent
|
|
9739
|
+
}) => {
|
|
9741
9740
|
if (!(level === 0 && config && typeof config === 'object')) {
|
|
9742
9741
|
return null;
|
|
9743
9742
|
}
|
|
@@ -9751,14 +9750,14 @@ const handleSectionChildren = _ref => {
|
|
|
9751
9750
|
let fieldValue;
|
|
9752
9751
|
|
|
9753
9752
|
// Determine field value based on type
|
|
9754
|
-
if (fieldConfig.type === 'dataLinkGroup' && Array.isArray(allData
|
|
9753
|
+
if (fieldConfig.type === 'dataLinkGroup' && Array.isArray(allData?.[fieldKey])) {
|
|
9755
9754
|
fieldValue = allData[fieldKey];
|
|
9756
|
-
} else if (fieldConfig.type === 'dataLinkGroup' && allData
|
|
9755
|
+
} else if (fieldConfig.type === 'dataLinkGroup' && allData?.[fieldKey]) {
|
|
9757
9756
|
fieldValue = allData[fieldKey];
|
|
9758
9757
|
} else if (fieldConfig.type === 'group') {
|
|
9759
9758
|
fieldValue = {};
|
|
9760
9759
|
} else {
|
|
9761
|
-
fieldValue = allData
|
|
9760
|
+
fieldValue = allData?.[fieldKey];
|
|
9762
9761
|
}
|
|
9763
9762
|
return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
|
|
9764
9763
|
nodeKey: fieldKey,
|
|
@@ -14719,7 +14718,8 @@ const useMap$1 = ({
|
|
|
14719
14718
|
const excludedType = ['village', 'town', 'area', 'territory'];
|
|
14720
14719
|
const filteredData = data?.filter(obj => !excludedType.includes(obj?.type) && (obj?.stakeholders?.length > 0 || data.some(other => other.datastakeId !== obj.datastakeId && (other.stakeholders || []).some(stk => (stk.links || []).includes(obj.datastakeId)))));
|
|
14721
14720
|
const maxTotal = Math.max(...(data || []).map(d => d.total));
|
|
14722
|
-
filteredData
|
|
14721
|
+
const dataToRender = type === "chain" ? filteredData : data;
|
|
14722
|
+
dataToRender.forEach((d, i) => {
|
|
14723
14723
|
addIconToMapInitialy([d?.marker?.lat, d?.marker?.lng], "location", d.category || "mineSite", d, maxTotal, i);
|
|
14724
14724
|
});
|
|
14725
14725
|
polylinesRef.current.forEach(polyline => {
|