datastake-daf 0.6.785 → 0.6.787

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 (54) hide show
  1. package/dist/components/index.js +674 -399
  2. package/dist/hooks/index.js +9 -1
  3. package/dist/pages/index.js +24 -16
  4. package/dist/services/index.js +10 -1
  5. package/dist/utils/index.js +28 -12
  6. package/package.json +1 -1
  7. package/src/@daf/core/components/Dashboard/Map/hook.js +1 -1
  8. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/hook.js +0 -1
  9. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/index.jsx +1 -1
  10. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/hook.js +1 -1
  11. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/index.jsx +1 -1
  12. package/src/@daf/core/components/Screens/Admin/AdminModals/AddUser/index.jsx +0 -1
  13. package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/index.jsx +1 -1
  14. package/src/@daf/core/components/Screens/Admin/AdminModals/NewAccount/index.jsx +1 -1
  15. package/src/@daf/core/components/Screens/Admin/AdminScreens/Dashboard.jsx +2 -2
  16. package/src/@daf/core/components/Screens/Admin/AdminScreens/Location.jsx +5 -5
  17. package/src/@daf/core/components/Screens/Admin/AdminScreens/Subjects.jsx +2 -2
  18. package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/column.js +224 -0
  19. package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/helper.js +65 -0
  20. package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/index.jsx +23 -5
  21. package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/columns.js +36 -36
  22. package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/index.jsx +12 -21
  23. package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/helper.js +13 -8
  24. package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/index.jsx +2 -2
  25. package/src/@daf/core/components/Screens/Admin/adminRoutes.js +2 -2
  26. package/src/@daf/hooks/useGetQueryParams.js +3 -1
  27. package/src/@daf/pages/Events/Activities/columns.js +2 -2
  28. package/src/@daf/pages/Events/Activities/config.js +2 -2
  29. package/src/@daf/pages/Events/Incidents/columns.js +2 -2
  30. package/src/@daf/pages/Events/Incidents/config.js +2 -2
  31. package/src/@daf/pages/Locations/MineSite/columns.js +2 -2
  32. package/src/@daf/pages/Locations/columns.js +2 -2
  33. package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/columns.js +180 -0
  34. package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/config.js +0 -0
  35. package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/index.jsx +27 -0
  36. package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/columns.js +157 -0
  37. package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/config.js +31 -0
  38. package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/index.js +77 -0
  39. package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/columns.js +117 -0
  40. package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/index.jsx +54 -0
  41. package/src/@daf/pages/SelfAssesment/index.jsx +0 -0
  42. package/src/@daf/pages/Stakeholders/Operators/columns.js +2 -2
  43. package/src/@daf/services/AdminService.js +12 -3
  44. package/src/@daf/services/DashboardService.js +2 -1
  45. package/src/@daf/utils/filters.js +89 -89
  46. package/src/constants/locales/en/translation.js +3 -0
  47. package/src/constants/locales/fr/translation.js +1 -1
  48. package/src/constants/locales/sp/translation.js +1 -1
  49. package/build/favicon.ico +0 -0
  50. package/build/logo192.png +0 -0
  51. package/build/logo512.png +0 -0
  52. package/build/manifest.json +0 -25
  53. package/build/robots.txt +0 -3
  54. package/dist/style/datastake/mapbox-gl.css +0 -330
@@ -4778,7 +4778,7 @@ const config$2 = {
4778
4778
  Down: config$3
4779
4779
  };
4780
4780
 
