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
@@ -0,0 +1,47 @@
1
+ import { useMemo } from 'react';
2
+ import { DashboardLayout, Header, KeyIndicators, MineSiteMap, Widget } from '../../../../../../src/index.js'
3
+ import { getKeyIndicatorsRowConfig } from './config';
4
+
5
+ const PlantingCycleSummary = ({ activityData, supportText, onDownload, downloadDisabled, actionButtons, breadcrumbs, goBackTo, loading, t = () => { } }) => {
6
+ const keyIndicatorsConfig = useMemo(() => getKeyIndicatorsRowConfig({ t, data: {} }), [t]);
7
+
8
+ return (
9
+ <DashboardLayout
10
+ header={
11
+ <Header
12
+ title={'Planting Cycle Summary'}
13
+ supportText={supportText || ''}
14
+ onDownload={onDownload}
15
+ downloadDisabled={downloadDisabled}
16
+ actionButtons={actionButtons}
17
+ breadcrumbs={breadcrumbs}
18
+ goBackTo={goBackTo}
19
+ loading={loading}
20
+ />
21
+ }
22
+ >
23
+ <section>
24
+ <KeyIndicators title={t("Key Information")} config={keyIndicatorsConfig} loading={loading} />
25
+ </section>
26
+
27
+ <section>
28
+ <Widget
29
+ title={t("Planting Locations")}
30
+ className="no-px h-w-btn-header no-pt-body no-p-body no-pb-body"
31
+ style={{ height: '100%', display: 'flex', flexDirection: 'column' }}
32
+ >
33
+ <MineSiteMap
34
+ loading={loading}
35
+ t={t}
36
+ isSatellite
37
+ data={[]}
38
+ />
39
+ </Widget>
40
+
41
+ </section>
42
+ </DashboardLayout>
43
+ )
44
+ }
45
+
46
+ export default PlantingCycleSummary;
47
+
@@ -26,7 +26,7 @@ export const getKeyIndicatorsRowConfig = ({ t, data = {} }) => [
26
26
  },
27
27
  {
28
28
  label: t('Activity Participants'),
29
- render: () => <div>{'0'}</div>
29
+ render: () => <div> {data?.totalNumberOfParticipantsArrival || '0'}</div>
30
30
  },
