datastake-daf 0.6.744 → 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.
Files changed (80) hide show
  1. package/dist/components/index.js +549 -893
  2. package/dist/context/index.js +0 -3
  3. package/dist/hooks/index.js +19 -4658
  4. package/dist/layouts/index.js +573 -916
  5. package/dist/pages/index.js +792 -988
  6. package/dist/services/index.js +1 -7
  7. package/dist/utils/index.js +466 -808
  8. package/package.json +3 -1
  9. package/rollup.config.js +7 -2
  10. package/src/@daf/core/components/DynamicForm/components/ajaxModal.js +1 -1
  11. package/src/@daf/core/components/EditForm/components/Comment/index.js +1 -1
  12. package/src/@daf/core/components/EditForm/components/DataLink/ajaxSelectDataLink.js +1 -1
  13. package/src/@daf/core/components/EditForm/components/DataLink/flat.js +1 -1
  14. package/src/@daf/core/components/EditForm/components/DataLink/index.js +1 -1
  15. package/src/@daf/core/components/EditForm/components/DataLinkGroup/index.js +1 -1
  16. package/src/@daf/core/components/EditForm/components/Repeatable/index.js +1 -1
  17. package/src/@daf/core/components/EditForm/components/ajaxSelect.js +1 -1
  18. package/src/@daf/core/components/EditForm/components/geolocation.js +1 -0
  19. package/src/@daf/core/components/EditForm/helper.js +0 -4
  20. package/src/@daf/core/components/Screens/Admin/AdminModals/CombineAccount/index.jsx +1 -1
  21. package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/index.jsx +1 -1
  22. package/src/@daf/core/components/Screens/Admin/AdminModals/CombineSubjects/index.jsx +1 -1
  23. package/src/@daf/layouts/AppLayout/index.jsx +5 -4
  24. package/src/@daf/layouts/AuthLayout/components/Select/style.js +1 -1
  25. package/src/@daf/layouts/AuthLayout/style.js +1 -1
  26. package/src/@daf/pages/Documents/columns.js +102 -0
  27. package/src/@daf/pages/{dashboards/AllInformation/Documents → Documents}/create.jsx +2 -2
  28. package/src/@daf/pages/{dashboards/AllInformation/Documents → Documents}/index.jsx +9 -6
  29. package/src/@daf/pages/{dashboards/DueDilligence/Incidents → Events/Activities}/columns.js +8 -7
  30. package/src/@daf/pages/{dashboards/DueDilligence → Events}/Activities/create.jsx +2 -2
  31. package/src/@daf/pages/{dashboards/DueDilligence → Events}/Activities/index.jsx +6 -6
  32. package/src/@daf/pages/{dashboards/DueDilligence/Activities → Events/Incidents}/columns.js +5 -5
  33. package/src/@daf/pages/{dashboards/DueDilligence → Events}/Incidents/create.jsx +2 -2
  34. package/src/@daf/pages/{dashboards/DueDilligence → Events}/Incidents/index.jsx +5 -5
  35. package/src/@daf/pages/{dashboards/DueDilligence → Events}/Incidents2/columns.js +4 -4
  36. package/src/@daf/pages/{dashboards/DueDilligence → Events}/Incidents2/config.js +0 -1
  37. package/src/@daf/pages/{dashboards/DueDilligence → Events}/Incidents2/create.jsx +2 -2
  38. package/src/@daf/pages/{dashboards/DueDilligence → Events}/Incidents2/index.jsx +5 -5
  39. package/src/@daf/pages/Events/columns.js +226 -0
  40. package/src/@daf/pages/{dashboards/AllInformation/Events → Events}/create.jsx +2 -2
  41. package/src/@daf/pages/{dashboards/AllInformation/Events → Events}/index.jsx +5 -9
  42. package/src/@daf/pages/{dashboards/Operations/ProductionSites → Locations/MineSite}/columns.js +4 -4
  43. package/src/@daf/pages/{dashboards/Operations/ProductionSites → Locations/MineSite}/create.jsx +2 -2
  44. package/src/@daf/pages/{dashboards/Operations/ProductionSites → Locations/MineSite}/index.jsx +5 -5
  45. package/src/@daf/pages/{dashboards/AllInformation/Locations → Locations}/columns.js +5 -5
  46. package/src/@daf/pages/{dashboards/AllInformation/Locations → Locations}/create.jsx +2 -2
  47. package/src/@daf/pages/{dashboards/AllInformation/Locations → Locations}/index.jsx +5 -5
  48. package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Operators/columns.js +5 -5
  49. package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Operators/create.jsx +2 -2
  50. package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Operators/index.jsx +5 -5
  51. package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Workers/columns.js +6 -6
  52. package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Workers/create.jsx +2 -2
  53. package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Workers/index.jsx +5 -5
  54. package/src/@daf/pages/{dashboards/AllInformation/Documents → Stakeholders}/columns.js +5 -5
  55. package/src/@daf/pages/{dashboards/AllInformation/Stakeholders → Stakeholders}/create.jsx +2 -2
  56. package/src/@daf/pages/{dashboards/AllInformation/Stakeholders → Stakeholders}/index.jsx +5 -5
  57. package/src/@daf/pages/dashboards/SupplyChain/components/ChartsContainer/components/Identification/index.js +0 -2
  58. package/src/@daf/pages/dashboards/UserDashboard/components/KeyIndicators/config.js +2 -2
  59. package/src/@daf/pages/dashboards/UserDashboard/components/MineSites/index.jsx +1 -5
  60. package/src/@daf/pages/dashboards/UserDashboard/config.js +2 -2
  61. package/src/@daf/pages/pages/TablePageWithTabs/index.jsx +2 -2
  62. package/src/@daf/services/AuthenticationService.js +0 -1
  63. package/src/@daf/services/LinkedSubjects.js +1 -2
  64. package/src/pages.js +9 -9
  65. package/build/favicon.ico +0 -0
  66. package/build/logo192.png +0 -0
  67. package/build/logo512.png +0 -0
  68. package/build/manifest.json +0 -25
  69. package/build/robots.txt +0 -3
  70. package/src/@daf/pages/dashboards/AllInformation/Events/columns.js +0 -151
  71. package/src/@daf/pages/dashboards/AllInformation/Stakeholders/columns.js +0 -132
  72. /package/src/@daf/pages/{dashboards/AllInformation/Documents → Documents}/config.js +0 -0
  73. /package/src/@daf/pages/{dashboards/DueDilligence → Events}/Activities/config.js +0 -0
  74. /package/src/@daf/pages/{dashboards/DueDilligence → Events}/Incidents/config.js +0 -0
  75. /package/src/@daf/pages/{dashboards/AllInformation/Events → Events}/config.js +0 -0
  76. /package/src/@daf/pages/{dashboards/Operations/ProductionSites → Locations/MineSite}/config.js +0 -0
  77. /package/src/@daf/pages/{dashboards/AllInformation/Locations → Locations}/config.js +0 -0
  78. /package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Operators/config.js +0 -0
  79. /package/src/@daf/pages/{dashboards/Operations → Stakeholders}/Workers/config.js +0 -0
  80. /package/src/@daf/pages/{dashboards/AllInformation/Stakeholders → Stakeholders}/config.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.744",
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-component",
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
@@ -261,7 +261,7 @@ function AjaxModal({
261
261
  setData({})
262
262
  setModalVisible(!modalVisible);
263
263
  }}