4781
- const _excluded$C = ["width", "height", "size", "name", "fill"];
4781
+ const _excluded$D = ["width", "height", "size", "name", "fill"];
4782
4782
  const CustomIcon = _ref => {
4783
4783
  let {
4784
4784
  width = 14,
@@ -4787,7 +4787,7 @@ const CustomIcon = _ref => {
4787
4787
  name = "",
4788
4788
  fill = "none"
4789
4789
  } = _ref,
4790
- props = _objectWithoutProperties(_ref, _excluded$C);
4790
+ props = _objectWithoutProperties(_ref, _excluded$D);
4791
4791
  const conf = config$2[name];
4792
4792
  if (conf) {
4793
4793
  return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -5076,7 +5076,7 @@ createCommonjsModule(function (module, exports) {
5076
5076
  !function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
5077
5077
  });
5078
5078
 
5079
- const _excluded$B = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5079
+ const _excluded$C = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5080
5080
  dayjs__default["default"].extend(customParseFormat);
5081
5081
  dayjs__default["default"].extend(utc);
5082
5082
  dayjs__default["default"].extend(utc);
@@ -5452,7 +5452,7 @@ const filterCreateData = data => {
5452
5452
  createdAt,
5453
5453
  updatedAt
5454
5454
  } = data,
5455
- rest = _objectWithoutProperties(data, _excluded$B);
5455
+ rest = _objectWithoutProperties(data, _excluded$C);
5456
5456
  const _meta = isObjectEmpty(meta) ? undefined : meta;
5457
5457
  return _objectSpread2(_objectSpread2({}, rest), {}, {
5458
5458
  meta: _meta
@@ -5848,7 +5848,7 @@ SelectFilters.propTypes = {
5848
5848
  apiUrl: PropTypes__default["default"].string
5849
5849
  };
5850
5850
 
5851
- const _excluded$A = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
5851
+ const _excluded$B = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
5852
5852
  function DAFTable(_ref) {
5853
5853
  let {
5854
5854
  columns = [],
@@ -5879,7 +5879,7 @@ function DAFTable(_ref) {
5879
5879
  app,
5880
5880
  doEmptyRows
5881
5881
  } = _ref,
5882
- rest = _objectWithoutProperties(_ref, _excluded$A);
5882
+ rest = _objectWithoutProperties(_ref, _excluded$B);
5883
5883
  const [source, setSource] = React.useState([]);
5884
5884
  const projectData = (projects || []).find(p => p.id === selectedProject);
5885
5885
  const [filtersInit, setFiltersInit] = React.useState(!loading);
@@ -6697,7 +6697,7 @@ function ComponentWithFocus(_ref) {
6697
6697
  }
6698
6698
 
6699
6699
  var _templateObject$f;
6700
- const _excluded$z = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6700
+ const _excluded$A = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6701
6701
  function StickyTable(_ref) {
6702
6702
  let {
6703
6703
  size = "small",
@@ -6708,7 +6708,7 @@ function StickyTable(_ref) {
6708
6708
  pagination = false,
6709
6709
  doEmptyRows = true
6710
6710
  } = _ref,
6711
- props = _objectWithoutProperties(_ref, _excluded$z);
6711
+ props = _objectWithoutProperties(_ref, _excluded$A);
6712
6712
  const data = React__default["default"].useMemo(() => {
6713
6713
  if (!doEmptyRows) {
6714
6714
  return dataSource;
@@ -7233,7 +7233,7 @@ const BTN_SIZE = {
7233
7233
  LG: 'large'
7234
7234
  };
7235
7235
 
7236
- const _excluded$y = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7236
+ const _excluded$z = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7237
7237
  function DafButton(_ref) {
7238
7238
  let {
7239
7239
  content = '',
@@ -7247,7 +7247,7 @@ function DafButton(_ref) {
7247
7247
  style = {},
7248
7248
  className = ''
7249
7249
  } = _ref,
7250
- restProps = _objectWithoutProperties(_ref, _excluded$y);
7250
+ restProps = _objectWithoutProperties(_ref, _excluded$z);
7251
7251
  return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
7252
7252
  icon: icon,
7253
7253
  type: type,
@@ -7366,12 +7366,12 @@ const Style$R = styled__default["default"].div`
7366
7366
  }
7367
7367
  `;
7368
7368
 
7369
- const _excluded$x = ["children"];
7369
+ const _excluded$y = ["children"];
7370
7370
  const BorderedButton = _ref => {
7371
7371
  let {
7372
7372
  children
7373
7373
  } = _ref,
7374
- props = _objectWithoutProperties(_ref, _excluded$x);
7374
+ props = _objectWithoutProperties(_ref, _excluded$y);
7375
7375
  return /*#__PURE__*/jsxRuntime.jsx(Style$R, {
7376
7376
  className: "d-btn-cont",
7377
7377
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -7511,12 +7511,12 @@ Badge.propTypes = {
7511
7511
  props: PropTypes__default["default"].object
7512
7512
  };
7513
7513
 
7514
- const _excluded$w = ["icon"];
7514
+ const _excluded$x = ["icon"];
7515
7515
  function GetIcon(_ref) {
7516
7516
  let {
7517
7517
  icon
7518
7518
  } = _ref,
7519
- props = _objectWithoutProperties(_ref, _excluded$w);
7519
+ props = _objectWithoutProperties(_ref, _excluded$x);
7520
7520
  let Icon = Icons__namespace.CloseOutlined;
7521
7521
  if (Icons__namespace[icon]) {
7522
7522
  Icon = Icons__namespace[icon];
@@ -7846,7 +7846,7 @@ const MultiSelectStyled = styled__default["default"](antd.Select)`
7846
7846
  }
7847
7847
  `;
7848
7848
 
7849
- const _excluded$v = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
7849
+ const _excluded$w = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
7850
7850
  const {
7851
7851
  useToken: useToken$n
7852
7852
  } = antd.theme;
@@ -7939,7 +7939,7 @@ function Multiselect(_ref) {
7939
7939
  isSingle = false,
7940
7940
  selectionType = SELECTION_TYPES.DEFAULT
7941
7941
  } = _ref,
7942
- restProps = _objectWithoutProperties(_ref, _excluded$v);
7942
+ restProps = _objectWithoutProperties(_ref, _excluded$w);
7943
7943
  const {
7944
7944
  token
7945
7945
  } = useToken$n();
@@ -8661,7 +8661,7 @@ DAFHeader.propTypes = {
8661
8661
  filtersConfig: PropTypes__default["default"].any
8662
8662
  };
8663
8663
 
8664
- const _excluded$u = ["tabs", "onChange", "value", "className"];
8664
+ const _excluded$v = ["tabs", "onChange", "value", "className"];
8665
8665
  function TabsHeader(_ref) {
8666
8666
  let {
8667
8667
  tabs = [],
@@ -8669,7 +8669,7 @@ function TabsHeader(_ref) {
8669
8669
  value = '',
8670
8670
  className = 'mt-2'
8671
8671
  } = _ref,
8672
- rest = _objectWithoutProperties(_ref, _excluded$u);
8672
+ rest = _objectWithoutProperties(_ref, _excluded$v);
8673
8673
  return /*#__PURE__*/jsxRuntime.jsx("div", {
8674
8674
  className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
8675
8675
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
@@ -8766,7 +8766,7 @@ DrawerHeader.propTypes = {
8766
8766
  tabsConfig: PropTypes__default["default"].any
8767
8767
  };
8768
8768
 
8769
- const _excluded$t = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8769
+ const _excluded$u = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8770
8770
  const useFooter = _ref => {
8771
8771
  let {
8772
8772
  leftContent,
@@ -8801,7 +8801,7 @@ const useFooter = _ref => {
8801
8801
  style = {},
8802
8802
  className = ""
8803
8803
  } = button,
8804
- restProps = _objectWithoutProperties(button, _excluded$t);
8804
+ restProps = _objectWithoutProperties(button, _excluded$u);
8805
8805
  return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
8806
8806
  content: label,
8807
8807
  type: type,
@@ -9558,29 +9558,24 @@ const processConditionalTableKeys = (tableKeys, item) => {
9558
9558
  });
9559
9559
  return processedKeys;
9560
9560
  };
9561
- const renderFieldData = function (type, value, user, config) {
9562
- let getApiBaseUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : () => {};
9563
- let getAppHeader = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : () => {};
9564
- let app = arguments.length > 6 ? arguments[6] : undefined;
9565
- let allValues = arguments.length > 7 ? arguments[7] : undefined;
9566
- let formValues = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : {};
9561
+ const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, getAppHeader = () => {}, app, allValues, formValues = {}) => {
9567
9562
  switch (type) {
9568
9563
  case 'year':
9569
9564
  return value !== '-' ? renderDateFormatted(value, 'YYYY', 'en') : '-';
9570
9565
  case 'date':
9571
9566
  {
9572
- const language = user !== null && user !== void 0 && user.language && (user === null || user === void 0 ? void 0 : user.language) === 'sp' ? 'es' : user === null || user === void 0 ? void 0 : user.language;
9567
+ const language = user?.language && user?.language === 'sp' ? 'es' : user?.language;
9573
9568
  return value !== '-' ? renderDateFormatted(value, 'DD MMM YYYY', language || 'en') : '-';
9574
9569
  }
9575
9570
  case 'select':
9576
9571
  {
9577
- const options = (config === null || config === void 0 ? void 0 : config.options) || [];
9572
+ const options = config?.options || [];
9578
9573
  const option = findOptions(value, options);
9579
9574
  return option;
9580
9575
  }
9581
9576
  case 'multiselect':
9582
9577
  {
9583
- const options = (config === null || config === void 0 ? void 0 : config.options) || [];
9578
+ const options = config?.options || [];
9584
9579
  const _val = typeof value === 'string' ? value.split(',').map(v => v.trim()) : value;
9585
9580
  const option = findOptions(_val, options);
9586
9581
  return option.join(', ');
@@ -9595,7 +9590,7 @@ const renderFieldData = function (type, value, user, config) {
9595
9590
  formValues: formValues
9596
9591
  });
9597
9592
  case 'percentage':
9598
- return value === '-' || value === null || value === undefined ? '-' : "".concat(value, " %");
9593
+ return value === '-' || value === null || value === undefined ? '-' : `${value} %`;
9599
9594
  case 'geolocation':
9600
9595
  {
9601
9596
  const val = JSON.parse(value) || {};
@@ -9609,7 +9604,7 @@ const renderFieldData = function (type, value, user, config) {
9609
9604
  case 'upload':
9610
9605
  case 'videoUpload':
9611
9606
  {
9612
- const documentName = allValues === null || allValues === void 0 ? void 0 : allValues.map(item => item === null || item === void 0 ? void 0 : item.name).join(', ');
9607
+ const documentName = allValues?.map(item => item?.name).join(', ');
9613
9608
  return documentName;
9614
9609
  }
9615
9610
  default:
@@ -9617,27 +9612,25 @@ const renderFieldData = function (type, value, user, config) {
9617
9612
  }
9618
9613
  };
9619
9614
 
9620
- const renderValue = _ref => {
9621
- let {
9622
- value,
9623
- hasChildren,
9624
- config,
9625
- user,
9626
- getApiBaseUrl = () => {},
9627
- getAppHeader = () => {},
9628
- app,
9629
- allData = {}
9630
- } = _ref;
9631
- if ((config === null || config === void 0 ? void 0 : config.type) === 'groupInputs') {
9632
- if (!(config !== null && config !== void 0 && config.inputs)) return null;
9615
+ const renderValue = ({
9616
+ value,
9617
+ hasChildren,
9618
+ config,
9619
+ user,
9620
+ getApiBaseUrl = () => {},
9621
+ getAppHeader = () => {},
9622
+ app,
9623
+ allData = {}
9624
+ }) => {
9625
+ if (config?.type === 'groupInputs') {
9626
+ if (!config?.inputs) return null;
9633
9627
  const inputKeys = Object.keys(config.inputs).sort((a, b) => {
9634
- var _config$inputs$a, _config$inputs$b;
9635
- const positionA = ((_config$inputs$a = config.inputs[a]) === null || _config$inputs$a === void 0 ? void 0 : _config$inputs$a.position) || 0;
9636
- const positionB = ((_config$inputs$b = config.inputs[b]) === null || _config$inputs$b === void 0 ? void 0 : _config$inputs$b.position) || 0;
9628
+ const positionA = config.inputs[a]?.position || 0;
9629
+ const positionB = config.inputs[b]?.position || 0;
9637
9630
  return positionA - positionB;
9638
9631
  });
9639
9632
  const values = inputKeys.map(inputKey => {
9640
- let inputValue = value === null || value === void 0 ? void 0 : value[inputKey];
9633
+ let inputValue = value?.[inputKey];
9641
9634
  if (inputValue === null || inputValue === undefined || inputValue === '') {
9642
9635
  return '';
9643
9636
  } else if (typeof inputValue === 'object' && inputValue !== null) {
@@ -9678,8 +9671,8 @@ const renderValue = _ref => {
9678
9671
  } else {
9679
9672
  displayValue = String(value);
9680
9673
  }
9681
- const fieldType = (config === null || config === void 0 ? void 0 : config.type) || 'text';
9682
- let cssClass = "tree-value ".concat(fieldType, "-type");
9674
+ const fieldType = config?.type || 'text';
9675
+ let cssClass = `tree-value ${fieldType}-type`;
9683
9676
  if (displayValue === '-') {
9684
9677
  cssClass += ' empty';
9685
9678
  }
@@ -9689,21 +9682,19 @@ const renderValue = _ref => {
9689
9682
  children: displayValue
9690
9683
  });
9691
9684
  };
9692
- const determineHasChildren = _ref2 => {
9693
- var _config$meta;
9694
- let {
9695
- config,
9696
- level
9697
- } = _ref2;
9698
- if ((config === null || config === void 0 ? void 0 : config.type) === 'groupInputs') {
9685
+ const determineHasChildren = ({
9686
+ config,
9687
+ level
9688
+ }) => {
9689
+ if (config?.type === 'groupInputs') {
9699
9690
  return false;
9700
9691
  }
9701
- if ((config === null || config === void 0 ? void 0 : config.type) === 'header' && config !== null && config !== void 0 && config.inputs && Object.keys(config.inputs).length > 0) {
9692
+ if (config?.type === 'header' && config?.inputs && Object.keys(config.inputs).length > 0) {
9702
9693
  return true;
9703
9694
  }
9704
- return (config === null || config === void 0 ? void 0 : config.inputs) || (config === null || config === void 0 ? void 0 : config.type) === 'group' || (config === null || config === void 0 ? void 0 : config.type) === 'dataLinkGroup' || (config === null || config === void 0 ? void 0 : config.type) === 'section' || (config === null || config === void 0 ? void 0 : config.type) === 'ajaxSubGroup' ||
9695
+ return config?.inputs || config?.type === 'group' || config?.type === 'dataLinkGroup' || config?.type === 'section' || config?.type === 'ajaxSubGroup' ||
9705
9696
  // Add this line
9706
- (config === null || config === void 0 ? void 0 : config.type) === 'dataLink' && (config === null || config === void 0 || (_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.tableKeys) || level === 0 && config && typeof config === 'object' && Object.keys(config).some(key => key !== 'id' && key !== 'label' && key !== 'position' && key !== 'subTitle' && typeof config[key] === 'object' && config[key] !== null);
9697
+ config?.type === 'dataLink' && config?.meta?.tableKeys || level === 0 && config && typeof config === 'object' && Object.keys(config).some(key => key !== 'id' && key !== 'label' && key !== 'position' && key !== 'subTitle' && typeof config[key] === 'object' && config[key] !== null);
9707
9698
  };
9708
9699
 
9709
9700
  const sortByPosition = (items, getConfig) => {
@@ -11691,7 +11682,7 @@ Widget.propTypes = {
11691
11682
  };
11692
11683
  Widget.displayName = 'Widget';
11693
11684
 
11694
- const _excluded$s = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11685
+ const _excluded$t = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11695
11686
  function ImageWidget(_ref) {
11696
11687
  let {
11697
11688
  loading = false,
@@ -11702,7 +11693,7 @@ function ImageWidget(_ref) {
11702
11693
  noDescriptionText,
11703
11694
  isPdf = false
11704
11695
  } = _ref,
11705
- props = _objectWithoutProperties(_ref, _excluded$s);
11696
+ props = _objectWithoutProperties(_ref, _excluded$t);
11706
11697
  const expandable = isPdf ? false : props.expandable;
11707
11698
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
11708
11699
  loading: loading,
@@ -11762,7 +11753,7 @@ function ImageWidget(_ref) {
11762
11753
  ImageWidget.displayName = 'ImageWidget';
11763
11754
 
11764
11755
  var _templateObject$c;
11765
- const _excluded$r = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11756
+ const _excluded$s = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11766
11757
  function FlowWidget(_ref) {
11767
11758
  let {
11768
11759
  title,
@@ -11774,7 +11765,7 @@ function FlowWidget(_ref) {
11774
11765
  className,
11775
11766
  direction = "horizontal"
11776
11767
  } = _ref,
11777
- rest = _objectWithoutProperties(_ref, _excluded$r);
11768
+ rest = _objectWithoutProperties(_ref, _excluded$s);
11778
11769
  const [activeTab, setActiveTab] = React.useState();
11779
11770
  React.useEffect(() => {
11780
11771
  if (defaultActiveTab) {
@@ -14735,7 +14726,7 @@ const useMap$1 = ({
14735
14726
  });
14736
14727
  function handleSelectMarker(clickedMarker) {
14737
14728
  setSelectedMarkersId(prev => {
14738
- if (prev.includes(clickedMarker.datastakeId)) {
14729
+ if (openPopupIdRef.current === clickedMarker.datastakeId) {
14739
14730
  // Deselecting - clear polylines
14740
14731
  openPopupIdRef.current = null;
14741
14732
  setMarkerWithPopup(null);
@@ -15327,7 +15318,7 @@ Map$3.propTypes = {
15327
15318
  link: PropTypes__default["default"].any
15328
15319
  };
15329
15320
 
15330
- const _excluded$q = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15321
+ const _excluded$r = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15331
15322
  function InExpandableWidgetMap(_ref) {
15332
15323
  let {
15333
15324
  isExpanded,
@@ -15341,7 +15332,7 @@ function InExpandableWidgetMap(_ref) {
15341
15332
  height,
15342
15333
  widgetConfig
15343
15334
  } = _ref,
15344
- rest = _objectWithoutProperties(_ref, _excluded$q);
15335
+ rest = _objectWithoutProperties(_ref, _excluded$r);
15345
15336
  const [mapKey, setMapKey] = React.useState(0);
15346
15337
  const [isMapReady, setIsMapReady] = React.useState(false);
15347
15338
  React.useEffect(() => {
@@ -17541,14 +17532,14 @@ const MapConfig = ({
17541
17532
  });
17542
17533
  };
17543
17534
 
17544
- const _excluded$p = ["config", "title", "loading"];
17535
+ const _excluded$q = ["config", "title", "loading"];
17545
17536
  const Details = _ref => {
17546
17537
  let {
17547
17538
  config = [],
17548
17539
  title,
17549
17540
  loading = false
17550
17541
  } = _ref,
17551
- rest = _objectWithoutProperties(_ref, _excluded$p);
17542
+ rest = _objectWithoutProperties(_ref, _excluded$q);
17552
17543
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17553
17544
  className: "with-border-header h-w-btn-header card",
17554
17545
  loading: loading,
@@ -17564,14 +17555,14 @@ const Details = _ref => {
17564
17555
  }));
17565
17556
  };
17566
17557
 
17567
- const _excluded$o = ["config", "title", "loading"];
17558
+ const _excluded$p = ["config", "title", "loading"];
17568
17559
  const KeyIndicatorsDetails = _ref => {
17569
17560
  let {
17570
17561
  config,
17571
17562
  title,
17572
17563
  loading = false
17573
17564
  } = _ref,
17574
- rest = _objectWithoutProperties(_ref, _excluded$o);
17565
+ rest = _objectWithoutProperties(_ref, _excluded$p);
17575
17566
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17576
17567
  className: "with-border-header h-w-btn-header",
17577
17568
  title: title,
@@ -17601,7 +17592,7 @@ const Style$G = styled__default["default"].div`
17601
17592
  }
17602
17593
  `;
17603
17594
 
17604
- const _excluded$n = ["children", "config", "detailsTitle", "firstColumnWidth"];
17595
+ const _excluded$o = ["children", "config", "detailsTitle", "firstColumnWidth"];
17605
17596
  const DetailsSection = _ref => {
17606
17597
  let {
17607
17598
  children,
@@ -17609,7 +17600,7 @@ const DetailsSection = _ref => {
17609
17600
  detailsTitle,
17610
17601
  firstColumnWidth = "250px"
17611
17602
  } = _ref,
17612
- rest = _objectWithoutProperties(_ref, _excluded$n);
17603
+ rest = _objectWithoutProperties(_ref, _excluded$o);
17613
17604
  return /*#__PURE__*/jsxRuntime.jsx(Style$G, {
17614
17605
  firstColumnWidth: firstColumnWidth,
17615
17606
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -17785,14 +17776,14 @@ const getGoalConfig = () => {
17785
17776
  };
17786
17777
 
17787
17778
  var _templateObject$a;
17788
- const _excluded$m = ["title", "activeSdgGoals", "t"];
17779
+ const _excluded$n = ["title", "activeSdgGoals", "t"];
17789
17780
  function SDGWidget(_ref) {
17790
17781
  let {
17791
17782
  title = "Sustainable Development Goals",
17792
17783
  activeSdgGoals = [],
17793
17784
  t = key => key
17794
17785
  } = _ref,
17795
- props = _objectWithoutProperties(_ref, _excluded$m);
17786
+ props = _objectWithoutProperties(_ref, _excluded$n);
17796
17787
  const sdgConfig = getGoalConfig();
17797
17788
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17798
17789
  title: title,
@@ -18090,7 +18081,7 @@ function SdgList({
18090
18081
  });
18091
18082
  }
18092
18083
 
18093
- const _excluded$l = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18084
+ const _excluded$m = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18094
18085
  const {
18095
18086
  Meta
18096
18087
  } = antd.Card;
@@ -18110,7 +18101,7 @@ function ProjectWidget(_ref) {
18110
18101
  hideSDGList = false,
18111
18102
  t = x => x
18112
18103
  } = _ref,
18113
- props = _objectWithoutProperties(_ref, _excluded$l);
18104
+ props = _objectWithoutProperties(_ref, _excluded$m);
18114
18105
  const [isHovered, setIsHovered] = React__default["default"].useState(false);
18115
18106
  const {
18116
18107
  token
@@ -18382,13 +18373,13 @@ const WidgetCard = _ref => {
18382
18373
  });
18383
18374
  };
18384
18375
 
18385
- const _excluded$k = ["title", "children"];
18376
+ const _excluded$l = ["title", "children"];
18386
18377
  const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
18387
18378
  let {
18388
18379
  title,
18389
18380
  children
18390
18381
  } = _ref,
18391
- rest = _objectWithoutProperties(_ref, _excluded$k);
18382
+ rest = _objectWithoutProperties(_ref, _excluded$l);
18392
18383
  /**
18393
18384
  * Handles carousel slide change events
18394
18385
  * @param {number} currentSlide - The index of the current slide after change
@@ -18552,7 +18543,7 @@ const EmptyStateContainer = styled__default["default"].div`
18552
18543
  }
18553
18544
  `;
18554
18545
 
18555
- const _excluded$j = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18546
+ const _excluded$k = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18556
18547
  function ImageCarousel(_ref) {
18557
18548
  let {
18558
18549
  title,
@@ -18567,7 +18558,7 @@ function ImageCarousel(_ref) {
18567
18558
  emptyLogo = antd.Empty.PRESENTED_IMAGE_SIMPLE,
18568
18559
  emptyText = "No Image"
18569
18560
  } = _ref,
18570
- rest = _objectWithoutProperties(_ref, _excluded$j);
18561
+ rest = _objectWithoutProperties(_ref, _excluded$k);
18571
18562
  const [previewVisible, setPreviewVisible] = React.useState(false);
18572
18563
  const [current, setCurrent] = React.useState(0);
18573
18564
  const carouselRef = React.useRef(null);
@@ -24123,7 +24114,7 @@ const RepeatableModals = ({
24123
24114
  }) : null;
24124
24115
  };
24125
24116
 
24126
- const _excluded$i = ["viewGroup"],
24117
+ const _excluded$j = ["viewGroup"],
24127
24118
  _excluded2$1 = ["label", "icon", "position"];
24128
24119
  const Content$1 = _ref => {
24129
24120
  let {
@@ -24192,7 +24183,7 @@ const Content$1 = _ref => {
24192
24183
  if (groups[gKey].viewGroup === key) {
24193
24184
  // eslint-disable-next-line no-unused-vars
24194
24185
  const _groups$gKey = groups[gKey],
24195
- gCfg = _objectWithoutProperties(_groups$gKey, _excluded$i);
24186
+ gCfg = _objectWithoutProperties(_groups$gKey, _excluded$j);
24196
24187
  items[gKey] = gCfg;
24197
24188
  }
24198
24189
  return items;
@@ -24450,7 +24441,7 @@ const Content$1 = _ref => {
24450
24441
  });
24451
24442
  };
24452
24443
 
24453
- const _excluded$h = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
24444
+ const _excluded$i = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
24454
24445
  function Modal(_ref) {
24455
24446
  let {
24456
24447
  t = text => text,
@@ -24466,7 +24457,7 @@ function Modal(_ref) {
24466
24457
  disabled = false,
24467
24458
  withModalFormWrapper = true
24468
24459
  } = _ref,
24469
- props = _objectWithoutProperties(_ref, _excluded$h);
24460
+ props = _objectWithoutProperties(_ref, _excluded$i);
24470
24461
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Modal, _objectSpread2(_objectSpread2({
24471
24462
  width: 650,
24472
24463
  footer: null,
@@ -35002,7 +34993,7 @@ const beforeUpload = allowedExtensions => file => {
35002
34993
  };
35003
34994
  const allowedImageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.avif', '.bmp', '.tiff', '.tif', '.heif', '.heic', '.svg', '.ico'];
35004
34995
 
35005
- const _excluded$g = ["placeholder"],
34996
+ const _excluded$h = ["placeholder"],
35006
34997
  _excluded2 = ["label", "description", "excludeFromEdit", "showFormIf", "icon", "position", "template", "formClass"];
35007
34998
  dayjs__default["default"].extend(utc);
35008
34999
  dayjs__default["default"].extend(timezone);
@@ -35951,7 +35942,7 @@ const inputTypeComponent$1 = {
35951
35942
  },
35952
35943
  commentHint
35953
35944
  } = _ref19,
35954
- props = _objectWithoutProperties(_ref19.props, _excluded$g);
35945
+ props = _objectWithoutProperties(_ref19.props, _excluded$h);
35955
35946
  let {
35956
35947
  onChange,
35957
35948
  value,
@@ -38633,7 +38624,7 @@ function AjaxSelect(props) {
38633
38624
  }, props));
38634
38625
  }
38635
38626
 
38636
- const _excluded$f = ["placeholder"];
38627
+ const _excluded$g = ["placeholder"];
38637
38628
  const propHasValue = val => {
38638
38629
  if (Array.isArray(val)) {
38639
38630
  return val.length > 0 ? true : false;
@@ -39388,7 +39379,7 @@ const inputTypeComponent = {
39388
39379
  },
39389
39380
  commentHint
39390
39381
  } = _ref15,
39391
- props = _objectWithoutProperties(_ref15.props, _excluded$f);
39382
+ props = _objectWithoutProperties(_ref15.props, _excluded$g);
39392
39383
  let {
39393
39384
  onChange,
39394
39385
  value
@@ -41026,7 +41017,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
41026
41017
  });
41027
41018
  };
41028
41019
 
41029
- const _excluded$e = ["icon"];
41020
+ const _excluded$f = ["icon"];
41030
41021
  function DynamicForm(_ref) {
41031
41022
  var _data$meta;
41032
41023
  let {
@@ -41641,7 +41632,7 @@ function DynamicForm(_ref) {
41641
41632
  let {
41642
41633
  icon: Icon
41643
41634
  } = _ref3,
41644
- form = _objectWithoutProperties(_ref3, _excluded$e);
41635
+ form = _objectWithoutProperties(_ref3, _excluded$f);
41645
41636
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
41646
41637
  type: "link",
41647
41638
  size: "large",
@@ -41859,7 +41850,7 @@ const Navigation = _ref => {
41859
41850
  var _templateObject$7;
41860
41851
  const StyledSelect = styled__default["default"](antd.Select)(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteral(["\n width: 100%;\n \n .ant-select-arrow {\n margin-top: 1px !important;\n }\n"])));
41861
41852
 
41862
- const _excluded$d = ["onChange", "value"];
41853
+ const _excluded$e = ["onChange", "value"];
41863
41854
  function AuthForm(_ref) {
41864
41855
  var _steps$currentStep;
41865
41856
  let {
@@ -41989,7 +41980,7 @@ function AuthForm(_ref) {
41989
41980
  {
41990
41981
  var _field$options;
41991
41982
  const _ref3 = field.props || {},
41992
- restSelectProps = _objectWithoutProperties(_ref3, _excluded$d);
41983
+ restSelectProps = _objectWithoutProperties(_ref3, _excluded$e);
41993
41984
  inputNode = /*#__PURE__*/jsxRuntime.jsx(StyledSelect, _objectSpread2(_objectSpread2({
41994
41985
  placeholder: field.placeholder
41995
41986
  }, restSelectProps), {}, {
@@ -42153,7 +42144,7 @@ function MultiBarProgress(_ref) {
42153
42144
  }
42154
42145
  const Style$x = styled__default["default"].div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n\theight: 6px;\n\twidth: 100%;\n\tbackground: var(--base-gray-40);\n\tborder-radius: 8px;\n\tdisplay: flex;\n\toverflow: hidden;\n\tdiv {\n\t\theight: 100%;\n\t}\n"])));
42155
42146
 
42156
- const _excluded$c = ["tooltipTitle", "percentage", "strokeColor", "showInfo"];
42147
+ const _excluded$d = ["tooltipTitle", "percentage", "strokeColor", "showInfo"];
42157
42148
  function MultiColorProgressBar(_ref) {
42158
42149
  let {
42159
42150
  tooltipTitle,
@@ -42165,7 +42156,7 @@ function MultiColorProgressBar(_ref) {
42165
42156
  },
42166
42157
  showInfo = false
42167
42158
  } = _ref,
42168
- rest = _objectWithoutProperties(_ref, _excluded$c);
42159
+ rest = _objectWithoutProperties(_ref, _excluded$d);
42169
42160
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
42170
42161
  title: tooltipTitle,
42171
42162
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Progress, _objectSpread2({
@@ -42212,7 +42203,7 @@ const SideIcon = _ref3 => {
42212
42203
  });
42213
42204
  };
42214
42205
 
42215
- const _excluded$b = ["value", "options", "onChange", "className", "width"];
42206
+ const _excluded$c = ["value", "options", "onChange", "className", "width"];
42216
42207
  const ProgressTabs = _ref => {
42217
42208
  let {
42218
42209
  value = 'setup',
@@ -42233,7 +42224,7 @@ const ProgressTabs = _ref => {
42233
42224
  className = '',
42234
42225
  width = '100%'
42235
42226
  } = _ref,
42236
- rest = _objectWithoutProperties(_ref, _excluded$b);
42227
+ rest = _objectWithoutProperties(_ref, _excluded$c);
42237
42228
  // Transform options to include icons and handle disabled state
42238
42229
  const transformedOptions = options.map(option => _objectSpread2(_objectSpread2({}, option), {}, {
42239
42230
  label: /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -44448,7 +44439,6 @@ const getDefaultActiveFilters = (params, selectFiltersConfig, defaultPageSize, d
44448
44439
  });
44449
44440
  return o;
44450
44441
  };
44451
- const NEW_PAGINATION_APPS = ["nashiriki"];
44452
44442
  const filterParams = (value, module) => {
44453
44443
  const {
44454
44444
  activeFilters,
@@ -44464,10 +44454,12 @@ const filterParams = (value, module) => {
44464
44454
  ...filters
44465
44455
  } = activeFilters || {};
44466
44456
  const params = {};
44467
- params.pagination = JSON.stringify({
44468
- [NEW_PAGINATION_APPS.includes(module) ? "skip" : "page"]: page,
44469
- [NEW_PAGINATION_APPS.includes(module) ? "take" : "pageSize"]: pageSize
44470
- });
44457
+ // Use skip and take inside pagination object
44458
+ // Calculate skip from page number (page 1 = skip 1, page 2 = skip 21, etc.)
44459
+ params.pagination = {
44460
+ skip: page ? (page - 1) * (pageSize || 20) + 1 : 1,
44461
+ take: pageSize || 20
44462
+ };
44471
44463
  if (search && searchParams) {
44472
44464
  params.search = JSON.stringify({
44473
44465
  qs: search,
@@ -44482,12 +44474,24 @@ const filterParams = (value, module) => {
44482
44474
  }
44483
44475
  if (Object.keys(filters).length) {
44484
44476
  if (value.sourceId && value.sourceId === "overview") {
44485
- params.filters = JSON.stringify(filters);
44477
+ const {
44478
+ activeTab,
44479
+ ...restFilters
44480
+ } = filters;
44481
+ Object.assign(params, restFilters);
44482
+ if (activeTab !== undefined) {
44483
+ params.tab = activeTab;
44484
+ }
44486
44485
  } else {
44487
- params.filters = JSON.stringify({
44488
- ...filters,
44489
- authorId: undefined
44490
- });
44486
+ const {
44487
+ authorId,
44488
+ activeTab,
44489
+ ...restFilters
44490
+ } = filters;
44491
+ Object.assign(params, restFilters);
44492
+ if (activeTab !== undefined) {
44493
+ params.tab = activeTab;
44494
+ }
44491
44495
  }
44492
44496
  }
44493
44497
  return {
@@ -44785,7 +44789,7 @@ const renderRows = ({
44785
44789
  });
44786
44790
  };
44787
44791
 
44788
- const _excluded$a = ["page", "pageSize"];
44792
+ const _excluded$b = ["page", "pageSize"];
44789
44793
  function DataStoreTable$1(_ref) {
44790
44794
  let {
44791
44795
  mod,
@@ -44883,7 +44887,7 @@ function DataStoreTable$1(_ref) {
44883
44887
  page,
44884
44888
  pageSize
44885
44889
  } = activeFilters,
44886
- rest = _objectWithoutProperties(activeFilters, _excluded$a);
44890
+ rest = _objectWithoutProperties(activeFilters, _excluded$b);
44887
44891
  const params = _objectSpread2({
44888
44892
  pagination: {
44889
44893
  page,
@@ -45203,7 +45207,7 @@ const getLinkedColumns = ({
45203
45207
  ellipsis: true
45204
45208
  }];
45205
45209
 
45206
- const _excluded$9 = ["administrativeLevel1", "administrativeLevel2"];
45210
+ const _excluded$a = ["administrativeLevel1", "administrativeLevel2"];
45207
45211
  function DataStoreView(_ref) {
45208
45212
  let {
45209
45213
  mod,
@@ -45266,7 +45270,7 @@ function DataStoreView(_ref) {
45266
45270
  administrativeLevel1,
45267
45271
  administrativeLevel2
45268
45272
  } = _ref2,
45269
- rest = _objectWithoutProperties(_ref2, _excluded$9);
45273
+ rest = _objectWithoutProperties(_ref2, _excluded$a);
45270
45274
  const levels = [administrativeLevel1, administrativeLevel2].filter(p => !!p);
45271
45275
  let levelsRes = {
45272
45276
  data: []
@@ -46764,14 +46768,14 @@ const TabsStyled = styled__default["default"](antd.Tabs)`
46764
46768
 
46765
46769
  `;
46766
46770
 
46767
- const _excluded$8 = ["defaultActiveKey", "items", "onChange"];
46771
+ const _excluded$9 = ["defaultActiveKey", "items", "onChange"];
46768
46772
  const StyledTabs = _ref => {
46769
46773
  let {
46770
46774
  defaultActiveKey,
46771
46775
  items,
46772
46776
  onChange
46773
46777
  } = _ref,
46774
- rest = _objectWithoutProperties(_ref, _excluded$8);
46778
+ rest = _objectWithoutProperties(_ref, _excluded$9);
46775
46779
  return /*#__PURE__*/jsxRuntime.jsx(TabsStyled, _objectSpread2({
46776
46780
  defaultActiveKey: defaultActiveKey,
46777
46781
  items: items,
@@ -46842,7 +46846,7 @@ const Container$1 = styled__default["default"].div`
46842
46846
  width: ${props => props.isPdf ? props.width ? props.width : '1000px' : 'calc(100% - 48px)'};
46843
46847
  `;
46844
46848
 
46845
- const _excluded$7 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "isPercentage", "seriesField", "formattedYAxis", "formattedXAxis", "color", "height", "t", "isPdf", "legendConfig", "width", "xAxisConfig"];
46849
+ const _excluded$8 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "isPercentage", "seriesField", "formattedYAxis", "formattedXAxis", "color", "height", "t", "isPdf", "legendConfig", "width", "xAxisConfig"];
46846
46850
  const {
46847
46851
  useToken: useToken$g
46848
46852
  } = antd.theme;
@@ -46932,7 +46936,7 @@ function BarChart(_ref) {
46932
46936
  width,
46933
46937
  xAxisConfig = {}
46934
46938
  } = _ref;
46935
- _objectWithoutProperties(_ref, _excluded$7);
46939
+ _objectWithoutProperties(_ref, _excluded$8);
46936
46940
  const containerRef = React__default["default"].useRef(null);
46937
46941
  const chartRef = React__default["default"].useRef(null);
46938
46942
  const {
@@ -47016,7 +47020,7 @@ function BarChart(_ref) {
47016
47020
  });
47017
47021
  }
47018
47022
 
47019
- const _excluded$6 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isSmooth", "seriesField", "isArea", "formattedYAxis", "formattedXAxis", "color", "isPercentage", "height", "autoHideXLabel", "t", "isPdf", "legendConfig", "width", "yAxis", "xAxis"];
47023
+ const _excluded$7 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isSmooth", "seriesField", "isArea", "formattedYAxis", "formattedXAxis", "color", "isPercentage", "height", "autoHideXLabel", "t", "isPdf", "legendConfig", "width", "yAxis", "xAxis"];
47020
47024
  const {
47021
47025
  useToken: useToken$f
47022
47026
  } = antd.theme;
@@ -47105,7 +47109,7 @@ function LineChart(_ref) {
47105
47109
  yAxis: customYAxis,
47106
47110
  xAxis: customXAxis
47107
47111
  } = _ref;
47108
- _objectWithoutProperties(_ref, _excluded$6);
47112
+ _objectWithoutProperties(_ref, _excluded$7);
47109
47113
  const containerRef = React__default["default"].useRef(null);
47110
47114
  const chartRef = React__default["default"].useRef(null);
47111
47115
  const {
@@ -47207,7 +47211,7 @@ function LineChart(_ref) {
47207
47211
  });
47208
47212
  }
47209
47213
 
47210
- const _excluded$5 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "seriesField", "isPercentage", "showBackground", "formattedYAxis", "formattedXAxis", "color", "height", "groupField", "width", "legendConfig", "isPdf", "yAxis", "xAxis"];
47214
+ const _excluded$6 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "seriesField", "isPercentage", "showBackground", "formattedYAxis", "formattedXAxis", "color", "height", "groupField", "width", "legendConfig", "isPdf", "yAxis", "xAxis"];
47211
47215
  const {
47212
47216
  useToken: useToken$e
47213
47217
  } = antd.theme;
@@ -47312,7 +47316,7 @@ function ColumnChart(_ref) {
47312
47316
  yAxis: customYAxis,
47313
47317
  xAxis: customXAxis
47314
47318
  } = _ref;
47315
- _objectWithoutProperties(_ref, _excluded$5);
47319
+ _objectWithoutProperties(_ref, _excluded$6);
47316
47320
  const containerRef = React__default["default"].useRef(null);
47317
47321
  const chartRef = React__default["default"].useRef(null);
47318
47322
  const {
@@ -47580,7 +47584,7 @@ function RadialBarChart(_ref) {
47580
47584
  });
47581
47585
  }
47582
47586
 
47583
- const _excluded$4 = ["data", "angleField", "colorField", "color", "height", "innerRadius", "radius", "legend", "label", "statistic", "tooltip", "renderTooltipContent", "tooltipConfig", "meta", "animation", "t", "isPdf", "legendConfig"];
47587
+ const _excluded$5 = ["data", "angleField", "colorField", "color", "height", "innerRadius", "radius", "legend", "label", "statistic", "tooltip", "renderTooltipContent", "tooltipConfig", "meta", "animation", "t", "isPdf", "legendConfig"];
47584
47588
  const {
47585
47589
  useToken: useToken$c
47586
47590
  } = antd.theme;
@@ -47655,7 +47659,7 @@ function DonutPie(_ref) {
47655
47659
  isPdf = false,
47656
47660
  legendConfig = {}
47657
47661
  } = _ref,
47658
- rest = _objectWithoutProperties(_ref, _excluded$4);
47662
+ rest = _objectWithoutProperties(_ref, _excluded$5);
47659
47663
  const containerRef = React.useRef(null);
47660
47664
  const chartRef = React.useRef(null);
47661
47665
  const {
@@ -48175,7 +48179,7 @@ function StackChart(_ref) {
48175
48179
  });
48176
48180
  }
48177
48181
 
48178
- const _excluded$3 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "fillOpacity", "height", "t", "isPdf", "legendConfig", "width"];
48182
+ const _excluded$4 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "fillOpacity", "height", "t", "isPdf", "legendConfig", "width"];
48179
48183
  const {
48180
48184
  useToken: useToken$a
48181
48185
  } = antd.theme;
@@ -48252,7 +48256,7 @@ const AreaChart = _ref => {
48252
48256
  legendConfig = {},
48253
48257
  width
48254
48258
  } = _ref,
48255
- rest = _objectWithoutProperties(_ref, _excluded$3);
48259
+ rest = _objectWithoutProperties(_ref, _excluded$4);
48256
48260
  const containerRef = React.useRef(null);
48257
48261
  const chartRef = React.useRef(null);
48258
48262
  const {
@@ -48340,7 +48344,7 @@ const AreaChart = _ref => {
48340
48344
  });
48341
48345
  };
48342
48346
 
48343
- const _excluded$2 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "score", "height", "isPdf", "legendConfig"];
48347
+ const _excluded$3 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "score", "height", "isPdf", "legendConfig"];
48344
48348
  const {
48345
48349
  useToken: useToken$9
48346
48350
  } = antd.theme;
@@ -48365,7 +48369,7 @@ const RadarChart = _ref => {
48365
48369
  isPdf = false,
48366
48370
  legendConfig = {}
48367
48371
  } = _ref,
48368
- rest = _objectWithoutProperties(_ref, _excluded$2);
48372
+ rest = _objectWithoutProperties(_ref, _excluded$3);
48369
48373
  const containerRef = React.useRef(null);
48370
48374
  const chartRef = React.useRef(null);
48371
48375
  const {
@@ -50697,7 +50701,7 @@ function StakeholderMappings(_ref3) {
50697
50701
  }
50698
50702
  var index = withProvider(StakeholderMappings);
50699
50703
 
50700
- const _excluded$1 = ["t", "checkboxConfig", "defaultTableFilters", "columns", "children", "data", "loading", "APP", "getApiBaseUrl", "selectOptions", "selectFilters", "showCreate", "location", "goTo", "getRedirectLink", "defaultUrlParams", "view", "module", "filtersConfig", "isMobile"];
50704
+ const _excluded$2 = ["t", "checkboxConfig", "defaultTableFilters", "columns", "children", "data", "loading", "APP", "getApiBaseUrl", "selectOptions", "selectFilters", "showCreate", "location", "goTo", "getRedirectLink", "defaultUrlParams", "view", "module", "filtersConfig", "isMobile"];
50701
50705
  const BaseScreen = _ref => {
50702
50706
  var _data$data;
50703
50707
  let {
@@ -50735,7 +50739,7 @@ const BaseScreen = _ref => {
50735
50739
  filtersConfig,
50736
50740
  isMobile
50737
50741
  } = _ref,
50738
- rest = _objectWithoutProperties(_ref, _excluded$1);
50742
+ rest = _objectWithoutProperties(_ref, _excluded$2);
50739
50743
  const [showFilters, setShowFilters] = React.useState(false);
50740
50744
  const [hasError, setHasError] = React.useState(false);
50741
50745
  const {
@@ -51168,6 +51172,7 @@ function useUserGrowth({
51168
51172
  const {
51169
51173
  token
51170
51174
  } = useToken$6();
51175
+ console.log("mainData", mainData);
51171
51176
  const fetchData = () => {
51172
51177
  const {
51173
51178
  dates = []
@@ -51303,6 +51308,7 @@ function UserGrowth({
51303
51308
  t,
51304
51309
  translationKeys
51305
51310
  });
51311
+ console.log("usergrowthhhhh", data);
51306
51312
  React.useEffect(() => {
51307
51313
  if (typeof fetchUserGrowth === "function") {
51308
51314
  fetchUserGrowth(selectValue);
@@ -51430,6 +51436,7 @@ function TopContributors({
51430
51436
  data,
51431
51437
  t
51432
51438
  });
51439
+ console.log("topcontributorshhhh", data);
51433
51440
  return /*#__PURE__*/jsxRuntime.jsx(Widget, {
51434
51441
  title: t(`admin::top-contributors`),
51435
51442
  className: "with-border-header overflow-hidden h-w-btn-header",
@@ -51700,7 +51707,6 @@ function AddUserModal({
51700
51707
  setAccountUsed(true);
51701
51708
  }).catch(() => {});
51702
51709
  };
51703
- console.log("hellooooooooooooooooooooooooo");
51704
51710
  return /*#__PURE__*/jsxRuntime.jsx(Modal, {
51705
51711
  open: isOpen,
51706
51712
  title: "admin::edit-user",
@@ -51826,7 +51832,7 @@ const renderTypeTag = ({
51826
51832
  });
51827
51833
  };
51828
51834
 
51829
- const getColumns$6 = ({
51835
+ const getColumns$7 = ({
51830
51836
  t,
51831
51837
  show = "show",
51832
51838
  selectOptions,
@@ -52310,7 +52316,7 @@ function UserTable(_ref) {
52310
52316
  role: config.userRoles.filter(c => !c.isForAppAdmin)
52311
52317
  };
52312
52318
  }, [config.userRoles, config.accountTypes, accounts]);
52313
- const columns = React.useMemo(() => getColumns$6({
52319
+ const columns = React.useMemo(() => getColumns$7({
52314
52320
  t,
52315
52321
  show: activeTab,
52316
52322
  selectOptions,
@@ -52406,7 +52412,7 @@ function UserTable(_ref) {
52406
52412
  });
52407
52413
  }
52408
52414
 
52409
- const getColumns$5 = ({
52415
+ const getColumns$6 = ({
52410
52416
  t,
52411
52417
  goTo,
52412
52418
  show = "show",
@@ -52759,7 +52765,7 @@ const getTabs$1 = ({
52759
52765
  label: t("Suspended")
52760
52766
  }];
52761
52767
 
52762
- const getColumns$4 = ({
52768
+ const getColumns$5 = ({
52763
52769
  t,
52764
52770
  selectOptions,
52765
52771
  module
@@ -52882,7 +52888,7 @@ function CombineAccountModal({
52882
52888
  } = useToken$4();
52883
52889
  const [MainForm] = antd.Form.useForm();
52884
52890
  const columns = React.useMemo(() => {
52885
- return getColumns$4({
52891
+ return getColumns$5({
52886
52892
  t,
52887
52893
  selectOptions,
52888
52894
  module
@@ -53051,7 +53057,7 @@ function NewAccount({
53051
53057
  };
53052
53058
  return /*#__PURE__*/jsxRuntime.jsx(Modal, {
53053
53059
  t: t,
53054
- title: t(isEdit ? "admin::edit-account" : "admin::add-account"),
53060
+ title: t(isEdit ? "edit-account" : "add-account"),
53055
53061
  open: isOpen,
53056
53062
  onClose: onClose,
53057
53063
  onSuccess: onSubmit,
@@ -53185,7 +53191,7 @@ function AccountTable(_ref) {
53185
53191
  onCancel: () => {}
53186
53192
  });
53187
53193
  }, [t, fetchData, fetchPendingAccounts]);
53188
- const columns = React.useMemo(() => getColumns$5({
53194
+ const columns = React.useMemo(() => getColumns$6({
53189
53195
  t,
53190
53196
  show: activeTab,
53191
53197
  selectOptions,
@@ -53356,233 +53362,12 @@ const checkboxConfig$8 = {
53356
53362
  name: "Name",
53357
53363
  datastakeId: "ID"
53358
53364
  };
53359
- const getNameByLevel = (data, level) => {
53365
+ const getNameByLevel$1 = (data, level) => {
53360
53366
  const entry = Object.values(data || {}).find(item => item.level === level);
53361
53367
  return entry;
53362
53368
  };
53363
53369
 
53364
- const getColumns$3 = ({
53365
- t,
53366
- goTo = () => {},
53367
- show = "show",
53368
- getRedirectLink = () => {},
53369
- token,
53370
- selectedSubjects,
53371
- setSelectedSubjects,
53372
- selectOptions,
53373
- entity
53374
- }) => {
53375
- const cols = [{
53376
- title: "",
53377
- dataIndex: "select",
53378
- key: "select",
53379
- width: 50,
53380
- show: true,
53381
- render: (v, all) => {
53382
- if (all.empty) {
53383
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53384
- className: "daf-default-cell"
53385
- });
53386
- }
53387
- return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox, {
53388
- onChange: () => setSelectedSubjects(prev => {
53389
- const isSelected = prev.some(p => p.id === all.id);
53390
- if (isSelected) {
53391
- return prev.filter(p => p.id !== all.id);
53392
- }
53393
- return [...prev, all];
53394
- }),
53395
- checked: selectedSubjects.some(p => p.id === all.id),
53396
- disabled: selectedSubjects?.length >= 3 && !selectedSubjects.some(p => p.id === all.id)
53397
- });
53398
- }
53399
- }, {
53400
- title: t("ID"),
53401
- dataIndex: "datastakeId",
53402
- key: "datastakeId",
53403
- ellipsis: true,
53404
- show: true,
53405
- render: (value, all) => {
53406
- if (all.empty) {
53407
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53408
- className: "daf-default-cell"
53409
- });
53410
- }
53411
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53412
- title: value,
53413
- children: value
53414
- });
53415
- }
53416
- }, {
53417
- title: t("Name"),
53418
- dataIndex: "name",
53419
- key: "name",
53420
- ellipsis: true,
53421
- show: true,
53422
- render: (value, all) => {
53423
- if (all.empty) {
53424
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53425
- className: "daf-default-cell"
53426
- });
53427
- }
53428
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53429
- title: value,
53430
- children: value
53431
- });
53432
- }
53433
- }, {
53434
- title: t("Category"),
53435
- dataIndex: "category",
53436
- key: "category",
53437
- ellipsis: true,
53438
- show: true,
53439
- render: (value, all) => {
53440
- if (all.empty) {
53441
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53442
- className: "daf-default-cell"
53443
- });
53444
- }
53445
- const category = findOptions(value, selectOptions?.category || []) || "--";
53446
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53447
- title: category,
53448
- children: category
53449
- });
53450
- }
53451
- }, {
53452
- title: t("Country"),
53453
- dataIndex: "country",
53454
- key: "country",
53455
- ellipsis: true,
53456
- show: true,
53457
- render: (value, all) => {
53458
- if (all.empty) {
53459
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53460
- className: "daf-default-cell"
53461
- });
53462
- }
53463
- const country = findOptions(value, selectOptions?.country || []) || "--";
53464
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53465
- title: country,
53466
- children: country
53467
- });
53468
- }
53469
- }, {
53470
- title: t("Province"),
53471
- dataIndex: "administrativeLevel1",
53472
- key: "administrativeLevel1",
53473
- ellipsis: true,
53474
- show: entity.includes("locations"),
53475
- render: (value, all) => {
53476
- if (all.empty) {
53477
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53478
- className: "daf-default-cell"
53479
- });
53480
- }
53481
- let label;
53482
- if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
53483
- label = all?.linking?.SCL?.[value]?.name;
53484
- } else {
53485
- label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
53486
- }
53487
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53488
- title: label || '-',
53489
- children: label || '-'
53490
- });
53491
- }
53492
- }, {
53493
- title: t("Territory"),
53494
- dataIndex: "administrativeLevel2",
53495
- key: "administrativeLevel2",
53496
- show: entity.includes("locations"),
53497
- ellipsis: true,
53498
- render: (value, all) => {
53499
- if (all.empty) {
53500
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53501
- className: "daf-default-cell"
53502
- });
53503
- }
53504
- let label;
53505
- if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
53506
- label = all?.linking?.SCL?.[value]?.name;
53507
- } else {
53508
- label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
53509
- }
53510
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53511
- title: label || '-',
53512
- children: label || '-'
53513
- });
53514
- }
53515
- }, {
53516
- title: t("Sources"),
53517
- dataIndex: "sources",
53518
- key: "sources",
53519
- show: true,
53520
- render: (value, all) => {
53521
- if (all.empty) {
53522
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53523
- className: "daf-default-cell"
53524
- });
53525
- }
53526
- const MAX_SOURCES = 3;
53527
- const count = value?.length === MAX_SOURCES + 1 ? value?.length : MAX_SOURCES;
53528
- return Array.isArray(value) && value?.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(antd.Avatar.Group, {
53529
- max: {
53530
- count: count,
53531
- style: {
53532
- color: token.baseGray90,
53533
- backgroundColor: token.baseGray20,
53534
- border: `1px solid ${token.baseGray40}`
53535
- }
53536
- },
53537
- size: "small",
53538
- children: value.map((v, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Avatar, {
53539
- size: "small",
53540
- style: {
53541
- backgroundColor: token.baseGray20,
53542
- color: token.baseGray90,
53543
- border: `1px solid ${token.baseGray40}`,
53544
- display: "flex",
53545
- alignItems: "center",
53546
- justifyContent: "center"
53547
- },
53548
- children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
53549
- name: "Organisation02",
53550
- width: 18,
53551
- height: 18,
53552
- color: token.baseGray90
53553
- })
53554
- }, i))
53555
- }) : '-';
53556
- }
53557
- }, {
53558
- title: "",
53559
- dataIndex: "actions",
53560
- key: "actions",
53561
- width: 60,
53562
- show: true,
53563
- render: (value, all) => {
53564
- if (all.empty) {
53565
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53566
- className: "daf-default-cell"
53567
- });
53568
- }
53569
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53570
- className: "cursor-pointer",
53571
- onClick: () => {
53572
- goTo(getRedirectLink(`/app/accounts/view/${all.id}/details`));
53573
- },
53574
- children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
53575
- name: "Link",
53576
- width: 18,
53577
- height: 18
53578
- })
53579
- });
53580
- }
53581
- }];
53582
- return cols.filter(c => c[show]);
53583
- };
53584
-
53585
- const getColumns$2 = ({
53370
+ const getColumns$4 = ({
53586
53371
  t,
53587
53372
  selectOptions,
53588
53373
  module,
@@ -53645,7 +53430,7 @@ const getColumns$2 = ({
53645
53430
  if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
53646
53431
  label = all?.linking?.SCL?.[value]?.name;
53647
53432
  } else {
53648
- label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
53433
+ label = getNameByLevel$1(all?.linking?.SCL, "level_1")?.name;
53649
53434
  }
53650
53435
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53651
53436
  title: label || '-',
@@ -53662,7 +53447,7 @@ const getColumns$2 = ({
53662
53447
  if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
53663
53448
  label = all?.linking?.SCL?.[value]?.name;
53664
53449
  } else {
53665
- label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
53450
+ label = getNameByLevel$1(all?.linking?.SCL, "level_2")?.name;
53666
53451
  }
53667
53452
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53668
53453
  title: label || '-',
@@ -53691,7 +53476,7 @@ function CombineLocationModal({
53691
53476
  const [MainForm] = antd.Form.useForm();
53692
53477
  const [isDisabled, setIsDisabled] = React.useState(true);
53693
53478
  const columns = React.useMemo(() => {
53694
- return getColumns$2({
53479
+ return getColumns$4({
53695
53480
  t,
53696
53481
  selectOptions,
53697
53482
  module,
@@ -53809,7 +53594,7 @@ function CombineLocationModal({
53809
53594
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
53810
53595
  placeholder: t("Province"),
53811
53596
  options: selectedLocations.map(location => {
53812
- const _data = getNameByLevel(location?.linking?.SCL, "level_1");
53597
+ const _data = getNameByLevel$1(location?.linking?.SCL, "level_1");
53813
53598
  return {
53814
53599
  label: _data?.name || "-",
53815
53600
  value: _data?.id || "-"
@@ -53822,7 +53607,7 @@ function CombineLocationModal({
53822
53607
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
53823
53608
  placeholder: t("Territory"),
53824
53609
  options: selectedLocations.map(location => {
53825
- const _data = getNameByLevel(location?.linking?.SCL, "level_2");
53610
+ const _data = getNameByLevel$1(location?.linking?.SCL, "level_2");
53826
53611
  return {
53827
53612
  label: _data?.name || "-",
53828
53613
  value: _data?.id || "-"
@@ -53840,6 +53625,233 @@ function CombineLocationModal({
53840
53625
  });
53841
53626
  }
53842
53627
 
53628
+ const getNameByLevel = (data, level) => {
53629
+ const entry = Object.values(data || {}).find(item => item.level === level);
53630
+ return entry;
53631
+ };
53632
+
53633
+ const getColumns$3 = ({
53634
+ t,
53635
+ goTo = () => {},
53636
+ show = "show",
53637
+ getRedirectLink = () => {},
53638
+ token,
53639
+ selectedLocations,
53640
+ setSelectedLocations,
53641
+ selectOptions,
53642
+ entity
53643
+ }) => {
53644
+ const cols = [{
53645
+ title: "",
53646
+ dataIndex: "select",
53647
+ key: "select",
53648
+ width: 50,
53649
+ show: true,
53650
+ render: (v, all) => {
53651
+ if (all.empty) {
53652
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53653
+ className: "daf-default-cell"
53654
+ });
53655
+ }
53656
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox, {
53657
+ onChange: () => setSelectedLocations(prev => {
53658
+ const isSelected = prev.some(p => p.id === all.id);
53659
+ if (isSelected) {
53660
+ return prev.filter(p => p.id !== all.id);
53661
+ }
53662
+ return [...prev, all];
53663
+ }),
53664
+ checked: selectedLocations.some(p => p.id === all.id),
53665
+ disabled: selectedLocations?.length >= 3 && !selectedLocations.some(p => p.id === all.id)
53666
+ });
53667
+ }
53668
+ }, {
53669
+ title: t("ID"),
53670
+ dataIndex: "datastakeId",
53671
+ key: "datastakeId",
53672
+ ellipsis: true,
53673
+ show: true,
53674
+ render: (value, all) => {
53675
+ if (all.empty) {
53676
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53677
+ className: "daf-default-cell"
53678
+ });
53679
+ }
53680
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53681
+ title: value,
53682
+ children: value
53683
+ });
53684
+ }
53685
+ }, {
53686
+ title: t("Name"),
53687
+ dataIndex: "name",
53688
+ key: "name",
53689
+ ellipsis: true,
53690
+ show: true,
53691
+ render: (value, all) => {
53692
+ if (all.empty) {
53693
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53694
+ className: "daf-default-cell"
53695
+ });
53696
+ }
53697
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53698
+ title: value,
53699
+ children: value
53700
+ });
53701
+ }
53702
+ }, {
53703
+ title: t("Category"),
53704
+ dataIndex: "category",
53705
+ key: "category",
53706
+ ellipsis: true,
53707
+ show: true,
53708
+ render: (value, all) => {
53709
+ if (all.empty) {
53710
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53711
+ className: "daf-default-cell"
53712
+ });
53713
+ }
53714
+ const category = findOptions(value, selectOptions?.category || []) || "--";
53715
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53716
+ title: category,
53717
+ children: category
53718
+ });
53719
+ }
53720
+ }, {
53721
+ title: t("Country"),
53722
+ dataIndex: "country",
53723
+ key: "country",
53724
+ ellipsis: true,
53725
+ show: true,
53726
+ render: (value, all) => {
53727
+ if (all.empty) {
53728
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53729
+ className: "daf-default-cell"
53730
+ });
53731
+ }
53732
+ const country = findOptions(value, selectOptions?.country || []) || "--";
53733
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53734
+ title: country,
53735
+ children: country
53736
+ });
53737
+ }
53738
+ }, {
53739
+ title: t("Admin Level 1"),
53740
+ dataIndex: "administrativeLevel1",
53741
+ key: "administrativeLevel1",
53742
+ ellipsis: true,
53743
+ show: entity.includes("location"),
53744
+ render: (value, all) => {
53745
+ if (all.empty) {
53746
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53747
+ className: "daf-default-cell"
53748
+ });
53749
+ }
53750
+ let label;
53751
+ if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
53752
+ label = all?.linking?.SCL?.[value]?.name;
53753
+ } else {
53754
+ label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
53755
+ }
53756
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53757
+ title: label || '-',
53758
+ children: label || '-'
53759
+ });
53760
+ }
53761
+ }, {
53762
+ title: t("Admin Level 2"),
53763
+ dataIndex: "administrativeLevel2",
53764
+ key: "administrativeLevel2",
53765
+ show: entity.includes("location"),
53766
+ ellipsis: true,
53767
+ render: (value, all) => {
53768
+ if (all.empty) {
53769
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53770
+ className: "daf-default-cell"
53771
+ });
53772
+ }
53773
+ let label;
53774
+ if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
53775
+ label = all?.linking?.SCL?.[value]?.name;
53776
+ } else {
53777
+ label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
53778
+ }
53779
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53780
+ title: label || '-',
53781
+ children: label || '-'
53782
+ });
53783
+ }
53784
+ }, {
53785
+ title: t("Sources"),
53786
+ dataIndex: "sources",
53787
+ key: "sources",
53788
+ show: true,
53789
+ render: (value, all) => {
53790
+ if (all.empty) {
53791
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53792
+ className: "daf-default-cell"
53793
+ });
53794
+ }
53795
+ const MAX_SOURCES = 3;
53796
+ const count = value?.length === MAX_SOURCES + 1 ? value?.length : MAX_SOURCES;
53797
+ return Array.isArray(value) && value?.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(antd.Avatar.Group, {
53798
+ max: {
53799
+ count: count,
53800
+ style: {
53801
+ color: token.baseGray90,
53802
+ backgroundColor: token.baseGray20,
53803
+ border: `1px solid ${token.baseGray40}`
53804
+ }
53805
+ },
53806
+ size: "small",
53807
+ children: value.map((v, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Avatar, {
53808
+ size: "small",
53809
+ style: {
53810
+ backgroundColor: token.baseGray20,
53811
+ color: token.baseGray90,
53812
+ border: `1px solid ${token.baseGray40}`,
53813
+ display: "flex",
53814
+ alignItems: "center",
53815
+ justifyContent: "center"
53816
+ },
53817
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
53818
+ name: "Organisation02",
53819
+ width: 18,
53820
+ height: 18,
53821
+ color: token.baseGray90
53822
+ })
53823
+ }, i))
53824
+ }) : '-';
53825
+ }
53826
+ }, {
53827
+ title: "",
53828
+ dataIndex: "actions",
53829
+ key: "actions",
53830
+ width: 60,
53831
+ show: true,
53832
+ render: (value, all) => {
53833
+ if (all.empty) {
53834
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53835
+ className: "daf-default-cell"
53836
+ });
53837
+ }
53838
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53839
+ className: "cursor-pointer",
53840
+ onClick: () => {
53841
+ goTo(getRedirectLink(`/app/accounts/view/${all.id}/details`));
53842
+ },
53843
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
53844
+ name: "Link",
53845
+ width: 18,
53846
+ height: 18
53847
+ })
53848
+ });
53849
+ }
53850
+ }];
53851
+ return cols.filter(c => c[show]);
53852
+ };
53853
+
53854
+ const _excluded$1 = ["pagination", "tab"];
53843
53855
  const {
53844
53856
  useToken: useToken$2
53845
53857
  } = antd.theme;
@@ -53867,6 +53879,29 @@ function LocationTable(_ref) {
53867
53879
  token
53868
53880
  } = useToken$2();
53869
53881
  const [combineLocationVisible, setCombineLocationVisible] = React.useState(false);
53882
+
53883
+ // Wrapper to transform pagination params to strings and ensure tab is at root level
53884
+ const getDataWithStringPagination = async _ref2 => {
53885
+ let {
53886
+ params
53887
+ } = _ref2;
53888
+ // Extract tab from the params (it should already be there from filterParams)
53889
+ const {
53890
+ pagination,
53891
+ tab
53892
+ } = params,
53893
+ otherParams = _objectWithoutProperties(params, _excluded$1);
53894
+ const transformedParams = _objectSpread2(_objectSpread2({}, otherParams), {}, {
53895
+ pagination: {
53896
+ skip: String((pagination === null || pagination === void 0 ? void 0 : pagination.skip) || 1),
53897
+ take: String((pagination === null || pagination === void 0 ? void 0 : pagination.take) || 20)
53898
+ },
53899
+ tab: tab || "active" // Ensure tab is at root level with default value
53900
+ });
53901
+ return getData({
53902
+ params: transformedParams
53903
+ });
53904
+ };
53870
53905
  const {
53871
53906
  filter,
53872
53907
  activeTab,
@@ -53888,7 +53923,7 @@ function LocationTable(_ref) {
53888
53923
  defaultPageSize,
53889
53924
  filtersConfig: filtersConfig$8,
53890
53925
  getRedirectLink,
53891
- getData,
53926
+ getData: getDataWithStringPagination,
53892
53927
  refetchTrigger
53893
53928
  });
53894
53929
  const selectOptions = React.useMemo(() => {
@@ -53916,7 +53951,7 @@ function LocationTable(_ref) {
53916
53951
  children: [/*#__PURE__*/jsxRuntime.jsxs(AdminTable, {
53917
53952
  filters: filter,
53918
53953
  t: t,
53919
- headerTitle: headerTitle,
53954
+ headerTitle: "test",
53920
53955
  actionButton: [{
53921
53956
  icon: "Merge",
53922
53957
  onClick: () => setCombineLocationVisible(true),
@@ -53984,6 +54019,7 @@ function LocationTable(_ref) {
53984
54019
  if (typeof mergeSubjectsFunction === 'function') {
53985
54020
  mergeSubjectsFunction(data);
53986
54021
  setSelectedLocations([]);
54022
+ antd.message.success(t("Locations successfully merged."));
53987
54023
  }
53988
54024
  },
53989
54025
  selectedLocations: selectedLocations,
@@ -53994,6 +54030,227 @@ function LocationTable(_ref) {
53994
54030
  });
53995
54031
  }
53996
54032
 
54033
+ const getColumns$2 = ({
54034
+ t,
54035
+ goTo = () => {},
54036
+ show = "show",
54037
+ getRedirectLink = () => {},
54038
+ token,
54039
+ selectedSubjects,
54040
+ setSelectedSubjects,
54041
+ selectOptions,
54042
+ entity
54043
+ }) => {
54044
+ const cols = [{
54045
+ title: "",
54046
+ dataIndex: "select",
54047
+ key: "select",
54048
+ width: 50,
54049
+ show: true,
54050
+ render: (v, all) => {
54051
+ if (all.empty) {
54052
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54053
+ className: "daf-default-cell"
54054
+ });
54055
+ }
54056
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox, {
54057
+ onChange: () => setSelectedSubjects(prev => {
54058
+ const isSelected = prev.some(p => p.id === all.id);
54059
+ if (isSelected) {
54060
+ return prev.filter(p => p.id !== all.id);
54061
+ }
54062
+ return [...prev, all];
54063
+ }),
54064
+ checked: selectedSubjects.some(p => p.id === all.id),
54065
+ disabled: selectedSubjects?.length >= 3 && !selectedSubjects.some(p => p.id === all.id)
54066
+ });
54067
+ }
54068
+ }, {
54069
+ title: t("ID"),
54070
+ dataIndex: "datastakeId",
54071
+ key: "datastakeId",
54072
+ ellipsis: true,
54073
+ show: true,
54074
+ render: (value, all) => {
54075
+ if (all.empty) {
54076
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54077
+ className: "daf-default-cell"
54078
+ });
54079
+ }
54080
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54081
+ title: value,
54082
+ children: value
54083
+ });
54084
+ }
54085
+ }, {
54086
+ title: t("Name"),
54087
+ dataIndex: "name",
54088
+ key: "name",
54089
+ ellipsis: true,
54090
+ show: true,
54091
+ render: (value, all) => {
54092
+ if (all.empty) {
54093
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54094
+ className: "daf-default-cell"
54095
+ });
54096
+ }
54097
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54098
+ title: value,
54099
+ children: value
54100
+ });
54101
+ }
54102
+ }, {
54103
+ title: t("Category"),
54104
+ dataIndex: "category",
54105
+ key: "category",
54106
+ ellipsis: true,
54107
+ show: true,
54108
+ render: (value, all) => {
54109
+ if (all.empty) {
54110
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54111
+ className: "daf-default-cell"
54112
+ });
54113
+ }
54114
+ const category = findOptions(value, selectOptions?.category || []) || "--";
54115
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54116
+ title: category,
54117
+ children: category
54118
+ });
54119
+ }
54120
+ }, {
54121
+ title: t("Country"),
54122
+ dataIndex: "country",
54123
+ key: "country",
54124
+ ellipsis: true,
54125
+ show: true,
54126
+ render: (value, all) => {
54127
+ if (all.empty) {
54128
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54129
+ className: "daf-default-cell"
54130
+ });
54131
+ }
54132
+ const country = findOptions(value, selectOptions?.country || []) || "--";
54133
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54134
+ title: country,
54135
+ children: country
54136
+ });
54137
+ }
54138
+ }, {
54139
+ title: t("Admin Level 1"),
54140
+ dataIndex: "administrativeLevel1",
54141
+ key: "administrativeLevel1",
54142
+ ellipsis: true,
54143
+ show: entity.includes("location"),
54144
+ render: (value, all) => {
54145
+ if (all.empty) {
54146
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54147
+ className: "daf-default-cell"
54148
+ });
54149
+ }
54150
+ let label;
54151
+ if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
54152
+ label = all?.linking?.SCL?.[value]?.name;
54153
+ } else {
54154
+ label = getNameByLevel$1(all?.linking?.SCL, "level_1")?.name;
54155
+ }
54156
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54157
+ title: label || '-',
54158
+ children: label || '-'
54159
+ });
54160
+ }
54161
+ }, {
54162
+ title: t("Admin Level 2"),
54163
+ dataIndex: "administrativeLevel2",
54164
+ key: "administrativeLevel2",
54165
+ show: entity.includes("location"),
54166
+ ellipsis: true,
54167
+ render: (value, all) => {
54168
+ if (all.empty) {
54169
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54170
+ className: "daf-default-cell"
54171
+ });
54172
+ }
54173
+ let label;
54174
+ if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
54175
+ label = all?.linking?.SCL?.[value]?.name;
54176
+ } else {
54177
+ label = getNameByLevel$1(all?.linking?.SCL, "level_2")?.name;
54178
+ }
54179
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54180
+ title: label || '-',
54181
+ children: label || '-'
54182
+ });
54183
+ }
54184
+ }, {
54185
+ title: t("Sources"),
54186
+ dataIndex: "sources",
54187
+ key: "sources",
54188
+ show: true,
54189
+ render: (value, all) => {
54190
+ if (all.empty) {
54191
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54192
+ className: "daf-default-cell"
54193
+ });
54194
+ }
54195
+ const MAX_SOURCES = 3;
54196
+ const count = value?.length === MAX_SOURCES + 1 ? value?.length : MAX_SOURCES;
54197
+ return Array.isArray(value) && value?.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(antd.Avatar.Group, {
54198
+ max: {
54199
+ count: count,
54200
+ style: {
54201
+ color: token.baseGray90,
54202
+ backgroundColor: token.baseGray20,
54203
+ border: `1px solid ${token.baseGray40}`
54204
+ }
54205
+ },
54206
+ size: "small",
54207
+ children: value.map((v, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Avatar, {
54208
+ size: "small",
54209
+ style: {
54210
+ backgroundColor: token.baseGray20,
54211
+ color: token.baseGray90,
54212
+ border: `1px solid ${token.baseGray40}`,
54213
+ display: "flex",
54214
+ alignItems: "center",
54215
+ justifyContent: "center"
54216
+ },
54217
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
54218
+ name: "Organisation02",
54219
+ width: 18,
54220
+ height: 18,
54221
+ color: token.baseGray90
54222
+ })
54223
+ }, i))
54224
+ }) : '-';
54225
+ }
54226
+ }, {
54227
+ title: "",
54228
+ dataIndex: "actions",
54229
+ key: "actions",
54230
+ width: 60,
54231
+ show: true,
54232
+ render: (value, all) => {
54233
+ if (all.empty) {
54234
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54235
+ className: "daf-default-cell"
54236
+ });
54237
+ }
54238
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
54239
+ className: "cursor-pointer",
54240
+ onClick: () => {
54241
+ goTo(getRedirectLink(`/app/accounts/view/${all.id}/details`));
54242
+ },
54243
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
54244
+ name: "Link",
54245
+ width: 18,
54246
+ height: 18
54247
+ })
54248
+ });
54249
+ }
54250
+ }];
54251
+ return cols.filter(c => c[show]);
54252
+ };
54253
+
53997
54254
  const mapToSelectOptions = (items, valueKey, selectOptions, optionKey, customMapper = null) => {
53998
54255
  return items.map(item => {
53999
54256
  if (customMapper) {
@@ -54072,7 +54329,7 @@ const getColumns$1 = ({
54072
54329
  if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
54073
54330
  label = all?.linking?.SCL?.[value]?.name;
54074
54331
  } else {
54075
- label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
54332
+ label = getNameByLevel$1(all?.linking?.SCL, "level_1")?.name;
54076
54333
  }
54077
54334
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54078
54335
  title: label || '-',
@@ -54089,7 +54346,7 @@ const getColumns$1 = ({
54089
54346
  if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
54090
54347
  label = all?.linking?.SCL?.[value]?.name;
54091
54348
  } else {
54092
- label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
54349
+ label = getNameByLevel$1(all?.linking?.SCL, "level_2")?.name;
54093
54350
  }
54094
54351
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54095
54352
  title: label || '-',
@@ -54221,7 +54478,7 @@ function CombineSubjectsModal({
54221
54478
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
54222
54479
  placeholder: t("Province"),
54223
54480
  options: mapToSelectOptions(selectedSubjects, null, selectOptions, null, subject => {
54224
- const _data = getNameByLevel(subject?.linking?.SCL, "level_1");
54481
+ const _data = getNameByLevel$1(subject?.linking?.SCL, "level_1");
54225
54482
  return {
54226
54483
  label: _data?.name || "-",
54227
54484
  value: _data?.id || "-"
@@ -54234,7 +54491,7 @@ function CombineSubjectsModal({
54234
54491
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
54235
54492
  placeholder: t("Territory"),
54236
54493
  options: mapToSelectOptions(selectedSubjects, null, selectOptions, null, subject => {
54237
- const _data = getNameByLevel(subject?.linking?.SCL, "level_2");
54494
+ const _data = getNameByLevel$1(subject?.linking?.SCL, "level_2");
54238
54495
  return {
54239
54496
  label: _data?.name || "-",
54240
54497
  value: _data?.id || "-"
@@ -54308,11 +54565,11 @@ function SubjectsTable(_ref) {
54308
54565
  return {
54309
54566
  category: (_config$options = config.options) === null || _config$options === void 0 ? void 0 : _config$options.category,
54310
54567
  country: (_config$options2 = config.options) === null || _config$options2 === void 0 ? void 0 : _config$options2.countries,
54311
- sources: [] //TODO: add sources logic and make sure you only show unique sources only once
54568
+ sources: []
54312
54569
  };
54313
54570
  }, [config.options]);
54314
54571
  const columns = React.useMemo(() => {
54315
- return getColumns$3({
54572
+ return getColumns$2({
54316
54573
  t,
54317
54574
  goTo,
54318
54575
  token,
@@ -54387,19 +54644,20 @@ function SubjectsTable(_ref) {
54387
54644
  }), /*#__PURE__*/jsxRuntime.jsx(CombineSubjectsModal, {
54388
54645
  isOpen: isCombineModalOpen,
54389
54646
  t: t,
54390
- onClose: () => {
54391
- setIsModalOpen(false);
54392
- },
54647
+ onClose: () => setIsModalOpen(false),
54393
54648
  onSuccess: data => {
54394
54649
  setIsModalOpen(false);
54395
54650
  setLoading(true);
54651
+ antd.message.success(t("Subjects successfully merged."));
54396
54652
  if (typeof mergeSubjectsFunction === 'function') {
54397
- mergeSubjectsFunction(data);
54398
- setSelectedSubjects([]);
54653
+ mergeSubjectsFunction(data).finally(() => {
54654
+ setSelectedSubjects([]);
54655
+ fetchData();
54656
+ });
54399
54657
  }
54400
54658
  },
54401
54659
  selectedSubjects: selectedSubjects,
54402
- selectOptions: selectOptions || {},
54660
+ selectOptions: selectOptions,
54403
54661
  module: module,
54404
54662
  entity: headerTitle
54405
54663
  })]
@@ -54852,10 +55110,7 @@ const getColumns = ({
54852
55110
  }];
54853
55111
  return cols.filter(v => v.show);
54854
55112
  };
54855
- const checkboxConfig$7 = {
54856
- name: "Name",
54857
- datastakeId: "ID"
54858
- };
55113
+ const checkboxConfig$7 = {};
54859
55114
  const selectFiltersConfig$7 = {
54860
55115
  userRole: {
54861
55116
  type: "select",
@@ -54885,11 +55140,18 @@ const selectFiltersConfig$7 = {
54885
55140
  }
54886
55141
  };
54887
55142
  const filtersConfig$7 = {
54888
- name: "",
54889
- datastakeId: ""
55143
+ search: ""
55144
+ };
55145
+ const defaultUrlParams = {
55146
+ search: "",
55147
+ userRole: null,
55148
+ status: null
55149
+ };
55150
+ const defaultTableFilters = {
55151
+ search: "",
55152
+ userRole: null,
55153
+ status: null
54890
55154
  };
54891
- const defaultUrlParams = {};
54892
- const defaultTableFilters = {};
54893
55155
 
54894
55156
  function Users({
54895
55157
  t,
@@ -54933,9 +55195,9 @@ function Users({
54933
55195
  userRole: userRoles.filter(u => !u.isForAppAdmin),
54934
55196
  status: accountStatuses
54935
55197
  };
54936
- }, [userRoles]);
55198
+ }, [userRoles, accountStatuses]);
54937
55199
  const canClearSearch = React.useMemo(() => {
54938
- return !!activeFilters.search;
55200
+ return !!activeFilters.search || !!activeFilters.userRole || !!activeFilters.status;
54939
55201
  }, [activeFilters]);
54940
55202
  const onDeleteUserClick = React.useCallback(id => {
54941
55203
  antd.Modal.confirm({
@@ -55654,9 +55916,9 @@ function AdminDashboardScreen({
55654
55916
  fetchUserGrowth,
55655
55917
  userGrowthDataLoading
55656
55918
  } = useWidgetFetch();
55657
- console.log({
55658
- userGrowthData
55659
- });
55919
+
55920
+ // console.log({userGrowthData});
55921
+
55660
55922
  const actionsWidgetsConfig = React.useMemo(() => getActionWidgetsConfig({
55661
55923
  getRedirectLink
55662
55924
  }), [getRedirectLink, getActionWidgetsConfig]);
@@ -55667,6 +55929,7 @@ function AdminDashboardScreen({
55667
55929
  const safeUserActivity = Array.isArray(data?.data?.userActivity) ? data.data.userActivity : [];
55668
55930
  const safeTopContributors = Array.isArray(data?.topContributors) ? data.topContributors : [];
55669
55931
  const safeUserGrowth = Array.isArray(data?.userGrowthData) ? data.userGrowthData : [];
55932
+ console.log("safeUserGrowth", safeUserGrowth);
55670
55933
  return /*#__PURE__*/jsxRuntime.jsx(AdminDashboard, {
55671
55934
  t: t,
55672
55935
  goTo: goTo,
@@ -55922,7 +56185,10 @@ function AdminSubjectsScreen({
55922
56185
  const handleMergeSubjects = React.useCallback(async mergeData => {
55923
56186
  try {
55924
56187
  if (AdminService.mergeSubjects) {
55925
- await AdminService.mergeSubjects(mergeData);
56188
+ await AdminService.mergeSubjects({
56189
+ subject: 'stakeholder',
56190
+ ...mergeData
56191
+ });
55926
56192
  antd.message.success(t("Subjects merged successfully"));
55927
56193
  } else {
55928
56194
  console.warn("AdminService.mergeSubjects is not implemented");
@@ -55938,7 +56204,10 @@ function AdminSubjectsScreen({
55938
56204
  if (getData) {
55939
56205
  return getData(params);
55940
56206
  }
55941
- return AdminService.getSubjects(params);
56207
+ return AdminService.getSubjects({
56208
+ subject: 'stakeholder',
56209
+ params
56210
+ });
55942
56211
  }, [getData, AdminService]);
55943
56212
  return /*#__PURE__*/jsxRuntime.jsx(SubjectsTable, {
55944
56213
  t: t,
@@ -55986,11 +56255,14 @@ function AdminLocationScreen({
55986
56255
  } = config;
55987
56256
  const handleMergeLocations = React.useCallback(async mergeData => {
55988
56257
  try {
55989
- if (AdminService.mergeLocations) {
55990
- await AdminService.mergeLocations(mergeData);
56258
+ if (AdminService.mergeSubjects) {
56259
+ await AdminService.mergeSubjects({
56260
+ subject: 'location',
56261
+ ...mergeData
56262
+ });
55991
56263
  antd.message.success(t("Locations merged successfully"));
55992
56264
  } else {
55993
- console.warn("AdminService.mergeLocations is not implemented");
56265
+ console.warn("AdminService.mergeSubjects is not implemented");
55994
56266
  antd.message.success(t("Locations merged successfully"));
55995
56267
  }
55996
56268
  } catch (err) {
@@ -55998,12 +56270,15 @@ function AdminLocationScreen({
55998
56270
  }
55999
56271
  }, [AdminService, t, handleError]);
56000
56272
 
56001
- // Use custom getData if provided, otherwise use default AdminService.getLocations
56273
+ // Use custom getData if provided, otherwise use default AdminService.getSubjects
56002
56274
  const getLocations = React.useCallback(params => {
56003
56275
  if (getData) {
56004
56276
  return getData(params);
56005
56277
  }
56006
- return AdminService.getLocations(params);
56278
+ return AdminService.getSubjects({
56279
+ subject: 'location',
56280
+ params
56281
+ });
56007
56282
  }, [getData, AdminService]);
56008
56283
  return /*#__PURE__*/jsxRuntime.jsx(LocationTable, {
56009
56284
  t: t,
@@ -56108,13 +56383,13 @@ function getAdminRoutes(config) {
56108
56383
  visible: user => userIsAdmin(user),
56109
56384
  component: subjectsIndexComponent
56110
56385
  }, ...(typeof useAdminLocationConfig === "function" ? [{
56111
- path: "subjects/location",
56386
+ path: "management/subjects/location",
56112
56387
  key: "".concat(APP_PREFIX, "_ADMIN_SUBJECTS_LOCATIONS"),
56113
56388
  exact: true,
56114
56389
  visible: user => userIsAdmin(user),
56115
56390
  component: /*#__PURE__*/jsxRuntime.jsx(LocationWrapper, {})
56116
56391
  }] : []), ...(typeof useAdminSubjectsConfig === "function" ? [{
56117
- path: "subjects/stakeholder",
56392
+ path: "management/subjects/stakeholder",
56118
56393
  key: "".concat(APP_PREFIX, "_ADMIN_SUBJECTS_STAKEHOLDERS"),
56119
56394
  exact: true,
56120
56395
  visible: user => userIsAdmin(user),