datastake-daf 0.6.783 → 0.6.785

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 (59) hide show
  1. package/dist/components/index.js +78 -70
  2. package/dist/hooks/index.js +3 -1
  3. package/dist/pages/index.js +1082 -270
  4. package/dist/style/datastake/mapbox-gl.css +330 -0
  5. package/dist/utils/index.js +67 -0
  6. package/package.json +1 -1
  7. package/src/@daf/core/components/Charts/BarChart/index.jsx +1 -1
  8. package/src/@daf/core/components/Dashboard/Map/ChainIcon/utils.js +2 -2
  9. package/src/@daf/core/components/Screens/BaseScreen/index.jsx +1 -0
  10. package/src/@daf/core/components/Select/MultiSelect/index.jsx +4 -2
  11. package/src/@daf/core/components/Select/MultiSelect/style.js +15 -0
  12. package/src/@daf/hooks/useGetQueryParams.js +3 -1
  13. package/src/@daf/pages/Dashboards/UserDashboard/components/ContributionsGraph/hook.js +6 -7
  14. package/src/@daf/pages/Dashboards/UserDashboard/components/ContributionsGraph/index.jsx +1 -1
  15. package/src/@daf/pages/Documents/config.js +5 -5
  16. package/src/@daf/pages/Events/Activities/columns.js +5 -0
  17. package/src/@daf/pages/Events/Activities/config.js +21 -17
  18. package/src/@daf/pages/Events/Incidents/columns.js +5 -0
  19. package/src/@daf/pages/Events/Incidents/config.js +14 -11
  20. package/src/@daf/pages/Events/columns.js +6 -0
  21. package/src/@daf/pages/Events/config.js +0 -16
  22. package/src/@daf/pages/Locations/MineSite/columns.js +5 -1
  23. package/src/@daf/pages/Locations/MineSite/config.js +21 -24
  24. package/src/@daf/pages/Partners/columns.js +3 -1
  25. package/src/@daf/pages/Partners/config.js +13 -9
  26. package/src/@daf/pages/Partners/create.jsx +5 -2
  27. package/src/@daf/pages/Partners/edit.jsx +4 -2
  28. package/src/@daf/pages/Stakeholders/Operators/columns.js +6 -0
  29. package/src/@daf/pages/Stakeholders/Operators/config.js +8 -8
  30. package/src/@daf/pages/Stakeholders/Workers/columns.js +19 -13
  31. package/src/@daf/pages/Stakeholders/Workers/config.js +8 -23
  32. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/KeyInformation/index.jsx +48 -0
  33. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/PlantedSpecies.jsx +73 -0
  34. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/SeedlingsHeight.jsx +44 -0
  35. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/Stats.jsx +86 -0
  36. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/VegetationHealth.jsx +73 -0
  37. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/index.jsx +92 -0
  38. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MonitoringScopeAndFindings/index.jsx +348 -0
  39. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/config.js +35 -0
  40. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/index.jsx +30 -0
  41. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/CommunityStats/helper.js +1 -1
  42. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/index.jsx +1 -1
  43. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleOutcomes/index.jsx +1 -1
  44. package/src/@daf/pages/Summary/Activities/PlantingCycle/helper.js +0 -56
  45. package/src/@daf/pages/Summary/Minesite/index.jsx +6 -4
  46. package/src/@daf/pages/Summary/Operator/components/TradeRelationships/index.js +2 -0
  47. package/src/@daf/pages/Summary/Operator/index.jsx +6 -3
  48. package/src/@daf/pages/TablePage/index.jsx +8 -2
  49. package/src/@daf/pages/Template/components/LinkingTemplate/config.js +14 -1
  50. package/src/@daf/pages/Template/components/LinkingTemplate/index.jsx +4 -2
  51. package/src/@daf/pages/Template/index.jsx +1 -10
  52. package/src/@daf/pages/View/hooks/usePrepareForm.js +4 -4
  53. package/src/@daf/pages/View/index.jsx +2 -1
  54. package/src/@daf/utils/numbers.js +57 -0
  55. package/src/constants/locales/en/translation.js +3 -0
  56. package/src/constants/locales/fr/translation.js +3 -0
  57. package/src/constants/locales/sp/translation.js +3 -0
  58. package/src/pages.js +1 -0
  59. package/src/utils.js +1 -1
