datastake-daf 0.6.754 → 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.
Files changed (34) hide show
  1. package/dist/components/index.js +561 -525
  2. package/dist/hooks/index.js +11 -8
  3. package/dist/layouts/index.js +470 -448
  4. package/dist/pages/index.js +1276 -602
  5. package/dist/utils/index.js +470 -448
  6. package/package.json +1 -1
  7. package/src/@daf/core/components/Graphs/components/BaseGraph.jsx +4 -2
  8. package/src/@daf/core/components/Icon/configs/ClockPlus.js +14 -0
  9. package/src/@daf/core/components/Icon/configs/WaziDarkIcon.js +15 -0
  10. package/src/@daf/core/components/Icon/configs/index.js +4 -0
  11. package/src/@daf/core/components/Screens/BaseScreen/index.jsx +3 -3
  12. package/src/@daf/core/components/Screens/Users/columns.js +216 -0
  13. package/src/@daf/core/components/Screens/Users/config.js +174 -0
  14. package/src/@daf/core/components/Screens/Users/create.jsx +63 -0
  15. package/src/@daf/core/components/Screens/Users/index.jsx +173 -0
  16. package/src/@daf/core/components/TableScreen/TablePageWithTabs/index.jsx +4 -4
  17. package/src/@daf/hooks/useFilters.js +10 -8
  18. package/src/@daf/hooks/useWidgetFetch.js +3 -3
  19. package/src/@daf/pages/Dashboards/helper.js +3 -3
  20. package/src/@daf/pages/Documents/columns.js +2 -4
  21. package/src/@daf/pages/Events/Activities/index.jsx +1 -1
  22. package/src/@daf/pages/Events/columns.js +12 -14
  23. package/src/@daf/pages/Locations/MineSite/columns.js +16 -19
  24. package/src/@daf/pages/Locations/columns.js +2 -2
  25. package/src/@daf/pages/Stakeholders/Workers/columns.js +14 -4
  26. package/src/@daf/pages/Summary/Minesite/components/MineDetailsSection/index.js +1 -1
  27. package/src/@daf/pages/Summary/Minesite/index.jsx +1 -0
  28. package/src/@daf/pages/Summary/Operator/components/KeyInformation/config.js +7 -1
  29. package/src/@daf/pages/Summary/Operator/index.jsx +1 -0
  30. package/src/@daf/pages/Summary/components/InformationAvailability/index.js +1 -1
  31. package/src/@daf/pages/Summary/hook.js +5 -2
  32. package/src/pages.js +1 -1
  33. package/src/styles/components/_dataLink.scss +1 -0
  34. package/dist/style/datastake/mapbox-gl.css +0 -330
