datastake-daf 0.6.770 → 0.6.772
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/dist/components/index.js +3362 -3143
- package/dist/pages/index.js +2279 -2142
- package/dist/services/index.js +10 -4
- package/dist/utils/index.js +4 -16
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Map/ChainIcon/index.js +1 -0
- package/src/@daf/core/components/Dashboard/Map/hook.js +14 -1
- package/src/@daf/core/components/Graphs/TradeRelationship/index.jsx +4 -0
- package/src/@daf/core/components/Screens/Admin/AdminDashboard/index.jsx +0 -2
- package/src/@daf/core/components/Screens/Settings/Edit/index.js +2 -0
- package/src/@daf/core/components/Screens/Settings/components/Header/index.js +1 -1
- package/src/@daf/core/components/ViewForm/components/Records/config.js +22 -0
- package/src/@daf/core/components/ViewForm/components/Records/index.jsx +155 -0
- package/src/@daf/pages/Dashboards/SupplyChain/components/SupplyChainMap/index.js +3 -3
- package/src/@daf/pages/Documents/config.js +12 -0
- package/src/@daf/pages/Documents/index.jsx +3 -13
- package/src/@daf/pages/Events/Activities/config.js +12 -0
- package/src/@daf/pages/Events/Activities/index.jsx +2 -13
- package/src/@daf/pages/Events/Incidents/config.js +12 -0
- package/src/@daf/pages/Events/Incidents/index.jsx +2 -12
- package/src/@daf/pages/Events/config.js +12 -0
- package/src/@daf/pages/Events/index.jsx +2 -12
- package/src/@daf/pages/Locations/MineSite/config.js +12 -0
- package/src/@daf/pages/Locations/MineSite/index.jsx +2 -12
- package/src/@daf/pages/Locations/config.js +12 -0
- package/src/@daf/pages/Locations/index.jsx +2 -17
- package/src/@daf/pages/Stakeholders/Operators/config.js +12 -0
- package/src/@daf/pages/Stakeholders/Operators/index.jsx +2 -12
- package/src/@daf/pages/Stakeholders/Workers/config.js +12 -0
- package/src/@daf/pages/Stakeholders/Workers/index.jsx +2 -10
- package/src/@daf/pages/Stakeholders/config.js +12 -0
- package/src/@daf/pages/Stakeholders/index.jsx +3 -18
- package/src/@daf/pages/Summary/Operator/components/TradeRelationships/index.js +1 -0
- package/src/@daf/pages/Summary/hook.js +13 -3
- package/src/@daf/pages/TablePage/columns.js +29 -0
- package/src/@daf/pages/TablePage/config.js +19 -62
- package/src/@daf/pages/TablePage/helper.js +140 -0
- package/src/@daf/pages/TablePage/hook.js +20 -2
- package/src/@daf/pages/TablePage/index.jsx +12 -20
- package/src/@daf/services/LinkedSubjects.js +2 -2
- package/src/@daf/services/OperatorService.js +2 -2
- package/src/@daf/services/VersionService.js +13 -0
- package/src/@daf/utils/tooltip.js +3 -16
- package/src/index.js +1 -0
- package/src/pages.js +1 -0
- package/dist/style/datastake/mapbox-gl.css +0 -330
package/dist/services/index.js
CHANGED
|
@@ -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
|
}
|
|
@@ -1491,12 +1495,14 @@ class OperatorService extends BaseService {
|
|
|
1491
1495
|
}
|
|
1492
1496
|
});
|
|
1493
1497
|
}
|
|
1494
|
-
getData(id, sourceId) {
|
|
1498
|
+
getData(id, sourceId, source, version) {
|
|
1495
1499
|
return this.apiGet({
|
|
1496
1500
|
isApp: true,
|
|
1497
1501
|
url: `/stakeholder/${id}`,
|
|
1498
1502
|
params: {
|
|
1499
|
-
authorId: sourceId
|
|
1503
|
+
authorId: sourceId,
|
|
1504
|
+
source,
|
|
1505
|
+
version
|
|
1500
1506
|
}
|
|
1501
1507
|
});
|
|
1502
1508
|
}
|
package/dist/utils/index.js
CHANGED
|
@@ -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 ?
|
|
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
|
@@ -193,8 +193,21 @@ 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
|
-
|
|
208
|
+
|
|
209
|
+
const dataToRender = type === "chain" ? filteredData : data;
|
|
210
|
+
dataToRender.forEach((d, i) => {
|
|
198
211
|
addIconToMapInitialy(
|
|
199
212
|
[d?.marker?.lat, d?.marker?.lng],
|
|
200
213
|
"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
|
|
|
@@ -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({
|
|
@@ -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
|
-
|
|
59
|
+
window.open(getRedirectLink(`/app/mine-summary/${data.datastakeId}`), '_blank');
|
|
60
60
|
} else if (locationTypes.includes(data.type)) {
|
|
61
|
-
|
|
61
|
+
window.open(getRedirectLink(`/app/view/locations/${data.datastakeId}`), '_blank');
|
|
62
62
|
} else {
|
|
63
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
}
|