datastake-daf 0.6.802 → 0.6.804
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 +247 -66
- package/dist/pages/index.js +282 -125
- package/package.json +1 -1
- package/public/Biodiversity/others-default.svg +38 -0
- package/public/Biodiversity/others.svg +38 -0
- package/public/Biodiversity/unidentified-pests-default.svg +33 -0
- package/public/Biodiversity/unidentified-pests.svg +33 -0
- package/src/@daf/core/components/Dashboard/Widget/FaunaWidget/config.js +15 -0
- package/src/@daf/core/components/Dashboard/Widget/FaunaWidget/index.jsx +83 -0
- package/src/@daf/core/components/Dashboard/Widget/InvasiveSpeciesWidget/config.js +11 -0
- package/src/@daf/core/components/Dashboard/Widget/InvasiveSpeciesWidget/index.jsx +87 -0
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/column.js +1 -1
- package/src/@daf/pages/Dashboards/UserDashboard/components/ContributionsGraph/hook.js +0 -1
- package/src/@daf/pages/Edit/hooks/usePrepareForm.js +5 -6
- package/src/@daf/pages/Summary/Activities/Monitoring/components/BiodiversityAndHabitat/index.jsx +34 -31
- package/src/@daf/pages/View/hooks/useCallToGetData.js +2 -4
- package/src/@daf/pages/View/hooks/usePrepareForm.js +5 -4
- package/src/@daf/pages/View/index.jsx +0 -6
- package/src/index.js +2 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<svg width="110" height="110" viewBox="0 0 110 110" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g filter="url(#filter0_ddd_3654_27680)">
|
|
3
|
+
<rect x="5" y="4" width="100" height="100" rx="8" fill="#FCFCFD" shape-rendering="crispEdges"/>
|
|
4
|
+
<rect x="5.5" y="4.5" width="99" height="99" rx="7.5" stroke="#F9FAFB" shape-rendering="crispEdges"/>
|
|
5
|
+
<path d="M49.9075 29.75C50.3189 28.5804 51.131 27.5942 52.1999 26.966C53.2688 26.3378 54.5256 26.1081 55.7476 26.3177C56.9696 26.5274 58.0779 27.1627 58.8764 28.1112C59.6748 29.0597 60.1118 30.2602 60.11 31.5C60.11 35 54.86 36.75 54.86 36.75M55 43.75H55.0175M72.5 35C72.5 44.665 64.665 52.5 55 52.5C45.335 52.5 37.5 44.665 37.5 35C37.5 25.335 45.335 17.5 55 17.5C64.665 17.5 72.5 25.335 72.5 35Z" stroke="#E5E7EB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path d="M19.6172 63.1357V69.4043C19.6172 70.8125 20.5059 71.8037 22.0781 71.8037C23.6504 71.8037 24.5459 70.8125 24.5459 69.4043V63.1357H26.0703V69.5342C26.0703 71.6602 24.5527 73.1641 22.0781 73.1641C19.6035 73.1641 18.0859 71.6602 18.0859 69.5342V63.1357H19.6172ZM27.7383 73V65.5762H29.1533V66.8271H29.1807C29.6318 65.9521 30.377 65.4941 31.5254 65.4941C33.166 65.4941 34.1025 66.5332 34.1025 68.2422V73H32.6191V68.5225C32.6191 67.3945 32.0996 66.7656 31.0127 66.7656C29.8916 66.7656 29.2217 67.5449 29.2217 68.7139V73H27.7383ZM35.6406 73V65.5762H37.124V73H35.6406ZM36.3857 64.5166C35.9072 64.5166 35.5176 64.1338 35.5176 63.6621C35.5176 63.1768 35.9072 62.8076 36.3857 62.8076C36.8643 62.8076 37.2539 63.1768 37.2539 63.6621C37.2539 64.1338 36.8643 64.5166 36.3857 64.5166ZM41.499 73.0752C39.6396 73.0752 38.3682 71.5781 38.3682 69.2812C38.3682 66.998 39.6396 65.501 41.4854 65.501C42.5518 65.501 43.3994 65.9863 43.8232 66.8066H43.8574V62.6914H45.334V73H43.8984V71.7422H43.8711C43.4336 72.583 42.5859 73.0752 41.499 73.0752ZM41.875 66.7588C40.6787 66.7588 39.8857 67.7568 39.8857 69.2881C39.8857 70.8262 40.6719 71.8174 41.875 71.8174C43.0645 71.8174 43.8643 70.8057 43.8643 69.2881C43.8643 67.7773 43.0645 66.7588 41.875 66.7588ZM49.9961 66.6904C48.9297 66.6904 48.1572 67.4697 48.0752 68.6113H51.8418C51.8076 67.4561 51.0762 66.6904 49.9961 66.6904ZM51.835 70.8262H53.25C53.0381 72.1592 51.7324 73.0889 50.0645 73.0889C47.9111 73.0889 46.5713 71.6396 46.5713 69.3154C46.5713 66.9912 47.9248 65.4805 50.0029 65.4805C52.04 65.4805 53.3252 66.8955 53.3252 69.1445V69.6641H48.0684V69.7529C48.0684 71.0381 48.875 71.8857 50.0918 71.8857C50.9531 71.8857 51.6299 71.4756 51.835 70.8262ZM54.5215 73V65.5762H55.9365V66.8271H55.9639C56.415 65.9521 57.1602 65.4941 58.3086 65.4941C59.9492 65.4941 60.8857 66.5332 60.8857 68.2422V73H59.4023V68.5225C59.4023 67.3945 58.8828 66.7656 57.7959 66.7656C56.6748 66.7656 56.0049 67.5449 56.0049 68.7139V73H54.5215ZM62.8135 63.9082H64.29V65.5762H65.7119V66.7451H64.29V70.8945C64.29 71.5371 64.5771 71.8379 65.1992 71.8379C65.3564 71.8379 65.6094 71.8174 65.7051 71.8037V72.9727C65.541 73.0137 65.1924 73.0479 64.8711 73.0479C63.3877 73.0479 62.8135 72.4805 62.8135 71.0449V66.7451H61.7881V65.5762H62.8135V63.9082ZM67.0176 73V65.5762H68.501V73H67.0176ZM67.7627 64.5166C67.2842 64.5166 66.8945 64.1338 66.8945 63.6621C66.8945 63.1768 67.2842 62.8076 67.7627 62.8076C68.2412 62.8076 68.6309 63.1768 68.6309 63.6621C68.6309 64.1338 68.2412 64.5166 67.7627 64.5166ZM70.5244 73V66.7451H69.499V65.5762H70.5244V64.8926C70.5244 63.5049 71.1533 62.8965 72.6572 62.8965C72.9238 62.8965 73.1699 62.9238 73.4092 62.9648V64.0928C73.2588 64.0586 73.0537 64.0381 72.8555 64.0381C72.2471 64.0381 71.9941 64.3047 71.9873 64.9404V65.5762H73.416V66.7451H72.001V73H70.5244ZM74.7012 73V65.5762H76.1846V73H74.7012ZM75.4463 64.5166C74.9678 64.5166 74.5781 64.1338 74.5781 63.6621C74.5781 63.1768 74.9678 62.8076 75.4463 62.8076C75.9248 62.8076 76.3145 63.1768 76.3145 63.6621C76.3145 64.1338 75.9248 64.5166 75.4463 64.5166ZM80.8535 66.6904C79.7871 66.6904 79.0146 67.4697 78.9326 68.6113H82.6992C82.665 67.4561 81.9336 66.6904 80.8535 66.6904ZM82.6924 70.8262H84.1074C83.8955 72.1592 82.5898 73.0889 80.9219 73.0889C78.7686 73.0889 77.4287 71.6396 77.4287 69.3154C77.4287 66.9912 78.7822 65.4805 80.8604 65.4805C82.8975 65.4805 84.1826 66.8955 84.1826 69.1445V69.6641H78.9258V69.7529C78.9258 71.0381 79.7324 71.8857 80.9492 71.8857C81.8105 71.8857 82.4873 71.4756 82.6924 70.8262ZM88.1748 73.0752C86.3154 73.0752 85.0439 71.5781 85.0439 69.2812C85.0439 66.998 86.3154 65.501 88.1611 65.501C89.2275 65.501 90.0752 65.9863 90.499 66.8066H90.5332V62.6914H92.0098V73H90.5742V71.7422H90.5469C90.1094 72.583 89.2617 73.0752 88.1748 73.0752ZM88.5508 66.7588C87.3545 66.7588 86.5615 67.7568 86.5615 69.2881C86.5615 70.8262 87.3477 71.8174 88.5508 71.8174C89.7402 71.8174 90.54 70.8057 90.54 69.2881C90.54 67.7773 89.7402 66.7588 88.5508 66.7588ZM38.7715 80.1357H42.6338C44.5479 80.1357 45.8877 81.4551 45.8877 83.376C45.8877 85.3037 44.5205 86.6299 42.5859 86.6299H40.3027V90H38.7715V80.1357ZM40.3027 81.4277V85.3447H42.2305C43.5566 85.3447 44.3223 84.627 44.3223 83.3828C44.3223 82.1387 43.5635 81.4277 42.2305 81.4277H40.3027ZM49.8594 83.6904C48.793 83.6904 48.0205 84.4697 47.9385 85.6113H51.7051C51.6709 84.4561 50.9395 83.6904 49.8594 83.6904ZM51.6982 87.8262H53.1133C52.9014 89.1592 51.5957 90.0889 49.9277 90.0889C47.7744 90.0889 46.4346 88.6396 46.4346 86.3154C46.4346 83.9912 47.7881 82.4805 49.8662 82.4805C51.9033 82.4805 53.1885 83.8955 53.1885 86.1445V86.6641H47.9316V86.7529C47.9316 88.0381 48.7383 88.8857 49.9551 88.8857C50.8164 88.8857 51.4932 88.4756 51.6982 87.8262ZM54.2617 84.6885C54.2617 83.3828 55.4307 82.4873 57.1396 82.4873C58.7666 82.4873 59.9424 83.4033 59.9766 84.6953H58.582C58.5205 84.0391 57.9531 83.6289 57.1055 83.6289C56.2646 83.6289 55.7041 84.0186 55.7041 84.6064C55.7041 85.0576 56.0732 85.3652 56.8594 85.5566L58.0898 85.8506C59.5869 86.2129 60.1406 86.7529 60.1406 87.8467C60.1406 89.1729 58.8828 90.0889 57.085 90.0889C55.3555 90.0889 54.1729 89.1934 54.0635 87.8535H55.5264C55.6426 88.5645 56.2168 88.9541 57.1602 88.9541C58.083 88.9541 58.6641 88.5713 58.6641 87.9697C58.6641 87.498 58.3701 87.252 57.5908 87.0537L56.2646 86.7256C54.9248 86.3975 54.2617 85.7139 54.2617 84.6885ZM61.7881 80.9082H63.2646V82.5762H64.6865V83.7451H63.2646V87.8945C63.2646 88.5371 63.5518 88.8379 64.1738 88.8379C64.3311 88.8379 64.584 88.8174 64.6797 88.8037V89.9727C64.5156 90.0137 64.167 90.0479 63.8457 90.0479C62.3623 90.0479 61.7881 89.4805 61.7881 88.0449V83.7451H60.7627V82.5762H61.7881V80.9082ZM65.8145 84.6885C65.8145 83.3828 66.9834 82.4873 68.6924 82.4873C70.3193 82.4873 71.4951 83.4033 71.5293 84.6953H70.1348C70.0732 84.0391 69.5059 83.6289 68.6582 83.6289C67.8174 83.6289 67.2568 84.0186 67.2568 84.6064C67.2568 85.0576 67.626 85.3652 68.4121 85.5566L69.6426 85.8506C71.1396 86.2129 71.6934 86.7529 71.6934 87.8467C71.6934 89.1729 70.4355 90.0889 68.6377 90.0889C66.9082 90.0889 65.7256 89.1934 65.6162 87.8535H67.0791C67.1953 88.5645 67.7695 88.9541 68.7129 88.9541C69.6357 88.9541 70.2168 88.5713 70.2168 87.9697C70.2168 87.498 69.9229 87.252 69.1436 87.0537L67.8174 86.7256C66.4775 86.3975 65.8145 85.7139 65.8145 84.6885Z" fill="#D2D6DB"/>
|
|
7
|
+
</g>
|
|
8
|
+
<defs>
|
|
9
|
+
<filter id="filter0_ddd_3654_27680" x="0" y="0" width="110" height="110" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
10
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
11
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
12
|
+
<feOffset dy="1"/>
|
|
13
|
+
<feGaussianBlur stdDeviation="1"/>
|
|
14
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
15
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"/>
|
|
16
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_3654_27680"/>
|
|
17
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
18
|
+
<feMorphology radius="1" operator="erode" in="SourceAlpha" result="effect2_dropShadow_3654_27680"/>
|
|
19
|
+
<feOffset dy="1"/>
|
|
20
|
+
<feGaussianBlur stdDeviation="3"/>
|
|
21
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
22
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.02 0"/>
|
|
23
|
+
<feBlend mode="normal" in2="effect1_dropShadow_3654_27680" result="effect2_dropShadow_3654_27680"/>
|
|
24
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
25
|
+
<feOffset dy="2"/>
|
|
26
|
+
<feGaussianBlur stdDeviation="2"/>
|
|
27
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
28
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.02 0"/>
|
|
29
|
+
<feBlend mode="normal" in2="effect2_dropShadow_3654_27680" result="effect3_dropShadow_3654_27680"/>
|
|
30
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect3_dropShadow_3654_27680" result="shape"/>
|
|
31
|
+
</filter>
|
|
32
|
+
</defs>
|
|
33
|
+
</svg>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<svg width="110" height="110" viewBox="0 0 110 110" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g filter="url(#filter0_ddd_3654_27681)">
|
|
3
|
+
<rect x="5" y="4" width="100" height="100" rx="8" fill="white" shape-rendering="crispEdges"/>
|
|
4
|
+
<rect x="5.5" y="4.5" width="99" height="99" rx="7.5" stroke="#E5E7EB" shape-rendering="crispEdges"/>
|
|
5
|
+
<path d="M49.9075 29.75C50.3189 28.5804 51.131 27.5942 52.1999 26.966C53.2688 26.3378 54.5256 26.1081 55.7476 26.3177C56.9696 26.5274 58.0779 27.1627 58.8764 28.1112C59.6748 29.0597 60.1118 30.2602 60.11 31.5C60.11 35 54.86 36.75 54.86 36.75M55 43.75H55.0175M72.5 35C72.5 44.665 64.665 52.5 55 52.5C45.335 52.5 37.5 44.665 37.5 35C37.5 25.335 45.335 17.5 55 17.5C64.665 17.5 72.5 25.335 72.5 35Z" stroke="#00AEB1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path d="M19.6172 63.1357V69.4043C19.6172 70.8125 20.5059 71.8037 22.0781 71.8037C23.6504 71.8037 24.5459 70.8125 24.5459 69.4043V63.1357H26.0703V69.5342C26.0703 71.6602 24.5527 73.1641 22.0781 73.1641C19.6035 73.1641 18.0859 71.6602 18.0859 69.5342V63.1357H19.6172ZM27.7383 73V65.5762H29.1533V66.8271H29.1807C29.6318 65.9521 30.377 65.4941 31.5254 65.4941C33.166 65.4941 34.1025 66.5332 34.1025 68.2422V73H32.6191V68.5225C32.6191 67.3945 32.0996 66.7656 31.0127 66.7656C29.8916 66.7656 29.2217 67.5449 29.2217 68.7139V73H27.7383ZM35.6406 73V65.5762H37.124V73H35.6406ZM36.3857 64.5166C35.9072 64.5166 35.5176 64.1338 35.5176 63.6621C35.5176 63.1768 35.9072 62.8076 36.3857 62.8076C36.8643 62.8076 37.2539 63.1768 37.2539 63.6621C37.2539 64.1338 36.8643 64.5166 36.3857 64.5166ZM41.499 73.0752C39.6396 73.0752 38.3682 71.5781 38.3682 69.2812C38.3682 66.998 39.6396 65.501 41.4854 65.501C42.5518 65.501 43.3994 65.9863 43.8232 66.8066H43.8574V62.6914H45.334V73H43.8984V71.7422H43.8711C43.4336 72.583 42.5859 73.0752 41.499 73.0752ZM41.875 66.7588C40.6787 66.7588 39.8857 67.7568 39.8857 69.2881C39.8857 70.8262 40.6719 71.8174 41.875 71.8174C43.0645 71.8174 43.8643 70.8057 43.8643 69.2881C43.8643 67.7773 43.0645 66.7588 41.875 66.7588ZM49.9961 66.6904C48.9297 66.6904 48.1572 67.4697 48.0752 68.6113H51.8418C51.8076 67.4561 51.0762 66.6904 49.9961 66.6904ZM51.835 70.8262H53.25C53.0381 72.1592 51.7324 73.0889 50.0645 73.0889C47.9111 73.0889 46.5713 71.6396 46.5713 69.3154C46.5713 66.9912 47.9248 65.4805 50.0029 65.4805C52.04 65.4805 53.3252 66.8955 53.3252 69.1445V69.6641H48.0684V69.7529C48.0684 71.0381 48.875 71.8857 50.0918 71.8857C50.9531 71.8857 51.6299 71.4756 51.835 70.8262ZM54.5215 73V65.5762H55.9365V66.8271H55.9639C56.415 65.9521 57.1602 65.4941 58.3086 65.4941C59.9492 65.4941 60.8857 66.5332 60.8857 68.2422V73H59.4023V68.5225C59.4023 67.3945 58.8828 66.7656 57.7959 66.7656C56.6748 66.7656 56.0049 67.5449 56.0049 68.7139V73H54.5215ZM62.8135 63.9082H64.29V65.5762H65.7119V66.7451H64.29V70.8945C64.29 71.5371 64.5771 71.8379 65.1992 71.8379C65.3564 71.8379 65.6094 71.8174 65.7051 71.8037V72.9727C65.541 73.0137 65.1924 73.0479 64.8711 73.0479C63.3877 73.0479 62.8135 72.4805 62.8135 71.0449V66.7451H61.7881V65.5762H62.8135V63.9082ZM67.0176 73V65.5762H68.501V73H67.0176ZM67.7627 64.5166C67.2842 64.5166 66.8945 64.1338 66.8945 63.6621C66.8945 63.1768 67.2842 62.8076 67.7627 62.8076C68.2412 62.8076 68.6309 63.1768 68.6309 63.6621C68.6309 64.1338 68.2412 64.5166 67.7627 64.5166ZM70.5244 73V66.7451H69.499V65.5762H70.5244V64.8926C70.5244 63.5049 71.1533 62.8965 72.6572 62.8965C72.9238 62.8965 73.1699 62.9238 73.4092 62.9648V64.0928C73.2588 64.0586 73.0537 64.0381 72.8555 64.0381C72.2471 64.0381 71.9941 64.3047 71.9873 64.9404V65.5762H73.416V66.7451H72.001V73H70.5244ZM74.7012 73V65.5762H76.1846V73H74.7012ZM75.4463 64.5166C74.9678 64.5166 74.5781 64.1338 74.5781 63.6621C74.5781 63.1768 74.9678 62.8076 75.4463 62.8076C75.9248 62.8076 76.3145 63.1768 76.3145 63.6621C76.3145 64.1338 75.9248 64.5166 75.4463 64.5166ZM80.8535 66.6904C79.7871 66.6904 79.0146 67.4697 78.9326 68.6113H82.6992C82.665 67.4561 81.9336 66.6904 80.8535 66.6904ZM82.6924 70.8262H84.1074C83.8955 72.1592 82.5898 73.0889 80.9219 73.0889C78.7686 73.0889 77.4287 71.6396 77.4287 69.3154C77.4287 66.9912 78.7822 65.4805 80.8604 65.4805C82.8975 65.4805 84.1826 66.8955 84.1826 69.1445V69.6641H78.9258V69.7529C78.9258 71.0381 79.7324 71.8857 80.9492 71.8857C81.8105 71.8857 82.4873 71.4756 82.6924 70.8262ZM88.1748 73.0752C86.3154 73.0752 85.0439 71.5781 85.0439 69.2812C85.0439 66.998 86.3154 65.501 88.1611 65.501C89.2275 65.501 90.0752 65.9863 90.499 66.8066H90.5332V62.6914H92.0098V73H90.5742V71.7422H90.5469C90.1094 72.583 89.2617 73.0752 88.1748 73.0752ZM88.5508 66.7588C87.3545 66.7588 86.5615 67.7568 86.5615 69.2881C86.5615 70.8262 87.3477 71.8174 88.5508 71.8174C89.7402 71.8174 90.54 70.8057 90.54 69.2881C90.54 67.7773 89.7402 66.7588 88.5508 66.7588ZM38.7715 80.1357H42.6338C44.5479 80.1357 45.8877 81.4551 45.8877 83.376C45.8877 85.3037 44.5205 86.6299 42.5859 86.6299H40.3027V90H38.7715V80.1357ZM40.3027 81.4277V85.3447H42.2305C43.5566 85.3447 44.3223 84.627 44.3223 83.3828C44.3223 82.1387 43.5635 81.4277 42.2305 81.4277H40.3027ZM49.8594 83.6904C48.793 83.6904 48.0205 84.4697 47.9385 85.6113H51.7051C51.6709 84.4561 50.9395 83.6904 49.8594 83.6904ZM51.6982 87.8262H53.1133C52.9014 89.1592 51.5957 90.0889 49.9277 90.0889C47.7744 90.0889 46.4346 88.6396 46.4346 86.3154C46.4346 83.9912 47.7881 82.4805 49.8662 82.4805C51.9033 82.4805 53.1885 83.8955 53.1885 86.1445V86.6641H47.9316V86.7529C47.9316 88.0381 48.7383 88.8857 49.9551 88.8857C50.8164 88.8857 51.4932 88.4756 51.6982 87.8262ZM54.2617 84.6885C54.2617 83.3828 55.4307 82.4873 57.1396 82.4873C58.7666 82.4873 59.9424 83.4033 59.9766 84.6953H58.582C58.5205 84.0391 57.9531 83.6289 57.1055 83.6289C56.2646 83.6289 55.7041 84.0186 55.7041 84.6064C55.7041 85.0576 56.0732 85.3652 56.8594 85.5566L58.0898 85.8506C59.5869 86.2129 60.1406 86.7529 60.1406 87.8467C60.1406 89.1729 58.8828 90.0889 57.085 90.0889C55.3555 90.0889 54.1729 89.1934 54.0635 87.8535H55.5264C55.6426 88.5645 56.2168 88.9541 57.1602 88.9541C58.083 88.9541 58.6641 88.5713 58.6641 87.9697C58.6641 87.498 58.3701 87.252 57.5908 87.0537L56.2646 86.7256C54.9248 86.3975 54.2617 85.7139 54.2617 84.6885ZM61.7881 80.9082H63.2646V82.5762H64.6865V83.7451H63.2646V87.8945C63.2646 88.5371 63.5518 88.8379 64.1738 88.8379C64.3311 88.8379 64.584 88.8174 64.6797 88.8037V89.9727C64.5156 90.0137 64.167 90.0479 63.8457 90.0479C62.3623 90.0479 61.7881 89.4805 61.7881 88.0449V83.7451H60.7627V82.5762H61.7881V80.9082ZM65.8145 84.6885C65.8145 83.3828 66.9834 82.4873 68.6924 82.4873C70.3193 82.4873 71.4951 83.4033 71.5293 84.6953H70.1348C70.0732 84.0391 69.5059 83.6289 68.6582 83.6289C67.8174 83.6289 67.2568 84.0186 67.2568 84.6064C67.2568 85.0576 67.626 85.3652 68.4121 85.5566L69.6426 85.8506C71.1396 86.2129 71.6934 86.7529 71.6934 87.8467C71.6934 89.1729 70.4355 90.0889 68.6377 90.0889C66.9082 90.0889 65.7256 89.1934 65.6162 87.8535H67.0791C67.1953 88.5645 67.7695 88.9541 68.7129 88.9541C69.6357 88.9541 70.2168 88.5713 70.2168 87.9697C70.2168 87.498 69.9229 87.252 69.1436 87.0537L67.8174 86.7256C66.4775 86.3975 65.8145 85.7139 65.8145 84.6885Z" fill="#6C737F"/>
|
|
7
|
+
</g>
|
|
8
|
+
<defs>
|
|
9
|
+
<filter id="filter0_ddd_3654_27681" x="0" y="0" width="110" height="110" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
10
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
11
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
12
|
+
<feOffset dy="1"/>
|
|
13
|
+
<feGaussianBlur stdDeviation="1"/>
|
|
14
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
15
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"/>
|
|
16
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_3654_27681"/>
|
|
17
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
18
|
+
<feMorphology radius="1" operator="erode" in="SourceAlpha" result="effect2_dropShadow_3654_27681"/>
|
|
19
|
+
<feOffset dy="1"/>
|
|
20
|
+
<feGaussianBlur stdDeviation="3"/>
|
|
21
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
22
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.02 0"/>
|
|
23
|
+
<feBlend mode="normal" in2="effect1_dropShadow_3654_27681" result="effect2_dropShadow_3654_27681"/>
|
|
24
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
25
|
+
<feOffset dy="2"/>
|
|
26
|
+
<feGaussianBlur stdDeviation="2"/>
|
|
27
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
28
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.02 0"/>
|
|
29
|
+
<feBlend mode="normal" in2="effect2_dropShadow_3654_27681" result="effect3_dropShadow_3654_27681"/>
|
|
30
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect3_dropShadow_3654_27681" result="shape"/>
|
|
31
|
+
</filter>
|
|
32
|
+
</defs>
|
|
33
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const getFaunaConfig = () => {
|
|
2
|
+
return [
|
|
3
|
+
{ img: "/Biodiversity/birds.svg", key: "birds", disabled: "/Biodiversity/birds-default.svg" },
|
|
4
|
+
{ img: "/Biodiversity/crabs.svg", key: "crabs", disabled: "/Biodiversity/crabs-default.svg" },
|
|
5
|
+
{ img: "/Biodiversity/cymbium.svg", key: "cymbium", disabled: "/Biodiversity/cymbium-default.svg" },
|
|
6
|
+
{ img: "/Biodiversity/fish.svg", key: "fish", disabled: "/Biodiversity/fish-default.svg" },
|
|
7
|
+
{ img: "/Biodiversity/juveniles.svg", key: "juveniles", disabled: "/Biodiversity/juveniles-default.svg" },
|
|
8
|
+
{ img: "/Biodiversity/mollusks.svg", key: "mollusks", disabled: "/Biodiversity/mollusks-default.svg" },
|
|
9
|
+
{ img: "/Biodiversity/mongooses.svg", key: "mongooses", disabled: "/Biodiversity/mongooses-default.svg" },
|
|
10
|
+
{ img: "/Biodiversity/monkeys.svg", key: "monkeys", disabled: "/Biodiversity/monkeys-default.svg" },
|
|
11
|
+
{ img: "/Biodiversity/oysters.svg", key: "oysters", disabled: "/Biodiversity/oysters-default.svg" },
|
|
12
|
+
{ img: "/Biodiversity/snails.svg", key: "snails", disabled: "/Biodiversity/snails-default.svg" },
|
|
13
|
+
];
|
|
14
|
+
};
|
|
15
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import Widget from "../index.jsx";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { getFaunaConfig } from "./config.js";
|
|
4
|
+
import { Tooltip } from "antd";
|
|
5
|
+
|
|
6
|
+
export default function FaunaWidget({
|
|
7
|
+
title = "Observed Fauna",
|
|
8
|
+
faunaPresent = [],
|
|
9
|
+
filterKeys = null,
|
|
10
|
+
columnsPerRow = 5,
|
|
11
|
+
itemWidth = 100,
|
|
12
|
+
itemHeight = 100,
|
|
13
|
+
t = (key) => key,
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
let faunaConfig = getFaunaConfig();
|
|
17
|
+
|
|
18
|
+
// Filter to show only specific keys if filterKeys is provided
|
|
19
|
+
if (filterKeys && Array.isArray(filterKeys)) {
|
|
20
|
+
faunaConfig = faunaConfig.filter(item => filterKeys.includes(item.key));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Widget title={title} className={`with-border-header no-p-body`} {...props}>
|
|
25
|
+
<FaunaWrapper $columnsPerRow={columnsPerRow}>
|
|
26
|
+
<FaunaContainer
|
|
27
|
+
$columnsPerRow={columnsPerRow}
|
|
28
|
+
$itemWidth={itemWidth}
|
|
29
|
+
$itemHeight={itemHeight}
|
|
30
|
+
>
|
|
31
|
+
{faunaConfig.map((item) => {
|
|
32
|
+
// Use colored SVG if the item's key exists in faunaPresent array
|
|
33
|
+
// Otherwise use default SVG
|
|
34
|
+
const isPresent = Array.isArray(faunaPresent) && faunaPresent.includes(item.key);
|
|
35
|
+
const shouldUseColored = isPresent;
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Tooltip key={item.key} title={t(`straatos::${item.key}`)}>
|
|
39
|
+
<img
|
|
40
|
+
src={shouldUseColored ? item.img : item.disabled}
|
|
41
|
+
key={item.key}
|
|
42
|
+
className={`fauna-item`}
|
|
43
|
+
alt={item.key}
|
|
44
|
+
></img>
|
|
45
|
+
</Tooltip>
|
|
46
|
+
);
|
|
47
|
+
})}
|
|
48
|
+
</FaunaContainer>
|
|
49
|
+
</FaunaWrapper>
|
|
50
|
+
</Widget>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const FaunaWrapper = styled.div`
|
|
55
|
+
padding: 24px;
|
|
56
|
+
width: 100%;
|
|
57
|
+
${props => props.$columnsPerRow ? `
|
|
58
|
+
overflow-x: auto;
|
|
59
|
+
` : ''}
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
const FaunaContainer = styled.div`
|
|
63
|
+
display: grid;
|
|
64
|
+
grid-template-columns: ${props =>
|
|
65
|
+
props.$columnsPerRow
|
|
66
|
+
? `repeat(${props.$columnsPerRow}, 1fr)`
|
|
67
|
+
: `repeat(auto-fit, minmax(${props.$itemWidth}px, 1fr))`
|
|
68
|
+
};
|
|
69
|
+
gap: 24px;
|
|
70
|
+
width: 100%;
|
|
71
|
+
|
|
72
|
+
.fauna-item {
|
|
73
|
+
width: 100%;
|
|
74
|
+
aspect-ratio: ${props => props.$itemWidth / props.$itemHeight};
|
|
75
|
+
border-radius: 7px;
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
display: block;
|
|
78
|
+
margin: 0;
|
|
79
|
+
padding: 0;
|
|
80
|
+
object-fit: contain;
|
|
81
|
+
}
|
|
82
|
+
`;
|
|
83
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const getInvasiveSpeciesConfig = () => {
|
|
2
|
+
return [
|
|
3
|
+
{ img: "/Biodiversity/spiders.svg", key: "spiders", disabled: "/Biodiversity/spiders-default.svg" },
|
|
4
|
+
{ img: "/Biodiversity/scale-insects.svg", key: "scaleInsects", disabled: "/Biodiversity/scale-insects-default.svg" },
|
|
5
|
+
{ img: "/Biodiversity/caterpillars.svg", key: "caterpillars", disabled: "/Biodiversity/caterpillars-default.svg" },
|
|
6
|
+
{ img: "/Biodiversity/ants.svg", key: "ants", disabled: "/Biodiversity/ants-default.svg" },
|
|
7
|
+
{ img: "/Biodiversity/unidentified-pests.svg", key: "unidentifiedPests", disabled: "/Biodiversity/unidentified-pests-default.svg" },
|
|
8
|
+
{ img: "/Biodiversity/others.svg", key: "other", disabled: "/Biodiversity/others-default.svg" },
|
|
9
|
+
];
|
|
10
|
+
};
|
|
11
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import Widget from "../index.jsx";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { getInvasiveSpeciesConfig } from "./config.js";
|
|
4
|
+
import { Tooltip } from "antd";
|
|
5
|
+
|
|
6
|
+
export default function InvasiveSpeciesWidget({
|
|
7
|
+
title = "Invasive Species",
|
|
8
|
+
invasiveSpecies = [],
|
|
9
|
+
hasInvasiveSpecies,
|
|
10
|
+
filterKeys = null,
|
|
11
|
+
columnsPerRow = 3,
|
|
12
|
+
itemWidth = 100,
|
|
13
|
+
itemHeight = 100,
|
|
14
|
+
t = (key) => key,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
let invasiveSpeciesConfig = getInvasiveSpeciesConfig();
|
|
18
|
+
|
|
19
|
+
// Filter to show only specific keys if filterKeys is provided
|
|
20
|
+
if (filterKeys && Array.isArray(filterKeys)) {
|
|
21
|
+
invasiveSpeciesConfig = invasiveSpeciesConfig.filter(item => filterKeys.includes(item.key));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Widget title={title} className={`with-border-header no-p-body`} {...props}>
|
|
26
|
+
<InvasiveSpeciesWrapper $columnsPerRow={columnsPerRow}>
|
|
27
|
+
<InvasiveSpeciesContainer
|
|
28
|
+
$columnsPerRow={columnsPerRow}
|
|
29
|
+
$itemWidth={itemWidth}
|
|
30
|
+
$itemHeight={itemHeight}
|
|
31
|
+
>
|
|
32
|
+
{invasiveSpeciesConfig.map((item) => {
|
|
33
|
+
// If hasInvasiveSpecies is 'no', show all as inactive
|
|
34
|
+
// If hasInvasiveSpecies is 'yes', show present ones as active
|
|
35
|
+
const shouldShowAllAsNotPresent = hasInvasiveSpecies === 'no';
|
|
36
|
+
const isPresent = !shouldShowAllAsNotPresent &&
|
|
37
|
+
Array.isArray(invasiveSpecies) &&
|
|
38
|
+
invasiveSpecies.includes(item.key);
|
|
39
|
+
const shouldUseColored = isPresent;
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Tooltip key={item.key} title={t(`straatos::${item.key}`)}>
|
|
43
|
+
<img
|
|
44
|
+
src={shouldUseColored ? item.img : item.disabled}
|
|
45
|
+
key={item.key}
|
|
46
|
+
className={`invasive-species-item`}
|
|
47
|
+
alt={item.key}
|
|
48
|
+
></img>
|
|
49
|
+
</Tooltip>
|
|
50
|
+
);
|
|
51
|
+
})}
|
|
52
|
+
</InvasiveSpeciesContainer>
|
|
53
|
+
</InvasiveSpeciesWrapper>
|
|
54
|
+
</Widget>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const InvasiveSpeciesWrapper = styled.div`
|
|
59
|
+
padding: 24px;
|
|
60
|
+
width: 100%;
|
|
61
|
+
${props => props.$columnsPerRow ? `
|
|
62
|
+
overflow-x: auto;
|
|
63
|
+
` : ''}
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
const InvasiveSpeciesContainer = styled.div`
|
|
67
|
+
display: grid;
|
|
68
|
+
grid-template-columns: ${props =>
|
|
69
|
+
props.$columnsPerRow
|
|
70
|
+
? `repeat(${props.$columnsPerRow}, 1fr)`
|
|
71
|
+
: `repeat(auto-fit, minmax(${props.$itemWidth}px, 1fr))`
|
|
72
|
+
};
|
|
73
|
+
gap: 24px;
|
|
74
|
+
width: 100%;
|
|
75
|
+
|
|
76
|
+
.invasive-species-item {
|
|
77
|
+
width: 100%;
|
|
78
|
+
aspect-ratio: ${props => props.$itemWidth / props.$itemHeight};
|
|
79
|
+
border-radius: 7px;
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
display: block;
|
|
82
|
+
margin: 0;
|
|
83
|
+
padding: 0;
|
|
84
|
+
object-fit: contain;
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
87
|
+
|
|
@@ -86,7 +86,7 @@ export const getColumns = ({
|
|
|
86
86
|
return <div className="daf-default-cell" />;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
const category = findOptions(value,
|
|
89
|
+
const category = findOptions(value, options?.locationCategories || []) || "--";
|
|
90
90
|
|
|
91
91
|
return <Tooltip title={category}>{category}</Tooltip>;
|
|
92
92
|
},
|
|
@@ -28,16 +28,15 @@ export const usePrepareForm = ({
|
|
|
28
28
|
const prepareForm = (setExtra = true) => {
|
|
29
29
|
if (isSupported) {
|
|
30
30
|
const dKey = namespaceConfig?.dataKey;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const d = JSON.parse(JSON.stringify(allData[dKey][nKey].data || {}));
|
|
31
|
+
if (hasKeyInObject(allData, dKey)) {
|
|
32
|
+
const d = JSON.parse(JSON.stringify(allData[dKey].data || {}));
|
|
34
33
|
Object.keys(d).forEach((k) => {
|
|
35
34
|
if (d[k] === null) {
|
|
36
35
|
d[k] = undefined;
|
|
37
36
|
}
|
|
38
37
|
});
|
|
39
38
|
if (d.datastakeId === id || d.applicationId === id || id === "user" || d.id === id) {
|
|
40
|
-
const formG = mapFormGroup(allData[dKey]
|
|
39
|
+
const formG = mapFormGroup(allData[dKey].form || {}, d);
|
|
41
40
|
setForm(formG);
|
|
42
41
|
|
|
43
42
|
if (setExtra) {
|
|
@@ -75,7 +74,7 @@ export const usePrepareForm = ({
|
|
|
75
74
|
setEditValues({ ...d });
|
|
76
75
|
setInputsMeta(d?.meta?.inputs || {});
|
|
77
76
|
setOriginalData({ ...d });
|
|
78
|
-
setLinkingForms(allData[dKey]
|
|
77
|
+
setLinkingForms(allData[dKey].linkingForms);
|
|
79
78
|
setLoading(false);
|
|
80
79
|
return;
|
|
81
80
|
}
|
|
@@ -85,7 +84,7 @@ export const usePrepareForm = ({
|
|
|
85
84
|
setEditValues({ ...d });
|
|
86
85
|
setInputsMeta(d?.meta?.inputs || {});
|
|
87
86
|
setOriginalData({ ...d });
|
|
88
|
-
setLinkingForms(allData[dKey]
|
|
87
|
+
setLinkingForms(allData[dKey].linkingForms);
|
|
89
88
|
setLoading(false);
|
|
90
89
|
}
|
|
91
90
|
}
|
package/src/@daf/pages/Summary/Activities/Monitoring/components/BiodiversityAndHabitat/index.jsx
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Widget, FaunaWidget, InvasiveSpeciesWidget } from '../../../../../../../../src/index.js';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import {
|
|
5
|
-
generateFaunaConfig,
|
|
6
|
-
generateInvasiveSpeciesConfig
|
|
7
|
-
} from './helper';
|
|
8
4
|
|
|
9
|
-
const
|
|
10
|
-
display:
|
|
11
|
-
grid-template-columns: 70% 28.5%;
|
|
5
|
+
const BiodiversityContainer = styled.div`
|
|
6
|
+
display: flex;
|
|
12
7
|
gap: 24px;
|
|
13
8
|
width: 100%;
|
|
9
|
+
|
|
14
10
|
@media (max-width: 768px) {
|
|
15
|
-
|
|
11
|
+
flex-direction: column;
|
|
16
12
|
}
|
|
17
13
|
`;
|
|
18
14
|
|
|
15
|
+
const FaunaSection = styled.section`
|
|
16
|
+
width: 60%;
|
|
17
|
+
min-width: 0;
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
const InvasiveSpeciesSection = styled.section`
|
|
21
|
+
width: 38.5%;
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
|
|
19
25
|
const BiodiversityAndHabitat = ({
|
|
20
26
|
faunaPresent = [],
|
|
21
27
|
invasiveSpecies = [],
|
|
@@ -23,40 +29,37 @@ const BiodiversityAndHabitat = ({
|
|
|
23
29
|
loading = false,
|
|
24
30
|
t = (s) => s
|
|
25
31
|
}) => {
|
|
26
|
-
const observedFaunaConfig = useMemo(() =>
|
|
27
|
-
generateFaunaConfig(faunaPresent, t),
|
|
28
|
-
[faunaPresent, t]
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
const invasiveSpeciesConfig = useMemo(() =>
|
|
32
|
-
generateInvasiveSpeciesConfig(invasiveSpecies, hasInvasiveSpecies, t),
|
|
33
|
-
[invasiveSpecies, hasInvasiveSpecies, t]
|
|
34
|
-
);
|
|
35
|
-
|
|
36
32
|
return (
|
|
37
33
|
<Widget
|
|
38
34
|
title={t("Biodiversity & Habitat")}
|
|
39
35
|
className="with-border-header h-w-btn-header"
|
|
40
36
|
>
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
<
|
|
37
|
+
<BiodiversityContainer>
|
|
38
|
+
<FaunaSection>
|
|
39
|
+
<FaunaWidget
|
|
44
40
|
title={t("Observed Fauna")}
|
|
45
|
-
|
|
41
|
+
faunaPresent={faunaPresent}
|
|
42
|
+
columnsPerRow={5}
|
|
43
|
+
itemWidth={120}
|
|
44
|
+
itemHeight={120}
|
|
46
45
|
loading={loading}
|
|
47
|
-
widgetClassName="h-w-btn-header"
|
|
48
46
|
t={t}
|
|
49
47
|
/>
|
|
50
|
-
|
|
48
|
+
</FaunaSection>
|
|
49
|
+
|
|
50
|
+
<InvasiveSpeciesSection>
|
|
51
|
+
<InvasiveSpeciesWidget
|
|
51
52
|
title={t("Invasive Species")}
|
|
52
|
-
|
|
53
|
+
invasiveSpecies={invasiveSpecies}
|
|
54
|
+
hasInvasiveSpecies={hasInvasiveSpecies}
|
|
55
|
+
columnsPerRow={3}
|
|
56
|
+
itemWidth={100}
|
|
57
|
+
itemHeight={100}
|
|
53
58
|
loading={loading}
|
|
54
|
-
className="single-column"
|
|
55
|
-
widgetClassName="h-w-btn-header"
|
|
56
59
|
t={t}
|
|
57
60
|
/>
|
|
58
|
-
</
|
|
59
|
-
</
|
|
61
|
+
</InvasiveSpeciesSection>
|
|
62
|
+
</BiodiversityContainer>
|
|
60
63
|
</Widget>
|
|
61
64
|
);
|
|
62
65
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useRef, useEffect } from "react";
|
|
2
2
|
import { hasKeyInObject } from "../../../../@daf/utils/object.js";
|
|
3
|
-
import { getNkey } from "../../../../@daf/core/components/ViewForm/helper.js";
|
|
4
3
|
|
|
5
4
|
export const useCallToGetData = ({
|
|
6
5
|
namespaceConfig,
|
|
@@ -19,11 +18,10 @@ export const useCallToGetData = ({
|
|
|
19
18
|
|
|
20
19
|
const callToGetData = (_doCall = false) => {
|
|
21
20
|
const dKey = namespaceConfig?.dataKey;
|
|
22
|
-
const nKey = `${APP}-${getNkey(namespace || "")}`;
|
|
23
21
|
const doCall = _doCall
|
|
24
22
|
? true
|
|
25
|
-
: hasKeyInObject(allData, dKey)
|
|
26
|
-
? allData[dKey]
|
|
23
|
+
: hasKeyInObject(allData, dKey)
|
|
24
|
+
? allData[dKey]?.data?.datastakeId !== id
|
|
27
25
|
: true;
|
|
28
26
|
if (doCall) {
|
|
29
27
|
if (isSupported) {
|
|
@@ -20,17 +20,17 @@ export const usePrepareForm = ({
|
|
|
20
20
|
|
|
21
21
|
const prepareForm = (currentView) => {
|
|
22
22
|
const dKey = namespaceConfig?.dataKey;
|
|
23
|
-
const nKey = `${APP}-${currentView}`;
|
|
24
23
|
|
|
25
|
-
if (hasKeyInObject(allData, dKey)
|
|
24
|
+
if (hasKeyInObject(allData, dKey)) {
|
|
26
25
|
const {
|
|
27
26
|
form = {},
|
|
28
27
|
data = {},
|
|
29
28
|
config = {},
|
|
30
29
|
linkingForms = {},
|
|
31
|
-
} = JSON.parse(JSON.stringify(allData[dKey]
|
|
30
|
+
} = JSON.parse(JSON.stringify(allData[dKey] || {}));
|
|
32
31
|
|
|
33
|
-
if
|
|
32
|
+
if(Object.keys(form).length > 0) {
|
|
33
|
+
if (data.datastakeId === id || id === "user" || data.id === id) {
|
|
34
34
|
if (viewConfig.adminNamespaces.includes(namespace)) {
|
|
35
35
|
setForm(form);
|
|
36
36
|
} else {
|
|
@@ -57,6 +57,7 @@ export const usePrepareForm = ({
|
|
|
57
57
|
setNotFound(true);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
+
}
|
|
60
61
|
}
|
|
61
62
|
};
|
|
62
63
|
|
|
@@ -215,12 +215,6 @@ const View = ({
|
|
|
215
215
|
: pageActions;
|
|
216
216
|
}, [groupForm, pageActions]);
|
|
217
217
|
|
|
218
|
-
console.log({namespaceConfiguration, namespaceConfig, allData, namespace, id, group, subsection,
|
|
219
|
-
version,
|
|
220
|
-
source,
|
|
221
|
-
isSupported,
|
|
222
|
-
notFound
|
|
223
|
-
})
|
|
224
218
|
|
|
225
219
|
if(!isSupported || notFound) {
|
|
226
220
|
return <Loading />
|
package/src/index.js
CHANGED
|
@@ -79,6 +79,8 @@ export { default as CarouselWidget } from "./@daf/core/components/Dashboard/Widg
|
|
|
79
79
|
export { default as ImageCarousel } from "./@daf/core/components/Dashboard/Widget/ImageCarousel/index.jsx";
|
|
80
80
|
export { default as StatCard } from "./@daf/core/components/Dashboard/Widget/StatCard/index.js";
|
|
81
81
|
export { default as VegetationHealth } from "./@daf/core/components/Dashboard/Widget/VegetationWidget/index.jsx";
|
|
82
|
+
export { default as FaunaWidget } from "./@daf/core/components/Dashboard/Widget/FaunaWidget/index.jsx";
|
|
83
|
+
export { default as InvasiveSpeciesWidget } from "./@daf/core/components/Dashboard/Widget/InvasiveSpeciesWidget/index.jsx";
|
|
82
84
|
// export { default as WidgetCatalogue } from "./@daf/core/components/Dashboard/Widget/WidgetCatalogue/index.jsx";
|
|
83
85
|
|
|
84
86
|
// Forms
|