datastake-daf 0.6.736 → 0.6.738
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 +472 -441
- package/dist/hooks/index.js +4 -2
- package/dist/layouts/index.js +478 -441
- package/dist/pages/index.js +1870 -506
- package/dist/services/index.js +84 -0
- package/dist/utils/index.js +464 -440
- package/package.json +1 -1
- package/public/assets/favicons/datastake-black.svg +13 -0
- package/public/assets/favicons/datastake-white.svg +13 -0
- package/src/@daf/core/components/Icon/configs/EventCalendar.js +14 -0
- package/src/@daf/core/components/Icon/configs/LifeCycle.js +13 -0
- package/src/@daf/core/components/Icon/configs/index.js +4 -0
- package/src/@daf/core/components/Sidenav/index.jsx +15 -3
- package/src/@daf/hooks/useGetQueryParams.js +2 -2
- package/src/@daf/layouts/AppLayout/components/Sidenav/index.js +2 -0
- package/src/@daf/layouts/AppLayout/index.jsx +6 -1
- package/src/@daf/pages/dashboards/AllInformation/Documents/columns.js +106 -0
- package/src/@daf/pages/dashboards/AllInformation/Documents/config.js +31 -0
- package/src/@daf/pages/dashboards/AllInformation/Documents/create.jsx +104 -0
- package/src/@daf/pages/dashboards/AllInformation/Documents/index.jsx +156 -0
- package/src/@daf/pages/dashboards/AllInformation/Events/columns.js +150 -0
- package/src/@daf/pages/dashboards/AllInformation/Events/config.js +31 -0
- package/src/@daf/pages/dashboards/AllInformation/Events/create.jsx +104 -0
- package/src/@daf/pages/dashboards/AllInformation/Events/index.jsx +156 -0
- package/src/@daf/pages/dashboards/AllInformation/Locations/index.jsx +1 -2
- package/src/@daf/pages/dashboards/Operations/Operators/columns.js +150 -0
- package/src/@daf/pages/dashboards/Operations/Operators/config.js +31 -0
- package/src/@daf/pages/dashboards/Operations/Operators/create.jsx +104 -0
- package/src/@daf/pages/dashboards/Operations/Operators/index.jsx +156 -0
- package/src/@daf/pages/pages/TablePageWithTabs/index.jsx +2 -2
- package/src/@daf/services/OperatorService.js +90 -0
- package/src/helpers/StringHelper.js +4 -4
- package/src/pages.js +5 -2
- package/src/services.js +2 -1
- 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/dist/style/datastake/mapbox-gl.css +0 -330
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg width="70" height="13" viewBox="0 0 70 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M8.87545 7.05261C8.72638 7.59072 8.40565 8.06544 7.96205 8.40455C7.51844 8.74367 6.97622 8.92864 6.41785 8.93134H3.84289V6.3436C3.84839 5.78752 4.03466 5.24833 4.37358 4.80744C4.7125 4.36655 5.18565 4.04789 5.72161 3.89957V0C4.16061 0.167454 2.71548 0.902389 1.66069 2.06522C0.605898 3.22805 0.0149202 4.73778 0 6.30767V12.775H6.43781C8.01233 12.7663 9.5285 12.1781 10.6968 11.1225C11.8652 10.067 12.6039 8.61817 12.7718 7.05261H8.87545Z" fill="#2D2D35"/>
|
|
3
|
+
<path d="M6.96289 5.81263V0C10.1511 0 12.7755 2.62367 12.7755 5.81263H6.96289Z" fill="#2D2D35"/>
|
|
4
|
+
<path d="M20.2648 10.6122C19.7781 10.6203 19.2994 10.4881 18.8858 10.2314C18.4799 9.97356 18.1483 9.61431 17.9238 9.18911C17.6889 8.72998 17.5664 8.22163 17.5664 7.70591C17.5664 7.19018 17.6889 6.68183 17.9238 6.2227C18.1483 5.7975 18.4799 5.43825 18.8858 5.18045C19.2996 4.92409 19.7782 4.79191 20.2648 4.79963C20.6414 4.79398 21.0138 4.87924 21.3504 5.04816C21.6627 5.20412 21.9308 5.43629 22.1297 5.72322C22.3277 6.00901 22.439 6.34584 22.4504 6.69332V8.68482C22.4399 9.0381 22.332 9.38162 22.1385 9.67737C21.9455 9.97046 21.6786 10.2075 21.3648 10.3645C21.0234 10.5341 20.6461 10.6191 20.2648 10.6122ZM20.531 9.21557C20.7907 9.22039 21.0465 9.15234 21.2694 9.01915C21.4822 8.8913 21.656 8.70779 21.7721 8.4884C21.8948 8.24929 21.9563 7.98344 21.9509 7.71473C21.9582 7.44234 21.8979 7.17239 21.7753 6.92903C21.6602 6.71053 21.4885 6.52696 21.2782 6.39748C21.0574 6.26425 20.8033 6.19642 20.5454 6.20186C20.2844 6.19567 20.0268 6.26141 19.8006 6.39187C19.589 6.51944 19.4171 6.70352 19.3044 6.92342C19.1817 7.16456 19.1203 7.4322 19.1256 7.7027C19.1195 7.97687 19.1809 8.24834 19.3044 8.49321C19.4181 8.71403 19.5921 8.89806 19.8062 9.02396C20.0259 9.15246 20.2765 9.2187 20.531 9.21557ZM23.382 10.4983H21.8555V8.9959L22.1088 7.63295L21.8434 6.28203V2.1499H23.3788L23.382 10.4983Z" fill="#2D2D35"/>
|
|
5
|
+
<path d="M27.018 10.6122C26.5349 10.6192 26.0601 10.487 25.6502 10.2314C25.245 9.97565 24.916 9.61566 24.6977 9.18914C24.47 8.72787 24.3516 8.22035 24.3516 7.70593C24.3516 7.19151 24.47 6.684 24.6977 6.22273C24.916 5.7962 25.245 5.43622 25.6502 5.18048C26.0642 4.92401 26.5431 4.79183 27.03 4.79965C27.398 4.79334 27.7621 4.87585 28.0915 5.04017C28.3988 5.19424 28.6614 5.42477 28.8539 5.70962C29.0482 6.00084 29.1563 6.34099 29.1658 6.69094V8.7113C29.1545 9.05837 29.0486 9.39576 28.8595 9.68702C28.6704 9.97593 28.4074 10.209 28.0979 10.3621C27.7629 10.5301 27.3927 10.6159 27.018 10.6122ZM27.3066 9.2156C27.4986 9.22289 27.6899 9.18847 27.8674 9.1147C28.0448 9.04093 28.2042 8.92956 28.3344 8.78827C28.5995 8.49487 28.74 8.10991 28.7265 7.71475C28.731 7.44188 28.6676 7.17217 28.5421 6.92986C28.4282 6.70929 28.2567 6.52367 28.0458 6.39269C27.8219 6.2618 27.5659 6.19599 27.3066 6.20268C27.0542 6.19643 26.8052 6.2612 26.5879 6.38963C26.3706 6.51806 26.1937 6.70498 26.0775 6.92905C25.9542 7.16796 25.8924 7.4339 25.8979 7.70273C25.8916 7.97522 25.9534 8.24498 26.0775 8.48762C26.193 8.70717 26.3667 8.89077 26.5794 9.01837C26.7986 9.15089 27.0505 9.21923 27.3066 9.2156ZM28.6343 10.4984V8.99592L28.8884 7.63298L28.6343 6.28206V4.92472H30.1575V10.4968L28.6343 10.4984Z" fill="#2D2D35"/>
|
|
6
|
+
<path d="M30.9902 6.24829V4.92463H35.1119V6.2523L30.9902 6.24829ZM32.2947 10.4975V2.59961H33.8067V10.4967L32.2947 10.4975Z" fill="#2D2D35"/>
|
|
7
|
+
<path d="M38.1477 10.6122C37.6644 10.6193 37.1893 10.4871 36.7791 10.2314C36.3739 9.97565 36.045 9.61566 35.8267 9.18914C35.5989 8.72787 35.4805 8.22035 35.4805 7.70593C35.4805 7.19151 35.5989 6.684 35.8267 6.22273C36.045 5.7962 36.3739 5.43622 36.7791 5.18048C37.1931 4.92409 37.672 4.79192 38.1589 4.79965C38.5272 4.79334 38.8915 4.87584 39.2212 5.04017C39.5282 5.19435 39.7905 5.42488 39.9828 5.70962C40.1789 6.00296 40.2871 6.3462 40.2947 6.69896V8.71932C40.2842 9.06652 40.1782 9.40411 39.9884 9.69503C39.7993 9.98394 39.5363 10.217 39.2268 10.3701C38.8915 10.5355 38.5215 10.6185 38.1477 10.6122ZM38.4363 9.2156C38.6282 9.22288 38.8194 9.18845 38.9967 9.11468C39.174 9.0409 39.3332 8.92954 39.4633 8.78827C39.7286 8.495 39.8695 8.11002 39.8562 7.71475C39.8608 7.44177 39.7972 7.17195 39.6709 6.92986C39.5573 6.7091 39.3858 6.52342 39.1747 6.39269C38.9511 6.26178 38.6953 6.19597 38.4363 6.20268C38.1838 6.19627 37.9346 6.26098 37.7171 6.38942C37.4997 6.51786 37.3227 6.70485 37.2064 6.92905C37.0833 7.16803 37.0219 7.43397 37.0276 7.70273C37.0211 7.97515 37.0825 8.24492 37.2064 8.48762C37.3246 8.71029 37.502 8.89601 37.719 9.02432C37.936 9.15262 38.1842 9.21854 38.4363 9.21479V9.2156ZM39.7639 10.4984V8.99592L40.0173 7.63298L39.7639 6.28206V4.92472H41.2872V10.4968L39.7639 10.4984Z" fill="#2D2D35"/>
|
|
8
|
+
<path d="M44.5322 10.624C44.2145 10.6245 43.8981 10.5838 43.5909 10.503C43.2957 10.4257 43.0136 10.3049 42.7539 10.1446C42.5068 9.99267 42.2848 9.80335 42.0957 9.58338L43.0081 8.67101C43.1836 8.88777 43.4096 9.05818 43.6663 9.16728C43.9297 9.27668 44.2125 9.33124 44.4977 9.32763C44.6923 9.33872 44.8866 9.30096 45.0629 9.21779C45.1214 9.19089 45.1709 9.14785 45.2057 9.09373C45.2405 9.03961 45.2591 8.97667 45.2593 8.91233C45.2612 8.83999 45.2428 8.76857 45.2061 8.7062C45.1693 8.64383 45.1159 8.59303 45.0517 8.55957C44.8857 8.46797 44.7094 8.39638 44.5266 8.34631L43.8507 8.14988C43.6155 8.08207 43.3889 7.98709 43.1756 7.86688C42.9615 7.74597 42.781 7.57344 42.6505 7.36499C42.5022 7.11378 42.4298 6.82504 42.4421 6.53359C42.4351 6.20412 42.5279 5.88023 42.7082 5.60439C42.8935 5.33179 43.1543 5.11919 43.4586 4.99266C43.8204 4.84235 44.2095 4.76943 44.6011 4.7786C45.0308 4.77352 45.457 4.85533 45.8542 5.01912C46.2226 5.17276 46.5433 5.42183 46.7834 5.74068L45.8711 6.66428C45.7162 6.47503 45.5209 6.32297 45.2994 6.21931C45.0875 6.12306 44.8572 6.07383 44.6244 6.075C44.3935 6.075 44.2203 6.10974 44.1048 6.17923C44.0521 6.20656 44.0079 6.24803 43.9773 6.29899C43.9468 6.34996 43.931 6.40842 43.9317 6.46785C43.9298 6.53458 43.9474 6.60041 43.9823 6.65734C44.0172 6.71427 44.0678 6.75985 44.1281 6.78854C44.2932 6.8751 44.4674 6.94287 44.6476 6.99058C44.8614 7.05205 45.0864 7.11939 45.3227 7.19262C45.5578 7.26575 45.7828 7.36839 45.9921 7.49808C46.2031 7.62884 46.3809 7.80666 46.5116 8.0176C46.6558 8.27025 46.7258 8.55839 46.7137 8.849C46.7137 9.39578 46.5175 9.82872 46.1252 10.1478C45.7329 10.4669 45.2019 10.6256 44.5322 10.624Z" fill="#2D2D35"/>
|
|
9
|
+
<path d="M47.2461 6.24829V4.92463H51.367V6.2523L47.2461 6.24829ZM48.5505 10.4975V2.59961H50.0626V10.4967L48.5505 10.4975Z" fill="#2D2D35"/>
|
|
10
|
+
<path d="M54.4066 10.6122C53.9236 10.6192 53.4488 10.487 53.0389 10.2314C52.6337 9.97564 52.3047 9.61565 52.0864 9.18913C51.8587 8.72786 51.7402 8.22035 51.7402 7.70592C51.7402 7.1915 51.8587 6.68399 52.0864 6.22272C52.3047 5.79619 52.6337 5.43621 53.0389 5.18047C53.4529 4.92408 53.9318 4.79191 54.4187 4.79964C54.7869 4.79343 55.1513 4.87592 55.481 5.04016C55.788 5.19434 56.0503 5.42487 56.2426 5.70961C56.4372 6.00066 56.5454 6.34092 56.5545 6.69093V8.71129C56.5435 9.05842 56.4376 9.3959 56.2482 9.68701C56.0591 9.97592 55.7961 10.209 55.4866 10.3621C55.1516 10.5302 54.7814 10.616 54.4066 10.6122ZM54.6961 9.21559C54.888 9.22288 55.0792 9.18845 55.2565 9.11467C55.4338 9.0409 55.593 8.92953 55.7231 8.78826C55.9884 8.49499 56.1293 8.11001 56.1159 7.71474C56.1205 7.44142 56.0565 7.17131 55.9299 6.92904C55.8163 6.70829 55.6447 6.5226 55.4336 6.39188C55.21 6.26097 54.9543 6.19516 54.6953 6.20187C54.4423 6.19508 54.1925 6.25969 53.9746 6.3883C53.7566 6.51691 53.5793 6.70432 53.463 6.92904C53.3399 7.16802 53.2784 7.43396 53.2842 7.70272C53.2776 7.97515 53.3391 8.24492 53.463 8.48761C53.581 8.71046 53.7583 8.89633 53.9754 9.02467C54.1924 9.153 54.4407 9.2188 54.6928 9.21478L54.6961 9.21559ZM56.0229 10.4984V8.99591L56.2771 7.63297L56.0229 6.28205V4.92471H57.5462V10.4968L56.0229 10.4984Z" fill="#2D2D35"/>
|
|
11
|
+
<path d="M58.8594 10.4967V2.1499H60.3714V10.4967H58.8594ZM62.4038 10.4967L60.2584 7.62253L62.3918 4.9247H64.1468L61.6302 7.97128L61.6879 7.23209L64.2534 10.4991L62.4038 10.4967Z" fill="#2D2D35"/>
|
|
12
|
+
<path d="M67.3682 10.6241C66.8227 10.6336 66.284 10.5024 65.804 10.2432C65.3567 9.99946 64.9836 9.63936 64.7241 9.20098C64.468 8.74444 64.333 8.22994 64.332 7.70648C64.3311 7.18302 64.4641 6.66802 64.7185 6.21052C64.9714 5.77502 65.3362 5.41515 65.7751 5.16827C66.2331 4.91112 66.7509 4.77973 67.276 4.78744C67.7686 4.77982 68.2545 4.90322 68.6838 5.14501C69.0942 5.37823 69.4305 5.72255 69.6539 6.13836C69.8898 6.58228 70.009 7.07886 70.0003 7.58148C70.0003 7.68089 70.0003 7.78352 69.989 7.88694C69.9793 8.00192 69.96 8.11589 69.9313 8.22768L65.2324 8.2389V7.11407L69.2266 7.10284L68.6028 7.57587C68.6052 7.28955 68.5461 7.00605 68.4297 6.74447C68.3336 6.53431 68.177 6.35761 67.9799 6.23697C67.7615 6.11502 67.5139 6.05513 67.264 6.0638C66.9894 6.05704 66.7181 6.12493 66.4791 6.26022C66.2553 6.39152 66.0763 6.58706 65.9651 6.82144C65.8452 7.09667 65.7843 7.39398 65.7864 7.69419C65.7885 7.99441 65.8535 8.29086 65.9772 8.5644C66.0965 8.80703 66.2881 9.00673 66.5256 9.13604C66.7809 9.27199 67.0669 9.34017 67.3562 9.33407C67.6205 9.33765 67.8832 9.29057 68.1298 9.19537C68.3634 9.10148 68.5698 8.95073 68.7303 8.75682L69.6307 9.65476C69.3559 9.9709 69.0122 10.2197 68.6261 10.3819C68.2273 10.5464 67.7995 10.6288 67.3682 10.6241Z" fill="#2D2D35"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg width="169" height="25" viewBox="0 0 169 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M17.3687 13.8016C17.077 14.8546 16.4494 15.7836 15.5813 16.4472C14.7132 17.1109 13.6521 17.4728 12.5594 17.4781H7.52031V12.4141C7.53108 11.3259 7.8956 10.2707 8.55884 9.40789C9.22208 8.54509 10.148 7.92149 11.1969 7.63125V0C8.14208 0.327697 5.31404 1.76592 3.24987 4.04152C1.18571 6.31711 0.029198 9.27157 0 12.3438V25H12.5984C15.6797 24.983 18.6467 23.8318 20.9331 21.7662C23.2195 19.7006 24.665 16.8653 24.9937 13.8016H17.3687Z" fill="white"/>
|
|
3
|
+
<path d="M13.625 11.375V0C19.8641 0 25 5.13437 25 11.375H13.625Z" fill="white"/>
|
|
4
|
+
<path d="M43.7592 23.0829C42.5401 23.1032 41.3409 22.772 40.3051 22.1289C39.2883 21.4832 38.4576 20.5833 37.8952 19.5182C37.3068 18.3681 37 17.0948 37 15.803C37 14.5111 37.3068 13.2378 37.8952 12.0877C38.4576 11.0226 39.2883 10.1227 40.3051 9.47698C41.3414 8.83482 42.5403 8.50373 43.7592 8.52306C44.7025 8.50892 45.6353 8.72247 46.4784 9.14562C47.2609 9.53627 47.9322 10.1178 48.4304 10.8366C48.9264 11.5524 49.2053 12.3961 49.2337 13.2665V18.255C49.2076 19.14 48.9372 20.0004 48.4525 20.7412C47.9692 21.4754 47.3007 22.0691 46.5146 22.4623C45.6593 22.8874 44.7142 23.1002 43.7592 23.0829ZM44.426 19.5845C45.0764 19.5966 45.7171 19.4261 46.2756 19.0925C46.8085 18.7722 47.2439 18.3126 47.5348 17.763C47.8422 17.1641 47.9961 16.4982 47.9826 15.825C48.0009 15.1428 47.8498 14.4666 47.5428 13.857C47.2545 13.3097 46.8244 12.8498 46.2977 12.5255C45.7445 12.1918 45.108 12.0219 44.4621 12.0355C43.8084 12.02 43.1629 12.1847 42.5965 12.5114C42.0663 12.831 41.6358 13.2921 41.3534 13.8429C41.0461 14.4469 40.8923 15.1174 40.9055 15.7949C40.8903 16.4817 41.0441 17.1617 41.3534 17.7751C41.6383 18.3282 42.0742 18.7892 42.6105 19.1045C43.1609 19.4264 43.7885 19.5923 44.426 19.5845ZM51.5673 22.7977H47.7436V19.0342L48.3782 15.6202L47.7135 12.2363V1.8858H51.5593L51.5673 22.7977Z" fill="white"/>
|
|
5
|
+
<path d="M60.6768 23.0829C59.4668 23.1004 58.2774 22.7692 57.2507 22.1289C56.2357 21.4883 55.4117 20.5866 54.8649 19.5182C54.2945 18.3628 53.9977 17.0915 53.9977 15.803C53.9977 14.5144 54.2945 13.2431 54.8649 12.0877C55.4117 11.0193 56.2357 10.1176 57.2507 9.47698C58.2876 8.83455 59.4872 8.50346 60.7069 8.52306C61.6287 8.50726 62.5408 8.71392 63.3658 9.12553C64.1357 9.51144 64.7934 10.0889 65.2756 10.8024C65.7623 11.5319 66.0331 12.3839 66.0569 13.2605V18.3213C66.0286 19.1907 65.7633 20.0358 65.2897 20.7653C64.8159 21.489 64.1572 22.0729 63.3819 22.4563C62.5428 22.8773 61.6155 23.0921 60.6768 23.0829ZM61.3997 19.5845C61.8807 19.6028 62.36 19.5165 62.8045 19.3318C63.2489 19.147 63.648 18.868 63.9743 18.5141C64.6382 17.7792 64.9904 16.8149 64.9563 15.825C64.9677 15.1415 64.8089 14.4659 64.4944 13.859C64.2091 13.3065 63.7796 12.8415 63.2513 12.5134C62.6905 12.1856 62.0492 12.0207 61.3997 12.0375C60.7676 12.0218 60.1439 12.1841 59.5995 12.5058C59.0552 12.8275 58.6122 13.2957 58.3211 13.857C58.012 14.4554 57.8574 15.1216 57.8712 15.7949C57.8554 16.4775 58.01 17.1532 58.3211 17.761C58.6104 18.3109 59.0453 18.7708 59.5782 19.0905C60.1272 19.4224 60.7583 19.5936 61.3997 19.5845ZM64.7254 22.7977V19.0342L65.362 15.6202L64.7254 12.2363V8.83635H68.5411V22.7937L64.7254 22.7977Z" fill="white"/>
|
|
6
|
+
<path d="M70.6255 12.1519V8.83631H80.9499V12.162L70.6255 12.1519ZM73.8929 22.7956V3.01239H77.6805V22.7936L73.8929 22.7956Z" fill="white"/>
|
|
7
|
+
<path d="M88.5551 23.0829C87.3445 23.1007 86.1544 22.7695 85.127 22.1289C84.1121 21.4883 83.2881 20.5866 82.7412 19.5182C82.1708 18.3628 81.8741 17.0915 81.8741 15.803C81.8741 14.5144 82.1708 13.2431 82.7412 12.0877C83.2881 11.0193 84.1121 10.1176 85.127 9.47698C86.1641 8.83476 87.3636 8.50368 88.5832 8.52306C89.5057 8.50725 90.4184 8.7139 91.2441 9.12553C92.0133 9.51173 92.6703 10.0892 93.152 10.8024C93.6431 11.5372 93.9142 12.397 93.9332 13.2806V18.3414C93.9068 19.2111 93.6414 20.0567 93.166 20.7854C92.6922 21.5091 92.0335 22.0929 91.2582 22.4764C90.4182 22.8906 89.4915 23.0985 88.5551 23.0829ZM89.2781 19.5845C89.7588 19.6027 90.2377 19.5165 90.6819 19.3317C91.126 19.1469 91.5248 18.868 91.8506 18.5141C92.5153 17.7795 92.8682 16.8151 92.8347 15.825C92.8464 15.1413 92.6869 14.4654 92.3708 13.859C92.0861 13.306 91.6564 12.8409 91.1277 12.5134C90.5675 12.1855 89.9269 12.0207 89.2781 12.0375C88.6456 12.0214 88.0214 12.1835 87.4767 12.5052C86.932 12.827 86.4887 13.2954 86.1974 13.857C85.8891 14.4556 85.7351 15.1217 85.7496 15.7949C85.7331 16.4773 85.887 17.1531 86.1974 17.761C86.4935 18.3188 86.9378 18.784 87.4814 19.1054C88.0249 19.4268 88.6467 19.5919 89.2781 19.5825V19.5845ZM92.6037 22.7977V19.0342L93.2383 15.6202L92.6037 12.2363V8.83635H96.4194V22.7937L92.6037 22.7977Z" fill="white"/>
|
|
8
|
+
<path d="M104.547 23.1129C103.751 23.1141 102.959 23.0122 102.189 22.8097C101.45 22.6161 100.743 22.3136 100.093 21.912C99.4736 21.5314 98.9174 21.0572 98.4438 20.5062L100.729 18.2208C101.169 18.7638 101.735 19.1906 102.378 19.4639C103.038 19.738 103.746 19.8746 104.461 19.8656C104.948 19.8934 105.435 19.7988 105.876 19.5905C106.023 19.5231 106.147 19.4153 106.234 19.2797C106.321 19.1441 106.368 18.9865 106.368 18.8253C106.373 18.6441 106.327 18.4652 106.235 18.309C106.143 18.1528 106.009 18.0255 105.848 17.9417C105.432 17.7122 104.991 17.5329 104.533 17.4075L102.84 16.9155C102.251 16.7456 101.683 16.5077 101.149 16.2066C100.613 15.9037 100.16 15.4716 99.8335 14.9494C99.4621 14.3202 99.2808 13.5969 99.3114 12.8669C99.2941 12.0415 99.5264 11.2303 99.9781 10.5393C100.442 9.85647 101.095 9.32393 101.858 9.007C102.764 8.63049 103.739 8.44784 104.72 8.4708C105.796 8.45808 106.863 8.663 107.858 9.07327C108.781 9.45812 109.585 10.082 110.186 10.8807L107.901 13.1942C107.513 12.7202 107.023 12.3393 106.469 12.0796C105.938 11.8385 105.361 11.7152 104.778 11.7181C104.199 11.7181 103.766 11.8052 103.476 11.9792C103.344 12.0477 103.234 12.1515 103.157 12.2792C103.081 12.4069 103.041 12.5533 103.043 12.7022C103.038 12.8693 103.082 13.0342 103.17 13.1768C103.257 13.3194 103.384 13.4336 103.535 13.5055C103.948 13.7223 104.385 13.8921 104.836 14.0116C105.372 14.1655 105.935 14.3342 106.527 14.5176C107.116 14.7008 107.68 14.9579 108.204 15.2828C108.732 15.6103 109.178 16.0557 109.505 16.5841C109.866 17.217 110.042 17.9387 110.011 18.6667C110.011 20.0363 109.52 21.1208 108.537 21.92C107.555 22.7193 106.224 23.117 104.547 23.1129Z" fill="white"/>
|
|
9
|
+
<path d="M111.343 12.1519V8.83631H121.665V12.162L111.343 12.1519ZM114.61 22.7956V3.01239H118.398V22.7936L114.61 22.7956Z" fill="white"/>
|
|
10
|
+
<path d="M129.278 23.0829C128.069 23.1004 126.879 22.7693 125.852 22.129C124.837 21.4884 124.013 20.5867 123.467 19.5183C122.896 18.3628 122.599 17.0916 122.599 15.803C122.599 14.5144 122.896 13.2432 123.467 12.0877C124.013 11.0193 124.837 10.1176 125.852 9.47702C126.889 8.8348 128.089 8.50372 129.309 8.5231C130.231 8.50752 131.144 8.71417 131.97 9.12557C132.739 9.51177 133.396 10.0892 133.877 10.8025C134.365 11.5315 134.636 12.3838 134.659 13.2606V18.3213C134.631 19.1908 134.366 20.0362 133.891 20.7654C133.418 21.4891 132.759 22.0729 131.984 22.4563C131.145 22.8776 130.217 23.0924 129.278 23.0829ZM130.003 19.5845C130.484 19.6028 130.963 19.5165 131.407 19.3317C131.851 19.1469 132.25 18.868 132.576 18.5141C133.241 17.7795 133.594 16.8152 133.56 15.8251C133.571 15.1404 133.411 14.4638 133.094 13.857C132.809 13.304 132.38 12.8389 131.851 12.5115C131.291 12.1836 130.65 12.0187 130.001 12.0355C129.368 12.0185 128.742 12.1804 128.196 12.5025C127.65 12.8247 127.206 13.2941 126.915 13.857C126.606 14.4556 126.452 15.1218 126.467 15.795C126.45 16.4774 126.604 17.1531 126.915 17.761C127.21 18.3192 127.654 18.7848 128.198 19.1063C128.742 19.4278 129.364 19.5926 129.995 19.5825L130.003 19.5845ZM133.327 22.7977V19.0343L133.964 15.6203L133.327 12.2363V8.83638H137.143V22.7937L133.327 22.7977Z" fill="white"/>
|
|
11
|
+
<path d="M140.434 22.7937V1.8858H144.222V22.7937H140.434ZM149.313 22.7937L143.939 15.5941L149.283 8.83635H153.679L147.375 16.4677L147.519 14.6161L153.946 22.7997L149.313 22.7937Z" fill="white"/>
|
|
12
|
+
<path d="M161.748 23.1129C160.381 23.1368 159.032 22.8083 157.83 22.159C156.709 21.5484 155.775 20.6464 155.125 19.5483C154.483 18.4047 154.145 17.116 154.143 15.8047C154.14 14.4935 154.473 13.2035 155.111 12.0575C155.744 10.9667 156.658 10.0652 157.757 9.44682C158.904 8.8027 160.201 8.47359 161.517 8.4929C162.751 8.47381 163.968 8.78291 165.043 9.38858C166.071 9.97276 166.914 10.8352 167.473 11.8768C168.064 12.9888 168.363 14.2326 168.341 15.4916C168.341 15.7407 168.341 15.9977 168.313 16.2568C168.288 16.5448 168.24 16.8303 168.168 17.1103L156.398 17.1384V14.3208L166.403 14.2927L164.84 15.4776C164.846 14.7604 164.698 14.0503 164.407 13.395C164.166 12.8686 163.774 12.426 163.28 12.1238C162.733 11.8183 162.113 11.6683 161.487 11.69C160.799 11.6731 160.119 11.8432 159.521 12.182C158.96 12.5109 158.512 13.0007 158.233 13.5878C157.933 14.2772 157.78 15.022 157.786 15.774C157.791 16.526 157.954 17.2685 158.263 17.9538C158.562 18.5615 159.042 19.0617 159.637 19.3856C160.277 19.7262 160.993 19.897 161.718 19.8817C162.38 19.8906 163.038 19.7727 163.656 19.5342C164.241 19.2991 164.758 18.9215 165.16 18.4357L167.415 20.685C166.727 21.4769 165.866 22.1001 164.899 22.5064C163.9 22.9185 162.828 23.1247 161.748 23.1129Z" fill="white"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const config = {
|
|
2
|
+
viewBox: "0 0 17 19",
|
|
3
|
+
children: (
|
|
4
|
+
<path
|
|
5
|
+
d="M15.75 7.41667H0.75M15.75 9.5V6.41667C15.75 5.01654 15.75 4.31647 15.4775 3.78169C15.2378 3.31129 14.8554 2.92883 14.385 2.68915C13.8502 2.41667 13.1501 2.41667 11.75 2.41667H4.75C3.34987 2.41667 2.6498 2.41667 2.11502 2.68915C1.64462 2.92883 1.26217 3.31129 1.02248 3.78169C0.75 4.31647 0.75 5.01654 0.75 6.41667V13.4167C0.75 14.8168 0.75 15.5169 1.02248 16.0516C1.26217 16.522 1.64462 16.9045 2.11502 17.1442C2.6498 17.4167 3.34987 17.4167 4.75 17.4167H8.25M11.5833 0.75V4.08333M4.91667 0.75V4.08333M10.3333 14.9167L12 16.5833L15.75 12.8333"
|
|
6
|
+
stroke="currentColor"
|
|
7
|
+
strokeWidth="1.5"
|
|
8
|
+
strokeLinecap="round"
|
|
9
|
+
strokeLinejoin="round"
|
|
10
|
+
/>
|
|
11
|
+
),
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default config;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const config = { viewBox: "0 0 14 19",
|
|
2
|
+
children: (
|
|
3
|
+
<path
|
|
4
|
+
d="M4.0834 14.5H9.0834M2.0834 0.75H11.0834C11.5501 0.75 11.7835 0.75 11.9617 0.840828C12.1185 0.920722 12.246 1.04821 12.3259 1.20501C12.4167 1.38327 12.4167 1.61662 12.4167 2.08333V3.8121C12.4167 4.21975 12.4167 4.42357 12.3707 4.61539C12.3299 4.78545 12.2625 4.94802 12.1711 5.09714C12.0681 5.26534 11.9239 5.40946 11.6357 5.69771L9.19288 8.14052C8.86286 8.47054 8.69786 8.63554 8.63603 8.82582C8.58165 8.99319 8.58165 9.17348 8.63603 9.34085C8.69786 9.53112 8.86286 9.69613 9.19288 10.0261L11.6357 12.469C11.9239 12.7572 12.0681 12.9013 12.1711 13.0695C12.2625 13.2186 12.3299 13.3812 12.3707 13.5513C12.4167 13.7431 12.4167 13.9469 12.4167 14.3546V16.0833C12.4167 16.55 12.4167 16.7834 12.3259 16.9617C12.246 17.1185 12.1185 17.2459 11.9617 17.3258C11.7835 17.4167 11.5501 17.4167 11.0834 17.4167H2.0834C1.61669 17.4167 1.38334 17.4167 1.20508 17.3258C1.04827 17.2459 0.920791 17.1185 0.840897 16.9617C0.750069 16.7834 0.750069 16.55 0.750069 16.0833V14.3546C0.750069 13.9469 0.750069 13.7431 0.796119 13.5513C0.836947 13.3812 0.904287 13.2186 0.995668 13.0695C1.09874 12.9013 1.24286 12.7572 1.53112 12.469L3.97393 10.0261C4.30394 9.69613 4.46895 9.53112 4.53077 9.34085C4.58515 9.17348 4.58515 8.99319 4.53077 8.82582C4.46895 8.63555 4.30394 8.47053 3.97393 8.14052L1.53112 5.69771C1.24287 5.40946 1.09874 5.26534 0.995668 5.09714C0.904287 4.94802 0.836947 4.78545 0.796119 4.61539C0.750069 4.42357 0.750069 4.21975 0.750069 3.8121V2.08333C0.750069 1.61662 0.750069 1.38327 0.840897 1.20501C0.920791 1.04821 1.04827 0.920722 1.20508 0.840828C1.38334 0.75 1.61669 0.75 2.0834 0.75Z"
|
|
5
|
+
stroke="currentColor"
|
|
6
|
+
strokeWidth="1.5"
|
|
7
|
+
strokeLinecap="round"
|
|
8
|
+
strokeLinejoin="round"
|
|
9
|
+
/>
|
|
10
|
+
),
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default config;
|
|
@@ -216,6 +216,8 @@ import Onboarding from "./Onboarding";
|
|
|
216
216
|
import UnderDev from "./UnderDev";
|
|
217
217
|
import userIcon from "./userIcon";
|
|
218
218
|
import partnerIcon from "./partnerIcon";
|
|
219
|
+
import LifeCycle from "./LifeCycle";
|
|
220
|
+
import EventCalendar from "./EventCalendar";
|
|
219
221
|
|
|
220
222
|
const config = {
|
|
221
223
|
AppAdmin,
|
|
@@ -436,6 +438,8 @@ const config = {
|
|
|
436
438
|
UnderDev,
|
|
437
439
|
userIcon,
|
|
438
440
|
partnerIcon,
|
|
441
|
+
LifeCycle,
|
|
442
|
+
EventCalendar,
|
|
439
443
|
};
|
|
440
444
|
|
|
441
445
|
export default config;
|
|
@@ -24,6 +24,7 @@ export default function Sidenav({
|
|
|
24
24
|
hoverContentSecond,
|
|
25
25
|
t = (s) => s,
|
|
26
26
|
isDatastake = false,
|
|
27
|
+
logoVariant = "white",
|
|
27
28
|
}) {
|
|
28
29
|
return (
|
|
29
30
|
<ConfigProvider
|
|
@@ -70,9 +71,19 @@ export default function Sidenav({
|
|
|
70
71
|
</div>
|
|
71
72
|
{isDatastake && !isCollapsed ? (
|
|
72
73
|
<div className="sidenav-footer">
|
|
73
|
-
<h6
|
|
74
|
+
<h6
|
|
75
|
+
style={{
|
|
76
|
+
color: logoVariant === "black" ? "#B5B5C3" : "white",
|
|
77
|
+
margin: 0
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
{t("Powered By")}
|
|
81
|
+
</h6>
|
|
74
82
|
<img
|
|
75
|
-
src={
|
|
83
|
+
src={
|
|
84
|
+
poweredByLogo ||
|
|
85
|
+
`/assets/favicons/datastake-${logoVariant}.svg`
|
|
86
|
+
}
|
|
76
87
|
alt="logo"
|
|
77
88
|
/>
|
|
78
89
|
</div>
|
|
@@ -281,8 +292,9 @@ Sidenav.propTypes = {
|
|
|
281
292
|
topHoverSecond: propTypes.any,
|
|
282
293
|
hoverItemSecond: propTypes.any,
|
|
283
294
|
widthHoverSecond: propTypes.any,
|
|
295
|
+
poweredByLogo: propTypes.any,
|
|
284
296
|
hoverContentSecond: propTypes.any,
|
|
285
297
|
t: propTypes.any,
|
|
286
298
|
isDatastake: propTypes.any,
|
|
299
|
+
logoVariant: propTypes.oneOf(["white", "black"]),
|
|
287
300
|
};
|
|
288
|
-
|
|
@@ -8,10 +8,10 @@ export const useGetQueryParams = ({location}) => {
|
|
|
8
8
|
}, [location.search]);
|
|
9
9
|
|
|
10
10
|
const params = useMemo(() => {
|
|
11
|
-
const { page, pageSize, search, searchParams: rawSearchParams, ...rest } = queryParams;
|
|
11
|
+
const { page, pageSize, search, searchParams: rawSearchParams, sortBy, sortDir, ...rest } = queryParams;
|
|
12
12
|
|
|
13
13
|
return {
|
|
14
|
-
paginationQuery: { page, pageSize },
|
|
14
|
+
paginationQuery: { skip: page, take: pageSize },
|
|
15
15
|
searchParams: {
|
|
16
16
|
qs: search,
|
|
17
17
|
fields: safeJsonParse(rawSearchParams),
|
|
@@ -88,6 +88,7 @@ const Sidenav = ({
|
|
|
88
88
|
getRedirectLink = () => {},
|
|
89
89
|
isDatastake,
|
|
90
90
|
selectedProject,
|
|
91
|
+
logoVariant = "white",
|
|
91
92
|
}) => {
|
|
92
93
|
const hoverDiv = useRef();
|
|
93
94
|
const hoverDivSecond = useRef();
|
|
@@ -248,6 +249,7 @@ const Sidenav = ({
|
|
|
248
249
|
hoverContentSecond={hoverContentSecond}
|
|
249
250
|
t={t}
|
|
250
251
|
isDatastake={isDatastake}
|
|
252
|
+
logoVariant={logoVariant}
|
|
251
253
|
>
|
|
252
254
|
{showMenu ? (
|
|
253
255
|
<SidenavMenu
|
|
@@ -55,6 +55,7 @@ const { Content } = Layout;
|
|
|
55
55
|
* @param {Function} props.renderChildren - Custom render function for children
|
|
56
56
|
* @param {Object} props.theme - Theme object with layout color customization
|
|
57
57
|
* @param {Object|null} props.moduleInterfaceConfig - Module interface config { title, icon }
|
|
58
|
+
* @param {string} props.logoVariant - Logo variant for powered by section ("white" | "black")
|
|
58
59
|
*/
|
|
59
60
|
function AppLayout({
|
|
60
61
|
// User & Auth
|
|
@@ -126,6 +127,9 @@ function AppLayout({
|
|
|
126
127
|
// Theme
|
|
127
128
|
theme = {},
|
|
128
129
|
|
|
130
|
+
// Logo variant (white or black)
|
|
131
|
+
logoVariant = "white",
|
|
132
|
+
|
|
129
133
|
// Children
|
|
130
134
|
children,
|
|
131
135
|
}) {
|
|
@@ -278,7 +282,8 @@ function AppLayout({
|
|
|
278
282
|
isDatastake={isDatastake}
|
|
279
283
|
selectedProject={selectedProject}
|
|
280
284
|
userHelpers={userHelpers}
|
|
281
|
-
isDev={isDev}
|
|
285
|
+
isDev={isDev}
|
|
286
|
+
logoVariant={logoVariant}
|
|
282
287
|
/>
|
|
283
288
|
</div>
|
|
284
289
|
) : null}
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
|
|
8
|
+
const getLinkValue = (value, linkingObject) => {
|
|
9
|
+
if(linkingObject && linkingObject?.[value]) {
|
|
10
|
+
return linkingObject?.[value]?.name;
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink, theme, subject, data}) => [
|
|
16
|
+
{
|
|
17
|
+
dataIndex: 'datastakeId',
|
|
18
|
+
title: t('ID'),
|
|
19
|
+
ellipsis: true,
|
|
20
|
+
show: true,
|
|
21
|
+
render: (v, all) => {
|
|
22
|
+
if (all.empty) {
|
|
23
|
+
return <div className="daf-default-cell" />
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return <Tooltip title={v}>{v}</Tooltip>;
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
dataIndex: 'title',
|
|
31
|
+
title: t('Title'),
|
|
32
|
+
ellipsis: true,
|
|
33
|
+
show: true,
|
|
34
|
+
render: (v, all) => {
|
|
35
|
+
if (all.empty) {
|
|
36
|
+
return <div className="daf-default-cell" />
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return <Tooltip title={v}>{v}</Tooltip>;
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
dataIndex: 'type',
|
|
44
|
+
title: t('Type'),
|
|
45
|
+
ellipsis: true,
|
|
46
|
+
show: true,
|
|
47
|
+
render: (v, all) => {
|
|
48
|
+
if (all.empty) {
|
|
49
|
+
return <div className="daf-default-cell" />
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const type = findOptions(v, data?.options?.locationCategories);
|
|
53
|
+
|
|
54
|
+
return type ? <Tooltip title={type}>{type}</Tooltip> : '-';
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
{
|
|
59
|
+
title: t("Last Update"),
|
|
60
|
+
dataIndex: "updatedAt",
|
|
61
|
+
key: "updatedAt",
|
|
62
|
+
width: 125,
|
|
63
|
+
render: (date, all) => {
|
|
64
|
+
if (all.empty) {
|
|
65
|
+
return <div className="daf-default-cell" />;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const _date = date ? renderDateFormatted(date, "DD MMM YYYY", user?.language || 'en') : "-";
|
|
69
|
+
return <Tooltip title={_date}>{_date}</Tooltip>;
|
|
70
|
+
},
|
|
71
|
+
ellipsis: true,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: t("Sources"),
|
|
75
|
+
dataIndex: "sources",
|
|
76
|
+
key: "sources",
|
|
77
|
+
show: activeTab !== "own",
|
|
78
|
+
render: (val, all) => {
|
|
79
|
+
if (all.empty) {
|
|
80
|
+
return <div className="daf-default-cell" />;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
console.log({val, all})
|
|
84
|
+
|
|
85
|
+
return <AvatarGroup items={val}></AvatarGroup>;
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'actions',
|
|
90
|
+
title: "",
|
|
91
|
+
width: 60,
|
|
92
|
+
render: (_, all) => {
|
|
93
|
+
if (all.empty) {
|
|
94
|
+
return <div className="daf-default-cell" />;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const link = `/app/view/${subject}/${all.datastakeId}`;
|
|
98
|
+
|
|
99
|
+
return <div style={{ display: "flex", justifyContent: "center" }}>
|
|
100
|
+
<a href={getRedirectLink(link)}>
|
|
101
|
+
<CustomIcon name="Link" size={15} color={theme.baseGray70} />
|
|
102
|
+
</a>
|
|
103
|
+
</div>;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
].filter((column) => column.show !== false);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const checkboxConfig = {
|
|
2
|
+
name: 'Name',
|
|
3
|
+
datastakeId: 'ID'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const getFiltersConfig = ({t}) => {
|
|
7
|
+
return {
|
|
8
|
+
country: {
|
|
9
|
+
type: 'select',
|
|
10
|
+
placeholder: t('Country'),
|
|
11
|
+
style: { flex: 1 },
|
|
12
|
+
labelStyle: { flex: 1 },
|
|
13
|
+
getLabel: (option) => option.label,
|
|
14
|
+
getValue: (option) => option.value,
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const filtersConfig = {
|
|
20
|
+
name: '',
|
|
21
|
+
datastakeId: '',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const getFilterOptions = (options, t) => {
|
|
25
|
+
const { countries } = options || {};
|
|
26
|
+
const _default = {
|
|
27
|
+
country: countries,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return _default;
|
|
31
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React, { useEffect} from 'react'
|
|
2
|
+
import { message } from 'antd';
|
|
3
|
+
import { MessageTypes } from '../../../../../helpers/messages.js';
|
|
4
|
+
import DynamicForm from '../../../../core/components/DynamicForm/index.jsx';
|
|
5
|
+
|
|
6
|
+
const DocumentsCreate = ({
|
|
7
|
+
namespace = 'documents',
|
|
8
|
+
view = 'scoping',
|
|
9
|
+
edit = false,
|
|
10
|
+
formData = {},
|
|
11
|
+
loading = false,
|
|
12
|
+
onSubmitted = () => {},
|
|
13
|
+
onCancel = () => {},
|
|
14
|
+
getData = () => {},
|
|
15
|
+
saveData = () => {},
|
|
16
|
+
form: formConfig = {},
|
|
17
|
+
formValue = {},
|
|
18
|
+
defaultData = {},
|
|
19
|
+
user = {},
|
|
20
|
+
APP,
|
|
21
|
+
query,
|
|
22
|
+
goTo = () => {},
|
|
23
|
+
t = () => {},
|
|
24
|
+
ajaxForms = {},
|
|
25
|
+
changeAjaxForms = () => {},
|
|
26
|
+
ajaxOptions = {},
|
|
27
|
+
changeAjaxOptions = () => {},
|
|
28
|
+
getAppHeader = () => {},
|
|
29
|
+
getApiBaseUrl = () => {},
|
|
30
|
+
}) => {
|
|
31
|
+
let {
|
|
32
|
+
form = {},
|
|
33
|
+
data = defaultData || {},
|
|
34
|
+
} = !edit ? (formData[`${APP}-${view}`] || {}) : {
|
|
35
|
+
form: formConfig,
|
|
36
|
+
data: formValue
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (Object.keys(form).length === 0 && !formData[`${APP}-${view}`]) {
|
|
41
|
+
if (!edit) {
|
|
42
|
+
getData({ namespace, module: APP, view, scope: 'global' });
|
|
43
|
+
} else {
|
|
44
|
+
form = formConfig;
|
|
45
|
+
data = formValue;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, [edit, user?.language]);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div className="daf-create-form">
|
|
52
|
+
<DynamicForm
|
|
53
|
+
form={form}
|
|
54
|
+
data={data}
|
|
55
|
+
showSaveAndNext={false}
|
|
56
|
+
module={APP}
|
|
57
|
+
onCancel={onCancel}
|
|
58
|
+
isCreate
|
|
59
|
+
t={t}
|
|
60
|
+
excludedKeys={["title"]}
|
|
61
|
+
user={user}
|
|
62
|
+
ajaxForms={ajaxForms}
|
|
63
|
+
ajaxOptions={ajaxOptions}
|
|
64
|
+
getAppHeader={getAppHeader}
|
|
65
|
+
getApiBaseUrl={getApiBaseUrl}
|
|
66
|
+
changeAjaxOptions={changeAjaxOptions}
|
|
67
|
+
app={APP}
|
|
68
|
+
query={query}
|
|
69
|
+
goTo={goTo}
|
|
70
|
+
changeAjaxForms={changeAjaxForms}
|
|
71
|
+
submit={(payload, setSelectedFormNext) => {
|
|
72
|
+
const payloadData = { ...payload, module: APP, namespace };
|
|
73
|
+
|
|
74
|
+
const newPayload = {
|
|
75
|
+
...defaultData,
|
|
76
|
+
...payloadData,
|
|
77
|
+
form: 'document'
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const callback = (type, m, data) => {
|
|
81
|
+
if (setSelectedFormNext) {
|
|
82
|
+
setSelectedFormNext();
|
|
83
|
+
}
|
|
84
|
+
if (type === MessageTypes.SUCCESS) {
|
|
85
|
+
if (onSubmitted) onSubmitted(type, m, data);
|
|
86
|
+
} else {
|
|
87
|
+
message.error(m);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
saveData(
|
|
92
|
+
!data && !data.id ? newPayload : Object.assign(newPayload, { id: data.id }),
|
|
93
|
+
callback,
|
|
94
|
+
);
|
|
95
|
+
}}
|
|
96
|
+
isFormDisabled={() => {
|
|
97
|
+
return !data || !data.typeOfEvent;
|
|
98
|
+
}}
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export default DocumentsCreate
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import React, { useMemo, useState, useEffect, useCallback } from 'react'
|
|
2
|
+
import TablePageWithTabs from '../../../pages/TablePageWithTabs/index.jsx'
|
|
3
|
+
import { getColumns } from './columns.js';
|
|
4
|
+
import { checkboxConfig, getFiltersConfig, filtersConfig, getFilterOptions } from './config.js';
|
|
5
|
+
import { useGetQueryParams } from '../../../../hooks/useGetQueryParams.js';
|
|
6
|
+
import DocumentsCreate from './create.jsx';
|
|
7
|
+
import { displayMessage } from '../../../../../helpers/messages.js';
|
|
8
|
+
|
|
9
|
+
const DocumentsTable = ({
|
|
10
|
+
t = () => {},
|
|
11
|
+
goTo = () => {},
|
|
12
|
+
user = {},
|
|
13
|
+
options = {},
|
|
14
|
+
getRedirectLink = () => {},
|
|
15
|
+
theme = {},
|
|
16
|
+
loading = false,
|
|
17
|
+
data = {},
|
|
18
|
+
isMobile,
|
|
19
|
+
APP,
|
|
20
|
+
location,
|
|
21
|
+
getData = () => {},
|
|
22
|
+
getApiBaseUrl = () => {},
|
|
23
|
+
getAppHeader = () => {},
|
|
24
|
+
getFormData = () => {},
|
|
25
|
+
saveFormData = () => {},
|
|
26
|
+
formLoading = false,
|
|
27
|
+
query = {},
|
|
28
|
+
ajaxForms = {},
|
|
29
|
+
changeAjaxForms = () => {},
|
|
30
|
+
ajaxOptions = {},
|
|
31
|
+
changeAjaxOptions = () => {},
|
|
32
|
+
formData = {},
|
|
33
|
+
formValue = {},
|
|
34
|
+
form = {},
|
|
35
|
+
extendingFilters = {},
|
|
36
|
+
}) => {
|
|
37
|
+
const [selectOptions, setSelectOptions] = useState();
|
|
38
|
+
const [activeTab, setActiveTab] = useState();
|
|
39
|
+
|
|
40
|
+
const columns = useMemo(() => getColumns({
|
|
41
|
+
t,
|
|
42
|
+
goTo,
|
|
43
|
+
user,
|
|
44
|
+
options,
|
|
45
|
+
activeTab,
|
|
46
|
+
getRedirectLink,
|
|
47
|
+
theme,
|
|
48
|
+
subject: 'documents',
|
|
49
|
+
data,
|
|
50
|
+
}), [t, goTo, user, options, activeTab, getRedirectLink, theme, data]);
|
|
51
|
+
|
|
52
|
+
const breadCrumbs = [];
|
|
53
|
+
|
|
54
|
+
const { paginationQuery, searchParams, otherParams, sortBy, sortDir } = useGetQueryParams({location});
|
|
55
|
+
|
|
56
|
+
const filters = useMemo(() => {
|
|
57
|
+
return {
|
|
58
|
+
...otherParams,
|
|
59
|
+
...extendingFilters
|
|
60
|
+
}
|
|
61
|
+
}, [otherParams, extendingFilters])
|
|
62
|
+
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
console.log("fetching data")
|
|
65
|
+
getData({
|
|
66
|
+
pagination: paginationQuery,
|
|
67
|
+
...(Object.keys(filters).length > 0 && { filters: filters }),
|
|
68
|
+
...(Object.keys(searchParams).length > 0 && { search: searchParams }),
|
|
69
|
+
tab: activeTab,
|
|
70
|
+
sortBy: {
|
|
71
|
+
[sortBy || "updatedAt"]: sortDir ? (sortDir === "ascend" ? 1 : -1) : -1,
|
|
72
|
+
}
|
|
73
|
+
}, 'documents')
|
|
74
|
+
console.log("data fetched")
|
|
75
|
+
}, [location.search, activeTab, JSON.stringify(extendingFilters)]);
|
|
76
|
+
|
|
77
|
+
console.log({data})
|
|
78
|
+
|
|
79
|
+
const selectFiltersConfig = useMemo(() => {
|
|
80
|
+
return getFiltersConfig({t});
|
|
81
|
+
}, [t]);
|
|
82
|
+
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
setSelectOptions((prev) => ({
|
|
85
|
+
...prev,
|
|
86
|
+
...getFilterOptions(options, t),
|
|
87
|
+
}))
|
|
88
|
+
}, [options, t])
|
|
89
|
+
|
|
90
|
+
const handleActiveTabChange = useCallback((value) => {
|
|
91
|
+
setActiveTab(value);
|
|
92
|
+
}, []);
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<TablePageWithTabs
|
|
96
|
+
t={t}
|
|
97
|
+
title={t("documents")}
|
|
98
|
+
breadCrumbs={breadCrumbs}
|
|
99
|
+
location={location}
|
|
100
|
+
loading={loading}
|
|
101
|
+
goTo={goTo}
|
|
102
|
+
defaultActiveTab={"all"}
|
|
103
|
+
columns={columns}
|
|
104
|
+
data={data}
|
|
105
|
+
checkboxConfig={checkboxConfig}
|
|
106
|
+
APP={APP}
|
|
107
|
+
getApiBaseUrl={getApiBaseUrl}
|
|
108
|
+
selectOptions={selectOptions}
|
|
109
|
+
selectFiltersConfig={selectFiltersConfig}
|
|
110
|
+
getRedirectLink={getRedirectLink}
|
|
111
|
+
filtersConfig={filtersConfig}
|
|
112
|
+
isMobile={isMobile}
|
|
113
|
+
view="documents"
|
|
114
|
+
getActiveTab={handleActiveTabChange}
|
|
115
|
+
onDownload={() => {
|
|
116
|
+
console.log("download");
|
|
117
|
+
}}
|
|
118
|
+
drawerTitle={t("Create Document")}
|
|
119
|
+
>
|
|
120
|
+
{({onDrawerClose}) => (
|
|
121
|
+
<DocumentsCreate
|
|
122
|
+
t={t}
|
|
123
|
+
goTo={goTo}
|
|
124
|
+
user={user}
|
|
125
|
+
APP={APP}
|
|
126
|
+
getApiBaseUrl={getApiBaseUrl}
|
|
127
|
+
getAppHeader={getAppHeader}
|
|
128
|
+
getData={getFormData}
|
|
129
|
+
saveData={saveFormData}
|
|
130
|
+
loading={formLoading}
|
|
131
|
+
onSubmitted={(type, m, data) => {
|
|
132
|
+
if (data.datastakeId) {
|
|
133
|
+
displayMessage(
|
|
134
|
+
type,
|
|
135
|
+
t("affirmations::subject-created-successfully") || m,
|
|
136
|
+
);
|
|
137
|
+
// goTo(`/app/edit/stakeholders/${data.datastakeId}`);
|
|
138
|
+
goTo(`/app/edit/documents/${data.datastakeId}`)
|
|
139
|
+
}
|
|
140
|
+
}}
|
|
141
|
+
onCancel={onDrawerClose}
|
|
142
|
+
query={query}
|
|
143
|
+
ajaxForms={ajaxForms}
|
|
144
|
+
changeAjaxForms={changeAjaxForms}
|
|
145
|
+
ajaxOptions={ajaxOptions}
|
|
146
|
+
changeAjaxOptions={changeAjaxOptions}
|
|
147
|
+
formData={formData}
|
|
148
|
+
formValue={formValue}
|
|
149
|
+
form={form}
|
|
150
|
+
/>
|
|
151
|
+
)}
|
|
152
|
+
</TablePageWithTabs>
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export default DocumentsTable
|