datastake-daf 0.6.766 → 0.6.768
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 +269 -140
- package/dist/pages/index.js +4736 -5657
- package/dist/utils/index.js +16 -1
- package/package.json +4 -1
- package/src/@daf/core/components/Dashboard/Map/ChainIcon/Markers/StakeholderMarker.js +5 -2
- package/src/@daf/core/components/Dashboard/Map/ChainIcon/index.js +67 -28
- package/src/@daf/core/components/Dashboard/Map/StakeholderIcon/index.js +3 -0
- package/src/@daf/core/components/Dashboard/Map/hook.js +57 -33
- package/src/@daf/core/components/Graphs/TradeRelationship/index.jsx +49 -11
- package/src/@daf/core/components/Graphs/components/BaseGraph.jsx +8 -4
- package/src/@daf/core/components/Screens/BaseScreen/index.jsx +1 -1
- package/src/@daf/core/components/Screens/TableScreen/TablePageWithTabs/index.jsx +1 -1
- package/src/@daf/core/components/UI/MissingTagButton/index.jsx +36 -0
- package/src/@daf/hooks/useMapHelper.js +5 -0
- package/src/@daf/pages/Dashboards/SupplyChain/components/SupplyChainMap/index.js +3 -2
- package/src/@daf/pages/Documents/config.js +0 -10
- package/src/@daf/pages/Documents/index.jsx +51 -108
- package/src/@daf/pages/Events/Activities/config.js +1 -11
- package/src/@daf/pages/Events/Activities/index.jsx +47 -105
- package/src/@daf/pages/Events/Incidents/config.js +1 -11
- package/src/@daf/pages/Events/Incidents/index.jsx +47 -105
- package/src/@daf/pages/Events/config.js +18 -34
- package/src/@daf/pages/Events/helper.js +0 -1
- package/src/@daf/pages/Events/index.jsx +49 -111
- package/src/@daf/pages/Locations/MineSite/columns.js +1 -1
- package/src/@daf/pages/Locations/MineSite/config.js +0 -10
- package/src/@daf/pages/Locations/MineSite/index.jsx +47 -105
- package/src/@daf/pages/Locations/config.js +4 -16
- package/src/@daf/pages/Locations/index.jsx +53 -110
- package/src/@daf/pages/Stakeholders/Operators/config.js +0 -10
- package/src/@daf/pages/Stakeholders/Operators/index.jsx +47 -105
- package/src/@daf/pages/Stakeholders/Workers/config.js +0 -10
- package/src/@daf/pages/Stakeholders/Workers/index.jsx +47 -105
- package/src/@daf/pages/Stakeholders/config.js +3 -15
- package/src/@daf/pages/Stakeholders/index.jsx +53 -109
- package/src/@daf/pages/Summary/Operator/components/TradeRelationships/index.js +5 -1
- package/src/@daf/pages/TablePage/config.js +78 -0
- package/src/@daf/pages/{Events → TablePage}/create.jsx +11 -8
- package/src/@daf/pages/TablePage/hook.js +123 -0
- package/src/@daf/pages/TablePage/index.jsx +142 -0
- package/src/constants/locales/en/translation.js +5 -0
- package/src/constants/locales/fr/translation.js +5 -0
- package/src/index.js +1 -0
- package/src/@daf/pages/Documents/create.jsx +0 -105
- package/src/@daf/pages/Events/Activities/create.jsx +0 -104
- package/src/@daf/pages/Events/Incidents/create.jsx +0 -104
- package/src/@daf/pages/Locations/MineSite/create.jsx +0 -104
- package/src/@daf/pages/Locations/create.jsx +0 -104
- package/src/@daf/pages/Stakeholders/Operators/create.jsx +0 -104
- package/src/@daf/pages/Stakeholders/Workers/create.jsx +0 -104
- package/src/@daf/pages/Stakeholders/create.jsx +0 -105
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import TablePageWithTabs from '../../core/components/Screens/TableScreen/TablePageWithTabs/index.jsx'
|
|
1
|
+
import React from 'react'
|
|
3
2
|
import { getColumns } from './columns.js';
|
|
4
|
-
import
|
|
5
|
-
import { useGetQueryParams } from '../../hooks/useGetQueryParams.js';
|
|
6
|
-
import EventsCreate from './create.jsx';
|
|
7
|
-
import { displayMessage } from '../../../helpers/messages.js';
|
|
8
|
-
import { useFetchData } from '../hook.js';
|
|
3
|
+
import TablePage from '../TablePage/index.jsx';
|
|
9
4
|
|
|
10
5
|
const EventsTable = ({
|
|
11
6
|
t = () => {},
|
|
@@ -37,112 +32,55 @@ const EventsTable = ({
|
|
|
37
32
|
applications = [],
|
|
38
33
|
subjectClear = () => {},
|
|
39
34
|
breadcrumbs = [],
|
|
35
|
+
createDefaultValues = {},
|
|
40
36
|
}) => {
|
|
41
|
-
const [selectOptions, setSelectOptions] = useState();
|
|
42
|
-
const [activeTab, setActiveTab] = useState("own");
|
|
43
|
-
|
|
44
|
-
const columns = useMemo(() => getColumns({
|
|
45
|
-
t,
|
|
46
|
-
goTo,
|
|
47
|
-
user,
|
|
48
|
-
options,
|
|
49
|
-
activeTab,
|
|
50
|
-
getRedirectLink,
|
|
51
|
-
theme,
|
|
52
|
-
subject: 'events',
|
|
53
|
-
data,
|
|
54
|
-
applications,
|
|
55
|
-
}), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
|
|
56
|
-
|
|
57
|
-
useFetchData({
|
|
58
|
-
location,
|
|
59
|
-
getData,
|
|
60
|
-
activeTab,
|
|
61
|
-
extendingFilters,
|
|
62
|
-
subject: 'events',
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
const selectFiltersConfig = useMemo(() => {
|
|
66
|
-
return getFiltersConfig({t});
|
|
67
|
-
}, [t]);
|
|
68
|
-
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
setSelectOptions((prev) => ({
|
|
71
|
-
...prev,
|
|
72
|
-
...getFilterOptions(options, t),
|
|
73
|
-
}))
|
|
74
|
-
}, [options, t])
|
|
75
|
-
|
|
76
|
-
const handleActiveTabChange = useCallback((value) => {
|
|
77
|
-
setActiveTab(value);
|
|
78
|
-
}, []);
|
|
79
|
-
|
|
80
|
-
useEffect(
|
|
81
|
-
() => () => {
|
|
82
|
-
subjectClear();
|
|
83
|
-
},
|
|
84
|
-
[],
|
|
85
|
-
);
|
|
86
|
-
|
|
87
37
|
return (
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
onCancel={onDrawerClose}
|
|
135
|
-
query={query}
|
|
136
|
-
ajaxForms={ajaxForms}
|
|
137
|
-
changeAjaxForms={changeAjaxForms}
|
|
138
|
-
ajaxOptions={ajaxOptions}
|
|
139
|
-
changeAjaxOptions={changeAjaxOptions}
|
|
140
|
-
formData={formData}
|
|
141
|
-
formValue={formValue}
|
|
142
|
-
form={form}
|
|
143
|
-
/>
|
|
144
|
-
)}
|
|
145
|
-
</TablePageWithTabs>
|
|
38
|
+
<TablePage
|
|
39
|
+
t={t}
|
|
40
|
+
goTo={goTo}
|
|
41
|
+
user={user}
|
|
42
|
+
options={options}
|
|
43
|
+
getRedirectLink={getRedirectLink}
|
|
44
|
+
theme={theme}
|
|
45
|
+
loading={loading}
|
|
46
|
+
data={data}
|
|
47
|
+
isMobile={isMobile}
|
|
48
|
+
APP={APP}
|
|
49
|
+
location={location}
|
|
50
|
+
applications={applications}
|
|
51
|
+
|
|
52
|
+
subject="events"
|
|
53
|
+
getData={getData}
|
|
54
|
+
getApiBaseUrl={getApiBaseUrl}
|
|
55
|
+
getAppHeader={getAppHeader}
|
|
56
|
+
subjectClear={subjectClear}
|
|
57
|
+
getColumns={getColumns}
|
|
58
|
+
viewConfig={{
|
|
59
|
+
title: "Events",
|
|
60
|
+
breadcrumbs: breadcrumbs,
|
|
61
|
+
createTitle: "Create Event",
|
|
62
|
+
}}
|
|
63
|
+
extendingFilters={extendingFilters}
|
|
64
|
+
formConfig={{
|
|
65
|
+
getFormData,
|
|
66
|
+
saveFormData,
|
|
67
|
+
formLoading,
|
|
68
|
+
query,
|
|
69
|
+
ajaxForms,
|
|
70
|
+
changeAjaxForms,
|
|
71
|
+
ajaxOptions,
|
|
72
|
+
changeAjaxOptions,
|
|
73
|
+
formData,
|
|
74
|
+
formValue,
|
|
75
|
+
form,
|
|
76
|
+
namespace: "event",
|
|
77
|
+
view: 'scoping',
|
|
78
|
+
scope: 'create',
|
|
79
|
+
formType: 'event',
|
|
80
|
+
defaultValues: createDefaultValues,
|
|
81
|
+
}}
|
|
82
|
+
onDownload={() => console.log("download")}
|
|
83
|
+
/>
|
|
146
84
|
)
|
|
147
85
|
}
|
|
148
86
|
|
|
@@ -90,7 +90,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
90
90
|
return <div className="daf-default-cell" />
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
const operators = all?.operator?.map((operator) => operator?.
|
|
93
|
+
const operators = all?.operator?.map((operator) => operator?.locationClient?.name)?.filter(Boolean);
|
|
94
94
|
return (operators && operators.length > 0) ? <MoreOptions data={operators || []} toolTipPlacement={operators?.length < 2 ? "topLeft" : "top"} /> : '-';
|
|
95
95
|
},
|
|
96
96
|
},
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export const checkboxConfig = {
|
|
2
|
-
name: 'Name',
|
|
3
|
-
datastakeId: 'ID'
|
|
4
|
-
}
|
|
5
|
-
|
|
6
1
|
export const getFiltersConfig = ({t}) => {
|
|
7
2
|
return {
|
|
8
3
|
country: {
|
|
@@ -122,11 +117,6 @@ export const getFiltersConfig = ({t}) => {
|
|
|
122
117
|
}
|
|
123
118
|
}
|
|
124
119
|
|
|
125
|
-
export const filtersConfig = {
|
|
126
|
-
name: '',
|
|
127
|
-
datastakeId: '',
|
|
128
|
-
};
|
|
129
|
-
|
|
130
120
|
export const getFilterOptions = (options, t) => {
|
|
131
121
|
const {
|
|
132
122
|
statusOptions = [],
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import TablePageWithTabs from '../../../core/components/Screens/TableScreen/TablePageWithTabs/index.jsx'
|
|
1
|
+
import React from 'react'
|
|
3
2
|
import { getColumns } from './columns.js';
|
|
4
|
-
import
|
|
5
|
-
import { useGetQueryParams } from '../../../hooks/useGetQueryParams.js';
|
|
6
|
-
import ProductionSitesCreate from './create.jsx';
|
|
7
|
-
import { displayMessage } from '../../../../helpers/messages.js';
|
|
8
|
-
import { useFetchData } from '../../hook.js';
|
|
3
|
+
import TablePage from '../../TablePage/index.jsx';
|
|
9
4
|
|
|
10
5
|
const ProductionSitesTable = ({
|
|
11
6
|
t = () => {},
|
|
@@ -38,105 +33,52 @@ const ProductionSitesTable = ({
|
|
|
38
33
|
applications = [],
|
|
39
34
|
breadcrumbs = [],
|
|
40
35
|
}) => {
|
|
41
|
-
const [selectOptions, setSelectOptions] = useState();
|
|
42
|
-
const [activeTab, setActiveTab] = useState('own');
|
|
43
|
-
|
|
44
|
-
const columns = useMemo(() => getColumns({
|
|
45
|
-
t,
|
|
46
|
-
goTo,
|
|
47
|
-
user,
|
|
48
|
-
options,
|
|
49
|
-
activeTab,
|
|
50
|
-
getRedirectLink,
|
|
51
|
-
theme,
|
|
52
|
-
subject: 'production-sites',
|
|
53
|
-
data,
|
|
54
|
-
applications,
|
|
55
|
-
}), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
|
|
56
|
-
|
|
57
|
-
useFetchData({
|
|
58
|
-
location,
|
|
59
|
-
getData,
|
|
60
|
-
activeTab,
|
|
61
|
-
extendingFilters,
|
|
62
|
-
subject: 'production-sites',
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
const selectFiltersConfig = useMemo(() => {
|
|
66
|
-
return getFiltersConfig({t});
|
|
67
|
-
}, [t]);
|
|
68
|
-
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
setSelectOptions((prev) => ({
|
|
71
|
-
...prev,
|
|
72
|
-
...getFilterOptions(options, t),
|
|
73
|
-
}))
|
|
74
|
-
}, [options, t])
|
|
75
|
-
|
|
76
|
-
const handleActiveTabChange = useCallback((value) => {
|
|
77
|
-
setActiveTab(value);
|
|
78
|
-
}, []);
|
|
79
|
-
|
|
80
36
|
return (
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
}}
|
|
128
|
-
onCancel={onDrawerClose}
|
|
129
|
-
query={query}
|
|
130
|
-
ajaxForms={ajaxForms}
|
|
131
|
-
changeAjaxForms={changeAjaxForms}
|
|
132
|
-
ajaxOptions={ajaxOptions}
|
|
133
|
-
changeAjaxOptions={changeAjaxOptions}
|
|
134
|
-
formData={formData}
|
|
135
|
-
formValue={formValue}
|
|
136
|
-
form={form}
|
|
137
|
-
/>
|
|
138
|
-
)}
|
|
139
|
-
</TablePageWithTabs>
|
|
37
|
+
<TablePage
|
|
38
|
+
t={t}
|
|
39
|
+
goTo={goTo}
|
|
40
|
+
user={user}
|
|
41
|
+
options={options}
|
|
42
|
+
getRedirectLink={getRedirectLink}
|
|
43
|
+
theme={theme}
|
|
44
|
+
loading={loading}
|
|
45
|
+
data={data}
|
|
46
|
+
isMobile={isMobile}
|
|
47
|
+
APP={APP}
|
|
48
|
+
location={location}
|
|
49
|
+
applications={applications}
|
|
50
|
+
|
|
51
|
+
subject="production-sites"
|
|
52
|
+
getData={getData}
|
|
53
|
+
getApiBaseUrl={getApiBaseUrl}
|
|
54
|
+
getAppHeader={getAppHeader}
|
|
55
|
+
getColumns={getColumns}
|
|
56
|
+
viewConfig={{
|
|
57
|
+
title: "Production Sites",
|
|
58
|
+
breadcrumbs: breadcrumbs,
|
|
59
|
+
createTitle: "Create Production Site",
|
|
60
|
+
}}
|
|
61
|
+
extendingFilters={extendingFilters}
|
|
62
|
+
formConfig={{
|
|
63
|
+
getFormData,
|
|
64
|
+
saveFormData,
|
|
65
|
+
formLoading,
|
|
66
|
+
query,
|
|
67
|
+
ajaxForms,
|
|
68
|
+
changeAjaxForms,
|
|
69
|
+
ajaxOptions,
|
|
70
|
+
changeAjaxOptions,
|
|
71
|
+
formData,
|
|
72
|
+
formValue,
|
|
73
|
+
form,
|
|
74
|
+
namespace: "PRODUCTION SITES",
|
|
75
|
+
view: ['scoping', 'new'],
|
|
76
|
+
scope: 'global',
|
|
77
|
+
formType: 'production-sites',
|
|
78
|
+
defaultValues: createDefaultValues,
|
|
79
|
+
}}
|
|
80
|
+
onDownload={() => console.log("download")}
|
|
81
|
+
/>
|
|
140
82
|
)
|
|
141
83
|
}
|
|
142
84
|
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export const checkboxConfig = {
|
|
2
|
-
name: 'Name',
|
|
3
|
-
datastakeId: 'ID'
|
|
4
|
-
}
|
|
5
|
-
|
|
6
1
|
export const getFiltersConfig = ({t}) => {
|
|
7
2
|
return {
|
|
8
3
|
country: {
|
|
@@ -25,17 +20,10 @@ export const getFiltersConfig = ({t}) => {
|
|
|
25
20
|
}
|
|
26
21
|
}
|
|
27
22
|
|
|
28
|
-
export const filtersConfig = {
|
|
29
|
-
name: '',
|
|
30
|
-
datastakeId: '',
|
|
31
|
-
};
|
|
32
|
-
|
|
33
23
|
export const getFilterOptions = (options, t) => {
|
|
34
|
-
const { countries = [], category = [] } = options || {};
|
|
35
|
-
|
|
24
|
+
const { countries = [], category = [], locationCategories = [] } = options || {};
|
|
25
|
+
return {
|
|
36
26
|
country: countries,
|
|
37
|
-
category: category,
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return _default;
|
|
27
|
+
category: locationCategories || category,
|
|
28
|
+
};
|
|
41
29
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import TablePageWithTabs from '../../core/components/Screens/TableScreen/TablePageWithTabs/index.jsx'
|
|
1
|
+
import React from 'react'
|
|
3
2
|
import { getColumns } from './columns.js';
|
|
4
|
-
import
|
|
5
|
-
import { useGetQueryParams } from '../../hooks/useGetQueryParams.js';
|
|
6
|
-
import StakeholdersCreate from './create.jsx';
|
|
7
|
-
import { displayMessage } from '../../../helpers/messages.js';
|
|
8
|
-
import { useFetchData } from '../hook.js';
|
|
3
|
+
import TablePage from '../TablePage/index.jsx';
|
|
9
4
|
|
|
10
5
|
const LocationsTable = ({
|
|
11
6
|
t = () => {},
|
|
@@ -37,111 +32,59 @@ const LocationsTable = ({
|
|
|
37
32
|
subjectClear = () => {},
|
|
38
33
|
breadcrumbs = [],
|
|
39
34
|
extendingFilters = {},
|
|
35
|
+
createDefaultValues = {},
|
|
40
36
|
}) => {
|
|
41
|
-
const [selectOptions, setSelectOptions] = useState();
|
|
42
|
-
const [activeTab, setActiveTab] = useState("own");
|
|
43
|
-
|
|
44
|
-
const columns = useMemo(() => getColumns({
|
|
45
|
-
t,
|
|
46
|
-
goTo,
|
|
47
|
-
user,
|
|
48
|
-
options,
|
|
49
|
-
activeTab,
|
|
50
|
-
getRedirectLink,
|
|
51
|
-
theme,
|
|
52
|
-
subject: 'locations',
|
|
53
|
-
data,
|
|
54
|
-
applications,
|
|
55
|
-
}), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
|
|
56
|
-
|
|
57
|
-
useFetchData({
|
|
58
|
-
location,
|
|
59
|
-
getData,
|
|
60
|
-
activeTab,
|
|
61
|
-
extendingFilters,
|
|
62
|
-
subject: 'locations',
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
const selectFiltersConfig = useMemo(() => {
|
|
66
|
-
return getFiltersConfig({t});
|
|
67
|
-
}, [t]);
|
|
68
|
-
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
setSelectOptions((prev) => ({
|
|
71
|
-
...prev,
|
|
72
|
-
...getFilterOptions(options, t),
|
|
73
|
-
}))
|
|
74
|
-
}, [options, t])
|
|
75
|
-
|
|
76
|
-
const handleActiveTabChange = useCallback((value) => {
|
|
77
|
-
setActiveTab(value);
|
|
78
|
-
}, []);
|
|
79
|
-
|
|
80
|
-
useEffect(
|
|
81
|
-
() => () => {
|
|
82
|
-
subjectClear();
|
|
83
|
-
},
|
|
84
|
-
[],
|
|
85
|
-
);
|
|
86
|
-
|
|
87
37
|
return (
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
changeAjaxOptions={changeAjaxOptions}
|
|
139
|
-
formData={formData}
|
|
140
|
-
formValue={formValue}
|
|
141
|
-
form={form}
|
|
142
|
-
/>
|
|
143
|
-
)}
|
|
144
|
-
</TablePageWithTabs>
|
|
38
|
+
<TablePage
|
|
39
|
+
t={t}
|
|
40
|
+
goTo={goTo}
|
|
41
|
+
user={user}
|
|
42
|
+
options={options}
|
|
43
|
+
getRedirectLink={getRedirectLink}
|
|
44
|
+
theme={theme}
|
|
45
|
+
loading={loading}
|
|
46
|
+
data={data}
|
|
47
|
+
isMobile={isMobile}
|
|
48
|
+
APP={APP}
|
|
49
|
+
location={location}
|
|
50
|
+
applications={applications}
|
|
51
|
+
|
|
52
|
+
subject="locations"
|
|
53
|
+
getData={getData}
|
|
54
|
+
getApiBaseUrl={getApiBaseUrl}
|
|
55
|
+
getAppHeader={getAppHeader}
|
|
56
|
+
subjectClear={subjectClear}
|
|
57
|
+
getColumns={getColumns}
|
|
58
|
+
|
|
59
|
+
viewConfig={{
|
|
60
|
+
title: "Locations",
|
|
61
|
+
breadcrumbs: breadcrumbs,
|
|
62
|
+
createTitle: "Create Location",
|
|
63
|
+
}}
|
|
64
|
+
|
|
65
|
+
extendingFilters={extendingFilters}
|
|
66
|
+
|
|
67
|
+
formConfig={{
|
|
68
|
+
getFormData,
|
|
69
|
+
saveFormData,
|
|
70
|
+
formLoading,
|
|
71
|
+
query,
|
|
72
|
+
ajaxForms,
|
|
73
|
+
changeAjaxForms,
|
|
74
|
+
ajaxOptions,
|
|
75
|
+
changeAjaxOptions,
|
|
76
|
+
formData,
|
|
77
|
+
formValue,
|
|
78
|
+
form,
|
|
79
|
+
namespace: 'locations',
|
|
80
|
+
view: 'scoping',
|
|
81
|
+
scope: 'create',
|
|
82
|
+
formType: 'location',
|
|
83
|
+
defaultValues: createDefaultValues,
|
|
84
|
+
}}
|
|
85
|
+
|
|
86
|
+
onDownload={() => console.log("download")}
|
|
87
|
+
/>
|
|
145
88
|
)
|
|
146
89
|
}
|
|
147
90
|
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export const checkboxConfig = {
|
|
2
|
-
name: 'Name',
|
|
3
|
-
datastakeId: 'ID'
|
|
4
|
-
}
|
|
5
|
-
|
|
6
1
|
export const getFiltersConfig = ({t}) => {
|
|
7
2
|
return {
|
|
8
3
|
country: {
|
|
@@ -122,11 +117,6 @@ export const getFiltersConfig = ({t}) => {
|
|
|
122
117
|
}
|
|
123
118
|
}
|
|
124
119
|
|
|
125
|
-
export const filtersConfig = {
|
|
126
|
-
name: '',
|
|
127
|
-
datastakeId: '',
|
|
128
|
-
};
|
|
129
|
-
|
|
130
120
|
export const getFilterOptions = (options, t) => {
|
|
131
121
|
const {
|
|
132
122
|
statusOptions = [],
|