datastake-daf 0.6.816 → 0.6.818

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 (37) hide show
  1. package/dist/components/index.js +1236 -1281
  2. package/dist/pages/index.js +1326 -426
  3. package/dist/services/index.js +202 -0
  4. package/dist/utils/index.js +28 -0
  5. package/package.json +1 -1
  6. package/public/Vegetation/damage-from-insects-default.svg +1 -0
  7. package/public/Vegetation/dry-or-dead-default.svg +1 -0
  8. package/public/Vegetation/healthy-default.svg +1 -0
  9. package/public/Vegetation/yellowing.svg +1 -0
  10. package/src/@daf/core/components/Charts/RadarChart/index.jsx +51 -9
  11. package/src/@daf/core/components/Charts/style.js +0 -1
  12. package/src/@daf/core/components/Dashboard/Map/ChainIcon/index.js +123 -104
  13. package/src/@daf/core/components/Table/index.jsx +11 -6
  14. package/src/@daf/pages/Events/Activities/columns.js +15 -11
  15. package/src/@daf/pages/Events/Incidents/columns.js +15 -11
  16. package/src/@daf/pages/Events/Testimonials/columns.js +173 -0
  17. package/src/@daf/pages/Events/Testimonials/config.js +175 -0
  18. package/src/@daf/pages/Events/columns.js +7 -3
  19. package/src/@daf/pages/Locations/ConflictAreas/columns.js +140 -0
  20. package/src/@daf/pages/Locations/ConflictAreas/config.js +41 -0
  21. package/src/@daf/pages/Locations/MineSite/columns.js +21 -12
  22. package/src/@daf/pages/Locations/MineSite/config.js +2 -1
  23. package/src/@daf/pages/Locations/columns.js +7 -3
  24. package/src/@daf/pages/Stakeholders/ArmedGroups/columns.js +110 -0
  25. package/src/@daf/pages/Stakeholders/ArmedGroups/config.js +41 -0
  26. package/src/@daf/pages/Stakeholders/Operators/columns.js +30 -14
  27. package/src/@daf/pages/Stakeholders/Workers/columns.js +23 -13
  28. package/src/@daf/pages/Stakeholders/columns.js +8 -4
  29. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/BiodiversityHabitat/index.jsx +4 -2
  30. package/src/@daf/pages/TablePage/config.js +1 -1
  31. package/src/@daf/pages/TablePage/helper.js +45 -0
  32. package/src/@daf/services/EventsService.js +115 -0
  33. package/src/@daf/services/LinkedSubjects.js +1 -0
  34. package/src/@daf/services/WorkersService.js +80 -0
  35. package/src/helpers/errorHandling.js +142 -74
  36. package/src/services.js +3 -1
  37. package/src/utils.js +1 -1
