datastake-daf 0.6.769 → 0.6.771

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 (45) hide show
  1. package/dist/components/index.js +2514 -2299
  2. package/dist/pages/index.js +2278 -2142
  3. package/dist/services/index.js +6 -2
  4. package/dist/utils/index.js +4 -16
  5. package/package.json +1 -1
  6. package/src/@daf/core/components/Dashboard/Map/ChainIcon/index.js +1 -0
  7. package/src/@daf/core/components/Dashboard/Map/hook.js +12 -1
  8. package/src/@daf/core/components/Graphs/TradeRelationship/index.jsx +4 -0
  9. package/src/@daf/core/components/Screens/Admin/AdminDashboard/index.jsx +0 -2
  10. package/src/@daf/core/components/Screens/Settings/Edit/index.js +2 -0
  11. package/src/@daf/core/components/Screens/Settings/components/Header/index.js +1 -1
  12. package/src/@daf/core/components/ViewForm/components/Records/config.js +22 -0
  13. package/src/@daf/core/components/ViewForm/components/Records/index.jsx +155 -0
  14. package/src/@daf/pages/Dashboards/SupplyChain/components/SupplyChainMap/index.js +3 -3
  15. package/src/@daf/pages/Documents/config.js +12 -0
  16. package/src/@daf/pages/Documents/index.jsx +3 -13
  17. package/src/@daf/pages/Events/Activities/config.js +12 -0
  18. package/src/@daf/pages/Events/Activities/index.jsx +2 -13
  19. package/src/@daf/pages/Events/Incidents/config.js +12 -0
  20. package/src/@daf/pages/Events/Incidents/index.jsx +2 -12
  21. package/src/@daf/pages/Events/config.js +12 -0
  22. package/src/@daf/pages/Events/index.jsx +2 -12
  23. package/src/@daf/pages/Locations/MineSite/config.js +12 -0
  24. package/src/@daf/pages/Locations/MineSite/index.jsx +2 -12
  25. package/src/@daf/pages/Locations/config.js +12 -0
  26. package/src/@daf/pages/Locations/index.jsx +2 -17
  27. package/src/@daf/pages/Stakeholders/Operators/config.js +12 -0
  28. package/src/@daf/pages/Stakeholders/Operators/index.jsx +2 -12
  29. package/src/@daf/pages/Stakeholders/Workers/config.js +12 -0
  30. package/src/@daf/pages/Stakeholders/Workers/index.jsx +2 -10
  31. package/src/@daf/pages/Stakeholders/config.js +12 -0
  32. package/src/@daf/pages/Stakeholders/index.jsx +3 -18
  33. package/src/@daf/pages/Summary/Operator/components/TradeRelationships/index.js +1 -0
  34. package/src/@daf/pages/Summary/hook.js +13 -3
  35. package/src/@daf/pages/TablePage/columns.js +29 -0
  36. package/src/@daf/pages/TablePage/config.js +19 -62
  37. package/src/@daf/pages/TablePage/helper.js +140 -0
  38. package/src/@daf/pages/TablePage/hook.js +20 -2
  39. package/src/@daf/pages/TablePage/index.jsx +12 -20
  40. package/src/@daf/services/LinkedSubjects.js +2 -2
  41. package/src/@daf/services/VersionService.js +13 -0
  42. package/src/@daf/utils/tooltip.js +3 -16
  43. package/src/index.js +1 -0
  44. package/src/pages.js +1 -0
  45. package/dist/style/datastake/mapbox-gl.css +0 -330
@@ -1381,14 +1381,18 @@ class LinkedSubjectsService extends BaseService {
1381
1381
  id,
1382
1382
  signal,
1383
1383
  namespace,
1384
- sourceId
1384
+ sourceId,
1385
+ source,
1386
+ version
1385
1387
  }) {
1386
1388
  return this.apiGet({
1387
1389
  url: `/${namespace === "nashirikiEvent" ? "event" : namespace}/${id}`,
1388
1390
  isApp: true,
1389
1391
  signal,
1390
1392
  params: {
1391
- authorId: sourceId
1393
+ authorId: sourceId,
1394
+ source,
1395
+ version
1392
1396
  }
1393
1397
  });
1394
1398
  }
