datastake-daf 0.6.767 → 0.6.769

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 (79) hide show
  1. package/dist/components/index.js +1007 -730
  2. package/dist/layouts/index.js +495 -459
  3. package/dist/pages/index.js +7914 -6836
  4. package/dist/style/datastake/mapbox-gl.css +330 -0
  5. package/dist/utils/index.js +481 -457
  6. package/package.json +1 -1
  7. package/src/@daf/core/components/Charts/ColumnChart/index.jsx +10 -0
  8. package/src/@daf/core/components/Charts/LineChart/index.jsx +14 -0
  9. package/src/@daf/core/components/Dashboard/Map/ChainIcon/Markers/StakeholderMarker.js +5 -2
  10. package/src/@daf/core/components/Dashboard/Map/ChainIcon/index.js +67 -27
  11. package/src/@daf/core/components/Dashboard/Map/hook.js +26 -32
  12. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/index.jsx +2 -0
  13. package/src/@daf/core/components/Dashboard/Widget/StatCard/StatCard.stories.js +226 -0
  14. package/src/@daf/core/components/Dashboard/Widget/StatCard/index.js +103 -0
  15. package/src/@daf/core/components/Dashboard/Widget/StatCard/style.js +83 -0
  16. package/src/@daf/core/components/Icon/configs/Down.js +8 -0
  17. package/src/@daf/core/components/Icon/configs/Up.js +8 -0
  18. package/src/@daf/core/components/Icon/configs/index.js +4 -0
  19. package/src/@daf/core/components/Icon/configs/partnerIcon.js +1 -1
  20. package/src/@daf/core/components/Screens/BaseScreen/index.jsx +1 -1
  21. package/src/@daf/core/components/Screens/TableScreen/TablePageWithTabs/index.jsx +1 -1
  22. package/src/@daf/core/components/Sidenav/Menu.jsx +4 -4
  23. package/src/@daf/core/components/UI/MissingTagButton/index.jsx +36 -0
  24. package/src/@daf/pages/Dashboards/SupplyChain/components/SupplyChainMap/index.js +0 -2
  25. package/src/@daf/pages/Documents/config.js +0 -10
  26. package/src/@daf/pages/Documents/index.jsx +51 -108
  27. package/src/@daf/pages/Events/Activities/config.js +1 -11
  28. package/src/@daf/pages/Events/Activities/index.jsx +47 -105
  29. package/src/@daf/pages/Events/Incidents/config.js +1 -11
  30. package/src/@daf/pages/Events/Incidents/index.jsx +47 -105
  31. package/src/@daf/pages/Events/config.js +18 -34
  32. package/src/@daf/pages/Events/index.jsx +49 -111
  33. package/src/@daf/pages/Locations/MineSite/config.js +0 -10
  34. package/src/@daf/pages/Locations/MineSite/index.jsx +47 -105
  35. package/src/@daf/pages/Locations/config.js +4 -16
  36. package/src/@daf/pages/Locations/index.jsx +53 -110
  37. package/src/@daf/pages/Stakeholders/Operators/config.js +0 -10
  38. package/src/@daf/pages/Stakeholders/Operators/index.jsx +47 -105
  39. package/src/@daf/pages/Stakeholders/Workers/config.js +0 -10
  40. package/src/@daf/pages/Stakeholders/Workers/index.jsx +47 -105
  41. package/src/@daf/pages/Stakeholders/config.js +3 -15
  42. package/src/@daf/pages/Stakeholders/index.jsx +53 -109
  43. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/AssociatedInformation/index.jsx +43 -0
  44. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/CommunityStats/helper.js +60 -0
  45. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/CommunityStats/index.jsx +36 -0
  46. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/GenderDistribution/helper.js +117 -0
  47. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/GenderDistribution/index.jsx +49 -0
  48. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/JobsTimeline/index.jsx +212 -0
  49. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/index.jsx +72 -0
  50. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/CyclePartners/helper.js +91 -0
  51. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/CyclePartners/index.jsx +50 -0
  52. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/HealthAndSafety/helper.js +134 -0
  53. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/HealthAndSafety/index.jsx +49 -0
  54. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/index.jsx +112 -0
  55. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleOutcomes/index.jsx +498 -0
  56. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/KeyInformation/index.jsx +49 -0
  57. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/PlantingLocations/index.jsx +120 -0
  58. package/src/@daf/pages/Summary/Activities/PlantingCycle/config.js +5 -10
  59. package/src/@daf/pages/Summary/Activities/PlantingCycle/helper.js +218 -0
  60. package/src/@daf/pages/Summary/Activities/PlantingCycle/index.jsx +22 -32
  61. package/src/@daf/pages/Summary/Activities/Restoration/components/ActivityImagery/index.jsx +29 -0
  62. package/src/@daf/pages/Summary/Activities/Restoration/components/ActivityLocation/index.jsx +94 -0
  63. package/src/@daf/pages/Summary/Activities/Restoration/components/WorkersDistribution/index.jsx +49 -0
  64. package/src/@daf/pages/Summary/Activities/Restoration/index.jsx +16 -138
  65. package/src/@daf/pages/TablePage/config.js +78 -0
  66. package/src/@daf/{core/components/Screens/TableScreen/TableWithTabsAndCreate → pages/TablePage}/create.jsx +6 -5
  67. package/src/@daf/pages/TablePage/hook.js +123 -0
  68. package/src/@daf/pages/TablePage/index.jsx +142 -0
  69. package/src/index.js +2 -0
  70. package/src/@daf/core/components/Screens/TableScreen/TableWithTabsAndCreate/index.jsx +0 -115
  71. package/src/@daf/pages/Documents/create.jsx +0 -105
  72. package/src/@daf/pages/Events/Activities/create.jsx +0 -104
  73. package/src/@daf/pages/Events/Incidents/create.jsx +0 -104
  74. package/src/@daf/pages/Events/create.jsx +0 -104
  75. package/src/@daf/pages/Locations/MineSite/create.jsx +0 -104
  76. package/src/@daf/pages/Locations/create.jsx +0 -104
  77. package/src/@daf/pages/Stakeholders/Operators/create.jsx +0 -104
  78. package/src/@daf/pages/Stakeholders/Workers/create.jsx +0 -104
  79. package/src/@daf/pages/Stakeholders/create.jsx +0 -105