31
31
  {
32
32
  label: t('Hectares Planted'),
@@ -12,10 +12,10 @@ export const IconNodesConfig = {
12
12
  emptyName: "no-traders",
13
13
  },
14
14
  government: {
15
- name: "Government",
15
+ name: "Governance",
16
16
  icon: "KYC",
17
17
  order: 3,
18
- emptyName: "no-government",
18
+ emptyName: "no-governance",
19
19
  },
20
20
  other: {
21
21
  name: "Other",
@@ -1,18 +1,18 @@
1
1
  import { IconNodesConfig } from './config.js';
2
2
  import { findOptions } from '../../../../../../helpers/StringHelper.js';
3
3
 
4
- export const getStakeholderMappingData = ({data, locationData, id, options, t, goTo, selectedPartners, mainSubject}) => {
4
+ export const getStakeholderMappingData = ({data, locationData, id, options, t, goTo, selectedPartners, mainSubject, APP}) => {
5
5
  const _data = data;
6
6
  const mainSubjectData = _data?.[mainSubject];
7
7
 
8
8
  return {
9
- id: mainSubjectData?.datastakeId || "",
10
- name: mainSubjectData?.name || "",
9
+ id: mainSubjectData?.datastakeId || locationData?.datastakeId || "",
10
+ name: mainSubjectData?.name || locationData?.name || "",
11
11
  country: {
12
- label: findOptions(mainSubjectData?.country, options?.countries) || "",
13
- value: (mainSubjectData?.country || "").toLowerCase() || "",
12
+ label: findOptions((mainSubjectData?.country || locationData?.country), options?.countries) || "",
13
+ value: ((mainSubjectData?.country || locationData?.country) || "").toLowerCase() || "",
14
14
  },
15
- onClick: () => goTo(`/app/view/production-sites/${mainSubjectData?.datastakeId}`),
15
+ onClick: () => goTo(`/app/view/${APP === 'nashiriki' ? 'scl' : 'production-sites'}/${mainSubjectData?.datastakeId || locationData?.datastakeId}`),
16
16
  totalSources: selectedPartners?.partners?.length || 0,
17
17
  backgroundColor: "#FFD6E7",
18
18
  iconColor: "#C41D7F",
@@ -43,7 +43,7 @@ export const getStakeholderMappingData = ({data, locationData, id, options, t, g
43
43
  icon: "DashboardStakeholder",
44
44
  onClick: () => {
45
45
  if (child?.type === "operator") {
46
- goTo(`/app/summary/operators/${child.datastakeId}`);
46
+ goTo(`/app/${APP === 'nashiriki' ? 'summary/operators' : 'operator-summary'}/${child.datastakeId}`);
47
47
  return;
48
48
  }
49
49
 
@@ -11,6 +11,7 @@ const StakeholderMapping = ({
11
11
  goTo = () => {},
12
12
  selectedPartners = {},
13
13
  locationData = {},
14
+ APP,
14
15
  }) => {
15
16
 
16
17
  const defaultFilter = useMemo(() => {
@@ -25,7 +26,7 @@ const StakeholderMapping = ({
25
26
  coreSubject: "location",
26
27
  filterBySources: false,
27
28
  metrics: {
28
- operator: ['operator', 'operator.clientLocation'],
29
+ operator: ['operator.locationClient'],
29
30
  government: ['custom.stakeholderId', 'governance'],
30
31
  trader: ['trade'],
31
32
  other: ['civilSociety', 'international'],
@@ -37,7 +38,7 @@ const StakeholderMapping = ({
37
38
  const { data, loading } = useWidgetFetch({config: defaultFilter});
38
39
 
39
40
  const graphData = useMemo(() => {
40
- return getStakeholderMappingData({data, locationData, id, options, t, goTo, selectedPartners, mainSubject: "mine"});
41
+ return getStakeholderMappingData({data, locationData, id, options, t, goTo, selectedPartners, mainSubject: "mine", APP});
41
42
  }, [data, locationData, id, options, t, goTo, selectedPartners]);
42
43
 
43
44
  return (
@@ -30,6 +30,7 @@ const MineSummary = ({
30
30
  goBack = () => {},
31
31
  onIdChange = () => {},
32
32
  breadcrumbs = [],
33
+ APP,
33
34
  }) => {
34
35
  const {
35
36
  selectedItem,
@@ -78,7 +79,7 @@ const MineSummary = ({
78
79
  tooltip: t("Details"),
79
80
  icon: "FileEdit",
80
81
  onClick: () => {
81
- goTo(getRedirectLink(`/app/view/production-sites/${params?.id ? params?.id : selectedItem}`));
82
+ goTo(getRedirectLink(`/app/view/${APP === 'nashiriki' ? 'scl' : 'production-sites'}/${params?.id ? params?.id : selectedItem}`));
82
83
  },
83
84
  },
84
85
  {
@@ -142,6 +143,7 @@ const MineSummary = ({
142
143
  t={t}
143
144
  id={params?.id || selectedItem}
144
145
  partners={partners}
146
+ APP={APP}
145
147
  />
146
148
  </section>
147
149
  <section>
@@ -11,7 +11,6 @@ const Governance = ({
11
11
  id,
12
12
  options = {},
13
13
  goTo = () => {},
14
-
15
14
  }) => {
16
15
  const defaultFetchConfig = useMemo(() => {
17
16
  return {
@@ -2,6 +2,13 @@ import React from "react";
2
2
  import { Tag, Tooltip } from "antd";
3
3
  import CountryFlag from "../../../../../core/components/UI/CountryFlag/index.jsx";
4
4
  import {findOptions, truncateString } from "../../../../../../helpers/StringHelper.js";
5
+ import MoreTags from "../../../../../core/components/Table/MoreTags/index.jsx";
6
+
7
+ const getAllProducts = (arr) => {
8
+ return arr.flatMap(item =>
9
+ (item.products || []).map(product => product.typeOfProduct)
10
+ );
11
+ }
5
12
 
6
13
  export const getKeyIndicatorConfig = ({ t, data = {}, options = {} }) => [
7
14
  {
@@ -28,14 +35,14 @@ export const getKeyIndicatorConfig = ({ t, data = {}, options = {} }) => [
28
35
  {
29
36
  label: t("Supply Chain Position"),
30
37
  render: () => {
31
- const position = findOptions(data?.positionSupplyChain, options?.positionSupplyChainOptions);
38
+ const position = findOptions(data?.positionSupplyChain, options?.positionSupplyChainOptions || options?.optionPositionSupplyChain);
32
39
  return <div>{position|| "-"}</div>;
33
40
  },
34
41
  },
35
42
  {
36
43
  label: t("Legal Form"),
37
44
  render: () => {
38
- const subCategory = findOptions(data?.subCategory, options?.subCategoriesOptions);
45
+ const subCategory = findOptions(data?.subCategory, options?.subCategoriesOptions || options?.subCategory);
39
46
  if(subCategory?.length > 22) {
40
47
  const _subCategory = truncateString(subCategory, 22);
41
48
  return <Tooltip title={subCategory}>
@@ -48,43 +55,48 @@ export const getKeyIndicatorConfig = ({ t, data = {}, options = {} }) => [
48
55
  {
49
56
  label: t("Products"),
50
57
  render: () => {
51
- if ((data?.products || []).length === 0) {
52
- return "-";
53
- }
58
+
59
+ const clientProducts = getAllProducts(data?.clients || []);
60
+ const supplierProducts = getAllProducts(data?.suppliers || []);
61
+ const locationProducts = getAllProducts(data?.locationSuppliers || []);
62
+
63
+ const allProducts = [...clientProducts, ...supplierProducts, ...locationProducts];
64
+ const uniqueProducts = [...new Set(allProducts)];
65
+ const products = findOptions(uniqueProducts, options?.mineralOptions || options?.minerals);
66
+
54
67
 
55
68
  return (
56
- <div style={{ display: "flex", flexWrap: "wrap" }}>
57
- {data?.products?.map((product) => {
58
- return (
59
- <Tag
60
- color="processing"
61
- style={{ color: "#1677FF", marginBottom: 8 }}
62
- key={product}
63
- >
64
- {t(product)}
65
- </Tag>
66
- );
67
- })}
68
- </div>
69
+ <>
70
+ {products.length > 0 ? (
71
+ <div style={{ display: "flex", flexWrap: "wrap" }}>
72
+ <MoreTags
73
+ values={products}
74
+ limit={3}
75
+ tagColor="processing"
76
+ style={{ fontWeight: "normal", fontSize: 14 }}
77
+ />
78
+ </div>
79
+ ) : "-"}
80
+ </>
69
81
  );
70
82
  },
71
83
  },
72
84
  {
73
85
  label: t("Associated Mine Sites"),
74
86
  render: () => {
75
- return <div>{data?.associatedMineSites || 0}</div>;
87
+ return <div>{data?.locationSuppliers?.length || 0}</div>;
76
88
  },
77
89
  },
78
90
  {
79
91
  label: t("Identified Suppliers"),
80
92
  render: () => {
81
- return <div>{data?.identifiedSuppliers || 0}</div>;
93
+ return <div>{data?.suppliers?.length || 0}</div>;
82
94
  },
83
95
  },
84
96
  {
85
97
  label: t("Identified Customers"),
86
98
  render: () => {
87
- return <div>{data?.identifiedCustomers || 0}</div>;
99
+ return <div>{data?.clients?.length || 0}</div>;
88
100
  },
89
101
  },
90
102
  ];
@@ -1,7 +1,7 @@
1
1
  import { leftIcons, leftBackgroundColorLocation, leftBackgroundColorStakeholder, topIcons } from './config.js';
2
2
  import { findOptions } from '../../../../../../helpers/StringHelper.js';
3
3
 
4
- export const getFilterConfig = ({operatorData = {}, options = {}, filters = {}, t = () => {}}) => {
4
+ export const getFilterConfig = ({operatorData = {}, options = {}, filters = {}, t = () => {}, APP}) => {
5
5
  const productSet = new Set();
6
6
  const allTradeMineralOptions = [
7
7
  ...(operatorData?.suppliers || []),
@@ -15,7 +15,7 @@ export const getFilterConfig = ({operatorData = {}, options = {}, filters = {},
15
15
  .map((product) => {
16
16
  productSet.add(product.typeOfProduct);
17
17
 
18
- const label = options?.minerals?.find(
18
+ const label = options?.[APP !== 'nashiriki' ? 'mineralOptions' : 'minerals']?.find(
19
19
  (mineral) => mineral.value === product.typeOfProduct,
20
20
  )?.label;
21
21
 
@@ -61,15 +61,15 @@ export const getLeft = (data = {}, mapChildren = () => {}, supplierLocations = [
61
61
  .filter((d) => !!d);
62
62
  }
63
63
 
64
- export const mapItem = (data, options, goTo, getRedirectLink) => {
65
- const { positionSupplyChainOptions, locationCategories } = options || {};
64
+ export const mapItem = (data, options, goTo, getRedirectLink, operatorData = {}, APP) => {
65
+ const { positionSupplyChainOptions, locationCategories, optionPositionSupplyChain } = options || {};
66
66
  return {
67
- id: data.datastakeId || "-",
68
- datastakeId: data.datastakeId || "-",
67
+ id: data.datastakeId || operatorData?.id || "-",
68
+ datastakeId: data.datastakeId || operatorData?.datastakeId || "-",
69
69
  leftIcon: leftIcons[data.type === "mineSite" ? "location" : "stakeholder"],
70
- name: data.name || "-",
71
- subTitle: findOptions(data.type, [
72
- ...(positionSupplyChainOptions || []),
70
+ name: data.name || operatorData?.name || "-",
71
+ subTitle: findOptions(data.type || operatorData?.positionSupplyChain, [
72
+ ...(positionSupplyChainOptions || optionPositionSupplyChain || []),
73
73
  ...(locationCategories || []),
74
74
  ]),
75
75
  leftBackground:
@@ -78,19 +78,19 @@ export const mapItem = (data, options, goTo, getRedirectLink) => {
78
78
  : leftBackgroundColorStakeholder,
79
79
  topIcon: topIcons[data.type],
80
80
  country: {
81
- label: findOptions(data.country, options?.countries || []),
82
- value: data.country,
81
+ label: findOptions((data.country || operatorData?.country), options?.countries || []),
82
+ value: data.country || operatorData?.country,
83
83
  },
84
84
  totalSources: data.sources ?? 0,
85
85
  volume: data?.volume || "",
86
86
  onClick: function () {
87
87
  if (data.type === "mineSite") {
88
88
  return goTo(
89
- getRedirectLink(`/app/summary/scl/${data.datastakeId}`),
89
+ getRedirectLink(`/app/${APP === 'nashiriki' ? 'summary/scl' : 'mine-summary'}/${data.datastakeId}`),
90
90
  );
91
91
  }
92
92
  return goTo(
93
- getRedirectLink(`/app/summary/operators/${data.datastakeId}`),
93
+ getRedirectLink(`/app/${APP === 'nashiriki' ? 'summary/operators' : 'operator-summary'}/${data.datastakeId}`),
94
94
  );
95
95
  },
96
96
  }
@@ -12,6 +12,8 @@ export const useTradeRelationship = ({
12
12
  goTo,
13
13
  getRedirectLink,
14
14
  filters,
15
+ operatorData,
16
+ APP,
15
17
  }) => {
16
18
  const { positionSupplyChainOptions, locationCategories } = options || {};
17
19
  const [graphData, setGraphData] = useState({});
@@ -20,21 +22,21 @@ export const useTradeRelationship = ({
20
22
 
21
23
  const config = useMemo(() => ({
22
24
  basepath: "analytics",
23
- url: "/widgets/trade-connection-map",
25
+ url: `/widgets/trade-relationship-map`,
24
26
  filters: {
27
+ datastakeId: id,
25
28
  product: filters?.products,
26
29
  sources: selectedPartners?.partners || [],
27
30
  },
28
- }), [id, filters?.products, selectedPartners?.partners]);
31
+ stop: !selectedPartners?.partners?.length || selectedPartners?.loading,
32
+ }), [id, filters?.products, selectedPartners?.partners, selectedPartners?.loading]);
29
33
 
30
34
  const { data } = useWidgetFetch({config: config});
31
35
 
32
36
  const mapItem = (data) => {
33
- return _mapItem(data, options, goTo, getRedirectLink);
37
+ return _mapItem(data, options, goTo, getRedirectLink, operatorData, APP);
34
38
  }
35
39
 
36
-
37
-
38
40
  useEffect(() => {
39
41
  if (id && selectedPartners?.partners?.length > 0 && fetchedProducts) {
40
42
  const _fetch = async () => {
@@ -133,8 +135,6 @@ export const useTradeRelationship = ({
133
135
  left: getLeft(data, mapChildren, supplierLocations),
134
136
  };
135
137
 
136
- console.log({graphData})
137
-
138
138
  setGraphData(graphData);
139
139
  } catch (err) {
140
140
  setGraphData({});
@@ -146,7 +146,7 @@ export const useTradeRelationship = ({
146
146
 
147
147
  _fetch();
148
148
  }
149
- }, [filters?.products, id, selectedPartners, fetchedProducts]);
149
+ }, [filters?.products, id, selectedPartners, fetchedProducts, operatorData, options, goTo, getRedirectLink, data]);
150
150
 
151
151
  return {
152
152
  graphData,
@@ -12,6 +12,7 @@ const TradeRelationships = ({
12
12
  id,
13
13
  options = {},
14
14
  getRedirectLink = () => {},
15
+ APP,
15
16
  }) => {
16
17
  const [filters, setFilters] = useState({});
17
18
 
@@ -20,8 +21,8 @@ const TradeRelationships = ({
20
21
  };
21
22
 
22
23
  const filterConfig = useMemo(() => {
23
- return getFilterConfig({operatorData, options, filters, t});
24
- }, [filters.products, t, options?.minerals, operatorData]);
24
+ return getFilterConfig({operatorData, options, filters, t, APP});
25
+ }, [filters.products, t, options?.mineralOptions, operatorData, options?.mineral, APP]);
25
26
 
26
27
  const { graphData, loading, fetchedProducts, setFetchedProducts } = useTradeRelationship({
27
28
  id,
@@ -30,6 +31,8 @@ const TradeRelationships = ({
30
31
  goTo,
31
32
  getRedirectLink,
32
33
  filters,
34
+ operatorData,
35
+ APP
33
36
  });
34
37
 
35
38
  useEffect(() => {
@@ -31,6 +31,7 @@ const OperatorSummary = ({
31
31
  goBack = () => {},
32
32
  onIdChange = () => {},
33
33
  breadcrumbs = [],
34
+ APP,
34
35
  }) => {
35
36
  const {
36
37
  selectedItem,
@@ -143,6 +144,7 @@ const OperatorSummary = ({
143
144
  id={params?.id || selectedItem}
144
145
  subject="stakeholder"
145
146
  partners={partners}
147
+ APP={APP}
146
148
  />
147
149
  </section>
148
150
  <section>
@@ -154,6 +156,7 @@ const OperatorSummary = ({
154
156
  goTo={goTo}
155
157
  getRedirectLink={getRedirectLink}
156
158
  operatorData={singleItemData}
159
+ APP={APP}
157
160
  />
158
161
  </section>
159
162
  <section>
@@ -9,7 +9,8 @@ const InformationAvailability = ({
9
9
  t = () => {},
10
10
  id,
11
11
  subject,
12
- partners
12
+ partners,
13
+ APP
13
14
  }) => {
14
15
  const defaultFetchConfig = useMemo(
15
16
  () => ({
@@ -19,11 +20,11 @@ const InformationAvailability = ({
19
20
  stop: !id || selectedPartners?.loading,
20
21
  filters: {
21
22
  // datastakeId: id,
22
- scope: subject === "stakeholder" ? "operatorInfo" : "locationInfo",
23
+ scope: subject === "stakeholder" ? (APP === "nashiriki" ? "operator" : "operatorInfo") : (APP === "nashiriki" ? "nashiriki" : "locationInfo"),
23
24
  sources: selectedPartners?.partners || [],
24
25
  },
25
26
  }),
26
- [id, selectedPartners],
27
+ [id, selectedPartners, APP],
27
28
  );
28
29
 
29
30
  const { data, loading } = useWidgetFetch({config: defaultFetchConfig});
@@ -67,6 +67,20 @@ class AdminService extends BaseService {
67
67
  url: `/accounts/cancelInvitation/${token}`,
68
68
  })
69
69
  }
70
+
71
+ getSubjects({ subject, params }) {
72
+ return this.apiGet({
73
+ url: `${subject}`,
74
+ params,
75
+ })
76
+ }
77
+
78
+ mergeSubjects({ subject, ...data }) {
79
+ return this.apiPost({
80
+ url: `/merge/${subject}`,
81
+ data,
82
+ })
83
+ }
70
84
  }
71
85
 
72
86
  export default createLazyService(AdminService);
@@ -1,13 +1,115 @@
1
1
  const en = {
2
+ "Identified Customers": "Identified Customers",
3
+ "Identified Suppliers": "Identified Suppliers",
4
+ "Associated Mine Sites": "Associated Mine Sites",
5
+ "Supply Chain Position": "Supply Chain Position",
6
+ "Governance": "Governance",
7
+ "Holding": "Holding",
8
+ "Operator Review": "Operator Review",
9
+ "Stakeholder Mapping": "Stakeholder Mapping",
10
+ "sources-reporting": "Sources Reporting",
11
+ "link-details": "Link details",
12
+ "Mine Site Details": "Mine Site Details",
13
+ "Number of Workers on Site": "Number of Workers on Site",
14
+ "Extraction Methods": "Extraction Methods",
15
+ "Find Data": "Find Data",
16
+ "Mine Review": "Mine Review",
17
+ "Completion": "Completion",
18
+ "Information Completeness": "Information Completeness",
19
+ "Consolidated": "Consolidated",
20
+ "Datapoints": "Datapoints",
21
+ "Own Data": "Own Data",
22
+ "Create Worker": "Create Worker",
23
+ "Workers": "Workers",
24
+ "Census Update": "Census Update",
25
+ "Create Operator": "Create Operator",
26
+ "Edit Settings": "Edit Settings",
27
+ "Create Partner": "Create Partner",
28
+ "Only authorised users can create partnerships.": "Only authorised users can create partnerships.",
29
+ "Partners are organisations sharing their information with you, or receiving your information.": "Partners are organisations sharing their information with you, or receiving your information.",
30
+ "List": "List",
31
+ "Partner suspended successfully": "Partner suspended successfully",
32
+ "Invitation type": "Invitation type",
33
+ "Person name": "Person name",
34
+ "Source: This partner will share information with you.": "Source: This partner will share information with you.",
35
+ "Client: You will share information with this partner.": "Client: You will share information with this partner.",
36
+ "Exchange: You will both share information with each other.": "Exchange: You will both share information with each other.",
37
+ "Type of partnership": "Type of partnership",
38
+ "Type of partner": "Type of partner",
39
+ "Re-activate Partnership": "Re-activate Partnership",
40
+ "Activate Partner": "Activate Partner",
41
+ "Resend Invitation": "Resend Invitation",
42
+ "Resend Invite": "Resend Invite",
43
+ "Copy Invitation Link": "Copy Invitation Link",
44
+ "Are you sure you want to suspend this partner?": "Are you sure you want to suspend this partner?",
45
+ "Suspend Partner": "Suspend Partner",
46
+ "Are you sure you want to block this user?": "Are you sure you want to block this user?",
47
+ "Block User": "Block User",
48
+ "Suspended": "Suspended",
49
+ "Entity Type": "Entity Type",
50
+ "Source: This partner shares information with your organisation.": "Source: This partner shares information with your organisation.",
51
+ "Client: This partner receives information from your organisation.": "Client: This partner receives information from your organisation.",
52
+ "Exchange: You share information with each other.": "Exchange: You share information with each other.",
53
+ "Create Production Site": "Create Production Site",
54
+ "production-sites": "Production Sites",
55
+ "Summary": "Summary",
56
+ "Create Locations": "Create Locations",
57
+ "Create Incidents": "Create Incidents",
58
+ "Create Activity": "Create Activity",
59
+ "Activities": "Activities",
60
+ "Create Events": "Create Events",
61
+ "Create Document": "Create Document",
62
+ "Documents": "Documents",
63
+ "Triangluation": "Triangluation",
64
+ "Monitoring Map": "Monitoring Map",
65
+ "Major Incidents": "Major Incidents",
66
+ "Minor Incidents": "Minor Incidents",
67
+ "Moderate Incidents": "Moderate Incidents",
68
+ "Mine Site": "Mine Site",
69
+ "Location Type": "Location Type",
70
+ "Data Points": "Data Points",
71
+ "Information Subjects": "Information Subjects",
72
+ "Data Compilation": "Data Compilation",
73
+ "Data Chain of Custody": "Data Chain of Custody",
74
+ "Contributions": "Contributions",
75
+ "Others": "Others",
76
+ "Locations Data": "Locations Data",
77
+ "Stakeholders Data": "Stakeholders Data",
78
+ "Events Data": "Events Data",
79
+ "Accumulation": "Accumulation",
80
+ "Create Mine Site": "Create Mine Site",
81
+ "Supply Chain Map": "Supply Chain Map",
82
+ "Participants": "Participants",
83
+ "Trade Connections": "Trade Connections",
84
+ "Key Information": "Key Information",
85
+ "Weekly": "Weekly",
86
+ "Monthly": "Monthly",
87
+ "Daily": "Daily",
88
+ "Workforce": "Workforce",
89
+ "Trade Actors": "Trade Actors",
90
+ "Mining Sites": "Mining Sites",
91
+ "Primary Data Collection": "Primary Data Collection",
92
+ "Implementation Partner": "Implementation Partner",
93
+ "Origin": "Origin",
94
+ "Activity Participants": "Activity Participants",
95
+ "Legal Form": "Legal Form",
96
+ "Hectares Planted": "Hectares Planted",
97
+ "Sub Category": "Sub Category",
98
+ "Licensing": "Licensing",
99
+ "Email address": "Email address",
100
+ "Partner Type": "Partner Type",
101
+ "Product": "Product",
102
+ "Filter by": "Filter by",
103
+ "Key Stakeholder": "Key Stakeholder",
104
+ "Mineral Supply Chain Transparency": "Mineral Supply Chain Transparency",
2
105
  "no-board-members": "No board members identified",
3
106
  "no-management": "No management identified",
4
107
  "no-beneficiaries": "No beneficiaries identified",
5
108
  "no-stakeholders": "No stakeholders identified",
6
109
  "no-operators": "No operators identified",
7
110
  "no-traders": "No traders identified",
8
- "no-government": "No government identified",
111
+ "no-governance": "No governance identified",
9
112
  "no-other": "No other identified",
10
- "No planning required": "No planning required",
11
113
  "No evaluation required": "No evaluation required",
12
114
  "No improvement required": "No improvement required",
13
115
  "Currently unavailable": "Currently unavailable",