@@ -0,0 +1,173 @@
1
+ import React, { useMemo, useState, useEffect } from 'react'
2
+ import { Drawer } from 'antd'
3
+ import { getColumns } from './columns.js';
4
+ import { checkboxConfig, getFiltersConfig, filtersConfig, getFilterOptions } from './config.js';
5
+ import { useGetQueryParams } from '../../../../hooks/useGetQueryParams.js';
6
+ import UsersCreate from './create.jsx';
7
+ import Header from '../../../../core/components/Header/index.jsx';
8
+ import BaseScreen from '../BaseScreen/index.jsx';
9
+ import { CREATE_DRAWER_WIDTH } from '../../../../../helpers/Forms.js';
10
+ import DrawerHeader from '../../../../core/components/Header/DrawerHeader/index.jsx';
11
+
12
+ const UsersTable = ({
13
+ t = () => {},
14
+ goTo = () => {},
15
+ user = {},
16
+ options = {},
17
+ getRedirectLink = () => {},
18
+ theme = {},
19
+ loading = false,
20
+ data = {},
21
+ isMobile,
22
+ APP,
23
+ location,
24
+ getData = () => {},
25
+ getApiBaseUrl = () => {},
26
+ getAppHeader = () => {},
27
+ onInviteUser = () => {},
28
+ onEditUser = () => {},
29
+ query = {},
30
+ ajaxForms = {},
31
+ changeAjaxForms = () => {},
32
+ ajaxOptions = {},
33
+ changeAjaxOptions = () => {},
34
+ extendingFilters = {},
35
+ userRoles = [],
36
+ }) => {
37
+ const [selectOptions, setSelectOptions] = useState();
38
+ const params = new URLSearchParams(location?.search);
39
+ const [openCreateModal, setOpenCreateModal] = useState(params.has("create"));
40
+ const [userToEdit, setUserToEdit] = useState(null);
41
+
42
+ const columns = useMemo(() => getColumns({
43
+ t,
44
+ goTo,
45
+ user,
46
+ options,
47
+ getRedirectLink,
48
+ theme,
49
+ subject: 'user',
50
+ data,
51
+ setUserToEdit,
52
+ }), [t, goTo, user, options, getRedirectLink, theme, data]);
53
+
54
+ const breadCrumbs = [];
55
+
56
+ const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({ location });
57
+
58
+ const filters = useMemo(() => ({
59
+ ...otherParams,
60
+ ...extendingFilters,
61
+ }), [otherParams, extendingFilters]);
62
+
63
+ useEffect(() => {
64
+ getData({
65
+ pagination: paginationQuery,
66
+ ...(Object.keys(searchParams).length > 0 && { search: searchParams }),
67
+ ...otherParams,
68
+ sortBy: {
69
+ [sortBy || 'updatedAt']: sortDir ? (sortDir === 'ascend' ? 1 : -1) : -1,
70
+ },
71
+ ...extendingFilters,
72
+ }, 'users');
73
+ }, [location.search, JSON.stringify(extendingFilters)]);
74
+
75
+ const selectFiltersConfig = useMemo(() => getFiltersConfig({ t }), [t]);
76
+
77
+ useEffect(() => {
78
+ setSelectOptions((prev) => ({
79
+ ...prev,
80
+ ...getFilterOptions(options, t),
81
+ }));
82
+ }, [options, t]);
83
+
84
+ return (
85
+ <div className="semibold form-input-output daf-create-view">
86
+ <Header
87
+ title={t("users")}
88
+ breadcrumbs={breadCrumbs}
89
+ actionButtons={[
90
+ {
91
+ type: "primary",
92
+ onClick: () => setOpenCreateModal(true),
93
+ tooltip: t("New"),
94
+ icon: "Add",
95
+ },
96
+ ]}
97
+ // onDownload={() => {
98
+ // console.log("download");
99
+ // }}
100
+ // downloadDisabled={false}
101
+ />
102
+ <BaseScreen
103
+ t={t}
104
+ checkboxConfig={checkboxConfig}
105
+ defaultTableFilters={{}}
106
+ columns={columns}
107
+ data={data}
108
+ loading={loading}
109
+ location={location}
110
+ goTo={goTo}
111
+ APP={APP}
112
+ getApiBaseUrl={getApiBaseUrl}
113
+ selectOptions={selectOptions}
114
+ selectFilters={selectFiltersConfig}
115
+ view="users"
116
+ getRedirectLink={getRedirectLink}
117
+ defaultUrlParams={{}}
118
+ module={APP}
119
+ filtersConfig={filtersConfig}
120
+ isMobile={isMobile}
121
+ />
122
+ {(openCreateModal || !!userToEdit) && (
123
+ <Drawer
124
+ destroyOnClose
125
+ title={
126
+ <DrawerHeader
127
+ title={t(userToEdit ? "Edit User" : "New User")}
128
+ />
129
+ }
130
+ open={openCreateModal || !!userToEdit}
131
+ onClose={() => {
132
+ setOpenCreateModal(false);
133
+ setUserToEdit(null);
134
+ }}
135
+ width={CREATE_DRAWER_WIDTH}
136
+ bodyStyle={{ padding: 0 }}
137
+ maskClosable={false}
138
+ >
139
+ <UsersCreate
140
+ t={t}
141
+ goTo={goTo}
142
+ user={user}
143
+ APP={APP}
144
+ getApiBaseUrl={getApiBaseUrl}
145
+ getAppHeader={getAppHeader}
146
+ onSubmitted={(payload) => {
147
+ if (userToEdit) {
148
+ onEditUser(payload);
149
+ } else {
150
+ onInviteUser(payload);
151
+ }
152
+ setOpenCreateModal(false);
153
+ setUserToEdit(null);
154
+ }}
155
+ onCancel={() => {
156
+ setOpenCreateModal(false);
157
+ setUserToEdit(null);
158
+ }}
159
+ query={query}
160
+ ajaxForms={ajaxForms}
161
+ changeAjaxForms={changeAjaxForms}
162
+ ajaxOptions={ajaxOptions}
163
+ changeAjaxOptions={changeAjaxOptions}
164
+ userRoles={userRoles}
165
+ userToEdit={userToEdit}
166
+ />
167
+ </Drawer>
168
+ )}
169
+ </div>
170
+ );
171
+ };
172
+
173
+ export default UsersTable;
@@ -1,9 +1,9 @@
1
1
  import React, { useState, useEffect, useRef } from 'react'