@@ -0,0 +1,175 @@
1
+ import { getStatusOptions } from '../../../utils/filters';
2
+
3
+ export const getFiltersConfig = ({t}) => {
4
+ return {
5
+ timeframe: {
6
+ type: "timeframe",
7
+ label: "Timeframe",
8
+ style: { flex: 1 },
9
+ t: t,
10
+ },
11
+ country: {
12
+ type: 'select',
13
+ label: 'Country',
14
+ placeholder: () => `${t('Filter by')} ${t('Country').toLowerCase()}`,
15
+ style: { flex: 1 },
16
+ labelStyle: { flex: 1 },
17
+ getLabel: (option) => option.label,
18
+ getValue: (option) => option.value,
19
+ },
20
+ administrativeLevel1: {
21
+ type: 'ajaxSelect',
22
+ label: ({ t = (s) => s, options = {}, filters = {}, language = 'en' }) => {
23
+ const { administrativeLevel1 } = options;
24
+
25
+ if (administrativeLevel1) {
26
+ if (options.country) {
27
+ const _item = administrativeLevel1[filters.country];
28
+ if (_item) {
29
+ if (_item[language]) {
30
+ return _item[language]
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ return t('Province');
37
+ },
38
+ placeholder: () => `${t('Filter by')} ${t('Province').toLowerCase()}`,
39
+ filters: (data) => ({
40
+ country: data.country,
41
+ level: 'level_1',
42
+ }),
43
+ show: (data) => !data.country,
44
+ disabled: (data) => !data.country,
45
+ mapper: { label: "name", value: "id" },
46
+ method: 'getOptions',
47
+ entity: 'AdministrativeLevel',
48
+ style: { flex: 1 },
49
+ labelStyle: { flex: 1 },
50
+ },
51
+ administrativeLevel2: {
52
+ type: 'ajaxSelect',
53
+ label: ({ t = (s) => s, options = {}, filters = {}, language = 'en' }) => {
54
+ const { administrativeLevel2 } = options;
55
+
56
+ if (administrativeLevel2) {
57
+ if (options.country) {
58
+ const _item = administrativeLevel2[filters.country];
59
+ if (_item) {
60
+ if (_item[language]) {
61
+ return _item[language]
62
+ }
63
+ }
64
+ }
65
+ }
66
+
67
+ return t('Province');
68
+ },
69
+ show: (data) => !(data.country && data.administrativeLevel1),
70
+ placeholder: () => `${t('Filter by')} ${t('Territory').toLowerCase()}`,
71
+ filters: (data) => ({
72
+ country: data.country,
73
+ level: 'level_2',
74
+ administrativeLevel1: data.administrativeLevel1,
75
+ }),
76
+ disabled: (data) => !(data.country && data.administrativeLevel1),
77
+ mapper: { label: "name", value: "id" },
78
+ method: 'getOptions',
79
+ entity: 'AdministrativeLevel',
80
+ style: { flex: 1 },
81
+ labelStyle: { flex: 1 },
82
+ },
83
+ eventCategory: {
84
+ type: 'select',
85
+ label: 'Category',
86
+ placeholder: () => `${t('Filter by')} ${t('Category').toLowerCase()}`,
87
+ style: { flex: 1 },
88
+ labelStyle: { flex: 1 },
89
+ getLabel: (option) => option.label,
90
+ getValue: (option) => option.value,
91
+ filterOptions: (val) => {
92
+ if (val) {
93
+ const { option, filters } = val
94
+ if (filters && option) {
95
+ const { filters: optionFilters } = option;
96
+ if (Array.isArray(optionFilters) && optionFilters.length) {
97
+ const { value, condition } = optionFilters[0];
98
+ if (condition === 'includes') {
99
+ return value.includes('corporation');
100
+ }
101
+ }
102
+ }
103
+ }
104
+ return true;
105
+ },
106
+ },
107
+ // positionInTheMineralSupplyChain: {
108
+ // type: 'select',
109
+ // label: 'Position',
110
+ // placeholder: () => `${t('Filter by')} ${t('Position').toLowerCase()}`,
111
+ // style: { flex: 1 },
112
+ // labelStyle: { flex: 1 },
113
+ // getLabel: (option) => option.label,
114
+ // getValue: (option) => option.value,
115
+ // },
116
+ status: {
117
+ type: "select",
118
+ label: "Status",
119
+ placeholder: () => `${t("Filter by")} ${t("Status").toLowerCase()}`,
120
+ style: { flex: 1 },
121
+ labelStyle: { fley: 1 },
122
+ getLabel: (option) => option.label,
123
+ getValue: (option) => option.value,
124
+ },
125
+ }
126
+ }
127
+
128
+ export const getFilterOptions = (options, t) => {
129
+ const {
130
+ timeframe = [],
131
+ statusOptions,
132
+ categoryOptions,
133
+ countries,
134
+ subCategory,
135
+ category,
136
+ stakeholderCategoryOptions,
137
+ stakeholderSubCategoriesOptions,
138
+ administrativeLevel1,
139
+ administrativeLevel2,
140
+ positionInMineralSupplyChainOptions,
141
+ subCategoriesOptions,
142
+ eventCategoryOptions,
143
+ } = options || {};
144
+
145
+ const _categoryOptions = (eventCategoryOptions || categoryOptions || [])?.map((item) => ({
146
+ value: item.value,
147
+ label: typeof item.label === 'object' ? Object.values(item.label)[1] : item.label,
148
+ }))
149
+
150
+ const _default = {
151
+ timeframe: timeframe,
152
+ status: getStatusOptions(t) || [],
153
+ eventCategory: _categoryOptions || [],
154
+ country: countries || [],
155
+ subCategory: subCategoriesOptions || [],
156
+ // category: category,
157
+ administrativeLevel1,
158
+ administrativeLevel2,
159
+ // positionInTheMineralSupplyChain: positionInMineralSupplyChainOptions || [],
160
+ }
161
+
162
+ return _default;
163
+ }
164
+
165
+ export const formConfig = {
166
+ namespace: 'testimonials',
167
+ view: 'testimonials',
168
+ scope: 'create',
169
+ formType: 'testimonial',
170
+ }
171
+
172
+ export const viewConfig = {
173
+ title: "Testimonials",
174
+ createTitle: "New Testimonial",
175
+ }
@@ -147,13 +147,17 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
147
147
  key: "sources",
148
148
  show: activeTab !== "own",
149
149
  render: (val, all) => {
150
- if (all.empty) {
151
- return <div className="daf-default-cell" />;
150
+ if (all.empty) {
151
+ return <div className="daf-default-cell" />;
152
+ }
153
+
154
+ if (!val || val?.length === 0) {
155
+ return "-";
152
156
  }
153
157
 
154
158
  const sources = sourceAvatarConfig(val, user, applications);
155
159
 
156
- return <AvatarGroup items={sources}></AvatarGroup>;
160
+ return <AvatarGroup items={sources} />;
157
161
  },
158
162
  },
159
163
  {
@@ -0,0 +1,140 @@
1
+ import React from 'react';
2
+ import { Tooltip } from 'antd';
3
+ import { findOptions, getLinkValue } from '../../../../helpers/StringHelper.js';
4
+ import { renderDateFormatted } from '../../../../helpers/Forms.js';
5
+ import CustomIcon from '../../../core/components/Icon/CustomIcon.jsx';
6
+ import AvatarGroup from '../../../core/components/AvatarGroup/index.jsx';
7
+ import sourceAvatarConfig from '../../../../helpers/sourceAvatarConfig.js';
8
+ import MoreMenu from '../../../core/components/Table/MoreMenu/index.jsx';
9
+ import NavigationAction from '../../../core/components/Table/NavigationAction/index.jsx';
10
+ import { renderStatusTag } from '../../../utils/tags.js';
11
+
12
+ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data, applications}) => [
13
+ {
14
+ dataIndex: 'datastakeId',
15
+ title: t('ID'),
16
+ ellipsis: true,
17
+ show: true,
18
+ key: "datastakeId",
19
+ sorter: () => 0 + 0,
20
+ render: (v, all) => {
21
+ if (all.empty) {
22
+ return <div className="daf-default-cell" />
23
+ }
24
+
25
+ return <Tooltip title={v}>{v}</Tooltip>;
26
+ },
27
+ },
28
+ {
29
+ dataIndex: "name",
30
+ title: t('Name'),
31
+ ellipsis: true,
32
+ show: true,
33
+ key: "name",
34
+ sorter: () => 0 + 0,
35
+ render: (v, all) => {
36
+ if (all.empty) {
37
+ return <div className="daf-default-cell" />
38
+ }
39
+
40
+ return <Tooltip title={v}>{v}</Tooltip>;
41
+ },
42
+ },
43
+ {
44
+ dataIndex: 'region',
45
+ title: findOptions(user?.company?.country, options?.administrativeLevel1)?.length > 2 ? findOptions(user?.company?.country, options?.administrativeLevel1) : t("Province"),
46
+ ellipsis: true,
47
+ show: true,
48
+ render: (v, all) => {
49
+ if (all.empty) {
50
+ return <div className="daf-default-cell" />
51
+ }
52
+
53
+ const region = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
54
+
55
+ return region ? <Tooltip title={region}>{region}</Tooltip> : '-';
56
+ },
57
+ },
58
+ {
59
+ dataIndex: 'territory',
60
+ title: findOptions(user?.company?.country, options?.administrativeLevel2)?.length > 2 ? findOptions(user?.company?.country, options?.administrativeLevel2) : t("Territory"),
61
+ ellipsis: true,
62
+ show: true,
63
+ render: (v, all) => {
64
+ if (all.empty) {
65
+ return <div className="daf-default-cell" />
66
+ }
67
+
68
+ const district = getLinkValue(all?.administrativeLevel2, all?.linking?.SCL);
69
+
70
+ return district ? <Tooltip title={district}>{district}</Tooltip> : '-';
71
+ },
72
+ },
73
+ {
74
+ title: t("Last Update"),
75
+ dataIndex: "updatedAt",
76
+ key: "updatedAt",
77
+ render: (date, all) => {
78
+ if (all.empty) {
79
+ return <div className="daf-default-cell" />;
80
+ }
81
+
82
+ const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
83
+ return <Tooltip title={_date}>{_date}</Tooltip>;
84
+ },
85
+ ellipsis: true,
86
+ },
87
+ {
88
+ title: t("Sources"),
89
+ dataIndex: "sources",
90
+ key: "sources",
91
+ show: activeTab !== "own",
92
+ render: (val, all) => {
93
+ if (all.empty) {
94
+ return <div className="daf-default-cell" />;
95
+ }
96
+
97
+ if (!val || val?.length === 0) {
98
+ return "-";
99
+ }
100
+
101
+ const sources = sourceAvatarConfig(val, user, applications);
102
+
103
+ return <AvatarGroup items={sources} />;
104
+ },
105
+ },
106
+ {
107
+ title: t("Status"),
108
+ dataIndex: 'status',
109
+ ellipsis: true,
110
+ show: activeTab == "own",
111
+ render: (v, all) => {
112
+ if (all.empty) {
113
+ return <div className="daf-default-cell" />
114
+ }
115
+ const _val = all?.published || all?.status === "submitted" ? "submitted" : v;
116
+
117
+ return renderStatusTag({ value: _val, t });
118
+ },
119
+ },
120
+ {
121
+ id: 'actions',
122
+ title: "",
123
+ width: 60,
124
+ render: (_, all) => {
125
+ if (all.empty) {
126
+ return <div className="daf-default-cell" />;
127
+ }
128
+
129
+ const onClick = () => {
130
+ let link = `/app/view/${subject}/${all.datastakeId}`;
131
+ if (activeTab === "shared") {
132
+ link += `?sourceId=${all?.authorId?.id}`;
133
+ }
134
+ goTo(getRedirectLink(link));
135
+ };
136
+
137
+ return <NavigationAction onClick={onClick} theme={theme} />;
138
+ }
139
+ }
140
+ ].filter((column) => column.show !== false);
@@ -0,0 +1,41 @@
1
+ import { getStatusOptions } from '../../../utils/filters';
2
+
3
+ export const getFiltersConfig = ({t}) => {
4
+ return {
5
+ status: {
6
+ type: "select",
7
+ label: "Status",
8
+ placeholder: () => `${t("Filter by")} ${t("Status").toLowerCase()}`,
9
+ style: { flex: 1 },
10
+ labelStyle: { fley: 1 },
11
+ getLabel: (option) => option.label,
12
+ getValue: (option) => option.value,
13
+ },
14
+ timeframe: {
15
+ type: "timeframe",
16
+ label: "Timeframe",
17
+ style: { flex: 1 },
18
+ },
19
+ }
20
+ }
21
+
22
+ export const getFilterOptions = (options, t) => {
23
+ const _default = {
24
+ status: getStatusOptions(t) || [],
25
+ timeframe: [],
26
+ }
27
+
28
+ return _default;
29
+ }
30
+
31
+ export const formConfig = {
32
+ namespace: 'conflict-areas',
33
+ view: ['scoping', 'new'],
34
+ scope: 'conflictAreaCreate',
35
+ formType: 'conflict-area',
36
+ }
37
+
38
+ export const viewConfig = {
39
+ title: "Conflict Areas",
40
+ createTitle: "New Conflict Area",
41
+ }
@@ -50,7 +50,11 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
50
50
  return <div className="daf-default-cell" />
51
51
  }
52
52
 
53
- const locationCategories = [...(data?.options?.locationCategories || []), ...(options?.productionSiteCategories || [])]
53
+ const locationCategories = [
54
+ ...(data?.options?.locationCategories || []),
55
+ ...(options?.productionSiteCategories || []),
56
+ ...(options?.locationCategories || [])
57
+ ]
54
58
 
55
59
  const category = findOptions(v, locationCategories);
56
60
 
@@ -145,20 +149,25 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
145
149
  return renderStatusTag({ value: _val, t });
146
150
  },
147
151
  },
