datastake-daf 0.6.787 → 0.6.789

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 (62) hide show
  1. package/build/favicon.ico +0 -0
  2. package/build/logo192.png +0 -0
  3. package/build/logo512.png +0 -0
  4. package/build/manifest.json +25 -0
  5. package/build/robots.txt +3 -0
  6. package/dist/components/index.js +588 -729
  7. package/dist/pages/index.js +775 -34
  8. package/dist/services/index.js +1 -10
  9. package/dist/utils/index.js +12 -28
  10. package/package.json +1 -1
  11. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/ActivityIndicators.stories.js +24 -0
  12. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/index.jsx +1 -0
  13. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/style.js +34 -0
  14. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/KeyIndicators.stories.js +39 -0
  15. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/LabelWithIcon.jsx +38 -0
  16. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/index.jsx +16 -3
  17. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/style.js +33 -0
  18. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/hook.js +1 -0
  19. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/index.jsx +1 -1
  20. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/hook.js +1 -1
  21. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/index.jsx +1 -1
  22. package/src/@daf/core/components/Screens/Admin/AdminModals/AddUser/index.jsx +1 -0
  23. package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/index.jsx +1 -1
  24. package/src/@daf/core/components/Screens/Admin/AdminModals/NewAccount/index.jsx +1 -1
  25. package/src/@daf/core/components/Screens/Admin/AdminScreens/Dashboard.jsx +2 -2
  26. package/src/@daf/core/components/Screens/Admin/AdminScreens/Location.jsx +5 -5
  27. package/src/@daf/core/components/Screens/Admin/AdminScreens/Subjects.jsx +2 -2
  28. package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/index.jsx +5 -23
  29. package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/columns.js +36 -36
  30. package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/index.jsx +21 -12
  31. package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/helper.js +8 -13
  32. package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/index.jsx +2 -2
  33. package/src/@daf/core/components/Screens/Admin/adminRoutes.js +2 -2
  34. package/src/@daf/pages/Summary/Activities/Monitoring/components/ActivityImagery/index.jsx +29 -0
  35. package/src/@daf/pages/Summary/Activities/Monitoring/components/ActivityLocation/index.jsx +94 -0
  36. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/PlantedSpecies/index.jsx +56 -0
  37. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SeedlingsHeight/index.jsx +121 -0
  38. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SurvivalRate/index.jsx +94 -0
  39. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/index.jsx +54 -0
  40. package/src/@daf/pages/Summary/Activities/Monitoring/components/WorkersDistribution/index.jsx +49 -0
  41. package/src/@daf/pages/Summary/Activities/Monitoring/config.js +51 -0
  42. package/src/@daf/pages/Summary/Activities/Monitoring/helper.js +236 -0
  43. package/src/@daf/pages/Summary/Activities/Monitoring/index.jsx +66 -0
  44. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/index.js +1 -1
  45. package/src/@daf/services/AdminService.js +3 -12
  46. package/src/@daf/services/DashboardService.js +1 -2
  47. package/src/@daf/utils/filters.js +89 -89
  48. package/src/constants/locales/en/translation.js +0 -3
  49. package/src/constants/locales/fr/translation.js +1 -1
  50. package/src/constants/locales/sp/translation.js +1 -1
  51. package/src/pages.js +1 -0
  52. package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/column.js +0 -224
  53. package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/helper.js +0 -65
  54. package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/columns.js +0 -180
  55. package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/config.js +0 -0
  56. package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/index.jsx +0 -27
  57. package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/columns.js +0 -157
  58. package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/config.js +0 -31
  59. package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/index.js +0 -77
  60. package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/columns.js +0 -117
  61. package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/index.jsx +0 -54
  62. package/src/@daf/pages/SelfAssesment/index.jsx +0 -0
