datastake-daf 0.6.764 → 0.6.766

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.
Files changed (60) hide show
  1. package/dist/components/index.js +353 -191
  2. package/dist/layouts/index.js +0 -3
  3. package/dist/pages/index.js +308 -223
  4. package/dist/services/index.js +18 -0
  5. package/dist/utils/index.js +312 -4
  6. package/package.json +1 -2
  7. package/src/@daf/core/components/Charts/BarChart/index.jsx +4 -0
  8. package/src/@daf/core/components/Dashboard/Map/ChainIcon/index.js +0 -7
  9. package/src/@daf/core/components/Graphs/StakeholderMappings/index.jsx +0 -2
  10. package/src/@daf/core/components/Graphs/components/BaseGraph.jsx +3 -4
  11. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/KeyIndicatorsWidget/config.js +2 -2
  12. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/KeyIndicatorsWidget/index.jsx +1 -1
  13. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserActivity/helper.js +4 -1
  14. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserActivity/index.jsx +5 -0
  15. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/index.jsx +1 -0
  16. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/index.jsx +34 -26
  17. package/src/@daf/core/components/Screens/Admin/AdminDashboard/index.jsx +56 -52
  18. package/src/@daf/core/components/Screens/Admin/AdminScreens/Dashboard.jsx +52 -67
  19. package/src/@daf/core/components/Screens/Admin/AdminScreens/Location.jsx +96 -0
  20. package/src/@daf/core/components/Screens/Admin/AdminScreens/Subjects.jsx +96 -0
  21. package/src/@daf/core/components/Screens/Admin/AdminScreens/index.js +2 -1
  22. package/src/@daf/core/components/Screens/Admin/adminRoutes.js +116 -89
  23. package/src/@daf/core/components/Table/MoreTags/index.jsx +17 -5
  24. package/src/@daf/layouts/AuthLayout/components/Navbar/index.jsx +0 -1
  25. package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/Identification/hook.js +10 -10
  26. package/src/@daf/pages/Dashboards/SupplyChain/components/SupplyChainMap/index.js +6 -3
  27. package/src/@daf/pages/Dashboards/UserDashboard/components/ContributionsGraph/helper.js +1 -14
  28. package/src/@daf/pages/Dashboards/UserDashboard/components/ContributionsGraph/hook.js +12 -5
  29. package/src/@daf/pages/Dashboards/UserDashboard/components/MineSites/index.jsx +1 -1
  30. package/src/@daf/pages/Dashboards/UserDashboard/components/Triangulation/hook.js +1 -1
  31. package/src/@daf/pages/Data/Channels/columns.js +175 -0
  32. package/src/@daf/pages/Data/Channels/config.js +0 -0
  33. package/src/@daf/pages/Data/Channels/create.jsx +0 -0
  34. package/src/@daf/pages/Data/Channels/index.jsx +0 -0
  35. package/src/@daf/pages/Events/Activities/columns.js +1 -4
  36. package/src/@daf/pages/Events/helper.js +3 -2
  37. package/src/@daf/pages/Events/index.jsx +1 -1
  38. package/src/@daf/pages/Locations/MineSite/columns.js +6 -4
  39. package/src/@daf/pages/Stakeholders/Operators/columns.js +4 -2
  40. package/src/@daf/pages/Summary/Activities/PlantingCycle/config.js +40 -0
  41. package/src/@daf/pages/Summary/Activities/PlantingCycle/helper.js +122 -0
  42. package/src/@daf/pages/Summary/Activities/PlantingCycle/index.jsx +47 -0
  43. package/src/@daf/pages/Summary/Activities/Restoration/config.js +1 -1
  44. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/config.js +2 -2
  45. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/helper.js +7 -7
  46. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/index.js +3 -2
  47. package/src/@daf/pages/Summary/Minesite/index.jsx +3 -1
  48. package/src/@daf/pages/Summary/Operator/components/Governance/index.js +0 -1
  49. package/src/@daf/pages/Summary/Operator/components/KeyInformation/config.js +33 -21
  50. package/src/@daf/pages/Summary/Operator/components/TradeRelationships/helper.js +13 -13
  51. package/src/@daf/pages/Summary/Operator/components/TradeRelationships/hook.js +8 -8
  52. package/src/@daf/pages/Summary/Operator/components/TradeRelationships/index.js +5 -2
  53. package/src/@daf/pages/Summary/Operator/index.jsx +3 -0
  54. package/src/@daf/pages/Summary/components/InformationAvailability/index.js +4 -3
  55. package/src/@daf/services/AdminService.js +14 -0
  56. package/src/constants/locales/en/translation.js +104 -2
  57. package/src/constants/locales/fr/translation.js +104 -1
  58. package/src/constants/locales/sp/translation.js +104 -1
  59. package/src/index.js +2 -0
  60. package/src/pages.js +1 -0
@@ -8916,12 +8916,6 @@ function LocationIcon({
8916
8916
  }).addTo(mapRef);
8917
8917
  const div = document.getElementById(markerId);
8918
8918
  root.current = client.createRoot(div);