2
2
  import { Tabs, Drawer } from 'antd'
3
- import Header from '../../../Header/index.jsx'
4
- import BaseScreen from '../../BaseScreen/index.jsx'
5
- import { CREATE_DRAWER_WIDTH } from '../../../../helpers/Forms.js'
6
- import DrawerHeader from '../../../Header/DrawerHeader/index.jsx'
3
+ import Header from '../../../../core/components/Header/index.jsx'
4
+ import BaseScreen from '../../../components/Screens/BaseScreen/index.jsx'
5
+ import { CREATE_DRAWER_WIDTH } from '../../../../../helpers/Forms.js'
6
+ import DrawerHeader from '../../../../core/components/Header/DrawerHeader/index.jsx'
7
7
 
8
8
  const TablePageWithTabs = ({
9
9
  t= () => {},
@@ -15,7 +15,7 @@ export const useFilters = ({
15
15
  doPagination = true,
16
16
  getRedirectLink,
17
17
  }) => {
18
- const params = useMemo(() => new URLSearchParams(location.search), [location.search]);
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.pathname}?${qs}`
73
- : doPagination ? `${location.pathname}?page=${page}`
74
- : location.pathname)
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.pathname}?${qs}`
85
- : doPagination ? `${location.pathname}?page=${page}`
86
- : location.pathname);
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.pathname, goTo, getRedirectLink, doPagination]);
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;
@@ -16,9 +16,9 @@ export const useWidgetFetch = ({config, getData = DashboardService.getWidget, on
16
16
 
17
17
 
18
18
  const fetchData = async () => {
19
- // if (stop) {
20
- // return;
21
- // }
19
+ if (stop) {
20
+ return;
21
+ }
22
22
 
23
23
  setLoading(true);
24
24
 
@@ -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="NashirikiSmallLogo"
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="NashirikiSmallLogo"
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="NashirikiSmallLogo" color="white" width={16} height={16} />;
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}></AvatarGroup>;
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" />;
@@ -47,7 +47,7 @@ const ActivitiesTable = ({
47
47
  activeTab,
48
48
  getRedirectLink,
49
49
  theme,
50
- subject: 'correctiveActions',
50
+ subject: 'activities',
51
51
  data,
52
52
  applications,
53
53
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
@@ -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: 'province',
44
- title: t('Province'),
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?.location?.administrativeLevel1, all?.location?.linking?.SCL);
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?.location?.administrativeLevel2, all?.location?.linking?.SCL);
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
- title: t("Products"),
76
- dataIndex: "products",
77
- key: "products",
78
- show: activeTab !== "own",
79
- render: (val, all) => {
80
- if (all.empty) {
81
- return <div className="daf-default-cell" />;
82
- }
83
-
84
- console.log({val, all})
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(v, all?.linking?.SCL);
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(v, all?.linking?.SCL);
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
- <a href={getRedirectLink(link)}>
171
- <CustomIcon name="Link" size={15} color={theme.baseGray70} />
172
- </a>
173
- </div>;
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 || [],
@@ -59,6 +59,7 @@ const MineSummary = ({
59
59
  theme,
60
60
  service,
61
61
  onIdChange,
62
+ type: "mine",
62
63
  });
63
64
 
64
65
  return (
@@ -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
  },
@@ -60,6 +60,7 @@ const OperatorSummary = ({
60
60
  theme,
61
61
  service,
62
62
  onIdChange,
63
+ type: "operator",
63
64
  });
64
65
 
65
66
  return (
@@ -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: { size: 20, page: 1 },
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
 
package/src/pages.js CHANGED
@@ -11,7 +11,7 @@ export { default as ActivitiesTable } from './@daf/pages/Events/Activities/index
11
11
 
12
12
  export { default as IncidentsTable } from './@daf/pages/Events/Incidents/index.jsx';
13
13
  export { default as ProductionSitesTable } from './@daf/pages/Locations/MineSite/index.jsx';
14
-
14
+ export { default as UsersTable } from './@daf/core/components/Screens/Users/index.jsx';
15
15
 
16
16
  // Summary
17
17
  export { default as OperatorSummary } from './@daf/pages/Summary/Operator/index.jsx';
@@ -1,4 +1,5 @@
1
1
  .data-link-cont {
2
+ max-width: 614px; //DATA LINK STRETCH
2
3
  .add-btn {
3
4
  min-width: 32px;
4
5
  width: 32px;