datastake-daf 0.6.755 → 0.6.756
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.
- package/build/favicon.ico +0 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +25 -0
- package/build/robots.txt +3 -0
- package/dist/components/index.js +623 -581
- package/dist/hooks/index.js +11 -8
- package/dist/layouts/index.js +470 -448
- package/dist/pages/index.js +574 -510
- package/dist/utils/index.js +470 -448
- package/package.json +1 -1
- package/src/@daf/core/components/Graphs/components/BaseGraph.jsx +4 -2
- package/src/@daf/core/components/Icon/configs/ClockPlus.js +14 -0
- package/src/@daf/core/components/Icon/configs/WaziDarkIcon.js +15 -0
- package/src/@daf/core/components/Icon/configs/index.js +4 -0
- package/src/@daf/core/components/Screens/BaseScreen/index.jsx +3 -3
- package/src/@daf/hooks/useFilters.js +10 -8
- package/src/@daf/hooks/useWidgetFetch.js +3 -3
- package/src/@daf/pages/Dashboards/helper.js +3 -3
- package/src/@daf/pages/Documents/columns.js +2 -4
- package/src/@daf/pages/Events/Activities/index.jsx +1 -1
- package/src/@daf/pages/Events/columns.js +12 -14
- package/src/@daf/pages/Locations/MineSite/columns.js +16 -19
- package/src/@daf/pages/Locations/columns.js +2 -2
- package/src/@daf/pages/Stakeholders/Workers/columns.js +14 -4
- package/src/@daf/pages/Summary/Minesite/components/MineDetailsSection/index.js +1 -1
- package/src/@daf/pages/Summary/Minesite/index.jsx +1 -0
- package/src/@daf/pages/Summary/Operator/components/KeyInformation/config.js +7 -1
- package/src/@daf/pages/Summary/Operator/index.jsx +1 -0
- package/src/@daf/pages/Summary/components/InformationAvailability/index.js +1 -1
- package/src/@daf/pages/Summary/hook.js +5 -2
- package/src/styles/components/_dataLink.scss +1 -0
package/package.json
CHANGED
|
@@ -54,9 +54,10 @@ const BaseGraph = forwardRef(function BaseGraph(
|
|
|
54
54
|
|
|
55
55
|
requestAnimationFrame(() => {
|
|
56
56
|
fitView({
|
|
57
|
-
padding: 0.
|
|
57
|
+
padding: 0.4,
|
|
58
58
|
nodes: [...nodesToFit],
|
|
59
59
|
duration: withDuration ? 300 : undefined,
|
|
60
|
+
maxZoom: 0.8,
|
|
60
61
|
});
|
|
61
62
|
});
|
|
62
63
|
}, [JSON.stringify(nodesToFit), withDuration]);
|
|
@@ -82,8 +83,9 @@ const BaseGraph = forwardRef(function BaseGraph(
|
|
|
82
83
|
minZoom={minZoom}
|
|
83
84
|
maxZoom={maxZoom}
|
|
84
85
|
attributionPosition="top-left"
|
|
86
|
+
fitView={true} // zoom out on default
|
|
85
87
|
fitViewOptions={{
|
|
86
|
-
padding: 0.
|
|
88
|
+
padding: 0.2, //zoom out on default
|
|
87
89
|
duration: withDuration ? 300 : undefined,
|
|
88
90
|
}}
|
|
89
91
|
{...props}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const config = {
|
|
2
|
+
viewBox: "0 0 19 19",
|
|
3
|
+
children: (
|
|
4
|
+
<path
|
|
5
|
+
d="M17.3506 10.1375C17.3942 9.79224 17.4167 9.44041 17.4167 9.08333C17.4167 4.48096 13.6857 0.75 9.08333 0.75C4.48096 0.75 0.75 4.48096 0.75 9.08333C0.75 13.6857 4.48096 17.4167 9.08333 17.4167C9.44617 17.4167 9.80359 17.3935 10.1542 17.3485M9.08333 4.08333V9.08333L12.1986 10.641M14.9167 17.4167V12.4167M12.4167 14.9167H17.4167"
|
|
6
|
+
stroke="currentColor"
|
|
7
|
+
strokeWidth="1.5"
|
|
8
|
+
strokeLinecap="round"
|
|
9
|
+
strokeLinejoin="round"
|
|
10
|
+
/>
|
|
11
|
+
),
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default config;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const config = {
|
|
2
|
+
viewBox: '0 0 25 26',
|
|
3
|
+
children: (
|
|
4
|
+
<path
|
|
5
|
+
d="M12.5001 0C19.4037 2.39999e-07 25.0001 5.59644 25.0001 12.5C25.0001 19.0635 19.941 24.4456 13.5099 24.96C13.1457 24.9946 12.7787 25.0126 12.4103 25.0146H12.1056C5.42401 25.0146 0.00713129 19.5985 0.00695801 12.917C0.00242724 12.7787 0.000122101 12.6394 0.00012207 12.5C0.00012207 5.59644 5.59656 0 12.5001 0ZM12.1642 5.32715C8.53558 5.32715 5.65747 8.46702 5.65735 12.2588V13.4951C5.65735 17.287 8.5355 20.4268 12.1642 20.4268C15.7926 20.4264 18.671 17.2868 18.671 13.4951V12.2588C18.6709 8.46722 15.7925 5.32748 12.1642 5.32715ZM12.1642 6.42676C15.1149 6.42709 17.5703 9.00217 17.5704 12.2588V13.4951C17.5704 16.7518 15.115 19.3268 12.1642 19.3271C9.21313 19.3271 6.75696 16.7521 6.75696 13.4951V12.2588C6.75708 9.00197 9.21321 6.42676 12.1642 6.42676ZM11.7618 9.40918L8.86145 12.5166L8.51086 12.8926L8.86145 13.2676L11.7618 16.375L12.1642 16.8057L12.5665 16.375L15.4669 13.2676L15.8175 12.8926L15.4669 12.5166L12.5665 9.40918L12.1642 8.97852L11.7618 9.40918ZM13.798 13.4424L12.1632 15.1924L10.5294 13.4424H13.798ZM13.798 12.3418H10.5294L12.1632 10.5908L13.798 12.3418Z"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
/>
|
|
8
|
+
),
|
|
9
|
+
tag: ['logo']
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default config;
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
@@ -222,6 +222,8 @@ import Aid from "./Aid";
|
|
|
222
222
|
import Bear from "./Bear";
|
|
223
223
|
import Security from "./Security";
|
|
224
224
|
import Minus from "./Minus";
|
|
225
|
+
import ClockPlus from "./ClockPlus";
|
|
226
|
+
import WaziDarkIcon from "./WaziDarkIcon";
|
|
225
227
|
|
|
226
228
|
const config = {
|
|
227
229
|
AppAdmin,
|
|
@@ -448,6 +450,8 @@ const config = {
|
|
|
448
450
|
Bear,
|
|
449
451
|
Security,
|
|
450
452
|
Minus,
|
|
453
|
+
ClockPlus,
|
|
454
|
+
WaziDarkIcon,
|
|
451
455
|
};
|
|
452
456
|
|
|
453
457
|
export default config;
|
|
@@ -104,8 +104,8 @@ const BaseScreen = ({
|
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
useEffect(() => {
|
|
107
|
-
if (typeof data?.meta?.total === "number") {
|
|
108
|
-
setPagination((prev) => ({ ...prev, total: data?.meta?.total }));
|
|
107
|
+
if (typeof (data?.meta?.total || data?.totalItems) === "number") {
|
|
108
|
+
setPagination((prev) => ({ ...prev, total: (data?.meta?.total || data?.totalItems) }));
|
|
109
109
|
}
|
|
110
110
|
}, [data]);
|
|
111
111
|
|
|
@@ -161,7 +161,7 @@ const BaseScreen = ({
|
|
|
161
161
|
goNext={goNext}
|
|
162
162
|
canGoNext={canGoNext}
|
|
163
163
|
canGoPrev={canGoPrev}
|
|
164
|
-
totalItems={pagination.total}
|
|
164
|
+
totalItems={pagination.total || pagination.pageSize}
|
|
165
165
|
doTotalItems
|
|
166
166
|
onChangePagination={(val) => {
|
|
167
167
|
onTableChange({ ...pagination, current: 1, pageSize: val });
|
|
@@ -15,7 +15,7 @@ export const useFilters = ({
|
|
|
15
15
|
doPagination = true,
|
|
16
16
|
getRedirectLink,
|
|
17
17
|
}) => {
|
|
18
|
-
const params = useMemo(() => new URLSearchParams(location
|
|
18
|
+
const params = useMemo(() => new URLSearchParams(location?.search), [location?.search]);
|
|
19
19
|
const [activeFilters, setActiveFilters] = useState(
|
|
20
20
|
defaultActiveFilters || getDefaultActiveFilters(params, selectFiltersConfig, defaultPageSize, defaultUrlParams, doPagination)
|
|
21
21
|
);
|
|
@@ -69,9 +69,9 @@ export const useFilters = ({
|
|
|
69
69
|
if (typeof getRedirectLink === 'function') {
|
|
70
70
|
goTo(getRedirectLink(
|
|
71
71
|
view === 'mine-monitoring'
|
|
72
|
-
? (qs !== '' ? `${location
|
|
73
|
-
: doPagination ? `${location
|
|
74
|
-
: location
|
|
72
|
+
? (qs !== '' ? `${location?.pathname}?${qs}`
|
|
73
|
+
: doPagination ? `${location?.pathname}?page=${page}`
|
|
74
|
+
: location?.pathname)
|
|
75
75
|
: (qs !== '' ? `${`/app/${view}`}?${qs}`
|
|
76
76
|
: doPagination ? `${`/app/${view}`}?page=${page}`
|
|
77
77
|
: `${`/app/${view}`}`)
|
|
@@ -81,9 +81,9 @@ export const useFilters = ({
|
|
|
81
81
|
|
|
82
82
|
if (view === 'mine-monitoring') {
|
|
83
83
|
goTo(
|
|
84
|
-
qs !== '' ? `${location
|
|
85
|
-
: doPagination ? `${location
|
|
86
|
-
: location
|
|
84
|
+
qs !== '' ? `${location?.pathname}?${qs}`
|
|
85
|
+
: doPagination ? `${location?.pathname}?page=${page}`
|
|
86
|
+
: location?.pathname);
|
|
87
87
|
} else {
|
|
88
88
|
goTo(
|
|
89
89
|
qs !== '' ? `${`/app/${module}/${view}`}?${qs}`
|
|
@@ -91,7 +91,7 @@ export const useFilters = ({
|
|
|
91
91
|
: `${`/app/${module}/${view}`}`);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
}, [module, view, location
|
|
94
|
+
}, [module, view, location?.pathname, goTo, getRedirectLink, doPagination]);
|
|
95
95
|
|
|
96
96
|
const defaultFilters = useMemo(() => {
|
|
97
97
|
const def = {};
|
|
@@ -234,6 +234,8 @@ export const useFilters = ({
|
|
|
234
234
|
const canGoPrev = useMemo(() => pagination.current !== 1, [pagination]);
|
|
235
235
|
const canGoNext = useMemo(() => pagination.current !== totalPages && totalPages, [pagination, totalPages]);
|
|
236
236
|
|
|
237
|
+
console.log({totalPages, pagination})
|
|
238
|
+
|
|
237
239
|
const goPrev = () => {
|
|
238
240
|
if (!canGoPrev) {
|
|
239
241
|
return;
|
|
@@ -11,7 +11,7 @@ const individualIcon = <CustomIcon name="UserCircle" color="#6C737F" width={18}
|
|
|
11
11
|
const csIcon = <CustomIcon name="CivilSociety" color="#6C737F" width={18} height={18} />;
|
|
12
12
|
const leftIcon = (
|
|
13
13
|
<CustomIcon
|
|
14
|
-
name="
|
|
14
|
+
name="WaziDarkIcon"
|
|
15
15
|
color={theme.colorPrimary8}
|
|
16
16
|
width={16}
|
|
17
17
|
height={16}
|
|
@@ -19,14 +19,14 @@ const leftIcon = (
|
|
|
19
19
|
);
|
|
20
20
|
const middleIcon = (
|
|
21
21
|
<CustomIcon
|
|
22
|
-
name="
|
|
22
|
+
name="WaziDarkIcon"
|
|
23
23
|
color={theme.colorPrimary2}
|
|
24
24
|
width={16}
|
|
25
25
|
height={16}
|
|
26
26
|
/>
|
|
27
27
|
);
|
|
28
28
|
|
|
29
|
-
const rightIcon = <CustomIcon name="
|
|
29
|
+
const rightIcon = <CustomIcon name="WaziDarkIcon" color="white" width={16} height={16} />;
|
|
30
30
|
|
|
31
31
|
const mapIcon = (category) => {
|
|
32
32
|
switch (category) {
|
|
@@ -37,7 +37,6 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
37
37
|
title: t("Date"),
|
|
38
38
|
dataIndex: "date",
|
|
39
39
|
key: "date",
|
|
40
|
-
width: 125,
|
|
41
40
|
render: (date, all) => {
|
|
42
41
|
if (all.empty) {
|
|
43
42
|
return <div className="daf-default-cell" />;
|
|
@@ -58,19 +57,18 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
58
57
|
return <div className="daf-default-cell" />;
|
|
59
58
|
}
|
|
60
59
|
if (!val || val?.length === 0) {
|
|
61
|
-
return "
|
|
60
|
+
return "-";
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
const sources = sourceAvatarConfig(val, user, applications);
|
|
65
64
|
|
|
66
|
-
return <AvatarGroup items={sources}
|
|
65
|
+
return <AvatarGroup items={sources} />;
|
|
67
66
|
},
|
|
68
67
|
},
|
|
69
68
|
{
|
|
70
69
|
title: t("Last Update"),
|
|
71
70
|
dataIndex: "updatedAt",
|
|
72
71
|
key: "updatedAt",
|
|
73
|
-
width: 125,
|
|
74
72
|
render: (date, all) => {
|
|
75
73
|
if (all.empty) {
|
|
76
74
|
return <div className="daf-default-cell" />;
|
|
@@ -96,7 +96,7 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
96
96
|
})
|
|
97
97
|
|
|
98
98
|
if (val?.length === 0) {
|
|
99
|
-
return "
|
|
99
|
+
return "-";
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
return <MoreTags values={val} />;
|
|
@@ -106,19 +106,19 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
106
106
|
title: t("Date"),
|
|
107
107
|
dataIndex: "date",
|
|
108
108
|
key: "date",
|
|
109
|
-
testimonials: true,
|
|
110
|
-
incident: true,
|
|
111
|
-
correctiveActions: true,
|
|
109
|
+
// testimonials: true,
|
|
110
|
+
// incident: true,
|
|
111
|
+
// correctiveActions: true,
|
|
112
112
|
show: true,
|
|
113
|
-
sorter: () => 0 + 0,
|
|
114
|
-
searchType: "date",
|
|
115
|
-
width: 125,
|
|
113
|
+
// sorter: () => 0 + 0,
|
|
114
|
+
// searchType: "date",
|
|
115
|
+
// width: 125,
|
|
116
116
|
render: (date, all) => {
|
|
117
117
|
if (all.empty) {
|
|
118
118
|
return null;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
const title = date ? renderDateFormatted(date, "DD MMM YYYY") : "
|
|
121
|
+
const title = date ? renderDateFormatted(date, "DD MMM YYYY") : "-";
|
|
122
122
|
return <Tooltip title={title}>{title}</Tooltip>;
|
|
123
123
|
},
|
|
124
124
|
ellipsis: true,
|
|
@@ -134,13 +134,13 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
if (!value) {
|
|
137
|
-
return "
|
|
137
|
+
return "-";
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
// Form the moment the intend of the if block is to be executed only in event table
|
|
141
141
|
if (typeof value === "string") {
|
|
142
142
|
if (all.navigationEventType === "other") {
|
|
143
|
-
return "
|
|
143
|
+
return "-";
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
const categoryOptions = (data?.options?.categoryOptions || []).map((c) => {
|
|
@@ -158,13 +158,13 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
158
158
|
...(data?.options?.testimonialsType || []),
|
|
159
159
|
];
|
|
160
160
|
|
|
161
|
-
const title = relaxantOptions.find((v) => v.value === value)?.label || "
|
|
161
|
+
const title = relaxantOptions.find((v) => v.value === value)?.label || "-";
|
|
162
162
|
|
|
163
163
|
return <Tooltip title={title}>{title}</Tooltip>;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
const val = value.map((v, i) => ({ label: v.name, value: `${v.name}-${i}` }));
|
|
167
|
-
return val.length ? <MoreTags values={val} /> : "
|
|
167
|
+
return val.length ? <MoreTags values={val} /> : "-";
|
|
168
168
|
},
|
|
169
169
|
},
|
|
170
170
|
{
|
|
@@ -190,7 +190,6 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
190
190
|
correctiveActions: activeTab === "own",
|
|
191
191
|
testimonials: activeTab === "own",
|
|
192
192
|
incident: activeTab === "own",
|
|
193
|
-
width: 120,
|
|
194
193
|
render: (value, all) => {
|
|
195
194
|
if (all.empty) {
|
|
196
195
|
return <div className="daf-default-cell" />;
|
|
@@ -209,7 +208,6 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
209
208
|
title: t("Last Update"),
|
|
210
209
|
dataIndex: "updatedAt",
|
|
211
210
|
key: "updatedAt",
|
|
212
|
-
width: 125,
|
|
213
211
|
render: (date, all) => {
|
|
214
212
|
if (all.empty) {
|
|
215
213
|
return <div className="daf-default-cell" />;
|
|
@@ -40,8 +40,8 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
dataIndex: '
|
|
44
|
-
title: t('
|
|
43
|
+
dataIndex: 'region',
|
|
44
|
+
title: t('Region'),
|
|
45
45
|
ellipsis: true,
|
|
46
46
|
show: true,
|
|
47
47
|
render: (v, all) => {
|
|
@@ -49,13 +49,11 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
49
49
|
return <div className="daf-default-cell" />
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
const region = getLinkValue(all?.
|
|
52
|
+
const region = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
|
|
53
53
|
|
|
54
54
|
return region ? <Tooltip title={region}>{region}</Tooltip> : '-';
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
57
|
{
|
|
60
58
|
dataIndex: 'territory',
|
|
61
59
|
title: t('Territory'),
|
|
@@ -66,26 +64,25 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
66
64
|
return <div className="daf-default-cell" />
|
|
67
65
|
}
|
|
68
66
|
|
|
69
|
-
const district = getLinkValue(all?.
|
|
67
|
+
const district = getLinkValue(all?.administrativeLevel2, all?.linking?.SCL);
|
|
70
68
|
|
|
71
69
|
return district ? <Tooltip title={district}>{district}</Tooltip> : '-';
|
|
72
70
|
},
|
|
73
71
|
},
|
|
74
72
|
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
show:
|
|
79
|
-
render: (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return <AvatarGroup items={val}></AvatarGroup>;
|
|
73
|
+
dataIndex: 'category',
|
|
74
|
+
title: t('Type'),
|
|
75
|
+
ellipsis: true,
|
|
76
|
+
show: true,
|
|
77
|
+
render: (v, all) => {
|
|
78
|
+
if (all.empty) {
|
|
79
|
+
return <div className="daf-default-cell" />
|
|
80
|
+
}
|
|
81
|
+
const category = findOptions(v, options?.locationCategories);
|
|
82
|
+
|
|
83
|
+
return <Tooltip title={category}>{category}</Tooltip>;
|
|
87
84
|
},
|
|
88
|
-
},
|
|
85
|
+
},
|
|
89
86
|
{
|
|
90
87
|
dataIndex: 'operator',
|
|
91
88
|
title: t('Operator'),
|
|
@@ -80,7 +80,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
80
80
|
return <div className="daf-default-cell" />
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const province = getLinkValue(
|
|
83
|
+
const province = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
|
|
84
84
|
|
|
85
85
|
return province ? <Tooltip title={province}>{province}</Tooltip> : '-';
|
|
86
86
|
},
|
|
@@ -95,7 +95,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
95
95
|
return <div className="daf-default-cell" />
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
const territory = getLinkValue(
|
|
98
|
+
const territory = getLinkValue(all?.administrativeLevel2, all?.linking?.SCL);
|
|
99
99
|
|
|
100
100
|
return territory ? <Tooltip title={territory}>{territory}</Tooltip> : '-';
|
|
101
101
|
},
|
|
@@ -167,10 +167,20 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
167
167
|
const link = `/app/view/${subject}/${all.datastakeId}`;
|
|
168
168
|
|
|
169
169
|
return <div style={{ display: "flex", justifyContent: "center" }}>
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
<button
|
|
171
|
+
onClick={() => goTo(getRedirectLink(link))}
|
|
172
|
+
style={{
|
|
173
|
+
cursor: 'pointer',
|
|
174
|
+
border: 'none',
|
|
175
|
+
background: 'transparent',
|
|
176
|
+
padding: 0,
|
|
177
|
+
display: 'flex',
|
|
178
|
+
alignItems: 'center'
|
|
179
|
+
}}
|
|
180
|
+
>
|
|
181
|
+
<CustomIcon name="Link" size={15} color={theme.baseGray70} />
|
|
182
|
+
</button>
|
|
183
|
+
</div>;
|
|
174
184
|
}
|
|
175
185
|
}
|
|
176
186
|
].filter((column) => column.show !== false);
|
|
@@ -16,7 +16,7 @@ const MineDetailsSection = ({
|
|
|
16
16
|
basepath: "analytics",
|
|
17
17
|
url: '/widgets/mine-site-details',
|
|
18
18
|
defaultData: [],
|
|
19
|
-
stop: selectedPartners?.loading,
|
|
19
|
+
stop: !locationData?.datastakeId || selectedPartners?.loading,
|
|
20
20
|
filters: {
|
|
21
21
|
datastakeId: locationData?.datastakeId,
|
|
22
22
|
sources: selectedPartners?.partners || [],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Tag, Tooltip } from "antd";
|
|
3
3
|
import CountryFlag from "../../../../../core/components/UI/CountryFlag/index.jsx";
|
|
4
|
-
import {findOptions } from "../../../../../../helpers/StringHelper.js";
|
|
4
|
+
import {findOptions, truncateString } from "../../../../../../helpers/StringHelper.js";
|
|
5
5
|
|
|
6
6
|
export const getKeyIndicatorConfig = ({ t, data = {}, options = {} }) => [
|
|
7
7
|
{
|
|
@@ -36,6 +36,12 @@ export const getKeyIndicatorConfig = ({ t, data = {}, options = {} }) => [
|
|
|
36
36
|
label: t("Legal Form"),
|
|
37
37
|
render: () => {
|
|
38
38
|
const subCategory = findOptions(data?.subCategory, options?.subCategoriesOptions);
|
|
39
|
+
if(subCategory?.length > 22) {
|
|
40
|
+
const _subCategory = truncateString(subCategory, 22);
|
|
41
|
+
return <Tooltip title={subCategory}>
|
|
42
|
+
<span style={{fontWeight: "normal", fontSize: 14}}>{_subCategory || "-"}</span>
|
|
43
|
+
</Tooltip>;
|
|
44
|
+
}
|
|
39
45
|
return <div>{subCategory || "-"}</div>;
|
|
40
46
|
},
|
|
41
47
|
},
|
|
@@ -16,7 +16,7 @@ const InformationAvailability = ({
|
|
|
16
16
|
basepath: subject === "stakeholder" ? "stakeholder" : "location",
|
|
17
17
|
url: `/completion/${id}`,
|
|
18
18
|
defaultData: [],
|
|
19
|
-
stop: selectedPartners?.loading,
|
|
19
|
+
stop: !id || selectedPartners?.loading,
|
|
20
20
|
filters: {
|
|
21
21
|
// datastakeId: id,
|
|
22
22
|
scope: subject === "stakeholder" ? "operatorInfo" : "locationInfo",
|
|
@@ -17,7 +17,8 @@ export const useSummary = ({
|
|
|
17
17
|
t,
|
|
18
18
|
theme = {},
|
|
19
19
|
service,
|
|
20
|
-
onIdChange = () => {}
|
|
20
|
+
onIdChange = () => {},
|
|
21
|
+
type
|
|
21
22
|
}) => {
|
|
22
23
|
const [search, setSearch] = useState("");
|
|
23
24
|
const [debouncedSearch, setDebouncedSearch] = useState("");
|
|
@@ -110,10 +111,12 @@ export const useSummary = ({
|
|
|
110
111
|
|
|
111
112
|
const filters = useMemo(() => {
|
|
112
113
|
return {
|
|
113
|
-
pagination: {
|
|
114
|
+
pagination: { take: 20, skip: 1 },
|
|
114
115
|
...(debouncedSearch
|
|
115
116
|
? { search: { qs: debouncedSearch, fields: ["name","datastakeId","orgShortName"] } }
|
|
116
117
|
: {}),
|
|
118
|
+
...(type === 'operator' && { stakeholderType: 'operator'}),
|
|
119
|
+
...(type === 'mine' && { category: 'mineSite'}),
|
|
117
120
|
};
|
|
118
121
|
}, [debouncedSearch]);
|
|
119
122
|
|