8919
- console.log({
8920
- locationID: data.datastakeId,
8921
- stakeholder,
8922
- index,
8923
- parentId: data.datastakeId
8924
- });
8925
8919
  root.current.render( /*#__PURE__*/jsxRuntime.jsx(StakeholderIcon$1, {
8926
8920
  data: stakeholder,
8927
8921
  zoom: zoom,
@@ -10485,6 +10479,7 @@ function SupplyChainMap({
10485
10479
  renderTooltip: data => {
10486
10480
  const productsText = data?.products?.[0];
10487
10481
  const minerals = options?.minerals || [];
10482
+ const participants = data?.stakeholders?.map(stakeholder => stakeholder.name);
10488
10483
  return [{
10489
10484
  label: t("Products"),
10490
10485
  value: minerals.find(mineral => mineral.value === productsText)?.label || productsText || "-",
@@ -10493,13 +10488,15 @@ function SupplyChainMap({
10493
10488
  })
10494
10489
  }, {
10495
10490
  label: t("Participants"),
10496
- value: data?.participants || "-"
10491
+ value: participants?.length > 0 ? participants.join(', ') : "-"
10497
10492
  }];
10498
10493
  },
10499
10494
  link: true,
10500
10495
  onClickLink: data => {
10501
- const locationTypes = ['mineSite', 'village'];
10502
- if (locationTypes.includes(data.type)) {
10496
+ const locationTypes = ['village', 'town', 'area', 'territory'];
10497
+ if (data?.type === 'mineSite') {
10498
+ goTo(getRedirectLink(`/app/mine-summary/${data.datastakeId}`));
10499
+ } else if (locationTypes.includes(data.type)) {
10503
10500
  goTo(getRedirectLink(`/app/view/locations/${data.datastakeId}`));
10504
10501
  } else {
10505
10502
  goTo(getRedirectLink(`/app/view/stakeholders/${data.datastakeId}`));
@@ -11626,7 +11623,6 @@ const BaseGraph = /*#__PURE__*/React.forwardRef(function BaseGraph({
11626
11623
  withDuration = true,
11627
11624
  onFilterChange,
11628
11625
  isPdf,
11629
- zoomOutTransition = false,
11630
11626
  ...props
11631
11627
  }, ref) {
11632
11628
  const {
@@ -11649,8 +11645,8 @@ const BaseGraph = /*#__PURE__*/React.forwardRef(function BaseGraph({
11649
11645
  fitView({
11650
11646
  padding: 0.4,
11651
11647
  nodes: [...nodesToFit],
11652
- duration: withDuration ? 300 : undefined,
11653
- maxZoom: 0.8
11648
+ // duration: withDuration ? 300 : undefined,
11649
+ maxZoom: 0.9
11654
11650
  });
11655
11651
  });
11656
11652
  }, [JSON.stringify(nodesToFit), withDuration]);
@@ -11682,11 +11678,8 @@ const BaseGraph = /*#__PURE__*/React.forwardRef(function BaseGraph({
11682
11678
  fitView: true // zoom out on default
11683
11679
  ,
11684
11680
  fitViewOptions: {
11685
- padding: 0.2,
11686
- //zoom out on default
11687
- ...(zoomOutTransition ? {
11688
- duration: withDuration ? 300 : undefined
11689
- } : {})
11681
+ padding: 0.2 //zoom out on default
11682
+ // ...(zoomOutTransition ? { duration: withDuration ? 300 : undefined } : {}),
11690
11683
  },
11691
11684
  ...props,
11692
11685
  children: !isPdf && /*#__PURE__*/jsxRuntime.jsxs(react.Controls, {
@@ -12300,11 +12293,13 @@ function useIdentification({
12300
12293
  const values = graphData.filter(d => d.date === title);
12301
12294
  return {
12302
12295
  title: "Products",
12303
- items: values.map(val => ({
12304
- label: options?.minerals?.find(mineral => mineral.value === val.typeOfProduct)?.label || val.typeOfProduct,
12305
- color: colors[allSeenProducts.indexOf(val.typeOfProduct) % colors.length],
12306
- value: val.value.toLocaleString()
12307
- }))
12296
+ items: values.map(val => {
12297
+ return {
12298
+ label: findOptions(val.typeOfProduct, options?.mineralOptions) || val.typeOfProduct,
12299
+ color: colors[allSeenProducts.indexOf(val.typeOfProduct) % colors.length],
12300
+ value: val.value.toLocaleString()
12301
+ };
12302
+ })
12308
12303
  };
12309
12304
  }
12310
12305
  return {
@@ -13594,7 +13589,7 @@ function MineSites({
13594
13589
  if (activeTab === "stakeholder") {
13595
13590
  return [{
13596
13591
  label: t("Category"),
13597
- value: findOptions(data?.category, locationCategories ?? []) || "--"
13592
+ value: findOptions(data?.category, options?.categoriesOptions ?? []) || "--"
13598
13593
  }];
13599
13594
  }
13600
13595
  if (activeTab === "event") {
@@ -14079,6 +14074,7 @@ function BarChart({
14079
14074
  isPdf = false,
14080
14075
  legendConfig = {},
14081
14076
  width,
14077
+ xAxisConfig = {},
14082
14078
  ...rest
14083
14079
  }) {
14084
14080
  const containerRef = React__default["default"].useRef(null);
@@ -14111,8 +14107,10 @@ function BarChart({
14111
14107
  return Array.from(new Array(11), (v, i) => i * 10);
14112
14108
  }
14113
14109
  } : {}),
14110
+ ...xAxisConfig,
14114
14111
  label: {
14115
- formatter: isPercentage ? v => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, s => `${s},`) + " %" : formattedXAxis
14112
+ formatter: isPercentage ? v => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, s => `${s},`) + " %" : formattedXAxis,
14113
+ ...xAxisConfig?.label
14116
14114
  }
14117
14115
  },
14118
14116
  yAxis: {
@@ -14138,7 +14136,7 @@ function BarChart({
14138
14136
  } else {
14139
14137
  chartRef.current.update(config);
14140
14138
  }
14141
- }, [data, xFieldKey, yFieldKey, renderTooltipContent, tooltipConfig, animated, isStack, isGroup, isPercentage, seriesField, formattedYAxis, formattedXAxis, color, token.colorPrimary7]);
14139
+ }, [data, xFieldKey, yFieldKey, renderTooltipContent, tooltipConfig, animated, isStack, isGroup, isPercentage, seriesField, formattedYAxis, formattedXAxis, color, token.colorPrimary7, xAxisConfig]);
14142
14140
  React__default["default"].useEffect(() => {
14143
14141
  return () => {
14144
14142
  if (chartRef.current) {
@@ -14172,55 +14170,7 @@ const mapData = ({
14172
14170
  tabSelected
14173
14171
  }) => {
14174
14172
  if (!data.length) {
14175
- return [{
14176
- category: "",
14177
- type: t("Stakeholders"),
14178
- value: 0.5
14179
- }, {
14180
- category: "",
14181
- type: t("Locations"),
14182
- value: 0.5
14183
- }, {
14184
- category: "",
14185
- type: t("Events"),
14186
- value: 0.5
14187
- }, {
14188
- category: " ",
14189
- type: "Stakeholders",
14190
- value: 0.5
14191
- }, {
14192
- category: " ",
14193
- type: "Locations",
14194
- value: 0.5
14195
- }, {
14196
- category: " ",
14197
- type: t("Events"),
14198
- value: 0.5
14199
- }, {
14200
- category: " ",
14201
- type: t("Stakeholders"),
14202
- value: 0.5
14203
- }, {
14204
- category: " ",
14205
- type: t("Locations"),
14206
- value: 0.5
14207
- }, {
14208
- category: " ",
14209
- type: t("Events"),
14210
- value: 0.5
14211
- }, {
14212
- category: " ",
14213
- type: t("Stakeholders"),
14214
- value: 0.5
14215
- }, {
14216
- category: " ",
14217
- type: t("Locations"),
14218
- value: 0.5
14219
- }, {
14220
- category: " ",
14221
- type: t("Events"),
14222
- value: 0.5
14223
- }];
14173
+ return [];
14224
14174
  }
14225
14175
  const metricTypes = {
14226
14176
  stakeholders: tabSelected === "dataPoints" ? t("Stakeholders Data") : t("Stakeholders"),
@@ -14286,15 +14236,22 @@ const useContributionsGraph = ({
14286
14236
  tabSelected
14287
14237
  });
14288
14238
  }, [data, t]);
14239
+ const isEmpty = React.useMemo(() => _data?.length === 0, [_data]);
14289
14240
  const chartConfig = React.useMemo(() => {
14290
14241
  return {
14291
14242
  data: _data,
14292
- xField: "value",
14293
- yField: "category",
14243
+ xFieldKey: "value",
14244
+ yFieldKey: "category",
14294
14245
  seriesField: "type",
14295
14246
  isGroup: true,
14247
+ ...(isEmpty && {
14248
+ xAxisConfig: {
14249
+ min: 0,
14250
+ max: 10,
14251
+ tickCount: 5
14252
+ }
14253
+ }),
14296
14254
  renderTooltipContent: (title, items) => {
14297
- const isEmpty = !data.length;
14298
14255
  const tooltipItems = items.map(item => ({
14299
14256
  label: item.name,
14300
14257
  color: item.color,
@@ -14308,7 +14265,7 @@ const useContributionsGraph = ({
14308
14265
  },
14309
14266
  color: [theme.colorPrimary7, theme.colorPrimary4, theme.colorPrimary9]
14310
14267
  };
14311
- }, [_data, t, theme]);
14268
+ }, [_data, t, theme, isEmpty]);
14312
14269
  return chartConfig;
14313
14270
  };
14314
14271
 
@@ -14422,7 +14379,7 @@ const useTriangulation = ({
14422
14379
  const _config = config.find(c => c.key === item.key);
14423
14380
  if (_config) {
14424
14381
  return renderTooltipJsx({
14425
- title: t(section === "data-compilation" ? "nashiriki::Information Sharing" : "Triangulation"),
14382
+ title: t(section === "data-compilation" ? "Information Sharing" : "Triangulation"),
14426
14383
  items: [{
14427
14384
  // color: _config.color,
14428
14385
  label: t(_config.label[section]),
@@ -16133,6 +16090,42 @@ MoreMenu.propTypes = {
16133
16090
  trigger: PropTypes__default["default"].oneOf(["click", "hover", "contextMenu"])
16134
16091
  };
16135
16092
 
16093
+ const renderStatusTag = ({
16094
+ value,
16095
+ t = s => s
16096
+ }) => {
16097
+ const width = 87;
16098
+ switch (value) {
16099
+ case "edited":
16100
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
16101
+ color: "yellow",
16102
+ style: {
16103
+ width
16104
+ },
16105
+ className: "text-center",
16106
+ children: t("Edited")
16107
+ });
16108
+ case "submitted":
16109
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
16110
+ color: "green",
16111
+ style: {
16112
+ width
16113
+ },
16114
+ className: "text-center",
16115
+ children: t("Submitted")
16116
+ });
16117
+ default:
16118
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
16119
+ color: "blue",
16120
+ style: {
16121
+ width
16122
+ },
16123
+ className: "text-center",
16124
+ children: t("Private")
16125
+ });
16126
+ }
16127
+ };
16128
+
16136
16129
  const getColumns$a = ({
16137
16130
  t,
16138
16131
  goTo,
@@ -16289,11 +16282,11 @@ const getColumns$a = ({
16289
16282
  className: "daf-default-cell"
16290
16283
  });
16291
16284
  }
16292
- const status = findOptions(v, data?.options?.statusOptions);
16293
- return status ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
16294
- title: status,
16295
- children: status
16296
- }) : '-';
16285
+ const _val = all?.published || all?.status === "submitted" ? "submitted" : v;
16286
+ return renderStatusTag({
16287
+ value: _val,
16288
+ t
16289
+ });
16297
16290
  }
16298
16291
  }, {
16299
16292
  id: 'actions',
@@ -31157,7 +31150,10 @@ function MoreTags({
31157
31150
  values = [],
31158
31151
  maxWidthCont = 120,
31159
31152
  maxTextCont = 100,
31160
- diff = 30
31153
+ diff = 30,
31154
+ style = {},
31155
+ tagColor,
31156
+ limit
31161
31157
  }) {
31162
31158
  const ref = React.useRef();
31163
31159
  const [width, setWidth] = React.useState(0);
@@ -31172,6 +31168,11 @@ function MoreTags({
31172
31168
  return () => resizeObserver.disconnect();
31173
31169
  }, []);
31174
31170
  const _calculate = () => {
31171
+ // If limit prop is provided and valid, use it instead of calculating
31172
+ if (typeof limit === 'number' && limit > 0) {
31173
+ setIndexToReturn(Math.min(limit - 1, values.length - 1));
31174
+ return;
31175
+ }
31175
31176
  const tabs = ref.current.querySelectorAll(".check-tabs");
31176
31177
  let filled = 0;
31177
31178
  let indexToReturn;
@@ -31198,7 +31199,7 @@ function MoreTags({
31198
31199
  const other = hasMore ? values.slice(indexToReturn + 1, values.length + 1) : [];
31199
31200
  React.useEffect(() => {
31200
31201
  _calculate();
31201
- }, [width, values]);
31202
+ }, [width, values, limit]);
31202
31203
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
31203
31204
  className: "daf-more-tags",
31204
31205
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -31208,9 +31209,10 @@ function MoreTags({
31208
31209
  maxWidth: _maxWidthCont,
31209
31210
  overflow: "hidden",
31210
31211
  textOverflow: "ellipsis",
31211
- whiteSpace: "nowrap"
31212
+ whiteSpace: "nowrap",
31213
+ ...style
31212
31214
  },
31213
- color: ac.color,
31215
+ color: tagColor || ac.color,
31214
31216
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
31215
31217
  title: typeof ac === "object" ? ac.label : ac,
31216
31218
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
@@ -31218,7 +31220,8 @@ function MoreTags({
31218
31220
  maxWidth: _maxWidthTxt,
31219
31221
  overflow: "hidden",
31220
31222
  textOverflow: "ellipsis",
31221
- whiteSpace: "nowrap"
31223
+ whiteSpace: "nowrap",
31224
+ ...style
31222
31225
  },
31223
31226
  children: typeof ac === "object" ? ac.label : ac
31224
31227
  })
@@ -31226,6 +31229,8 @@ function MoreTags({
31226
31229
  }, `${typeof ac === "object" ? ac.value : ac}-${i}`)), other.length ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
31227
31230
  title: other.map(ac => typeof ac === "object" ? ac.label : ac).join(", "),
31228
31231
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Tag, {
31232
+ color: tagColor || 'default',
31233
+ style: style,
31229
31234
  children: ["+", other.length]
31230
31235
  })
31231
31236
  }) : null]
@@ -31233,10 +31238,11 @@ function MoreTags({
31233
31238
  className: "list hidden",
31234
31239
  ref: ref,
31235
31240
  children: values.map((ac, i) => typeof ac.renderTag === "function" ? ac.renderTag("check-tabs") : /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
31236
- color: ac.color,
31241
+ color: tagColor || ac.color,
31237
31242
  className: "check-tabs",
31238
31243
  style: {
31239
- maxWidth: _maxWidthCont
31244
+ maxWidth: _maxWidthCont,
31245
+ ...style
31240
31246
  },
31241
31247
  children: /*#__PURE__*/jsxRuntime.jsx(Text, {
31242
31248
  ellipsis: {
@@ -31255,43 +31261,8 @@ MoreTags.propTypes = {
31255
31261
  values: PropTypes__default["default"].array,
31256
31262
  maxWidthCont: PropTypes__default["default"].number,
31257
31263
  maxTextCont: PropTypes__default["default"].number,
31258
- diff: PropTypes__default["default"].number
31259
- };
31260
-
31261
- const renderStatusTag = ({
31262
- value,
31263
- t = s => s
31264
- }) => {
31265
- const width = 87;
31266
- switch (value) {
31267
- case "edited":
31268
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
31269
- color: "yellow",
31270
- style: {
31271
- width
31272
- },
31273
- className: "text-center",
31274
- children: t("Edited")
31275
- });
31276
- case "submitted":
31277
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
31278
- color: "green",
31279
- style: {
31280
- width
31281
- },
31282
- className: "text-center",
31283
- children: t("Submitted")
31284
- });
31285
- default:
31286
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
31287
- color: "blue",
31288
- style: {
31289
- width
31290
- },
31291
- className: "text-center",
31292
- children: t("Private")
31293
- });
31294
- }
31264
+ diff: PropTypes__default["default"].number,
31265
+ limit: PropTypes__default["default"].number
31295
31266
  };
31296
31267
 
31297
31268
  const getColumns$7 = ({
@@ -31910,7 +31881,7 @@ const EventsTable = ({
31910
31881
  }, []);
31911
31882
  return /*#__PURE__*/jsxRuntime.jsx(TablePageWithTabs, {
31912
31883
  t: t,
31913
- title: t("events"),
31884
+ title: t("Events"),
31914
31885
  breadCrumbs: breadcrumbs,
31915
31886
  location: location,
31916
31887
  loading: loading,
@@ -32940,11 +32911,15 @@ const WorkersTable = ({
32940
32911
  });
32941
32912
  };
32942
32913
 
32943
- const getEventCategoryBySubject = (eventCategoryObject, subject) => {
32914
+ const getEventCategoryBySubject = (eventCategoryObject, subject, isSingular = false) => {
32915
+ console.log({
32916
+ eventCategoryObject,
32917
+ subject
32918
+ });
32944
32919
  if (!eventCategoryObject || typeof eventCategoryObject !== 'object') {
32945
32920
  return null;
32946
32921
  }
32947
- const subjectSingular = subject.endsWith('ies') ? subject.slice(0, -3) + 'y' : subject.endsWith('s') ? subject.slice(0, -1) : subject;
32922
+ const subjectSingular = isSingular ? subject : subject.endsWith('ies') ? subject.slice(0, -3) + 'y' : subject.endsWith('s') ? subject.slice(0, -1) : subject;
32948
32923
  const key = `typeOfEvent is ${subjectSingular}`;
32949
32924
  return eventCategoryObject[key] || null;
32950
32925
  };
@@ -33074,16 +33049,7 @@ const getColumns$4 = ({
33074
33049
  });
33075
33050
  }
33076
33051
  const eventCategory = findOptions(v, data?.options?.eventCategoryOptions);
33077
- const categoryValue = getEventCategoryBySubject(eventCategory, subject);
33078
- console.log({
33079
- categoryValue
33080
- });
33081
- console.log({
33082
- eventCategory
33083
- });
33084
- console.log({
33085
- subject
33086
- });
33052
+ const categoryValue = getEventCategoryBySubject(eventCategory, "correctiveActions", true);
33087
33053
  return categoryValue ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
33088
33054
  title: categoryValue,
33089
33055
  children: categoryValue
@@ -34397,10 +34363,10 @@ const getColumns$2 = ({
34397
34363
  className: "daf-default-cell"
34398
34364
  });
34399
34365
  }
34400
- const operators = all?.operatorOfLocation?.map(operator => operator?.clientLocation?.name);
34366
+ const operators = all?.operator?.map(operator => operator?.clientLocation?.name);
34401
34367
  return operators && operators.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(MoreOptions, {
34402
34368
  data: operators || [],
34403
- tooltipPlacement: "topLeft"
34369
+ toolTipPlacement: operators?.length < 2 ? "topLeft" : "top"
34404
34370
  }) : '-';
34405
34371
  }
34406
34372
  }, {
@@ -34432,11 +34398,11 @@ const getColumns$2 = ({
34432
34398
  className: "daf-default-cell"
34433
34399
  });
34434
34400
  }
34435
- const status = findOptions(v, data?.options?.statusOptions);
34436
- return status ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
34437
- title: status,
34438
- children: status
34439
- }) : '-';
34401
+ const _val = all?.published || all?.status === "submitted" ? "submitted" : v;
34402
+ return renderStatusTag({
34403
+ value: _val,
34404
+ t
34405
+ });
34440
34406
  }
34441
34407
  }, {
34442
34408
  title: t("Sources"),
@@ -36844,6 +36810,9 @@ const useSummary = ({
36844
36810
  hasTooltip: PropTypes__default["default"].bool
36845
36811
  });
36846
36812
 
36813
+ const getAllProducts = arr => {
36814
+ return arr.flatMap(item => (item.products || []).map(product => product.typeOfProduct));
36815
+ };
36847
36816
  const getKeyIndicatorConfig = ({
36848
36817
  t,
36849
36818
  data = {},
@@ -36872,7 +36841,7 @@ const getKeyIndicatorConfig = ({
36872
36841
  }, {
36873
36842
  label: t("Supply Chain Position"),
36874
36843
  render: () => {
36875
- const position = findOptions(data?.positionSupplyChain, options?.positionSupplyChainOptions);
36844
+ const position = findOptions(data?.positionSupplyChain, options?.positionSupplyChainOptions || options?.optionPositionSupplyChain);
36876
36845
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36877
36846
  children: position || "-"
36878
36847
  });
@@ -36880,7 +36849,7 @@ const getKeyIndicatorConfig = ({
36880
36849
  }, {
36881
36850
  label: t("Legal Form"),
36882
36851
  render: () => {
36883
- const subCategory = findOptions(data?.subCategory, options?.subCategoriesOptions);
36852
+ const subCategory = findOptions(data?.subCategory, options?.subCategoriesOptions || options?.subCategory);
36884
36853
  if (subCategory?.length > 22) {
36885
36854
  const _subCategory = truncateString(subCategory, 22);
36886
36855
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
@@ -36901,45 +36870,49 @@ const getKeyIndicatorConfig = ({
36901
36870
  }, {
36902
36871
  label: t("Products"),
36903
36872
  render: () => {
36904
- if ((data?.products || []).length === 0) {
36905
- return "-";
36906
- }
36907
- return /*#__PURE__*/jsxRuntime.jsx("div", {
36908
- style: {
36909
- display: "flex",
36910
- flexWrap: "wrap"
36911
- },
36912
- children: data?.products?.map(product => {
36913
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tag, {
36914
- color: "processing",
36873
+ const clientProducts = getAllProducts(data?.clients || []);
36874
+ const supplierProducts = getAllProducts(data?.suppliers || []);
36875
+ const locationProducts = getAllProducts(data?.locationSuppliers || []);
36876
+ const allProducts = [...clientProducts, ...supplierProducts, ...locationProducts];
36877
+ const uniqueProducts = [...new Set(allProducts)];
36878
+ const products = findOptions(uniqueProducts, options?.mineralOptions || options?.minerals);
36879
+ return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
36880
+ children: products.length > 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
36881
+ style: {
36882
+ display: "flex",
36883
+ flexWrap: "wrap"
36884
+ },
36885
+ children: /*#__PURE__*/jsxRuntime.jsx(MoreTags, {
36886
+ values: products,
36887
+ limit: 3,
36888
+ tagColor: "processing",
36915
36889
  style: {
36916
- color: "#1677FF",
36917
- marginBottom: 8
36918
- },
36919
- children: t(product)
36920
- }, product);
36921
- })
36890
+ fontWeight: "normal",
36891
+ fontSize: 14
36892
+ }
36893
+ })
36894
+ }) : "-"
36922
36895
  });
36923
36896
  }
36924
36897
  }, {
36925
36898
  label: t("Associated Mine Sites"),
36926
36899
  render: () => {
36927
36900
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36928
- children: data?.associatedMineSites || 0
36901
+ children: data?.locationSuppliers?.length || 0
36929
36902
  });
36930
36903
  }
36931
36904
  }, {
36932
36905
  label: t("Identified Suppliers"),
36933
36906
  render: () => {
36934
36907
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36935
- children: data?.identifiedSuppliers || 0
36908
+ children: data?.suppliers?.length || 0
36936
36909
  });
36937
36910
  }
36938
36911
  }, {
36939
36912
  label: t("Identified Customers"),
36940
36913
  render: () => {
36941
36914
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36942
- children: data?.identifiedCustomers || 0
36915
+ children: data?.clients?.length || 0
36943
36916
  });
36944
36917
  }
36945
36918
  }];
@@ -37240,7 +37213,8 @@ const InformationAvailability = ({
37240
37213
  t = () => {},
37241
37214
  id,
37242
37215
  subject,
37243
- partners
37216
+ partners,
37217
+ APP
37244
37218
  }) => {
37245
37219
  const defaultFetchConfig = React.useMemo(() => ({
37246
37220
  basepath: subject === "stakeholder" ? "stakeholder" : "location",
@@ -37249,10 +37223,10 @@ const InformationAvailability = ({
37249
37223
  stop: !id || selectedPartners?.loading,
37250
37224
  filters: {
37251
37225
  // datastakeId: id,
37252
- scope: subject === "stakeholder" ? "operatorInfo" : "locationInfo",
37226
+ scope: subject === "stakeholder" ? APP === "nashiriki" ? "operator" : "operatorInfo" : APP === "nashiriki" ? "nashiriki" : "locationInfo",
37253
37227
  sources: selectedPartners?.partners || []
37254
37228
  }
37255
- }), [id, selectedPartners]);
37229
+ }), [id, selectedPartners, APP]);
37256
37230
  const {
37257
37231
  data,
37258
37232
  loading
@@ -37383,12 +37357,13 @@ const getFilterConfig = ({
37383
37357
  operatorData = {},
37384
37358
  options = {},
37385
37359
  filters = {},
37386
- t = () => {}
37360
+ t = () => {},
37361
+ APP
37387
37362
  }) => {
37388
37363
  const productSet = new Set();
37389
37364
  const allTradeMineralOptions = [...(operatorData?.suppliers || []), ...(operatorData?.clients || []), ...(operatorData?.locationSuppliers || [])].flatMap(trade => (trade?.products || []).filter(product => !!product?.typeOfProduct && !productSet.has(product.typeOfProduct)).map(product => {
37390
37365
  productSet.add(product.typeOfProduct);
37391
- const label = options?.minerals?.find(mineral => mineral.value === product.typeOfProduct)?.label;
37366
+ const label = options?.[APP !== 'nashiriki' ? 'mineralOptions' : 'minerals']?.find(mineral => mineral.value === product.typeOfProduct)?.label;
37392
37367
  return {
37393
37368
  value: product.typeOfProduct,
37394
37369
  label: label ?? product.typeOfProduct
@@ -37419,30 +37394,31 @@ const getLeft = (data = {}, mapChildren = () => {}, supplierLocations = []) => {
37419
37394
  return mapChildren([location], location.connect, "left");
37420
37395
  }).flat().filter(d => !!d);
37421
37396
  };
37422
- const mapItem = (data, options, goTo, getRedirectLink) => {
37397
+ const mapItem = (data, options, goTo, getRedirectLink, operatorData = {}, APP) => {
37423
37398
  const {
37424
37399
  positionSupplyChainOptions,
37425
- locationCategories
37400
+ locationCategories,
37401
+ optionPositionSupplyChain
37426
37402
  } = options || {};
37427
37403
  return {
37428
- id: data.datastakeId || "-",
37429
- datastakeId: data.datastakeId || "-",
37404
+ id: data.datastakeId || operatorData?.id || "-",
37405
+ datastakeId: data.datastakeId || operatorData?.datastakeId || "-",
37430
37406
  leftIcon: leftIcons[data.type === "mineSite" ? "location" : "stakeholder"],
37431
- name: data.name || "-",
37432
- subTitle: findOptions(data.type, [...(positionSupplyChainOptions || []), ...(locationCategories || [])]),
37407
+ name: data.name || operatorData?.name || "-",
37408
+ subTitle: findOptions(data.type || operatorData?.positionSupplyChain, [...(positionSupplyChainOptions || optionPositionSupplyChain || []), ...(locationCategories || [])]),
37433
37409
  leftBackground: data.type === "mineSite" ? leftBackgroundColorLocation : leftBackgroundColorStakeholder,
37434
37410
  topIcon: topIcons[data.type],
37435
37411
  country: {
37436
- label: findOptions(data.country, options?.countries || []),
37437
- value: data.country
37412
+ label: findOptions(data.country || operatorData?.country, options?.countries || []),
37413
+ value: data.country || operatorData?.country
37438
37414
  },
37439
37415
  totalSources: data.sources ?? 0,
37440
37416
  volume: data?.volume || "",
37441
37417
  onClick: function () {
37442
37418
  if (data.type === "mineSite") {
37443
- return goTo(getRedirectLink(`/app/summary/scl/${data.datastakeId}`));
37419
+ return goTo(getRedirectLink(`/app/${APP === 'nashiriki' ? 'summary/scl' : 'mine-summary'}/${data.datastakeId}`));
37444
37420
  }
37445
- return goTo(getRedirectLink(`/app/summary/operators/${data.datastakeId}`));
37421
+ return goTo(getRedirectLink(`/app/${APP === 'nashiriki' ? 'summary/operators' : 'operator-summary'}/${data.datastakeId}`));
37446
37422
  }
37447
37423
  };
37448
37424
  };
@@ -37453,26 +37429,30 @@ const useTradeRelationship = ({
37453
37429
  options,
37454
37430
  goTo,
37455
37431
  getRedirectLink,
37456
- filters
37432
+ filters,
37433
+ operatorData,
37434
+ APP
37457
37435
  }) => {
37458
37436
  const [graphData, setGraphData] = React.useState({});
37459
37437
  const [loading, setLoading] = React.useState(false);
37460
37438
  const [fetchedProducts, setFetchedProducts] = React.useState(false);
37461
37439
  const config = React.useMemo(() => ({
37462
37440
  basepath: "analytics",
37463
- url: "/widgets/trade-connection-map",
37441
+ url: `/widgets/trade-relationship-map`,
37464
37442
  filters: {
37443
+ datastakeId: id,
37465
37444
  product: filters?.products,
37466
37445
  sources: selectedPartners?.partners || []
37467
- }
37468
- }), [id, filters?.products, selectedPartners?.partners]);
37446
+ },
37447
+ stop: !selectedPartners?.partners?.length || selectedPartners?.loading
37448
+ }), [id, filters?.products, selectedPartners?.partners, selectedPartners?.loading]);
37469
37449
  const {
37470
37450
  data
37471
37451
  } = useWidgetFetch({
37472
37452
  config: config
37473
37453
  });
37474
37454
  const mapItem$1 = data => {
37475
- return mapItem(data, options, goTo, getRedirectLink);
37455
+ return mapItem(data, options, goTo, getRedirectLink, operatorData, APP);
37476
37456
  };
37477
37457
  React.useEffect(() => {
37478
37458
  if (id && selectedPartners?.partners?.length > 0 && fetchedProducts) {
@@ -37545,9 +37525,6 @@ const useTradeRelationship = ({
37545
37525
  right: mapChildren(data.clients, data.datastakeId, "right")?.filter(d => !!d),
37546
37526
  left: getLeft(data, mapChildren, supplierLocations)
37547
37527
  };
37548
- console.log({
37549
- graphData
37550
- });
37551
37528
  setGraphData(graphData);
37552
37529
  } catch (err) {
37553
37530
  setGraphData({});
@@ -37557,7 +37534,7 @@ const useTradeRelationship = ({
37557
37534
  };
37558
37535
  _fetch();
37559
37536
  }
37560
- }, [filters?.products, id, selectedPartners, fetchedProducts]);
37537
+ }, [filters?.products, id, selectedPartners, fetchedProducts, operatorData, options, goTo, getRedirectLink, data]);
37561
37538
  return {
37562
37539
  graphData,
37563
37540
  loading,
@@ -37840,7 +37817,8 @@ const TradeRelationships = ({
37840
37817
  selectedPartners = {},
37841
37818
  id,
37842
37819
  options = {},
37843
- getRedirectLink = () => {}
37820
+ getRedirectLink = () => {},
37821
+ APP
37844
37822
  }) => {
37845
37823
  const [filters, setFilters] = React.useState({});
37846
37824
  const onFilterChange = filters => {
@@ -37854,9 +37832,10 @@ const TradeRelationships = ({
37854
37832
  operatorData,
37855
37833
  options,
37856
37834
  filters,
37857
- t
37835
+ t,
37836
+ APP
37858
37837
  });
37859
- }, [filters.products, t, options?.minerals, operatorData]);
37838
+ }, [filters.products, t, options?.mineralOptions, operatorData, options?.mineral, APP]);
37860
37839
  const {
37861
37840
  graphData,
37862
37841
  loading,
@@ -37868,7 +37847,9 @@ const TradeRelationships = ({
37868
37847
  options,
37869
37848
  goTo,
37870
37849
  getRedirectLink,
37871
- filters
37850
+ filters,
37851
+ operatorData,
37852
+ APP
37872
37853
  });
37873
37854
  React.useEffect(() => {
37874
37855
  const defaultProduct = filterConfig?.[0]?.options?.[0]?.value;
@@ -38142,8 +38123,7 @@ function StakeholderMappings({
38142
38123
  iconOffsetY = 250,
38143
38124
  t = s => s,
38144
38125
  emptyString = undefined,
38145
- isPdf = false,
38146
- zoomOutTransition = false
38126
+ isPdf = false
38147
38127
  }) {
38148
38128
  const reactFlowWrapper = React.useRef(null);
38149
38129
  const [nodes, setNodes] = react.useNodesState([]);
@@ -38404,7 +38384,6 @@ function StakeholderMappings({
38404
38384
  });
38405
38385
  }, [reactFlowWrapper.current, JSON.stringify(data), JSON.stringify(selectedIconNodes), isAllOpenDefault, isSelectable, isChanged, emptyString]);
38406
38386
  return /*#__PURE__*/jsxRuntime.jsx(BaseGraph, {
38407
- zoomOutTransition: zoomOutTransition,
38408
38387
  nodes: nodes,
38409
38388
  mandatoryNodesToFit: mandatoryNodesToFit,
38410
38389
  edges: edges,
@@ -38511,7 +38490,8 @@ const OperatorSummary = ({
38511
38490
  getRedirectLink = () => {},
38512
38491
  goBack = () => {},
38513
38492
  onIdChange = () => {},
38514
- breadcrumbs = []
38493
+ breadcrumbs = [],
38494
+ APP
38515
38495
  }) => {
38516
38496
  const {
38517
38497
  selectedItem,
@@ -38617,7 +38597,8 @@ const OperatorSummary = ({
38617
38597
  t: t,
38618
38598
  id: params?.id || selectedItem,
38619
38599
  subject: "stakeholder",
38620
- partners: partners
38600
+ partners: partners,
38601
+ APP: APP
38621
38602
  })
38622
38603
  }), /*#__PURE__*/jsxRuntime.jsx("section", {
38623
38604
  children: /*#__PURE__*/jsxRuntime.jsx(TradeRelationships, {
@@ -38627,7 +38608,8 @@ const OperatorSummary = ({
38627
38608
  options: options,
38628
38609
  goTo: goTo,
38629
38610
  getRedirectLink: getRedirectLink,
38630
- operatorData: singleItemData
38611
+ operatorData: singleItemData,
38612
+ APP: APP
38631
38613
  })
38632
38614
  }), /*#__PURE__*/jsxRuntime.jsx("section", {
38633
38615
  children: /*#__PURE__*/jsxRuntime.jsx(Governance, {
@@ -42327,7 +42309,7 @@ styled__default["default"].div`
42327
42309
  flex: 1;
42328
42310
  `;
42329
42311
 
42330
- const getKeyIndicatorsRowConfig = ({
42312
+ const getKeyIndicatorsRowConfig$1 = ({
42331
42313
  t,
42332
42314
  data = {}
42333
42315
  }) => [{
@@ -42355,8 +42337,8 @@ const getKeyIndicatorsRowConfig = ({
42355
42337
  })
42356
42338
  }, {
42357
42339
  label: t('Activity Participants'),
42358
- render: () => /*#__PURE__*/jsxRuntime.jsx("div", {
42359
- children: '0'
42340
+ render: () => /*#__PURE__*/jsxRuntime.jsxs("div", {
42341
+ children: [" ", data?.totalNumberOfParticipantsArrival || '0']
42360
42342
  })
42361
42343
  }, {
42362
42344
  label: t('Hectares Planted'),
@@ -42828,7 +42810,7 @@ const RestorationActivitySummary = ({
42828
42810
  isCollapsed,
42829
42811
  isNestedSidebarCollapsed
42830
42812
  } = useResizeContext();
42831
- const keyIndicatorsConfig = React.useMemo(() => getKeyIndicatorsRowConfig({
42813
+ const keyIndicatorsConfig = React.useMemo(() => getKeyIndicatorsRowConfig$1({
42832
42814
  t,
42833
42815
  data: activityData
42834
42816
  }), [t, activityData]);
@@ -43001,6 +42983,103 @@ const RestorationActivitySummary = ({
43001
42983
  });
43002
42984
  };
43003
42985
 
42986
+ const getKeyIndicatorsRowConfig = ({
42987
+ t,
42988
+ data = {}
42989
+ }) => [{
42990
+ label: t('Region'),
42991
+ render: () => {
42992
+ // const region = data?.region;
42993
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
42994
+ children: '-'
42995
+ });
42996
+ }
42997
+ }, {
42998
+ label: t('Associated Plots'),
42999
+ render: () => {
43000
+ // const plotsCount = data?.associatedPlotsCount || '0';
43001
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
43002
+ children: '0'
43003
+ });
43004
+ }
43005
+ }, {
43006
+ label: t('Implementation Partners'),
43007
+ render: () => {
43008
+ // const partnersCount = data?.partnersCount || '0';
43009
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
43010
+ children: '0'
43011
+ });
43012
+ }
43013
+ }, {
43014
+ label: t('Total Activities'),
43015
+ render: () => {
43016
+ // const activitiesCount = data?.activitiesCount || '0';
43017
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
43018
+ children: '0'
43019
+ });
43020
+ }
43021
+ }, {
43022
+ label: t('Information Sources'),
43023
+ render: () => {
43024
+ // const sourcesCount = data?.informationSourcesCount || '0';
43025
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
43026
+ children: '0'
43027
+ });
43028
+ }
43029
+ }];
43030
+
43031
+ const PlantingCycleSummary = ({
43032
+ activityData,
43033
+ supportText,
43034
+ onDownload,
43035
+ downloadDisabled,
43036
+ actionButtons,
43037
+ breadcrumbs,
43038
+ goBackTo,
43039
+ loading,
43040
+ t = () => {}
43041
+ }) => {
43042
+ const keyIndicatorsConfig = React.useMemo(() => getKeyIndicatorsRowConfig({
43043
+ t,
43044
+ data: {}
43045
+ }), [t]);
43046
+ return /*#__PURE__*/jsxRuntime.jsxs(DashboardLayout, {
43047
+ header: /*#__PURE__*/jsxRuntime.jsx(DAFHeader, {
43048
+ title: 'Planting Cycle Summary',
43049
+ supportText: supportText || '',
43050
+ onDownload: onDownload,
43051
+ downloadDisabled: downloadDisabled,
43052
+ actionButtons: actionButtons,
43053
+ breadcrumbs: breadcrumbs,
43054
+ goBackTo: goBackTo,
43055
+ loading: loading
43056
+ }),
43057
+ children: [/*#__PURE__*/jsxRuntime.jsx("section", {
43058
+ children: /*#__PURE__*/jsxRuntime.jsx(KeyIndicatorsWidget, {
43059
+ title: t("Key Information"),
43060
+ config: keyIndicatorsConfig,
43061
+ loading: loading
43062
+ })
43063
+ }), /*#__PURE__*/jsxRuntime.jsx("section", {
43064
+ children: /*#__PURE__*/jsxRuntime.jsx(Widget, {
43065
+ title: t("Planting Locations"),
43066
+ className: "no-px h-w-btn-header no-pt-body no-p-body no-pb-body",
43067
+ style: {
43068
+ height: '100%',
43069
+ display: 'flex',
43070
+ flexDirection: 'column'
43071
+ },
43072
+ children: /*#__PURE__*/jsxRuntime.jsx(Map$1, {
43073
+ loading: loading,
43074
+ t: t,
43075
+ isSatellite: true,
43076
+ data: []
43077
+ })
43078
+ })
43079
+ })]
43080
+ });
43081
+ };
43082
+
43004
43083
  const IconNodesConfig = {
43005
43084
  operator: {
43006
43085
  name: "Operators",
@@ -43015,10 +43094,10 @@ const IconNodesConfig = {
43015
43094
  emptyName: "no-traders"
43016
43095
  },
43017
43096
  government: {
43018
- name: "Government",
43097
+ name: "Governance",
43019
43098
  icon: "KYC",
43020
43099
  order: 3,
43021
- emptyName: "no-government"
43100
+ emptyName: "no-governance"
43022
43101
  },
43023
43102
  other: {
43024
43103
  name: "Other",
@@ -43036,18 +43115,19 @@ const getStakeholderMappingData = ({
43036
43115
  t,
43037
43116
  goTo,
43038
43117
  selectedPartners,
43039
- mainSubject
43118
+ mainSubject,
43119
+ APP
43040
43120
  }) => {
43041
43121
  const _data = data;
43042
43122
  const mainSubjectData = _data?.[mainSubject];
43043
43123
  return {
43044
- id: mainSubjectData?.datastakeId || "",
43045
- name: mainSubjectData?.name || "",
43124
+ id: mainSubjectData?.datastakeId || locationData?.datastakeId || "",
43125
+ name: mainSubjectData?.name || locationData?.name || "",
43046
43126
  country: {
43047
- label: findOptions(mainSubjectData?.country, options?.countries) || "",
43048
- value: (mainSubjectData?.country || "").toLowerCase() || ""
43127
+ label: findOptions(mainSubjectData?.country || locationData?.country, options?.countries) || "",
43128
+ value: (mainSubjectData?.country || locationData?.country || "").toLowerCase() || ""
43049
43129
  },
43050
- onClick: () => goTo(`/app/view/production-sites/${mainSubjectData?.datastakeId}`),
43130
+ onClick: () => goTo(`/app/view/${APP === 'nashiriki' ? 'scl' : 'production-sites'}/${mainSubjectData?.datastakeId || locationData?.datastakeId}`),
43051
43131
  totalSources: selectedPartners?.partners?.length || 0,
43052
43132
  backgroundColor: "#FFD6E7",
43053
43133
  iconColor: "#C41D7F",
@@ -43074,7 +43154,7 @@ const getStakeholderMappingData = ({
43074
43154
  icon: "DashboardStakeholder",
43075
43155
  onClick: () => {
43076
43156
  if (child?.type === "operator") {
43077
- goTo(`/app/summary/operators/${child.datastakeId}`);
43157
+ goTo(`/app/${APP === 'nashiriki' ? 'summary/operators' : 'operator-summary'}/${child.datastakeId}`);
43078
43158
  return;
43079
43159
  }
43080
43160
  goTo(`/app/view/stakeholders/${child.datastakeId}`);
@@ -43096,7 +43176,8 @@ const StakeholderMapping = ({
43096
43176
  options = {},
43097
43177
  goTo = () => {},
43098
43178
  selectedPartners = {},
43099
- locationData = {}
43179
+ locationData = {},
43180
+ APP
43100
43181
  }) => {
43101
43182
  const defaultFilter = React.useMemo(() => {
43102
43183
  return {
@@ -43110,7 +43191,7 @@ const StakeholderMapping = ({
43110
43191
  coreSubject: "location",
43111
43192
  filterBySources: false,
43112
43193
  metrics: {
43113
- operator: ['operator', 'operator.clientLocation'],
43194
+ operator: ['operator.locationClient'],
43114
43195
  government: ['custom.stakeholderId', 'governance'],
43115
43196
  trader: ['trade'],
43116
43197
  other: ['civilSociety', 'international']
@@ -43133,7 +43214,8 @@ const StakeholderMapping = ({
43133
43214
  t,
43134
43215
  goTo,
43135
43216
  selectedPartners,
43136
- mainSubject: "mine"
43217
+ mainSubject: "mine",
43218
+ APP
43137
43219
  });
43138
43220
  }, [data, locationData, id, options, t, goTo, selectedPartners]);
43139
43221
  return /*#__PURE__*/jsxRuntime.jsx(Widget, {
@@ -43351,7 +43433,8 @@ const MineSummary = ({
43351
43433
  getRedirectLink = () => {},
43352
43434
  goBack = () => {},
43353
43435
  onIdChange = () => {},
43354
- breadcrumbs = []
43436
+ breadcrumbs = [],
43437
+ APP
43355
43438
  }) => {
43356
43439
  const {
43357
43440
  selectedItem,
@@ -43396,7 +43479,7 @@ const MineSummary = ({
43396
43479
  tooltip: t("Details"),
43397
43480
  icon: "FileEdit",
43398
43481
  onClick: () => {
43399
- goTo(getRedirectLink(`/app/view/production-sites/${params?.id ? params?.id : selectedItem}`));
43482
+ goTo(getRedirectLink(`/app/view/${APP === 'nashiriki' ? 'scl' : 'production-sites'}/${params?.id ? params?.id : selectedItem}`));
43400
43483
  }
43401
43484
  }, {
43402
43485
  tooltip: t("Find Data"),
@@ -43457,7 +43540,8 @@ const MineSummary = ({
43457
43540
  selectedPartners: selectedPartners,
43458
43541
  t: t,
43459
43542
  id: params?.id || selectedItem,
43460
- partners: partners
43543
+ partners: partners,
43544
+ APP: APP
43461
43545
  })
43462
43546
  }), /*#__PURE__*/jsxRuntime.jsx("section", {
43463
43547
  children: /*#__PURE__*/jsxRuntime.jsx(StakeholderMapping, {
@@ -43481,6 +43565,7 @@ exports.MineSummary = MineSummary;
43481
43565
  exports.OperatorSummary = OperatorSummary;
43482
43566
  exports.OperatorsTable = OperatorsTable;
43483
43567
  exports.PartnersTable = PartnersTable;
43568
+ exports.PlantingCycleSummary = PlantingCycleSummary;
43484
43569
  exports.ProductionSitesTable = ProductionSitesTable;
43485
43570
  exports.RestorationActivitySummary = RestorationActivitySummary;
43486
43571
  exports.StakeholdersTable = StakeholdersTable;