@@ -4971,7 +4971,8 @@ const renderTooltipJsx = ({
4971
4971
  className,
4972
4972
  link,
4973
4973
  onClickLink,
4974
- total
4974
+ total,
4975
+ isNewTab = false
4975
4976
  }) => {
4976
4977
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
4977
4978
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -5012,7 +5013,7 @@ const renderTooltipJsx = ({
5012
5013
  })]
5013
5014
  }) : null
5014
5015
  })]
5015
- }), link ? typeof onClickLink === "function" || typeof link !== "string" ? /*#__PURE__*/jsxRuntime.jsx("div", {
5016
+ }), link ? /*#__PURE__*/jsxRuntime.jsx("div", {
5016
5017
  className: "flex flex-column",
5017
5018
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
5018
5019
  className: "link-cont",
@@ -5020,20 +5021,7 @@ const renderTooltipJsx = ({
5020
5021
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
5021
5022
  width: 10,
5022
5023
  height: 10,
5023
- name: "Link"
5024
- })
5025
- })
5026
- }) : /*#__PURE__*/jsxRuntime.jsx("div", {
5027
- className: "flex flex-column",
5028
- children: /*#__PURE__*/jsxRuntime.jsx("a", {
5029
- href: link,
5030
- className: "link-cont",
5031
- target: "_blank",
5032
- rel: "noopener noreferrer",
5033
- children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
5034
- width: 10,
5035
- height: 10,
5036
- name: "LinkNewTab"
5024
+ name: isNewTab ? "LinkNewTab" : "Link"
5037
5025
  })
5038
5026
  })
5039
5027
  }) : null]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.769",
3
+ "version": "0.6.771",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -245,6 +245,7 @@ export default function LocationIcon({
245
245
  items: renderTooltip(data),
246
246
  link,
247
247
  onClickLink: () => onClickLink(data),
248
+ isNewTab: true,
248
249
  })}
249
250
  // open={
250
251
  // (!openPopupIdRef.current || openPopupIdRef.current === data.datastakeId) &&
