datastake-daf 0.6.743 → 0.6.745
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 +549 -893
- package/dist/context/index.js +0 -3
- package/dist/hooks/index.js +19 -4658
- package/dist/layouts/index.js +573 -916
- package/dist/pages/index.js +2630 -1243
- package/dist/services/index.js +3 -9
- package/dist/utils/index.js +466 -808
- package/package.json +3 -1
- package/rollup.config.js +7 -2
- package/src/@daf/core/components/DynamicForm/components/ajaxModal.js +1 -1
- package/src/@daf/core/components/EditForm/components/Comment/index.js +1 -1
- package/src/@daf/core/components/EditForm/components/DataLink/ajaxSelectDataLink.js +1 -1
- package/src/@daf/core/components/EditForm/components/DataLink/flat.js +1 -1
- package/src/@daf/core/components/EditForm/components/DataLink/index.js +1 -1
- package/src/@daf/core/components/EditForm/components/DataLinkGroup/index.js +1 -1
- package/src/@daf/core/components/EditForm/components/Repeatable/index.js +1 -1
- package/src/@daf/core/components/EditForm/components/ajaxSelect.js +1 -1
- package/src/@daf/core/components/EditForm/components/geolocation.js +1 -0
- package/src/@daf/core/components/EditForm/helper.js +0 -4
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineAccount/index.jsx +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/index.jsx +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineSubjects/index.jsx +1 -1
- package/src/@daf/layouts/AppLayout/index.jsx +5 -4
- package/src/@daf/layouts/AuthLayout/components/Select/style.js +1 -1
- package/src/@daf/layouts/AuthLayout/style.js +1 -1
- package/src/@daf/pages/Documents/columns.js +102 -0
- package/src/@daf/pages/{dashboards/AllInformation/Documents → Documents}/create.jsx +7 -6
- package/src/@daf/pages/{dashboards/AllInformation/Documents → Documents}/index.jsx +20 -27
- package/src/@daf/pages/Events/Activities/columns.js +222 -0
- package/src/@daf/pages/{dashboards/DueDilligence → Events}/Activities/create.jsx +2 -2
- package/src/@daf/pages/{dashboards/DueDilligence → Events}/Activities/index.jsx +6 -6
- package/src/@daf/pages/{dashboards/DueDilligence/Activities → Events/Incidents}/columns.js +5 -5
- package/src/@daf/pages/Events/Incidents/create.jsx +104 -0
- package/src/@daf/pages/Events/Incidents/index.jsx +157 -0
- package/src/@daf/pages/Events/Incidents2/columns.js +176 -0
- package/src/@daf/pages/Events/Incidents2/config.js +170 -0
- package/src/@daf/pages/Events/Incidents2/create.jsx +104 -0
- package/src/@daf/pages/Events/Incidents2/index.jsx +156 -0
- package/src/@daf/pages/Events/columns.js +226 -0
- package/src/@daf/pages/Events/config.js +183 -0
- package/src/@daf/pages/{dashboards/AllInformation/Events → Events}/create.jsx +4 -4
- package/src/@daf/pages/{dashboards/AllInformation/Events → Events}/index.jsx +13 -9
- package/src/@daf/pages/{dashboards/AllInformation/Events → Locations/MineSite}/columns.js +52 -53
- package/src/@daf/pages/Locations/MineSite/config.js +165 -0
- package/src/@daf/pages/Locations/MineSite/create.jsx +104 -0
- package/src/@daf/pages/Locations/MineSite/index.jsx +155 -0
- package/src/@daf/pages/{dashboards/AllInformation/Locations → Locations}/columns.js +5 -5
- package/src/@daf/pages/{dashboards/AllInformation/Locations → Locations}/create.jsx +3 -3
- package/src/@daf/pages/{dashboards/AllInformation/Locations → Locations}/index.jsx +13 -5
- package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Operators/columns.js +5 -5
- package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Operators/create.jsx +2 -2
- package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Operators/index.jsx +5 -5
- package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Workers/columns.js +6 -6
- package/src/@daf/pages/Stakeholders/Workers/config.js +166 -0
- package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Workers/create.jsx +2 -2
- package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Workers/index.jsx +5 -5
- package/src/@daf/pages/{dashboards/AllInformation/Stakeholders → Stakeholders}/columns.js +5 -5
- package/src/@daf/pages/{dashboards/AllInformation/Stakeholders → Stakeholders}/create.jsx +3 -3
- package/src/@daf/pages/{dashboards/AllInformation/Stakeholders → Stakeholders}/index.jsx +14 -6
- package/src/@daf/pages/dashboards/SupplyChain/components/ChartsContainer/components/Identification/index.js +0 -2
- package/src/@daf/pages/dashboards/UserDashboard/components/KeyIndicators/config.js +2 -2
- package/src/@daf/pages/dashboards/UserDashboard/components/MineSites/index.jsx +1 -5
- package/src/@daf/pages/dashboards/UserDashboard/config.js +2 -2
- package/src/@daf/pages/pages/TablePageWithTabs/index.jsx +2 -2
- package/src/@daf/services/AuthenticationService.js +0 -1
- package/src/@daf/services/LinkedSubjects.js +3 -4
- package/src/pages.js +10 -7
- package/build/favicon.ico +0 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +0 -25
- package/build/robots.txt +0 -3
- package/src/@daf/pages/dashboards/AllInformation/Documents/columns.js +0 -107
- package/src/@daf/pages/dashboards/AllInformation/Stakeholders/config.js +0 -31
- /package/src/@daf/pages/{dashboards/AllInformation/Documents → Documents}/config.js +0 -0
- /package/src/@daf/pages/{dashboards/DueDilligence → Events}/Activities/config.js +0 -0
- /package/src/@daf/pages/{dashboards/Operations/Workers → Events/Incidents}/config.js +0 -0
- /package/src/@daf/pages/{dashboards/AllInformation/Events → Locations}/config.js +0 -0
- /package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Operators/config.js +0 -0
- /package/src/@daf/pages/{dashboards/AllInformation/Locations → Stakeholders}/config.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datastake-daf",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.745",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@ant-design/icons": "^5.2.5",
|
|
6
6
|
"@antv/g2": "^5.1.1",
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"docx-preview": "^0.3.7",
|
|
23
23
|
"dot-object": "^2.1.5",
|
|
24
24
|
"file-saver": "^2.0.5",
|
|
25
|
+
"firebase": "^12.5.0",
|
|
25
26
|
"html-to-image": "^1.11.13",
|
|
27
|
+
"i18next": "^25.6.0",
|
|
26
28
|
"leaflet": "^1.0.3",
|
|
27
29
|
"leaflet-editable": "^1.3.0",
|
|
28
30
|
"leaflet-geosearch": "^3.1.0",
|
package/rollup.config.js
CHANGED
|
@@ -27,7 +27,7 @@ const external = [
|
|
|
27
27
|
"react-collapsed",
|
|
28
28
|
"leaflet-geosearch",
|
|
29
29
|
"react-html-parser",
|
|
30
|
-
"styled-
|
|
30
|
+
"styled-components",
|
|
31
31
|
"@ant-design/icons",
|
|
32
32
|
"deepmerge",
|
|
33
33
|
"leaflet.heat",
|
|
@@ -46,7 +46,12 @@ const external = [
|
|
|
46
46
|
"file-saver",
|
|
47
47
|
"axios",
|
|
48
48
|
"form-data",
|
|
49
|
-
"firebase"
|
|
49
|
+
"firebase",
|
|
50
|
+
"firebase/app",
|
|
51
|
+
"firebase/messaging",
|
|
52
|
+
"i18next",
|
|
53
|
+
"i18next-browser-languagedetector",
|
|
54
|
+
"react-i18next"
|
|
50
55
|
];
|
|
51
56
|
|
|
52
57
|
// Four builds, components, utils, hooks, context
|
|
@@ -521,7 +521,7 @@ export function AjaxSelectMain({
|
|
|
521
521
|
function updateOther(item, label, value) {
|
|
522
522
|
try {
|
|
523
523
|
// remove the last comma and closing bracket
|
|
524
|
-
const cleanedString = updateOtherValues
|
|
524
|
+
const cleanedString = updateOtherValues?.replace(/,\s*]$/, "]");
|
|
525
525
|
const updateOtherVal = updateOtherValues ? JSON.parse(cleanedString) : {};
|
|
526
526
|
const valueToSet = isDataLink ? item : value;
|
|
527
527
|
|
|
@@ -554,7 +554,7 @@ export default function DataLinkFlat({
|
|
|
554
554
|
footer={null}
|
|
555
555
|
width={650}
|
|
556
556
|
className="max-h-50"
|
|
557
|
-
|
|
557
|
+
destroyOnHidden
|
|
558
558
|
onCancel={onCloseModal}
|
|
559
559
|
title={(
|
|
560
560
|
<ModalHeader title={getLabelFromScopeForDataLink(form?.modalLabel || form?.label, formScope)} />
|
|
@@ -547,7 +547,7 @@ export default function DataLink({
|
|
|
547
547
|
footer={null}
|
|
548
548
|
width={650}
|
|
549
549
|
className="max-h-50"
|
|
550
|
-
|
|
550
|
+
destroyOnHidden
|
|
551
551
|
onCancel={onCloseModal}
|
|
552
552
|
title={(
|
|
553
553
|
<ModalHeader title={getLabelFromScopeForDataLink(form?.modalLabel || form?.label, formScope)} />
|
|
@@ -539,7 +539,7 @@ export default function DataLinkGroup({
|
|
|
539
539
|
footer={null}
|
|
540
540
|
width={650}
|
|
541
541
|
className="max-h-50"
|
|
542
|
-
|
|
542
|
+
destroyOnHidden
|
|
543
543
|
onCancel={onCloseModal}
|
|
544
544
|
title={(
|
|
545
545
|
<ModalHeader title={getLabelFromScopeForDataLink(form?.modalLabel || form?.label, formScope)} />
|
|
@@ -462,7 +462,7 @@ export function AjaxSelectMain({
|
|
|
462
462
|
function updateOther(item, label, value) {
|
|
463
463
|
try {
|
|
464
464
|
// remove the last comma and closing bracket
|
|
465
|
-
const cleanedString = updateOtherValues
|
|
465
|
+
const cleanedString = updateOtherValues?.replace(/,\s*]$/, "]");
|
|
466
466
|
const updateOtherVal = updateOtherValues ? JSON.parse(cleanedString) : {};
|
|
467
467
|
|
|
468
468
|
const _new = { ...formsValue };
|
|
@@ -2862,10 +2862,6 @@ export const GetFormItem = ({
|
|
|
2862
2862
|
if (input && typeof input === "object") {
|
|
2863
2863
|
// check if input is valid
|
|
2864
2864
|
const hideComment = namespace === "project-readiness";
|
|
2865
|
-
console.log("hideComment", {
|
|
2866
|
-
hideComment,
|
|
2867
|
-
namespace,
|
|
2868
|
-
});
|
|
2869
2865
|
return (
|
|
2870
2866
|
<>
|
|
2871
2867
|
<div className="flex-row input-cont">
|
|
@@ -52,7 +52,7 @@ export default function CombineLocationModal({
|
|
|
52
52
|
withModalFormWrapper={false}
|
|
53
53
|
width={1100}
|
|
54
54
|
disabled={isDisabled}
|
|
55
|
-
|
|
55
|
+
destroyOnHidden={true}
|
|
56
56
|
onValuesChange={() => {
|
|
57
57
|
setIsDisabled(() => {
|
|
58
58
|
const values = MainForm.getFieldsValue();
|
|
@@ -53,7 +53,7 @@ export default function CombineSubjectsModal({
|
|
|
53
53
|
withModalFormWrapper={false}
|
|
54
54
|
width={1100}
|
|
55
55
|
disabled={isDisabled}
|
|
56
|
-
|
|
56
|
+
destroyOnHidden={true}
|
|
57
57
|
onValuesChange={() => {
|
|
58
58
|
setIsDisabled(() => {
|
|
59
59
|
const values = MainForm.getFieldsValue();
|
|
@@ -156,8 +156,9 @@ function AppLayout({
|
|
|
156
156
|
console.log(err);
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
if (!userPreferences) {
|
|
160
|
+
_fetchPreferences();
|
|
161
|
+
}
|
|
161
162
|
}, [getUserPreference]);
|
|
162
163
|
|
|
163
164
|
const setIsCollapse = (val = false) => {
|
|
@@ -370,9 +371,9 @@ function AppLayout({
|
|
|
370
371
|
className="ln-22 dark-select language-select"
|
|
371
372
|
style={{ color: 'white', height: '30px' }}
|
|
372
373
|
defaultValue={StorageManager.get('datastakeLng') || 'en'}
|
|
373
|
-
|
|
374
|
+
variant="borderless"
|
|
374
375
|
onChange={lng => updateLanguage?.(lng)}
|
|
375
|
-
|
|
376
|
+
classNames={{ popup: formatClassname(['dark-select-popup language-select', appName, theme.customHeaderColor && 'custom']) }}
|
|
376
377
|
>
|
|
377
378
|
{languageConfig.map(lang => (
|
|
378
379
|
<Select.Option key={lang.value} value={lang.value}>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip } from 'antd';
|
|
3
|
+
import { findOptions } from '../../../helpers/StringHelper.js';
|
|
4
|
+
import { renderDateFormatted } from '../../../helpers/Forms.js';
|
|
5
|
+
import CustomIcon from '../../core/components/Icon/CustomIcon.jsx';
|
|
6
|
+
import AvatarGroup from '../../core/components/AvatarGroup/index.jsx';
|
|
7
|
+
import sourceAvatarConfig from '../../../helpers/sourceAvatarConfig.js';
|
|
8
|
+
|
|
9
|
+
export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink, theme, subject, applications }) => [
|
|
10
|
+
{
|
|
11
|
+
dataIndex: 'datastakeId',
|
|
12
|
+
title: t('ID'),
|
|
13
|
+
ellipsis: true,
|
|
14
|
+
show: true,
|
|
15
|
+
render: (v, all) => {
|
|
16
|
+
if (all.empty) {
|
|
17
|
+
return <div className="daf-default-cell" />
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return <Tooltip title={v}>{v}</Tooltip>;
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
dataIndex: 'name',
|
|
25
|
+
title: t('Title'),
|
|
26
|
+
ellipsis: true,
|
|
27
|
+
show: true,
|
|
28
|
+
render: (v, all) => {
|
|
29
|
+
if (all.empty) {
|
|
30
|
+
return <div className="daf-default-cell" />
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return <Tooltip title={v}>{v}</Tooltip>;
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: t("Date"),
|
|
38
|
+
dataIndex: "date",
|
|
39
|
+
key: "date",
|
|
40
|
+
width: 125,
|
|
41
|
+
render: (date, all) => {
|
|
42
|
+
if (all.empty) {
|
|
43
|
+
return <div className="daf-default-cell" />;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
|
|
47
|
+
return <Tooltip title={_date}>{_date}</Tooltip>;
|
|
48
|
+
},
|
|
49
|
+
ellipsis: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
title: t("Sources"),
|
|
53
|
+
dataIndex: "sources",
|
|
54
|
+
key: "sources",
|
|
55
|
+
show: activeTab !== "own",
|
|
56
|
+
render: (val, all) => {
|
|
57
|
+
if (all.empty) {
|
|
58
|
+
return <div className="daf-default-cell" />;
|
|
59
|
+
}
|
|
60
|
+
if (!val || val?.length === 0) {
|
|
61
|
+
return "--";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const sources = sourceAvatarConfig(val, user, applications);
|
|
65
|
+
|
|
66
|
+
return <AvatarGroup items={sources}></AvatarGroup>;
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: t("Last Update"),
|
|
71
|
+
dataIndex: "updatedAt",
|
|
72
|
+
key: "updatedAt",
|
|
73
|
+
width: 125,
|
|
74
|
+
render: (date, all) => {
|
|
75
|
+
if (all.empty) {
|
|
76
|
+
return <div className="daf-default-cell" />;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
|
|
80
|
+
return <Tooltip title={_date}>{_date}</Tooltip>;
|
|
81
|
+
},
|
|
82
|
+
ellipsis: true,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'actions',
|
|
86
|
+
title: "",
|
|
87
|
+
width: 60,
|
|
88
|
+
render: (_, all) => {
|
|
89
|
+
if (all.empty) {
|
|
90
|
+
return <div className="daf-default-cell" />;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const link = `/app/view/${subject}/${all.datastakeId}`;
|
|
94
|
+
|
|
95
|
+
return <div style={{ display: "flex", justifyContent: "center" }}>
|
|
96
|
+
<a href={getRedirectLink(link)}>
|
|
97
|
+
<CustomIcon name="Link" size={15} color={theme.baseGray70} />
|
|
98
|
+
</a>
|
|
99
|
+
</div>;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
].filter((column) => column.show !== false);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useEffect} from 'react'
|
|
2
2
|
import { message } from 'antd';
|
|
3
|
-
import { MessageTypes } from '
|
|
4
|
-
import DynamicForm from '
|
|
3
|
+
import { MessageTypes } from '../../../helpers/messages.js';
|
|
4
|
+
import DynamicForm from '../../core/components/DynamicForm/index.jsx';
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
namespace = '
|
|
6
|
+
const StakeholdersCreate = ({
|
|
7
|
+
namespace = 'stakeholders',
|
|
8
8
|
view = 'scoping',
|
|
9
9
|
edit = false,
|
|
10
10
|
formData = {},
|
|
@@ -39,7 +39,7 @@ const DocumentsCreate = ({
|
|
|
39
39
|
useEffect(() => {
|
|
40
40
|
if (Object.keys(form).length === 0 && !formData[`${APP}-${view}`]) {
|
|
41
41
|
if (!edit) {
|
|
42
|
-
getData({ namespace, module: APP, view, scope: '
|
|
42
|
+
getData({ namespace, module: APP, view, scope: 'create' });
|
|
43
43
|
} else {
|
|
44
44
|
form = formConfig;
|
|
45
45
|
data = formValue;
|
|
@@ -76,6 +76,7 @@ const DocumentsCreate = ({
|
|
|
76
76
|
...payloadData,
|
|
77
77
|
form: 'document'
|
|
78
78
|
};
|
|
79
|
+
|
|
79
80
|
|
|
80
81
|
const callback = (type, m, data) => {
|
|
81
82
|
if (setSelectedFormNext) {
|
|
@@ -101,4 +102,4 @@ const DocumentsCreate = ({
|
|
|
101
102
|
)
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
export default
|
|
105
|
+
export default StakeholdersCreate
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useMemo, useState, useEffect, useCallback } from 'react'
|
|
2
|
-
import TablePageWithTabs from '
|
|
2
|
+
import TablePageWithTabs from '../pages/TablePageWithTabs/index.jsx'
|
|
3
3
|
import { getColumns } from './columns.js';
|
|
4
4
|
import { checkboxConfig, getFiltersConfig, filtersConfig, getFilterOptions } from './config.js';
|
|
5
|
-
import { useGetQueryParams } from '
|
|
6
|
-
import
|
|
7
|
-
import { displayMessage } from '
|
|
5
|
+
import { useGetQueryParams } from '../../hooks/useGetQueryParams.js';
|
|
6
|
+
import StakeholdersCreate from './create.jsx';
|
|
7
|
+
import { displayMessage } from '../../../helpers/messages.js';
|
|
8
8
|
|
|
9
9
|
const DocumentsTable = ({
|
|
10
10
|
t = () => {},
|
|
@@ -32,12 +32,11 @@ const DocumentsTable = ({
|
|
|
32
32
|
formData = {},
|
|
33
33
|
formValue = {},
|
|
34
34
|
form = {},
|
|
35
|
-
extendingFilters = {},
|
|
36
35
|
applications = [],
|
|
36
|
+
subjectClear = () => {},
|
|
37
37
|
}) => {
|
|
38
38
|
const [selectOptions, setSelectOptions] = useState();
|
|
39
|
-
const [activeTab, setActiveTab] = useState();
|
|
40
|
-
|
|
39
|
+
const [activeTab, setActiveTab] = useState("own");
|
|
41
40
|
const columns = useMemo(() => getColumns({
|
|
42
41
|
t,
|
|
43
42
|
goTo,
|
|
@@ -47,36 +46,24 @@ const DocumentsTable = ({
|
|
|
47
46
|
getRedirectLink,
|
|
48
47
|
theme,
|
|
49
48
|
subject: 'documents',
|
|
50
|
-
data,
|
|
51
49
|
applications,
|
|
52
|
-
}), [t, goTo, user, options, activeTab, getRedirectLink, theme,
|
|
50
|
+
}), [t, goTo, user, options, activeTab, getRedirectLink, theme, applications]);
|
|
53
51
|
|
|
54
52
|
const breadCrumbs = [];
|
|
55
53
|
|
|
56
54
|
const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
|
|
57
55
|
|
|
58
|
-
const filters = useMemo(() => {
|
|
59
|
-
return {
|
|
60
|
-
...otherParams,
|
|
61
|
-
...extendingFilters
|
|
62
|
-
}
|
|
63
|
-
}, [otherParams, extendingFilters])
|
|
64
|
-
|
|
65
56
|
useEffect(() => {
|
|
66
|
-
console.log("fetching data")
|
|
67
57
|
getData({
|
|
68
58
|
pagination: paginationQuery,
|
|
69
|
-
...(Object.keys(
|
|
59
|
+
...(Object.keys(otherParams).length > 0 && { filters: otherParams }),
|
|
70
60
|
...(Object.keys(searchParams).length > 0 && { search: searchParams }),
|
|
71
61
|
tab: activeTab,
|
|
72
62
|
sortBy: {
|
|
73
63
|
[sortBy || "updatedAt"]: sortDir ? (sortDir === "ascend" ? 1 : -1) : -1,
|
|
74
64
|
}
|
|
75
65
|
}, 'documents')
|
|
76
|
-
|
|
77
|
-
}, [location.search, activeTab, JSON.stringify(extendingFilters)]);
|
|
78
|
-
|
|
79
|
-
console.log({data})
|
|
66
|
+
}, [paginationQuery, otherParams, searchParams, activeTab]);
|
|
80
67
|
|
|
81
68
|
const selectFiltersConfig = useMemo(() => {
|
|
82
69
|
return getFiltersConfig({t});
|
|
@@ -93,15 +80,22 @@ const DocumentsTable = ({
|
|
|
93
80
|
setActiveTab(value);
|
|
94
81
|
}, []);
|
|
95
82
|
|
|
83
|
+
useEffect(
|
|
84
|
+
() => () => {
|
|
85
|
+
subjectClear();
|
|
86
|
+
},
|
|
87
|
+
[],
|
|
88
|
+
);
|
|
89
|
+
|
|
96
90
|
return (
|
|
97
91
|
<TablePageWithTabs
|
|
98
92
|
t={t}
|
|
99
|
-
title={t("
|
|
93
|
+
title={t("Documents")}
|
|
100
94
|
breadCrumbs={breadCrumbs}
|
|
101
95
|
location={location}
|
|
102
96
|
loading={loading}
|
|
103
97
|
goTo={goTo}
|
|
104
|
-
defaultActiveTab={"
|
|
98
|
+
defaultActiveTab={"own"}
|
|
105
99
|
columns={columns}
|
|
106
100
|
data={data}
|
|
107
101
|
checkboxConfig={checkboxConfig}
|
|
@@ -120,7 +114,7 @@ const DocumentsTable = ({
|
|
|
120
114
|
drawerTitle={t("Create Document")}
|
|
121
115
|
>
|
|
122
116
|
{({onDrawerClose}) => (
|
|
123
|
-
<
|
|
117
|
+
<StakeholdersCreate
|
|
124
118
|
t={t}
|
|
125
119
|
goTo={goTo}
|
|
126
120
|
user={user}
|
|
@@ -136,8 +130,7 @@ const DocumentsTable = ({
|
|
|
136
130
|
type,
|
|
137
131
|
t("affirmations::subject-created-successfully") || m,
|
|
138
132
|
);
|
|
139
|
-
|
|
140
|
-
goTo(`/app/edit/documents/${data.datastakeId}`)
|
|
133
|
+
goTo(`/app/edit/documents/${data.datastakeId}`);
|
|
141
134
|
}
|
|
142
135
|
}}
|
|
143
136
|
onCancel={onDrawerClose}
|