148
-
149
- {
150
- title: t("Sources"),
151
- dataIndex: 'sources',
152
- ellipsis: true,
153
- show: activeTab !== "own",
154
- render: (v, all) => {
152
+ {
153
+ title: t("Sources"),
154
+ dataIndex: "sources",
155
+ key: "sources",
156
+ show: activeTab !== "own",
157
+ render: (val, all) => {
155
158
  if (all.empty) {
156
- return <div className="daf-default-cell" />
159
+ return <div className="daf-default-cell" />;
157
160
  }
158
- const sources = sourceAvatarConfig(v, user, applications);
159
- return <AvatarGroup items={sources}></AvatarGroup>;
160
- },
161
+
162
+ if (!val || val?.length === 0) {
163
+ return "-";
164
+ }
165
+
166
+ const sources = sourceAvatarConfig(val, user, applications);
167
+
168
+ return <AvatarGroup items={sources} />;
161
169
  },
170
+ },
162
171
  {
163
172
  id: 'actions',
164
173
  title: "",
@@ -1,6 +1,6 @@
1
1
  import { getStatusOptions } from '../../../utils/filters';
2
2
 
3
- export const getFiltersConfig = ({t}) => {
3
+ export const getFiltersConfig = ({t, screen}) => {
4
4
  return {
5
5
  country: {
6
6
  type: 'select',
@@ -91,6 +91,7 @@ export const getFiltersConfig = ({t}) => {
91
91
  labelStyle: { flex: 1 },
92
92
  getLabel: (option) => option.label,
93
93
  getValue: (option) => option.value,
94
+ show: () => screen === 'scl',
94
95
  },
95
96
  positionInTheMineralSupplyChain: {
96
97
  type: 'select',
@@ -105,11 +105,15 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
105
105
  return <div className="daf-default-cell" />;
106
106
  }
107
107
 
108
- const sources = sourceAvatarConfig(val, user, applications);
108
+ if (!val || val?.length === 0) {
109
+ return "-";
110
+ }
111
+
112
+ const sources = sourceAvatarConfig(val, user, applications);
109
113
 
110
- return <AvatarGroup items={sources}></AvatarGroup>;
114
+ return <AvatarGroup items={sources} />;
111
115
  },
112
- },
116
+ },
113
117
  {
114
118
  title: t("Last Update"),
115
119
  dataIndex: "updatedAt",
@@ -0,0 +1,110 @@
1
+ import React from 'react';
2
+ import { Tooltip } from 'antd';
3
+ import { findOptions, getLinkValue } from '../../../../helpers/StringHelper.js';
4
+ import { renderDateFormatted } from '../../../../helpers/Forms.js';
5
+ import CustomIcon from '../../../core/components/Icon/CustomIcon.jsx';
6
+ import AvatarGroup from '../../../core/components/AvatarGroup/index.jsx';
7
+ import sourceAvatarConfig from '../../../../helpers/sourceAvatarConfig.js';
8
+ import MoreMenu from '../../../core/components/Table/MoreMenu/index.jsx';
9
+ import NavigationAction from '../../../core/components/Table/NavigationAction/index.jsx';
10
+ import { renderStatusTag } from '../../../utils/tags.js';
11
+
12
+ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data, applications}) => [
13
+ {
14
+ dataIndex: 'datastakeId',
15
+ title: t('ID'),
16
+ ellipsis: true,
17
+ show: true,
18
+ key: "datastakeId",
19
+ sorter: () => 0 + 0,
20
+ render: (v, all) => {
21
+ if (all.empty) {
22
+ return <div className="daf-default-cell" />
23
+ }
24
+
25
+ return <Tooltip title={v}>{v}</Tooltip>;
26
+ },
27
+ },
28
+ {
29
+ dataIndex: 'name',
30
+ title: t('Name'),
31
+ ellipsis: true,
32
+ show: true,
33
+ key: "name",
34
+ sorter: () => 0 + 0,
35
+ render: (v, all) => {
36
+ if (all.empty) {
37
+ return <div className="daf-default-cell" />
38
+ }
39
+
40
+ return <Tooltip title={v}>{v}</Tooltip>;
41
+ },
42
+ },
43
+ {
44
+ title: t("Last Update"),
45
+ dataIndex: "updatedAt",
46
+ key: "updatedAt",
47
+ render: (date, all) => {
48
+ if (all.empty) {
49
+ return <div className="daf-default-cell" />;
50
+ }
51
+
52
+ const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
53
+ return <Tooltip title={_date}>{_date}</Tooltip>;
54
+ },
55
+ ellipsis: true,
56
+ },
57
+ {
58
+ title: t("Sources"),
59
+ dataIndex: "sources",
60
+ key: "sources",
61
+ show: activeTab !== "own",
62
+ render: (val, all) => {
63
+ if (all.empty) {
64
+ return <div className="daf-default-cell" />;
65
+ }
66
+
67
+ if (!val || val?.length === 0) {
68
+ return "-";
69
+ }
70
+
71
+ const sources = sourceAvatarConfig(val, user, applications);
72
+
73
+ return <AvatarGroup items={sources} />;
74
+ },
75
+ },
76
+ {
77
+ title: t("Status"),
78
+ dataIndex: 'status',
79
+ ellipsis: true,
80
+ show: activeTab == "own",
81
+ render: (v, all) => {
82
+ if (all.empty) {
83
+ return <div className="daf-default-cell" />
84
+ }
85
+ const _val = all?.published || all?.status === "submitted" ? "submitted" : v;
86
+
87
+ return renderStatusTag({ value: _val, t });
88
+ },
89
+ },
90
+ {
91
+ id: 'actions',
92
+ title: "",
93
+ width: 60,
94
+ render: (_, all) => {
95
+ if (all.empty) {
96
+ return <div className="daf-default-cell" />;
97
+ }
98
+
99
+ const onClick = () => {
100
+ let link = `/app/view/${subject}/${all.datastakeId}`;
101
+ if (activeTab === "shared") {
102
+ link += `?sourceId=${all?.authorId?.id}`;
103
+ }
104
+ goTo(getRedirectLink(link));
105
+ };
106
+
107
+ return <NavigationAction onClick={onClick} theme={theme} />;
108
+ }
109
+ }
110
+ ].filter((column) => column.show !== false);
@@ -0,0 +1,41 @@
1
+ import { getStatusOptions } from '../../../utils/filters';
2
+
3
+ export const getFiltersConfig = ({t}) => {
4
+ return {
5
+ status: {
6
+ type: "select",
7
+ label: "Status",
8
+ placeholder: () => `${t("Filter by")} ${t("Status").toLowerCase()}`,
9
+ style: { flex: 1 },
10
+ labelStyle: { fley: 1 },
11
+ getLabel: (option) => option.label,
12
+ getValue: (option) => option.value,
13
+ },
14
+ timeframe: {
15
+ type: "timeframe",
16
+ label: "Timeframe",
17
+ style: { flex: 1 },
18
+ },
19
+ }
20
+ }
21
+
22
+ export const getFilterOptions = (options, t) => {
23
+ const _default = {
24
+ status: getStatusOptions(t) || [],
25
+ timeframe: [],
26
+ }
27
+
28
+ return _default;
29
+ }
30
+
31
+ export const formConfig = {
32
+ namespace: 'armed-groups',
33
+ view: ['scoping', 'new'],
34
+ scope: 'global',
35
+ formType: 'armed-group',
36
+ }
37
+
38
+ export const viewConfig = {
39
+ title: "Armed Groups",
40
+ createTitle: "New Armed Group",
41
+ }
@@ -49,7 +49,13 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
49
49
  return <div className="daf-default-cell" />
50
50
  }
51
51
 
52
- const country = findOptions(v, data?.options?.positionSupplyChainOptions || data?.options?.optionPositionSupplyChain);
52
+ const positionSupplyChainOptions = [
53
+ ...(data?.options?.positionSupplyChainOptions || []),
54
+ ...(options?.positionSupplyChainOptions || []),
55
+ ...(options?.optionPositionSupplyChain || [])
56
+ ]
57
+
58
+ const country = findOptions(v, positionSupplyChainOptions);
53
59
 
54
60
  return country ? <Tooltip title={country}>{country}</Tooltip> : '-';
55
61
  },