264
- destroyOnClose={destroy}
264
+ destroyOnHidden={destroy}
265
265
  >
266
266
  {modalVisible ? (isFetching ?
267
267
  <div className="form-loader"><Loading /></div>
@@ -229,7 +229,7 @@ export default function Comment({
229
229
  footer={null}
230
230
  width={650}
231
231
  className="max-h-50"
232
- destroyOnClose
232
+ destroyOnHidden
233
233
  onCancel={onCloseModal}
234
234
  title={(
235
235
  <ModalHeader title={'Comment'} />
@@ -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.replace(/,\s*]$/, "]");
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
- destroyOnClose
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
- destroyOnClose
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
- destroyOnClose
542
+ destroyOnHidden
543
543
  onCancel={onCloseModal}
544
544
  title={(
545
545
  <ModalHeader title={getLabelFromScopeForDataLink(form?.modalLabel || form?.label, formScope)} />
@@ -611,7 +611,7 @@ export default function Repeatable({
611
611
  footer={null}
612
612
  width={650}
613
613
  className="max-h-50"
614
- destroyOnClose
614
+ destroyOnHidden
615
615
  onCancel={onCloseModal}
616
616
  title={(
617
617
  <ModalHeader
@@ -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.replace(/,\s*]$/, "]");
465
+ const cleanedString = updateOtherValues?.replace(/,\s*]$/, "]");
466
466
  const updateOtherVal = updateOtherValues ? JSON.parse(cleanedString) : {};
467
467
 
468
468
  const _new = { ...formsValue };
@@ -123,6 +123,7 @@ export default function Geolocation({
123
123
  searchLabel: t('Search'),
124
124
  provider: mapProvider,
125
125
  style: 'button',
126
+ position: 'topleft',
126
127
  notFoundMessage: t('Location not found'),
127
128
  showMarker: false,
128
129
  marker: {
@@ -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">
@@ -46,7 +46,7 @@ export default function CombineAccountModal({
46
46
  withModalFormWrapper={false}
47
47
  width={1100}
48
48
  disabled={isDisabled}
49
- destroyOnClose={true}
49
+ destroyOnHidden={true}
50
50
  >
51
51
  <Container>
52
52
  <div className="daf-table-wrapper no-pagination">
@@ -52,7 +52,7 @@ export default function CombineLocationModal({
52
52
  withModalFormWrapper={false}
53
53
  width={1100}
54
54
  disabled={isDisabled}
55
- destroyOnClose={true}
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
- destroyOnClose={true}
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
- _fetchPreferences();
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
- bordered={false}
374
+ variant="borderless"
374
375
  onChange={lng => updateLanguage?.(lng)}
375
- popupClassName={formatClassname(['dark-select-popup language-select', appName, theme.customHeaderColor && 'custom'])}
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}>
@@ -1,5 +1,5 @@
1
1
  import styled from "styled-components";
2
- import { MOBILE_WIDTH, TABLET_WIDTH } from "datastake-daf/src/constants/Style";
2
+ import { MOBILE_WIDTH, TABLET_WIDTH } from "../../../../../constants/Style";
3
3
 
4
4
  const Style = styled.div`
5
5
  display: flex;
@@ -1,5 +1,5 @@
1
1
  import styled from "styled-components";
2
- import { MOBILE_WIDTH, TABLET_WIDTH } from "datastake-daf/src/constants/Style";
2
+ import { MOBILE_WIDTH, TABLET_WIDTH } from "../../../constants/Style";
3
3
 
4
4
  const Style = styled.div`
5
5
  .errors-cont {
@@ -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,7 +1,7 @@
1
1
  import React, { useEffect} from 'react'
2
2
  import { message } from 'antd';
3
- import { MessageTypes } from '../../../../../helpers/messages.js';
4
- import DynamicForm from '../../../../core/components/DynamicForm/index.jsx';
3
+ import { MessageTypes } from '../../../helpers/messages.js';
4
+ import DynamicForm from '../../core/components/DynamicForm/index.jsx';
5
5
 
6
6
  const StakeholdersCreate = ({
7
7
  namespace = 'stakeholders',
@@ -1,10 +1,10 @@
1
1
  import React, { useMemo, useState, useEffect, useCallback } from 'react'
2
- import TablePageWithTabs from '../../../pages/TablePageWithTabs/index.jsx'
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 '../../../../hooks/useGetQueryParams.js';
5
+ import { useGetQueryParams } from '../../hooks/useGetQueryParams.js';
6
6
  import StakeholdersCreate from './create.jsx';
7
- import { displayMessage } from '../../../../../helpers/messages.js';
7
+ import { displayMessage } from '../../../helpers/messages.js';
8
8
 
9
9
  const DocumentsTable = ({
10
10
  t = () => {},
@@ -36,7 +36,7 @@ const DocumentsTable = ({
36
36
  subjectClear = () => {},
37
37
  }) => {
38
38
  const [selectOptions, setSelectOptions] = useState();
39
- const [activeTab, setActiveTab] = useState();
39
+ const [activeTab, setActiveTab] = useState("own");
40
40
  const columns = useMemo(() => getColumns({
41
41
  t,
42
42
  goTo,
@@ -51,7 +51,7 @@ const DocumentsTable = ({
51
51
 
52
52
  const breadCrumbs = [];
53
53
 
54
- const { paginationQuery, searchParams, otherParams } = useGetQueryParams({location});
54
+ const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
55
55
 
56
56
  useEffect(() => {
57
57
  getData({
@@ -59,6 +59,9 @@ const DocumentsTable = ({
59
59
  ...(Object.keys(otherParams).length > 0 && { filters: otherParams }),
60
60
  ...(Object.keys(searchParams).length > 0 && { search: searchParams }),
61
61
  tab: activeTab,
62
+ sortBy: {
63
+ [sortBy || "updatedAt"]: sortDir ? (sortDir === "ascend" ? 1 : -1) : -1,
64
+ }
62
65
  }, 'documents')
63
66
  }, [paginationQuery, otherParams, searchParams, activeTab]);
64
67
 
@@ -92,7 +95,7 @@ const DocumentsTable = ({
92
95
  location={location}
93
96
  loading={loading}
94
97
  goTo={goTo}
95
- defaultActiveTab={"all"}
98
+ defaultActiveTab={"own"}
96
99
  columns={columns}
97
100
  data={data}
98
101
  checkboxConfig={checkboxConfig}
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { Tooltip, Tag } 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';
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
8
 
9
9
  const getLinkValue = (value, linkingObject) => {
10
10
  if(linkingObject && linkingObject?.[value]) {
@@ -20,8 +20,6 @@ const getEventCategoryBySubject = (eventCategoryObject, subject) => {
20
20
 
21
21
  const subjectSingular = subject.endsWith('ies')
22
22
  ? subject.slice(0, -3) + 'y'
23
- : subject.endsWith('s')
24
- ? subject.slice(0, -1)
25
23
  : subject;
26
24
 
27
25
  const key = `typeOfEvent is ${subjectSingular}`;
@@ -152,6 +150,9 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
152
150
 
153
151
  const eventCategory = findOptions(v, data?.options?.eventCategoryOptions);
154
152
  const categoryValue = getEventCategoryBySubject(eventCategory, subject);
153
+ console.log({categoryValue})
154
+ console.log({eventCategory})
155
+ console.log({subject})
155
156
 
156
157
  return categoryValue ? <Tooltip title={categoryValue}>{categoryValue}</Tooltip> : '-';
157
158
  },
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect} from 'react'
2
2
  import { message } from 'antd';
3
- import { MessageTypes } from '../../../../../helpers/messages.js';
4
- import DynamicForm from '../../../../core/components/DynamicForm/index.jsx';
3
+ import { MessageTypes } from '../../../../helpers/messages.js';
4
+ import DynamicForm from '../../../core/components/DynamicForm/index.jsx';
5
5
 
6
6
  const StakeholdersCreate = ({
7
7
  namespace = "corrective-actions",
@@ -1,10 +1,10 @@
1
1
  import React, { useMemo, useState, useEffect, useCallback } from 'react'
2
- import TablePageWithTabs from '../../../pages/TablePageWithTabs/index.jsx'
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 '../../../../hooks/useGetQueryParams.js';
5
+ import { useGetQueryParams } from '../../../hooks/useGetQueryParams.js';
6
6
  import StakeholdersCreate from './create.jsx';
7
- import { displayMessage } from '../../../../../helpers/messages.js';
7
+ import { displayMessage } from '../../../../helpers/messages.js';
8
8
 
9
9
  const ActivitiesTable = ({
10
10
  t = () => {},
@@ -37,7 +37,7 @@ const ActivitiesTable = ({
37
37
  applications = [],
38
38
  }) => {
39
39
  const [selectOptions, setSelectOptions] = useState();
40
- const [activeTab, setActiveTab] = useState();
40
+ const [activeTab, setActiveTab] = useState("own");
41
41
 
42
42
  const columns = useMemo(() => getColumns({
43
43
  t,
@@ -47,7 +47,7 @@ const ActivitiesTable = ({
47
47
  activeTab,
48
48
  getRedirectLink,
49
49
  theme,
50
- subject: 'activities',
50
+ subject: 'correctiveActions',
51
51
  data,
52
52
  applications,
53
53
  }), [t, goTo, user, options, activeTab, getRedirectLink, theme, data, applications]);
@@ -99,7 +99,7 @@ const ActivitiesTable = ({
99
99
  location={location}
100
100
  loading={loading}
101
101
  goTo={goTo}
102
- defaultActiveTab={"all"}
102
+ defaultActiveTab={"own"}
103
103
  columns={columns}
104
104
  data={data}
105
105
  checkboxConfig={checkboxConfig}
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { Tooltip, Tag } 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';
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
8
 
9
9
  const getLinkValue = (value, linkingObject) => {
10
10
  if(linkingObject && linkingObject?.[value]) {
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect} from 'react'
2
2
  import { message } from 'antd';
3
- import { MessageTypes } from '../../../../../helpers/messages.js';
4
- import DynamicForm from '../../../../core/components/DynamicForm/index.jsx';
3
+ import { MessageTypes } from '../../../../helpers/messages.js';
4
+ import DynamicForm from '../../../core/components/DynamicForm/index.jsx';
5
5
 
6
6
  const StakeholdersCreate = ({
7
7
  namespace = "incident",
@@ -1,10 +1,10 @@
1
1
  import React, { useMemo, useState, useEffect, useCallback } from 'react'
2
- import TablePageWithTabs from '../../../pages/TablePageWithTabs/index.jsx'
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 '../../../../hooks/useGetQueryParams.js';
5
+ import { useGetQueryParams } from '../../../hooks/useGetQueryParams.js';
6
6
  import StakeholdersCreate from './create.jsx';
7
- import { displayMessage } from '../../../../../helpers/messages.js';
7
+ import { displayMessage } from '../../../../helpers/messages.js';
8
8
 
9
9
  const IncidentsTable = ({
10
10
  t = () => {},
@@ -37,7 +37,7 @@ const IncidentsTable = ({
37
37
  applications = [],
38
38
  }) => {
39
39
  const [selectOptions, setSelectOptions] = useState();
40
- const [activeTab, setActiveTab] = useState();
40
+ const [activeTab, setActiveTab] = useState("own");
41
41
 
42
42
  const columns = useMemo(() => getColumns({
43
43
  t,
@@ -99,7 +99,7 @@ const IncidentsTable = ({
99
99
  location={location}
100
100
  loading={loading}
101
101
  goTo={goTo}
102
- defaultActiveTab={"all"}
102
+ defaultActiveTab={"own"}
103
103
  columns={columns}
104
104
  data={data}
105
105
  checkboxConfig={checkboxConfig}
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
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';
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
7
 
8
8
  const getLinkValue = (value, linkingObject) => {
9
9
  if(linkingObject && linkingObject?.[value]) {
@@ -146,7 +146,6 @@ export const getFilterOptions = (options, t) => {
146
146
  administrativeLevel1,
147
147
  administrativeLevel2,
148
148
  } = options || {};
149
- console.log({options})
150
149
 
151
150
  const _default = {
152
151
  timeframe: timeframe,
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect} from 'react'
2
2
  import { message } from 'antd';
3
- import { MessageTypes } from '../../../../../helpers/messages.js';
4
- import DynamicForm from '../../../../core/components/DynamicForm/index.jsx';
3
+ import { MessageTypes } from '../../../../helpers/messages.js';
4
+ import DynamicForm from '../../../core/components/DynamicForm/index.jsx';
5
5
 
6
6
  const IncidentsCreate = ({
7
7
  namespace = "event",
@@ -1,10 +1,10 @@
1
1
  import React, { useMemo, useState, useEffect, useCallback } from 'react'
2
- import TablePageWithTabs from '../../../pages/TablePageWithTabs/index.jsx'
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 '../../../../hooks/useGetQueryParams.js';
5
+ import { useGetQueryParams } from '../../../hooks/useGetQueryParams.js';
6
6
  import IncidentsCreate from './create.jsx';
7
- import { displayMessage } from '../../../../../helpers/messages.js';
7
+ import { displayMessage } from '../../../../helpers/messages.js';
8
8
 
9
9
  const IncidentsTable = ({
10
10
  t = () => {},
@@ -36,7 +36,7 @@ const IncidentsTable = ({
36
36
  createDefaultValues = {},
37
37
  }) => {
38
38
  const [selectOptions, setSelectOptions] = useState();
39
- const [activeTab, setActiveTab] = useState();
39
+ const [activeTab, setActiveTab] = useState("own");
40
40
 
41
41
  const columns = useMemo(() => getColumns({
42
42
  t,
@@ -97,7 +97,7 @@ const IncidentsTable = ({
97
97
  location={location}
98
98
  loading={loading}
99
99
  goTo={goTo}
100
- defaultActiveTab={"all"}
100
+ defaultActiveTab={"own"}
101
101
  columns={columns}
102
102
  data={data}
103
103
  checkboxConfig={checkboxConfig}