@@ -1,11 +1,6 @@
1
- import React, { useMemo, useState, useEffect, useCallback } from '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 { checkboxConfig, getFiltersConfig, filtersConfig, getFilterOptions } from './config.js';
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
- <TablePageWithTabs
89
- t={t}
90
- title={t("Locations")}
91
- breadCrumbs={breadcrumbs}
92
- location={location}
93
- loading={loading}
94
- goTo={goTo}
95
- defaultActiveTab={"own"}
96
- columns={columns}
97
- data={data}
98
- checkboxConfig={checkboxConfig}
99
- APP={APP}
100
- getApiBaseUrl={getApiBaseUrl}
101
- selectOptions={selectOptions}
102
- selectFiltersConfig={selectFiltersConfig}
103
- getRedirectLink={getRedirectLink}
104
- filtersConfig={filtersConfig}
105
- isMobile={isMobile}
106
- view="locations"
107
- getActiveTab={handleActiveTabChange}
108
- onDownload={() => {
109
- console.log("download");
110
- }}
111
- drawerTitle={t("Create Location")}
112
- >
113
- {({onDrawerClose}) => (
114
- <StakeholdersCreate
115
- t={t}
116
- goTo={goTo}
117
- user={user}
118
- APP={APP}
119
- getApiBaseUrl={getApiBaseUrl}
120
- getAppHeader={getAppHeader}
121
- getData={getFormData}
122
- saveData={saveFormData}
123
- loading={formLoading}
124
- onSubmitted={(type, m, data) => {
125
- if (data.datastakeId) {
126
- displayMessage(
127
- type,
128
- t("affirmations::subject-created-successfully") || m,
129
- );
130
- goTo(`/app/edit/locations/${data.datastakeId}`);
131
- }
132
- }}
133
- onCancel={onDrawerClose}
134
- query={query}
135
- ajaxForms={ajaxForms}
136
- changeAjaxForms={changeAjaxForms}
137
- ajaxOptions={ajaxOptions}
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 = [],
@@ -1,11 +1,6 @@
1
- import React, { useMemo, useState, useEffect, useCallback } from '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 { checkboxConfig, getFiltersConfig, filtersConfig, getFilterOptions } from './config.js';
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 OperatorsTable = ({
11
6
  t = () => {},
@@ -38,105 +33,52 @@ const OperatorsTable = ({
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: 'operators',
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: 'operators',
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
- <TablePageWithTabs
82
- t={t}
83
- title={t("Operators")}
84
- breadCrumbs={breadcrumbs}
85
- location={location}
86
- loading={loading}
87
- goTo={goTo}
88
- defaultActiveTab={"own"}
89
- columns={columns}
90
- data={data}
91
- checkboxConfig={checkboxConfig}
92
- APP={APP}
93
- getApiBaseUrl={getApiBaseUrl}
94
- selectOptions={selectOptions}
95
- selectFiltersConfig={selectFiltersConfig}
96
- getRedirectLink={getRedirectLink}
97
- filtersConfig={filtersConfig}
98
- isMobile={isMobile}
99
- view="operators"
100
- getActiveTab={handleActiveTabChange}
101
- onDownload={() => {
102
- console.log("download");
103
- }}
104
- drawerTitle={t("Create Operator")}
105
- >
106
- {({onDrawerClose}) => (
107
- <StakeholdersCreate
108
- defaultData={createDefaultValues}
109
- t={t}
110
- goTo={goTo}
111
- user={user}
112
- APP={APP}
113
- getApiBaseUrl={getApiBaseUrl}
114
- getAppHeader={getAppHeader}
115
- getData={getFormData}
116
- saveData={saveFormData}
117
- loading={formLoading}
118
- onSubmitted={(type, m, data) => {
119
- if (data.datastakeId) {
120
- displayMessage(
121
- type,
122
- t("affirmations::subject-created-successfully") || m,
123
- );
124
- // goTo(`/app/edit/stakeholders/${data.datastakeId}`);
125
- goTo(`/app/edit/operators/${data.datastakeId}`)
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="operators"
52
+ getData={getData}
53
+ getApiBaseUrl={getApiBaseUrl}
54
+ getAppHeader={getAppHeader}
55
+ getColumns={getColumns}
56
+ viewConfig={{
57
+ title: "Operators",
58
+ breadcrumbs: breadcrumbs,
59
+ createTitle: "Create Operator",
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: "OPERATOR",
75
+ view: ['scoping', 'new'],
76
+ scope: 'global',
77
+ formType: 'operator',
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: {
@@ -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, { useMemo, useState, useEffect, useCallback } from '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 { checkboxConfig, getFiltersConfig, filtersConfig, getFilterOptions } from './config.js';
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 WorkersTable = ({
11
6
  t = () => {},
@@ -38,105 +33,52 @@ const WorkersTable = ({
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: 'workers',
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: 'workers',
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
- <TablePageWithTabs
82
- t={t}
83
- title={t("Workers")}
84
- breadCrumbs={breadcrumbs}
85
- location={location}
86
- loading={loading}
87
- goTo={goTo}
88
- defaultActiveTab={"own"}
89
- columns={columns}
90
- data={data}
91
- checkboxConfig={checkboxConfig}
92
- APP={APP}
93
- getApiBaseUrl={getApiBaseUrl}
94
- selectOptions={selectOptions}
95
- selectFiltersConfig={selectFiltersConfig}
96
- getRedirectLink={getRedirectLink}
97
- filtersConfig={filtersConfig}
98
- isMobile={isMobile}
99
- view="workers"
100
- getActiveTab={handleActiveTabChange}
101
- onDownload={() => {
102
- console.log("download");
103
- }}
104
- drawerTitle={t("Create Worker")}
105
- >
106
- {({onDrawerClose}) => (
107
- <StakeholdersCreate
108
- defaultData={createDefaultValues}
109
- t={t}
110
- goTo={goTo}
111
- user={user}
112
- APP={APP}
113
- getApiBaseUrl={getApiBaseUrl}
114
- getAppHeader={getAppHeader}
115
- getData={getFormData}
116
- saveData={saveFormData}
117
- loading={formLoading}
118
- onSubmitted={(type, m, data) => {
119
- if (data.datastakeId) {
120
- displayMessage(
121
- type,
122
- t("affirmations::subject-created-successfully") || m,
123
- );
124
- // goTo(`/app/edit/stakeholders/${data.datastakeId}`);
125
- goTo(`/app/edit/workers/${data.datastakeId}`)
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="workers"
52
+ getData={getData}
53
+ getApiBaseUrl={getApiBaseUrl}
54
+ getAppHeader={getAppHeader}
55
+ getColumns={getColumns}
56
+ viewConfig={{
57
+ title: "Workers",
58
+ breadcrumbs: breadcrumbs,
59
+ createTitle: "Create Worker",
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: "WORKERS",
75
+ view: ['scoping', 'new'],
76
+ scope: 'global',
77
+ formType: 'worker',
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
- const _default = {
24
+ const { countries = [], category = [], categoriesOptions = [] } = options || {};
25
+ return {
36
26
  country: countries,
37
- category: category,
27
+ category: categoriesOptions || category,
38
28
  }
39
-
40
- return _default;
41
29
  }