@@ -193,8 +193,19 @@ export const useMap = ({
193
193
  }
194
194
  clearMapMarkers();
195
195
  if (data) {
196
+ // Filters out locations that are not connected to any stakeholders
197
+ const excludedType = ['village', 'town', 'area', 'territory']
198
+ const filteredData = data?.filter((obj) =>
199
+ !excludedType.includes(obj?.type) && (obj?.stakeholders?.length > 0 ||
200
+ data.some((other) =>
201
+ other.datastakeId !== obj.datastakeId &&
202
+ (other.stakeholders || []).some((stk) =>
203
+ (stk.links || []).includes(obj.datastakeId)
204
+ )
205
+ )
206
+ ));
196
207
  const maxTotal = Math.max(...(data || []).map((d) => d.total));
197
- data.forEach((d, i) => {
208
+ filteredData.forEach((d, i) => {
198
209
  addIconToMapInitialy(
199
210
  [d?.marker?.lat, d?.marker?.lng],
200
211
  "location",
@@ -49,6 +49,10 @@ function TradeRelationship({
49
49
  }, 200);
50
50
 
51
51
  return () => clearTimeout(timeoutId);
52
+ }
53
+ if(nodes.length === 0 || edges.length === 0) {
54
+ setIsFullyRendered(true);
55
+ onRenderComplete(true);
52
56
  }
53
57
  }, [nodes.length, edges.length, associatedNodes]);
54
58
 
@@ -19,8 +19,6 @@ export default function AdminDashboard({
19
19
  ? data.keyIndicatorsData
20
20
  : [];
21
21
 
22
- console.log("AdminDashboard:data", data);
23
-
24
22
  return (
25
23
  <div className="daf-analysis admin-dashboard">
26
24
  <Header title={t(`${adminTranslationIdentifier}::dashboard`)} />
@@ -23,6 +23,7 @@ export default function SettingsEdit({
23
23
  renderMenu,
24
24
  children,
25
25
  t,
26
+ changeNotificationState,
26
27
  }) {
27
28
  return (
28
29
  <Style>
@@ -34,6 +35,7 @@ export default function SettingsEdit({
34
35
  onCancel,
35
36
  goToView,
36
37
  t,
38
+ changeNotificationState,
37
39
  }) : null}
38
40
  <div className="view-content">
39
41
  {renderMenu ? renderMenu({
@@ -11,8 +11,8 @@ export default function SettingsHeader({
11
11
  goToEdit = () => {},
12
12
  goToView = () => {},
13
13
  t = (key) => key,
14
+ changeNotificationState
14
15
  }) {
15
- const { changeNotificationState } = useForms();
16
16
 
17
17
  const breadCrumbs = useMemo(
18
18
  () => [
@@ -0,0 +1,22 @@
1
+ export const getSourcesType = (subject) => {
2
+ const typeMapping = {
3
+ locations: "location",
4
+ location: "location",
5
+ "production-sites": "location",
6
+
7
+ stakeholders: "stakeholder",
8
+ stakeholder: "stakeholder",
9
+ workers: "stakeholder",
10
+ operators: "stakeholder",
11
+
12
+ documents: "document",
13
+ document: "document",
14
+
15
+ events: "event",
16
+ event: "event",
17
+ activities: "event",
18
+ incidents: "event",
19
+ };
20
+
21
+ return typeMapping[subject] ?? null;
22
+ };
@@ -0,0 +1,155 @@
1
+ import React, { useState, useEffect, useMemo } from 'react';
2
+ import { Form, Select, Button } from 'antd';
3
+ import Modal from "../../../Modal/index.jsx";
4
+ import SourceService from "../../../../../services/SourceService.js";
5
+ import VersionService from "../../../../../services/VersionService.js";
6
+ import { getSourcesType } from './config.js';
7
+
8
+ const Records = ({
9
+ onSubmit,
10
+ modalTitle = "Records",
11
+ t = () => {},
12
+ onClose = () => {},
13
+ open = false,
14
+ subject = "",
15
+ id = "",
16
+ }) => {
17
+ const [form] = Form.useForm();
18
+ const [sources, setSources] = useState([]);
19
+ const [versions, setVersions] = useState([]);
20
+ const [selectedSource, setSelectedSource] = useState(null);
21
+
22
+ const handleCancel = () => {
23
+ onClose();
24
+ form.resetFields();
25
+ };
26
+ const type = useMemo(() => getSourcesType(subject), [subject]);
27
+
28
+ const getSources = async () => {
29
+ try {
30
+ const { data } = await SourceService.getSources({ type, id });
31
+ setSources(data);
32
+ } catch (error) {
33
+ console.error('Error fetching sources:', error);
34
+ }
35
+ }
36
+
37
+ const getVersions = async () => {
38
+ try {
39
+ const { data } = await VersionService.getSources({ type, id, params: {
40
+ source: selectedSource,
41
+ } });
42
+ console.log({data})
43
+ setVersions(data);
44
+ } catch (error) {
45
+ console.error('Error fetching versions:', error);
46
+ }
47
+ }
48
+
49
+ const sourceOptions = useMemo(() => {
50
+ return sources.map((source) => ({
51
+ label: source?.name,
52
+ value: source?.id,
53
+ }));
54
+ },[sources])
55
+
56
+ useEffect(() => {
57
+ if(type && id) {
58
+ getSources();
59
+ }
60
+ }, [type, id]);
61
+
62
+ useEffect(() => {
63
+ if(selectedSource) {
64
+ getVersions();
65
+ }
66
+ }, [selectedSource]);
67
+
68
+ const versionOptions = useMemo(() => {
69
+ if (!versions?.numberOfVersions) return [];
70
+
71
+ return Array.from({ length: versions.numberOfVersions }, (_, index) => ({
72
+ label: `Version ${index + 1}`,
73
+ value: index + 1,
74
+ }));
75
+ }, [versions]);
76
+
77
+ const handleOk = async () => {
78
+ try {
79
+ const values = await form.validateFields();
80
+ if (onSubmit) {
81
+ onSubmit(values);
82
+ }
83
+ onClose();
84
+ form.resetFields();
85
+ } catch (error) {
86
+ console.error('Validation failed:', error);
87
+ }
88
+ };
89
+
90
+ return (
91
+ <Modal
92
+ open={open}
93
+ t={t}
94
+ title={t(modalTitle)}
95
+ onSuccess={handleOk}
96
+ onClose={handleCancel}
97
+ withModalFormWrapper={false}
98
+ >
99
+ <Form
100
+ form={form}
101
+ layout="vertical"
102
+ name="recordsForm"
103
+ >
104
+ <Form.Item
105
+ name="source"
106
+ label={t("Source")}
107
+ rules={[{ required: true, message: t('Please select an option') }]}
108
+ >
109
+ <Select
110
+ placeholder={t("Select")}
111
+ showSearch
112
+ optionFilterProp="children"
113
+ onChange={(value) => {
114
+ console.log('Selected source ID:', value);
115
+ setSelectedSource(value);
116
+ }}
117
+ >
118
+ {sourceOptions.map((option) => (
119
+ <Select.Option
120
+ key={option.value}
121
+ value={option.value}
122
+ >
123
+ {option.label}
124
+ </Select.Option>
125
+ ))}
126
+ </Select>
127
+ </Form.Item>
128
+
129
+ <Form.Item
130
+ name="version"
131
+ label={t("Version")}
132
+ rules={[{ required: true, message: t('Please select an option') }]}
133
+ >
134
+ <Select
135
+ placeholder={t("Select")}
136
+ showSearch
137
+ optionFilterProp="children"
138
+ >
139
+ {versionOptions.map((option) => (
140
+ <Select.Option
141
+ key={option.value}
142
+ value={option.value}
143
+ >
144
+ {option.label}
145
+ </Select.Option>
146
+ ))}
147
+ </Select>
148
+ </Form.Item>
149
+ </Form>
150
+ <div style={{ height: 60 }}/>
151
+ </Modal>
152
+ );
153
+ };
154
+
155
+ export default Records;
@@ -56,11 +56,11 @@ function SupplyChainMap({selectedSources = {}, t = () => {}, goTo = () => {}, op
56
56
  onClickLink={(data) => {
57
57
  const locationTypes = ['village', 'town', 'area', 'territory'];
58
58
  if(data?.type === 'mineSite') {
59
- goTo(getRedirectLink(`/app/mine-summary/${data.datastakeId}`));
59
+ window.open(getRedirectLink(`/app/mine-summary/${data.datastakeId}`), '_blank');
60
60
  } else if (locationTypes.includes(data.type)) {
61
- goTo(getRedirectLink(`/app/view/locations/${data.datastakeId}`));
61
+ window.open(getRedirectLink(`/app/view/locations/${data.datastakeId}`), '_blank');
62
62
  } else {
63
- goTo(getRedirectLink(`/app/view/stakeholders/${data.datastakeId}`));
63
+ window.open(getRedirectLink(`/app/view/stakeholders/${data.datastakeId}`), '_blank');
64
64
  }
65
65
  }}
66
66
  />
@@ -15,4 +15,16 @@ export const getFilterOptions = (options, t) => {
15
15
  }
16
16
 
17
17
  return _default;
18
+ }
19
+
20
+ export const formConfig = {
21
+ namespace: 'document',
22
+ view: 'scoping',
23
+ scope: 'create',
24
+ formType: 'document',
25
+ }
26
+
27
+ export const viewConfig = {
28
+ title: "Documents",
29
+ createTitle: "Create Document",
18
30
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import { getColumns } from './columns.js';
3
2
  import TablePage from '../TablePage/index.jsx';
4
3
 
5
4
  const DocumentsTable = ({
@@ -54,13 +53,8 @@ const DocumentsTable = ({
54
53
  getApiBaseUrl={getApiBaseUrl}
55
54
  getAppHeader={getAppHeader}
56
55
  subjectClear={subjectClear}
57
- getColumns={getColumns}
58
-
59
- viewConfig={{
60
- title: "Documents",
61
- breadcrumbs: breadcrumbs,
62
- createTitle: "Create Document",
63
- }}
56
+ extendingFilters={extendingFilters}
57
+ breadcrumbs={breadcrumbs}
64
58
 
65
59
  formConfig={{
66
60
  getFormData,
@@ -74,12 +68,8 @@ const DocumentsTable = ({
74
68
  formData,
75
69
  formValue,
76
70
  form,
77
- namespace: 'document',
78
- view: 'scoping',
79
- scope: 'create',
80
- formType: 'document',
81
- defaultValues: createDefaultValues,
82
71
  }}
72
+ defaultValues={createDefaultValues}
83
73
 
84
74
  onDownload={() => console.log("download")}
85
75
  />
@@ -163,4 +163,16 @@ export const getFilterOptions = (options, t) => {
163
163
  }
164
164
 
165
165
  return _default;
166
+ }
167
+
168
+ export const formConfig = {
169
+ namespace: 'corrective-actions',
170
+ view: 'corrective-actions',
171
+ scope: 'createActivity',
172
+ formType: 'activity',
173
+ }
174
+
175
+ export const viewConfig = {
176
+ title: "Activities",
177
+ createTitle: "Create Activity",
166
178
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import { getColumns } from './columns.js';
3
2
  import TablePage from '../../TablePage/index.jsx';
4
3
 
5
4
  const ActivitiesTable = ({
@@ -47,17 +46,11 @@ const ActivitiesTable = ({
47
46
  APP={APP}
48
47
  location={location}
49
48
  applications={applications}
50
-
51
49
  subject="activities"
52
50
  getData={getData}
53
51
  getApiBaseUrl={getApiBaseUrl}
54
52
  getAppHeader={getAppHeader}
55
- getColumns={getColumns}
56
- viewConfig={{
57
- title: "Activities",
58
- breadcrumbs: breadcrumbs,
59
- createTitle: "Create Activity",
60
- }}
53
+ breadcrumbs={breadcrumbs}
61
54
  extendingFilters={extendingFilters}
62
55
  formConfig={{
63
56
  getFormData,
@@ -71,12 +64,8 @@ const ActivitiesTable = ({
71
64
  formData,
72
65
  formValue,
73
66
  form,
74
- namespace: "corrective-actions",
75
- view: 'corrective-actions',
76
- scope: 'createActivity',
77
- formType: 'activity',
78
- defaultValues: createDefaultValues,
79
67
  }}
68
+ defaultValues={createDefaultValues}
80
69
  onDownload={() => console.log("download")}
81
70
  />
82
71
  )
@@ -163,4 +163,16 @@ export const getFilterOptions = (options, t) => {
163
163
  }
164
164
 
165
165
  return _default;
166
+ }
167
+
168
+ export const formConfig = {
169
+ namespace: 'incident',
170
+ view: 'incident',
171
+ scope: 'createIncident',
172
+ formType: 'incident',
173
+ }
174
+
175
+ export const viewConfig = {
176
+ title: "Incidents",
177
+ createTitle: "Create Incident",
166
178
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import { getColumns } from './columns.js';
3
2
  import TablePage from '../../TablePage/index.jsx';
4
3
 
5
4
  const IncidentsTable = ({
@@ -52,12 +51,7 @@ const IncidentsTable = ({
52
51
  getData={getData}
53
52
  getApiBaseUrl={getApiBaseUrl}
54
53
  getAppHeader={getAppHeader}
55
- getColumns={getColumns}
56
- viewConfig={{
57
- title: "Incidents",
58
- breadcrumbs: breadcrumbs,
59
- createTitle: "Create Incident",
60
- }}
54
+ breadcrumbs={breadcrumbs}
61
55
  extendingFilters={extendingFilters}
62
56
  formConfig={{
63
57
  getFormData,
@@ -71,12 +65,8 @@ const IncidentsTable = ({
71
65
  formData,
72
66
  formValue,
73
67
  form,
74
- namespace: "incident",
75
- view: 'incident',
76
- scope: 'createIncident',
77
- formType: 'incident',
78
- defaultValues: createDefaultValues,
79
68
  }}
69
+ defaultValues={createDefaultValues}
80
70
  onDownload={() => console.log("download")}
81
71
  />
82
72
  )
@@ -155,4 +155,16 @@ export const getFilterOptions = (options, t) => {
155
155
 
156
156
  }
157
157
 
158
+ }
159
+
160
+ export const formConfig = {
161
+ namespace: 'event',
162
+ view: 'scoping',
163
+ scope: 'create',
164
+ formType: 'event',
165
+ }
166
+
167
+ export const viewConfig = {
168
+ title: "Events",
169
+ createTitle: "Create Event",
158
170
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import { getColumns } from './columns.js';
3
2
  import TablePage from '../TablePage/index.jsx';
4
3
 
5
4
  const EventsTable = ({
@@ -54,12 +53,7 @@ const EventsTable = ({
54
53
  getApiBaseUrl={getApiBaseUrl}
55
54
  getAppHeader={getAppHeader}
56
55
  subjectClear={subjectClear}
57
- getColumns={getColumns}
58
- viewConfig={{
59
- title: "Events",
60
- breadcrumbs: breadcrumbs,
61
- createTitle: "Create Event",
62
- }}
56
+ breadcrumbs={breadcrumbs}
63
57
  extendingFilters={extendingFilters}
64
58
  formConfig={{
65
59
  getFormData,
@@ -73,12 +67,8 @@ const EventsTable = ({
73
67
  formData,
74
68
  formValue,
75
69
  form,
76
- namespace: "event",
77
- view: 'scoping',
78
- scope: 'create',
79
- formType: 'event',
80
- defaultValues: createDefaultValues,
81
70
  }}
71
+ defaultValues={createDefaultValues}
82
72
  onDownload={() => console.log("download")}
83
73
  />
84
74
  )
@@ -151,4 +151,16 @@ export const getFilterOptions = (options, t) => {
151
151
  }
152
152
 
153
153
  return _default;
154
+ }
155
+
156
+ export const formConfig = {
157
+ namespace: 'PRODUCTION SITES',
158
+ view: ['scoping', 'new'],
159
+ scope: 'global',
160
+ formType: 'production-sites',
161
+ }
162
+
163
+ export const viewConfig = {
164
+ title: "Production Sites",
165
+ createTitle: "Create Production Site",
154
166
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import { getColumns } from './columns.js';
3
2
  import TablePage from '../../TablePage/index.jsx';
4
3
 
5
4
  const ProductionSitesTable = ({
@@ -52,12 +51,7 @@ const ProductionSitesTable = ({
52
51
  getData={getData}
53
52
  getApiBaseUrl={getApiBaseUrl}
54
53
  getAppHeader={getAppHeader}
55
- getColumns={getColumns}
56
- viewConfig={{
57
- title: "Production Sites",
58
- breadcrumbs: breadcrumbs,
59
- createTitle: "Create Production Site",
60
- }}
54
+ breadcrumbs={breadcrumbs}
61
55
  extendingFilters={extendingFilters}
62
56
  formConfig={{
63
57
  getFormData,
@@ -71,12 +65,8 @@ const ProductionSitesTable = ({
71
65
  formData,
72
66
  formValue,
73
67
  form,
74
- namespace: "PRODUCTION SITES",
75
- view: ['scoping', 'new'],
76
- scope: 'global',
77
- formType: 'production-sites',
78
- defaultValues: createDefaultValues,
79
68
  }}
69
+ defaultValues={createDefaultValues}
80
70
  onDownload={() => console.log("download")}
81
71
  />
82
72
  )
@@ -26,4 +26,16 @@ export const getFilterOptions = (options, t) => {
26
26
  country: countries,
27
27
  category: locationCategories || category,
28
28
  };
29
+ }
30
+
31
+ export const formConfig = {
32
+ namespace: 'locations',
33
+ view: 'scoping',
34
+ scope: 'create',
35
+ formType: 'location',
36
+ }
37
+
38
+ export const viewConfig = {
39
+ title: "Locations",
40
+ createTitle: "Create Location",
29
41
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import { getColumns } from './columns.js';
3
2
  import TablePage from '../TablePage/index.jsx';
4
3
 
5
4
  const LocationsTable = ({
@@ -48,22 +47,13 @@ const LocationsTable = ({
48
47
  APP={APP}
49
48
  location={location}
50
49
  applications={applications}
51
-
52
50
  subject="locations"
53
51
  getData={getData}
54
52
  getApiBaseUrl={getApiBaseUrl}
55
53
  getAppHeader={getAppHeader}
56
54
  subjectClear={subjectClear}
57
- getColumns={getColumns}
58
-
59
- viewConfig={{
60
- title: "Locations",
61
- breadcrumbs: breadcrumbs,
62
- createTitle: "Create Location",
63
- }}
64
-
55
+ breadcrumbs={breadcrumbs}
65
56
  extendingFilters={extendingFilters}
66
-
67
57
  formConfig={{
68
58
  getFormData,
69
59
  saveFormData,
@@ -76,13 +66,8 @@ const LocationsTable = ({
76
66
  formData,
77
67
  formValue,
78
68
  form,
79
- namespace: 'locations',
80
- view: 'scoping',
81
- scope: 'create',
82
- formType: 'location',
83
- defaultValues: createDefaultValues,
84
69
  }}
85
-
70
+ defaultValues={createDefaultValues}
86
71
  onDownload={() => console.log("download")}
87
72
  />
88
73
  )