@@ -66,7 +72,13 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
66
72
  return <div className="daf-default-cell" />
67
73
  }
68
74
 
69
- const subCategory = findOptions(v, data?.options?.subCategoriesOptions || data?.options?.subCategory);
75
+ const subCategoriesOptions = [
76
+ ...(data?.options?.subCategoriesOptions || []),
77
+ ...(options?.subCategoriesOptions || []),
78
+ ...(options?.subCategory || [])
79
+ ]
80
+
81
+ const subCategory = findOptions(v, subCategoriesOptions);
70
82
 
71
83
  return subCategory ? <Tooltip title={subCategory}>{subCategory}</Tooltip> : '-';
72
84
  },
@@ -116,21 +128,25 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
116
128
  },
117
129
  ellipsis: true,
118
130
  },
119
- {
120
- title: t("Sources"),
121
- dataIndex: "sources",
122
- key: "sources",
123
- show: activeTab !== "own",
124
- render: (val, all) => {
125
- if (all.empty) {
126
- return <div className="daf-default-cell" />;
127
- }
131
+ {
132
+ title: t("Sources"),
133
+ dataIndex: "sources",
134
+ key: "sources",
135
+ show: activeTab !== "own",
136
+ render: (val, all) => {
137
+ if (all.empty) {
138
+ return <div className="daf-default-cell" />;
139
+ }
140
+
141
+ if (!val || val?.length === 0) {
142
+ return "-";
143
+ }
128
144
 
129
- const sources = sourceAvatarConfig(val, user, applications);
145
+ const sources = sourceAvatarConfig(val, user, applications);
130
146
 
131
- return <AvatarGroup items={sources}></AvatarGroup>;
132
- },
147
+ return <AvatarGroup items={sources} />;
133
148
  },
149
+ },
134
150
  {
135
151
  title: t("Status"),
136
152
  dataIndex: 'status',