@@ -1,77 +0,0 @@
1
- import React from "react";
2
- import TablePage from "../../../TablePage/index.jsx";
3
-
4
- const OrganisationInformationTable = ({
5
- t = () => {},
6
- goTo = () => {},
7
- user = {},
8
- options = {},
9
- getRedirectLink = () => {},
10
- theme = {},
11
- loading = false,
12
- data = {},
13
- isMobile,
14
- APP,
15
- location,
16
- getData = () => {},
17
- getApiBaseUrl = () => {},
18
- getAppHeader = () => {},
19
- getFormData = () => {},
20
- saveFormData = () => {},
21
- formLoading = false,
22
- query = {},
23
- ajaxForms = {},
24
- changeAjaxForms = () => {},
25
- ajaxOptions = {},
26
- changeAjaxOptions = () => {},
27
- formData = {},
28
- formValue = {},
29
- form = {},
30
- applications = [],
31
- subjectClear = () => {},
32
- breadcrumbs = [],
33
- extendingFilters = {},
34
- createDefaultValues = {},
35
- }) => {
36
- return (
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="organisations"
52
- getData={getData}
53
- getApiBaseUrl={getApiBaseUrl}
54
- getAppHeader={getAppHeader}
55
- subjectClear={subjectClear}
56
- extendingFilters={extendingFilters}
57
- breadcrumbs={breadcrumbs}
58
-
59
- formConfig={{
60
- getFormData,
61
- saveFormData,
62
- formLoading,
63
- query,
64
- ajaxForms,
65
- changeAjaxForms,
66
- ajaxOptions,
67
- changeAjaxOptions,
68
- formData,
69
- formValue,
70
- form,
71
- }}
72
- defaultValues={createDefaultValues}
73
- />
74
- );
75
- };
76
-
77
- export default OrganisationInformationTable;
@@ -1,117 +0,0 @@
1
- import React from 'react';
2
- import { Tooltip, Tag } from 'antd';
3
- import { findOptions } from '../../../../helpers/StringHelper.js';
4
- import { renderDateFormatted } from '../../../../helpers/Forms.js';
5
- import NavigationAction from '../../../core/components/Table/NavigationAction/index.jsx';
6
- import AvatarGroup from '../../../core/components/AvatarGroup/index.jsx';
7
- import sourceAvatarConfig from '../../../../helpers/sourceAvatarConfig.js';
8
- import { renderStatusTag } from '../../../utils/tags.js';
9
-
10
- export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data, applications}) => [
11
- {
12
- dataIndex: 'datastakeId',
13
- title: t('ID'),
14
- ellipsis: true,
15
- show: true,
16
- render: (v, all) => {
17
- if (all.empty) {
18
- return <div className="daf-default-cell" />
19
- }
20
-
21
- return <Tooltip title={v}>{v}</Tooltip>;
22
- },
23
- },
24
- {
25
- dataIndex: 'name',
26
- title: t('Name'),
27
- ellipsis: true,
28
- show: true,
29
- render: (v, all) => {
30
- if (all.empty) {
31
- return <div className="daf-default-cell" />
32
- }
33
-
34
- return <Tooltip title={v}>{v}</Tooltip>;
35
- },
36
- },
37
- {
38
- dataIndex: 'category',
39
- title: t('Type'),
40
- ellipsis: true,
41
- show: true,
42
- render: (v, all) => {
43
- if (all.empty) {
44
- return <div className="daf-default-cell" />
45
- }
46
- const category = findOptions(v, options?.locationCategories);
47
-
48
- return <Tooltip title={category}>{category}</Tooltip>;
49
- },
50
- },
51
- {
52
- dataIndex: 'region',
53
- title: t('Region'),
54
- ellipsis: true,
55
- show: true,
56
- render: (v, all) => {
57
- if (all.empty) {
58
- return <div className="daf-default-cell" />
59
- }
60
-
61
- const region = getLinkValue(all?.administrativeLevel1, all?.linking?.SCL);
62
-
63
- return region ? <Tooltip title={region}>{region}</Tooltip> : '-';
64
- },
65
- },
66
- {
67
- dataIndex: 'district',
68
- title: t('District'),
69
- ellipsis: true,
70
- show: true,
71
- render: (v, all) => {
72
- if (all.empty) {
73
- return <div className="daf-default-cell" />
74
- }
75
-
76
- const district = getLinkValue(all?.administrativeLevel2, all?.linking?.SCL);
77
-
78
- return district ? <Tooltip title={district}>{district}</Tooltip> : '-';
79
- },
80
- },
81
- {
82
- title: t("Last Update"),
83
- dataIndex: "updatedAt",
84
- key: "updatedAt",
85
- width: 125,
86
- render: (date, all) => {
87
- if (all.empty) {
88
- return <div className="daf-default-cell" />;
89
- }
90
-
91
- const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
92
- return <Tooltip title={_date}>{_date}</Tooltip>;
93
- },
94
- ellipsis: true,
95
- },
96
-
97
- {
98
- id: 'actions',
99
- title: "",
100
- width: 60,
101
- render: (_, all) => {
102
- if (all.empty) {
103
- return <div className="daf-default-cell" />;
104
- }
105
-
106
- const onClick = () => {
107
- let link = `/app/view/${subject}/${all.datastakeId}`;
108
- if (activeTab === "shared") {
109
- link += `?sourceId=${all?.authorId?.id}`;
110
- }
111
- goTo(getRedirectLink(link));
112
- };
113
-
114
- return <NavigationAction onClick={onClick} theme={theme} />;
115
- }
116
- }
117
- ].filter((column) => column.show !== false);
@@ -1,54 +0,0 @@
1
- import React from 'react';
2
- import TablePage from '../../../TablePage/index.jsx';
3
- import { getColumns } from './columns.js';
4
-
5
- const ProductionSiteTable = ({
6
- t = () => {},
7
- goTo = () => {},
8
- user = {},
9
- options = {},
10
- getRedirectLink = () => {},
11
- theme = {},
12
- loading = false,
13
- data = {},
14
- isMobile,
15
- APP,
16
- location,
17
- getData = () => {},
18
- getApiBaseUrl = () => {},
19
- getAppHeader = () => {},
20
- applications = [],
21
- subjectClear = () => {},
22
- breadcrumbs = [],
23
- extendingFilters = {},
24
- createDefaultValues = {},
25
- }) => {
26
- return (
27
- <TablePage
28
- t={t}
29
- goTo={goTo}
30
- user={user}
31
- options={options}
32
- getRedirectLink={getRedirectLink}
33
- theme={theme}
34
- loading={loading}
35
- data={data}
36
- isMobile={isMobile}
37
- APP={APP}
38
- location={location}
39
- applications={applications}
40
- subject="production-sites"
41
- getData={getData}
42
- getApiBaseUrl={getApiBaseUrl}
43
- getAppHeader={getAppHeader}
44
- subjectClear={subjectClear}
45
- extendingFilters={extendingFilters}
46
- breadcrumbs={breadcrumbs}
47
- formConfig={formConfig}
48
- defaultValues={createDefaultValues}
49
- onDownload={() => console.log("download")}
50
- />
51
- )
52
- }
53
-
54
- export default ProductionSiteTable
File without changes