@@ -1,16 +1,15 @@
1
1
  export const getFiltersConfig = ({t}) => {
2
2
  return {
3
-
4
-
5
- timeframe: {
6
- type: "timeframe",
7
- label: "Timeframe",
8
- style: { flex: 1 },
3
+ timeframe: {
4
+ type: "timeframe",
5
+ label: "Timeframe",
6
+ style: { flex: 1 },
7
+ t: t,
9
8
  },
10
9
  country: {
11
10
  type: 'select',
12
11
  label: 'Country',
13
- placeholder: (t) => `${t('Filter by')} ${t('Country').toLowerCase()}`,
12
+ placeholder: () => `${t('Filter by')} ${t('Country').toLowerCase()}`,
14
13
  style: { flex: 1 },
15
14
  labelStyle: { flex: 1 },
16
15
  getLabel: (option) => option.label,
@@ -34,7 +33,7 @@ timeframe: {
34
33
 
35
34
  return t('Province');
36
35
  },
37
- placeholder: (t) => `${t('Filter by')} ${t('Province').toLowerCase()}`,
36
+ placeholder: () => `${t('Filter by')} ${t('Province').toLowerCase()}`,
38
37
  filters: (data) => ({
39
38
  country: data.country,
40
39
  level: 'level_1',
@@ -66,7 +65,7 @@ timeframe: {
66
65
  return t('Province');
67
66
  },
68
67
  show: (data) => !(data.country && data.administrativeLevel1),
69
- placeholder: (t) => `${t('Filter by')} ${t('Territory').toLowerCase()}`,
68
+ placeholder: () => `${t('Filter by')} ${t('Territory').toLowerCase()}`,
70
69
  filters: (data) => ({
71
70
  country: data.country,
72
71
  level: 'level_2',
@@ -82,7 +81,7 @@ timeframe: {
82
81
  category: {
83
82
  type: 'select',
84
83
  label: 'Category',
85
- placeholder: (t) => `${t('Filter by')} ${t('Category').toLowerCase()}`,
84
+ placeholder: () => `${t('Filter by')} ${t('Category').toLowerCase()}`,
86
85
  style: { flex: 1 },
87
86
  labelStyle: { flex: 1 },
88
87
  getLabel: (option) => option.label,
@@ -106,7 +105,7 @@ timeframe: {
106
105
  positionInTheMineralSupplyChain: {
107
106
  type: 'select',
108
107
  label: 'Position',
109
- placeholder: (t) => `${t('Filter by')} ${t('Position').toLowerCase()}`,
108
+ placeholder: () => `${t('Filter by')} ${t('Position').toLowerCase()}`,
110
109
  style: { flex: 1 },
111
110
  labelStyle: { flex: 1 },
112
111
  getLabel: (option) => option.label,
@@ -115,7 +114,7 @@ timeframe: {
115
114
  status: {
116
115
  type: "select",
117
116
  label: "Status",
118
- placeholder: (t) => `${t("Filter by")} ${t("Status").toLowerCase()}`,
117
+ placeholder: () => `${t("Filter by")} ${t("Status").toLowerCase()}`,
119
118
  style: { flex: 1 },
120
119
  labelStyle: { fley: 1 },
121
120
  getLabel: (option) => option.label,
@@ -127,7 +126,6 @@ timeframe: {
127
126
  export const getFilterOptions = (options, t) => {
128
127
  const {
129
128
  timeframe = [],
130
-
131
129
  statusOptions = [],
132
130
  categoryOptions = [],
133
131
  countries = [],
@@ -139,21 +137,27 @@ export const getFilterOptions = (options, t) => {
139
137
  administrativeLevel2,
140
138
  positionInMineralSupplyChainOptions,
141
139
  subCategoriesOptions,
142
- } = options || {};
140
+ eventCategoryOptions = [],
141
+ } = options || {};
142
+
143
+ const _categoryOptions = eventCategoryOptions?.map((item) => ({
144
+ value: item.value,
145
+ label: typeof item.label === 'object' ? Object.values(item.label)[1] : item.label,
146
+ }))
143
147
 
144
148
  const _default = {
145
149
  timeframe: timeframe,
146
150
  status: [
147
151
  {
148
152
  value: "submitted",
149
- label: "Submitted",
153
+ label: t("Submitted"),
150
154
  },
151
155
  {
152
156
  value: "private",
153
- label: "Private",
157
+ label: t("Private"),
154
158
  },
155
159
  ],
156
- category: stakeholderCategoryOptions || categoryOptions,
160
+ category: _categoryOptions,
157
161
  country: countries,
158
162
  subCategory: subCategoriesOptions,
159
163
  // category: category,
@@ -14,6 +14,8 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
14
14
  title: t('ID'),
15
15
  ellipsis: true,
16
16
  show: true,
17
+ key: "datastakeId",
18
+ sorter: () => 0 + 0,
17
19
  render: (v, all) => {
18
20
  if (all.empty) {
19
21
  return <div className="daf-default-cell" />
@@ -27,6 +29,8 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
27
29
  title: t('Title'),
28
30
  ellipsis: true,
29
31
  show: true,
32
+ key: "name",
33
+ sorter: () => 0 + 0,
30
34
  render: (v, all) => {
31
35
  if (all.empty) {
32
36
  return <div className="daf-default-cell" />
@@ -39,6 +43,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
39
43
  title: t("Date"),
40
44
  dataIndex: "date",
41
45
  key: "date",
46
+ sorter: () => 0 + 0,
42
47
  render: (date, all) => {
43
48
  if (all.empty) {
44
49
  return <div className="daf-default-cell" />;
@@ -1,11 +1,9 @@
1
1
  export const getFiltersConfig = ({t}) => {
2
2
  return {
3
-
4
-
5
- timeframe: {
6
- type: "timeframe",
7
- label: "Timeframe",
8
- style: { flex: 1 },
3
+ timeframe: {
4
+ type: "timeframe",
5
+ label: "Timeframe",
6
+ style: { flex: 1 },
9
7
  },
10
8
  country: {
11
9
  type: 'select',
@@ -127,7 +125,6 @@ timeframe: {
127
125
  export const getFilterOptions = (options, t) => {
128
126
  const {
129
127
  timeframe = [],
130
-
131
128
  statusOptions = [],
132
129
  categoryOptions = [],
133
130
  countries = [],
@@ -139,21 +136,27 @@ export const getFilterOptions = (options, t) => {
139
136
  administrativeLevel2,
140
137
  positionInMineralSupplyChainOptions,
141
138
  subCategoriesOptions,
142
- } = options || {};
139
+ eventCategoryOptions = [],
140
+ } = options || {};
141
+
142
+ const _categoryOptions = eventCategoryOptions?.map((item) => ({
143
+ value: item.value,
144
+ label: typeof item.label === 'object' ? Object.values(item.label)[0] : item.label,
145
+ }))
143
146
 
144
147
  const _default = {
145
148
  timeframe: timeframe,
146
149
  status: [
147
150
  {
148
151
  value: "submitted",
149
- label: "Submitted",
152
+ label: t("Submitted"),
150
153
  },
151
154
  {
152
155
  value: "private",
153
- label: "Private",
156
+ label: t("Private"),
154
157
  },
155
158
  ],
156
- category: stakeholderCategoryOptions || categoryOptions,
159
+ category: _categoryOptions,
157
160
  country: countries,
158
161
  subCategory: subCategoriesOptions,
159
162
  // category: category,
@@ -14,6 +14,8 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
14
14
  title: t('ID'),
15
15
  ellipsis: true,
16
16
  show: true,
17
+ key: "datastakeId",
18
+ sorter: () => 0 + 0,
17
19
  render: (v, all) => {
18
20
  if (all.empty) {
19
21
  return <div className="daf-default-cell" />
@@ -27,6 +29,8 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
27
29
  title: t('Title'),
28
30
  ellipsis: true,
29
31
  show: true,
32
+ key: "name",
33
+ sorter: () => 0 + 0,
30
34
  render: (v, all) => {
31
35
  if (all.empty) {
32
36
  return <div className="daf-default-cell" />
@@ -40,6 +44,8 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
40
44
  title: t('Type'),
41
45
  ellipsis: true,
42
46
  show: true,
47
+ key: "typeOfEvent",
48
+ sorter: () => 0 + 0,
43
49
  render: (v, all) => {
44
50
  if (all.empty) {
45
51
  return <div className="daf-default-cell" />
@@ -1,6 +1,5 @@
1
1
  export const getFiltersConfig = ({t}) => {
2
2
  return {
3
-
4
3
  timeframe: {
5
4
  type: "timeframe",
6
5
  label: "Timeframe",
@@ -86,21 +85,6 @@ export const getFiltersConfig = ({t}) => {
86
85
  labelStyle: { flex: 1 },
87
86
  getLabel: (option) => option.label,
88
87
  getValue: (option) => option.value,
89
- filterOptions: (val) => {
90
- if (val) {
91
- const { option, filters } = val
92
- if (filters && option) {
93
- const { filters: optionFilters } = option;
94
- if (Array.isArray(optionFilters) && optionFilters.length) {
95
- const { value, condition } = optionFilters[0];
96
- if (condition === 'includes') {
97
- return value.includes('corporation');
98
- }
99
- }
100
- }
101
- }
102
- return true;
103
- },
104
88
  },
105
89
  category:{
106
90
  type: 'select',
@@ -15,6 +15,8 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
15
15
  title: t('ID'),
16
16
  ellipsis: true,
17
17
  show: true,
18
+ key: "datastakeId",
19
+ sorter: () => 0 + 0,
18
20
  render: (v, all) => {
19
21
  if (all.empty) {
20
22
  return <div className="daf-default-cell" />
@@ -28,6 +30,8 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
28
30
  title: t('Name'),
29
31
  ellipsis: true,
30
32
  show: true,
33
+ key: "name",
34
+ sorter: () => 0 + 0,
31
35
  render: (v, all) => {
32
36
  if (all.empty) {
33
37
  return <div className="daf-default-cell" />
@@ -68,7 +72,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
68
72
  },
69
73
  {
70
74
  dataIndex: 'category',
71
- title: t('Type'),
75
+ title: t('type'),
72
76
  ellipsis: true,
73
77
  show: true,
74
78
  render: (v, all) => {
@@ -3,7 +3,7 @@ export const getFiltersConfig = ({t}) => {
3
3
  country: {
4
4
  type: 'select',
5
5
  label: 'Country',
6
- placeholder: (t) => `${t('Filter by')} ${t('Country').toLowerCase()}`,
6
+ placeholder: () => `${t('Filter by')} ${t('Country').toLowerCase()}`,
7
7
  style: { flex: 1 },
8
8
  labelStyle: { flex: 1 },
9
9
  getLabel: (option) => option.label,
@@ -27,7 +27,7 @@ export const getFiltersConfig = ({t}) => {
27
27
 
28
28
  return t('Province');
29
29
  },
30
- placeholder: (t) => `${t('Filter by')} ${t('Province').toLowerCase()}`,
30
+ placeholder: () => `${t('Filter by')} ${t('Province').toLowerCase()}`,
31
31
  filters: (data) => ({
32
32
  country: data.country,
33
33
  level: 'level_1',
@@ -59,7 +59,7 @@ export const getFiltersConfig = ({t}) => {
59
59
  return t('Province');
60
60
  },
61
61
  show: (data) => !(data.country && data.administrativeLevel1),
62
- placeholder: (t) => `${t('Filter by')} ${t('Territory').toLowerCase()}`,
62
+ placeholder: () => `${t('Filter by')} ${t('Territory').toLowerCase()}`,
63
63
  filters: (data) => ({
64
64
  country: data.country,
65
65
  level: 'level_2',
@@ -75,31 +75,25 @@ export const getFiltersConfig = ({t}) => {
75
75
  product: {
76
76
  type: 'select',
77
77
  label: 'Product',
78
- placeholder: (t) => `${t('Filter by')} ${t('Product').toLowerCase()}`,
78
+ placeholder: () => `${t('Filter by')} ${t('Product').toLowerCase()}`,
79
+ style: { flex: 1 },
80
+ labelStyle: { flex: 1 },
81
+ getLabel: (option) => option.label,
82
+ getValue: (option) => option.value,
83
+ },
84
+ type: {
85
+ type: 'select',
86
+ label: 'Type',
87
+ placeholder: () => `${t('Filter by')} ${t('Type').toLowerCase()}`,
79
88
  style: { flex: 1 },
80
89
  labelStyle: { flex: 1 },
81
90
  getLabel: (option) => option.label,
82
91
  getValue: (option) => option.value,
83
- filterOptions: (val) => {
84
- if (val) {
85
- const { option, filters } = val
86
- if (filters && option) {
87
- const { filters: optionFilters } = option;
88
- if (Array.isArray(optionFilters) && optionFilters.length) {
89
- const { value, condition } = optionFilters[0];
90
- if (condition === 'includes') {
91
- return value.includes('corporation');
92
- }
93
- }
94
- }
95
- }
96
- return true;
97
- },
98
92
  },
99
93
  positionInTheMineralSupplyChain: {
100
94
  type: 'select',
101
95
  label: 'Position',
102
- placeholder: (t) => `${t('Filter by')} ${t('Position').toLowerCase()}`,
96
+ placeholder: () => `${t('Filter by')} ${t('Position').toLowerCase()}`,
103
97
  style: { flex: 1 },
104
98
  labelStyle: { flex: 1 },
105
99
  getLabel: (option) => option.label,
@@ -108,7 +102,7 @@ export const getFiltersConfig = ({t}) => {
108
102
  status: {
109
103
  type: "select",
110
104
  label: "Status",
111
- placeholder: (t) => `${t("Filter by")} ${t("Status").toLowerCase()}`,
105
+ placeholder: () => `${t("Filter by")} ${t("Status").toLowerCase()}`,
112
106
  style: { flex: 1 },
113
107
  labelStyle: { fley: 1 },
114
108
  getLabel: (option) => option.label,
@@ -129,23 +123,26 @@ export const getFilterOptions = (options, t) => {
129
123
  stakeholderSubCategoriesOptions,
130
124
  administrativeLevel1,
131
125
  administrativeLevel2,
126
+ mineralOptions,
127
+ locationCategories = [],
132
128
  } = options || {};
133
129
 
134
130
  const _default = {
135
131
  category: stakeholderCategoryOptions || categoryOptions,
136
132
  country: countries,
137
- product: product,
133
+ product: mineralOptions,
134
+ type: locationCategories,
138
135
  administrativeLevel1,
139
136
  administrativeLevel2,
140
137
  subCategory: subCategoriesOptions,
141
138
  status: [
142
139
  {
143
140
  value: "submitted",
144
- label: "Submitted",
141
+ label: t("Submitted"),
145
142
  },
146
143
  {
147
144
  value: "private",
148
- label: "Private",
145
+ label: t("Private"),
149
146
  },
150
147
  ],
151
148
  }
@@ -4,7 +4,7 @@ import MoreMenu from '../../core/components/Table/MoreMenu/index.jsx';
4
4
  import TooltipIcon from '../../core/components/Icon/TooltipIcon.jsx';
5
5
  import { findOptions, camelCaseToTitle } from '../../../helpers/StringHelper.js';
6
6
  import { copyToClipboard } from '../../../helpers/copyToClipboard.js';
7
- import { partnershipTypes, partnerTypes } from './config.js';
7
+ import { getPartnershipTypes, getPartnerTypes } from './config.js';
8
8
 
9
9
  export const getColumns = ({
10
10
  t,
@@ -63,6 +63,7 @@ export const getColumns = ({
63
63
  return <div className="daf-default-cell" />;
64
64
  }
65
65
 
66
+ const partnershipTypes = getPartnershipTypes(t);
66
67
  return partnershipTypes.find((v) => v.value === val)?.label || val || "-";
67
68
  },
68
69
  },
@@ -76,6 +77,7 @@ export const getColumns = ({
76
77
  return <div className="daf-default-cell" />;
77
78
  }
78
79
 
80
+ const partnerTypes = getPartnerTypes(t);
79
81
  return partnerTypes.find((v) => v.value === val)?.label || val || "-";
80
82
  },
81
83
  },
@@ -20,13 +20,17 @@ export const checkboxConfig = {
20
20
  datastakeId: "ID",
21
21
  };
22
22
 
23
- export const partnerTypes = [
24
- { label: "Individual", value: "individual" },
25
- { label: "Organisation", value: "organisation" },
26
- ];
23
+ export const getPartnerTypes = (t) => {
24
+ return [
25
+ { label: t("Individual"), value: "individual" },
26
+ { label: t("Organisation"), value: "organisation" },
27
+ ]
28
+ }
27
29
 
28
- export const partnershipTypes = [
29
- { label: "Source", value: "source" },
30
- { label: "Client", value: "client" },
31
- { label: "Exchange", value: "exchange" },
32
- ];
30
+ export const getPartnershipTypes = (t) => {
31
+ return [
32
+ { label: t("Source"), value: "source" },
33
+ { label: t("Client"), value: "client" },
34
+ { label: t("Exchange"), value: "exchange" },
35
+ ]
36
+ }
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react'
2
2
  import { message } from 'antd';
3
3
  import PartnerService from '../../services/PartnerService.js';
4
4
  import DynamicForm from '../../core/components/DynamicForm/index.jsx';
5
- import { partnershipTypes, partnerTypes } from './config.js';
5
+ import { getPartnerTypes, getPartnershipTypes } from './config.js';
6
6
 
7
7
  const data = {};
8
8
 
@@ -22,6 +22,9 @@ const Create = ({
22
22
  getApiBaseUrl = () => {},
23
23
  }) => {
24
24
 
25
+ const partnerTypes = useMemo(() => getPartnerTypes(t), [t]);
26
+ const partnershipTypes = useMemo(() => getPartnershipTypes(t), [t]);
27
+
25
28
  const form = useMemo(
26
29
  () => ({
27
30
  identification: {
@@ -49,7 +52,7 @@ const Create = ({
49
52
  dataId: "partnerType",
50
53
  options: partnerTypes.map((o) => ({ ...o, label: t(o.label) })),
51
54
  rules: [{ required: true, message: "errors::field is required" }],
52
- },
55
+ },
53
56
  nickName: {
54
57
  label: {
55
58
  "partnerType is individual": t("Person name"),
@@ -1,9 +1,9 @@
1
- import React, { useState, useEffect } from 'react'
1
+ import React, { useState, useEffect, useMemo } from 'react'
2
2
  import { Form, Input, Select } from "antd";
3
3
  import PartnerService from '../../services/PartnerService.js';
4
4
  import Loading from '../../core/components/Loading/index.jsx';
5
5
  import ProjectVisualisationFooter from '../../core/components/ProjectVisualisation/Footer.js';
6
- import { partnershipTypes } from './config.js';
6
+ import { getPartnerTypes, getPartnershipTypes } from './config.js';
7
7
  import { licensingOptions } from '../../core/components/DataStore/components/Settings/config.js';
8
8
 
9
9
  const Edit = ({
@@ -14,6 +14,8 @@ const Edit = ({
14
14
  }) => {
15
15
  const [MainForm] = Form.useForm();
16
16
  const [loading, setLoading] = useState(false);
17
+ const partnerTypes = useMemo(() => getPartnerTypes(t), [t]);
18
+ const partnershipTypes = useMemo(() => getPartnershipTypes(t), [t]);
17
19
 
18
20
  useEffect(() => {
19
21
  MainForm.setFieldsValue({ ...partner, licensing: 'no_citation' });
@@ -14,6 +14,8 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
14
14
  title: t('ID'),
15
15
  ellipsis: true,
16
16
  show: true,
17
+ key: "datastakeId",
18
+ sorter: () => 0 + 0,
17
19
  render: (v, all) => {
18
20
  if (all.empty) {
19
21
  return <div className="daf-default-cell" />
@@ -27,6 +29,8 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
27
29
  title: t('Name'),
28
30
  ellipsis: true,
29
31
  show: true,
32
+ key: "name",
33
+ sorter: () => 0 + 0,
30
34
  render: (v, all) => {
31
35
  if (all.empty) {
32
36
  return <div className="daf-default-cell" />
@@ -55,6 +59,8 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
55
59
  title: t('Legal Form'),
56
60
  ellipsis: true,
57
61
  show: true,
62
+ key: "subCategory",
63
+ sorter: () => 0 + 0,
58
64
  render: (v, all) => {
59
65
  if (all.empty) {
60
66
  return <div className="daf-default-cell" />
@@ -3,7 +3,7 @@ export const getFiltersConfig = ({t}) => {
3
3
  country: {
4
4
  type: 'select',
5
5
  label: 'Country',
6
- placeholder: (t) => `${t('Filter by')} ${t('Country').toLowerCase()}`,
6
+ placeholder: () => `${t('Filter by')} ${t('Country').toLowerCase()}`,
7
7
  style: { flex: 1 },
8
8
  labelStyle: { flex: 1 },
9
9
  getLabel: (option) => option.label,
@@ -27,7 +27,7 @@ export const getFiltersConfig = ({t}) => {
27
27
 
28
28
  return t('Province');
29
29
  },
30
- placeholder: (t) => `${t('Filter by')} ${t('Province').toLowerCase()}`,
30
+ placeholder: () => `${t('Filter by')} ${t('Province').toLowerCase()}`,
31
31
  filters: (data) => ({
32
32
  country: data.country,
33
33
  level: 'level_1',
@@ -59,7 +59,7 @@ export const getFiltersConfig = ({t}) => {
59
59
  return t('Province');
60
60
  },
61
61
  show: (data) => !(data.country && data.administrativeLevel1),
62
- placeholder: (t) => `${t('Filter by')} ${t('Territory').toLowerCase()}`,
62
+ placeholder: () => `${t('Filter by')} ${t('Territory').toLowerCase()}`,
63
63
  filters: (data) => ({
64
64
  country: data.country,
65
65
  level: 'level_2',
@@ -75,7 +75,7 @@ export const getFiltersConfig = ({t}) => {
75
75
  subCategory: {
76
76
  type: 'select',
77
77
  label: 'Sub Category',
78
- placeholder: (t) => `${t('Filter by')} ${t('Sub Category').toLowerCase()}`,
78
+ placeholder: () => `${t('Filter by')} ${t('Sub Category').toLowerCase()}`,
79
79
  style: { flex: 1 },
80
80
  labelStyle: { flex: 1 },
81
81
  getLabel: (option) => option.label,
@@ -99,7 +99,7 @@ export const getFiltersConfig = ({t}) => {
99
99
  positionInTheMineralSupplyChain: {
100
100
  type: 'select',
101
101
  label: 'Position',
102
- placeholder: (t) => `${t('Filter by')} ${t('Position').toLowerCase()}`,
102
+ placeholder: () => `${t('Filter by')} ${t('Position').toLowerCase()}`,
103
103
  style: { flex: 1 },
104
104
  labelStyle: { flex: 1 },
105
105
  getLabel: (option) => option.label,
@@ -108,7 +108,7 @@ export const getFiltersConfig = ({t}) => {
108
108
  status: {
109
109
  type: "select",
110
110
  label: "Status",
111
- placeholder: (t) => `${t("Filter by")} ${t("Status").toLowerCase()}`,
111
+ placeholder: () => `${t("Filter by")} ${t("Status").toLowerCase()}`,
112
112
  style: { flex: 1 },
113
113
  labelStyle: { fley: 1 },
114
114
  getLabel: (option) => option.label,
@@ -139,11 +139,11 @@ export const getFilterOptions = (options, t) => {
139
139
  status: [
140
140
  {
141
141
  value: "submitted",
142
- label: "Submitted",
142
+ label: t("Submitted"),
143
143
  },
144
144
  {
145
145
  value: "private",
146
- label: "Private",
146
+ label: t("Private"),
147
147
  },
148
148
  ],
149
149
  }
@@ -8,24 +8,28 @@ import sourceAvatarConfig from '../../../../helpers/sourceAvatarConfig.js';
8
8
  import { renderStatusTag } from '../../../utils/tags.js';
9
9
 
10
10
  export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data, applications}) => [
11
- // {
12
- // dataIndex: 'datastakeId',
13
- // title: t('ID'),
14
- // ellipsis: true,
15
- // show: true,
16
- // render: (v, all) => {
17
- // if (all.empty) {
18
- // return <div className="daf-default-cell" />
19
- // }
11
+ {
12
+ dataIndex: 'datastakeId',
13
+ title: t('Title'),
14
+ ellipsis: true,
15
+ show: true,
16
+ key: "datastakeId",
17
+ sorter: () => 0 + 0,
18
+ render: (v, all) => {
19
+ if (all.empty) {
20
+ return <div className="daf-default-cell" />
21
+ }
20
22
 
21
- // return <Tooltip title={v}>{v}</Tooltip>;
22
- // },
23
- // },
23
+ return <Tooltip title={v}>{v}</Tooltip>;
24
+ },
25
+ },
24
26
  {
25
27
  dataIndex: 'name',
26
28
  title: t('Name'),
27
29
  ellipsis: true,
28
30
  show: true,
31
+ key: "name",
32
+ sorter: () => 0 + 0,
29
33
  render: (v, all) => {
30
34
  if (all.empty) {
31
35
  return <div className="daf-default-cell" />
@@ -36,9 +40,11 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
36
40
  },
37
41
  {
38
42
  dataIndex: 'mineSite',
39
- title: t('Position'),
43
+ title: t('Site'),
40
44
  ellipsis: true,
41
45
  show: true,
46
+ key: "mineSite",
47
+ sorter: () => 0 + 0,
42
48
  render: (v, all) => {
43
49
  if (all.empty) {
44
50
  return <div className="daf-default-cell" />