diff --git a/.github/workflows/cypress.yaml b/.github/workflows/cypress.yaml index 373e564cd50..d259f9e83c3 100644 --- a/.github/workflows/cypress.yaml +++ b/.github/workflows/cypress.yaml @@ -38,12 +38,6 @@ jobs: - name: Build ⚙️ run: npm run build - - name: Install Specific Chrome Version - run: | - sudo apt-get install -y wget - sudo wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - sudo apt-get install ./google-chrome-stable_current_amd64.deb - - name: Cypress run for Non-Forked PRs 🥬 if: steps.pr_origin.outputs.is_forked == 'false' uses: cypress-io/github-action@v5 @@ -53,10 +47,8 @@ jobs: start: "npx vite preview --host" wait-on: "http://localhost:4000" wait-on-timeout: 300 - browser: chrome record: true parallel: true - group: "UI-Chrome" env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -73,10 +65,8 @@ jobs: start: "npx vite preview --host" wait-on: "http://localhost:4000" wait-on-timeout: 300 - browser: chrome record: true parallel: true - group: "UI-Chrome" env: CYPRESS_SPLIT_TESTS: "true" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f2e0aa24c64..4d8ac14635a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -54,10 +54,6 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new - - name: Run tests - run: | - echo "running tests..." - - name: Move cache run: | rm -rf /tmp/.buildx-cache diff --git a/Dockerfile b/Dockerfile index bf9997b55e4..607f36bd6c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,14 @@ RUN apt-get update && apt-get install -y git COPY package.json package-lock.json ./ -RUN npm install +RUN npm install --ignore-scripts COPY . . +RUN npm run postinstall + +RUN npm run setup + RUN npm run build diff --git a/package-lock.json b/package-lock.json index 8de4696b459..1d9c8667df9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,8 +17,6 @@ "@hello-pangea/dnd": "^17.0.0", "@hookform/resolvers": "^3.9.1", "@originjs/vite-plugin-federation": "^1.3.6", - "@pnotify/core": "^5.2.0", - "@pnotify/mobile": "^5.2.0", "@radix-ui/react-alert-dialog": "^1.1.2", "@radix-ui/react-avatar": "^1.1.2", "@radix-ui/react-checkbox": "^1.1.3", @@ -74,7 +72,7 @@ "raviger": "^4.1.2", "react": "18.3.1", "react-copy-to-clipboard": "^5.1.0", - "react-day-picker": "^9.5.0", + "react-day-picker": "^8.10.1", "react-dom": "18.3.1", "react-google-recaptcha": "^3.1.0", "react-hook-form": "^7.53.2", @@ -3070,12 +3068,6 @@ "ms": "^2.1.1" } }, - "node_modules/@date-fns/tz": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@date-fns/tz/-/tz-1.2.0.tgz", - "integrity": "sha512-LBrd7MiJZ9McsOgxqWX7AaxrDjcFVjWH/tIKJd7pnR7McaslGYOP1QmmiBXdJH/H/yLCT+rcQ7FaPBUxRGUtrg==", - "license": "MIT" - }, "node_modules/@dependents/detective-less": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@dependents/detective-less/-/detective-less-5.0.0.tgz", @@ -3972,6 +3964,7 @@ "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", "dev": true, + "license": "BSD-3-Clause", "optional": true, "peer": true, "dependencies": { @@ -3994,6 +3987,7 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, + "license": "ISC", "optional": true, "peer": true }, @@ -4002,6 +3996,7 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "dependencies": { @@ -4016,6 +4011,7 @@ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "dependencies": { @@ -4031,6 +4027,7 @@ "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "dependencies": { @@ -4425,21 +4422,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@pnotify/core": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@pnotify/core/-/core-5.2.0.tgz", - "integrity": "sha512-d9ZM7Q6ZxuwTJ14QbOa7pWmoUqObPis7S1K+TzISffrL8w2f7JigEPI281agLShVAMIsE5SsC6O9YhkutwekbA==", - "license": "Apache-2.0" - }, - "node_modules/@pnotify/mobile": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@pnotify/mobile/-/mobile-5.2.0.tgz", - "integrity": "sha512-uu0V7h41Y8UTQA6ZB26PcHU7wHu5nwP/FEmMyimHEpEqhrvkzIRD2CxB7zu9SYp3Jk2NFcJC3NiueO3Kh25CVA==", - "license": "Apache-2.0", - "dependencies": { - "@pnotify/core": "^5.2.0" - } - }, "node_modules/@poppinss/cliui": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/@poppinss/cliui/-/cliui-6.4.2.tgz", @@ -7353,6 +7335,7 @@ "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", "dev": true, + "license": "ISC", "optional": true, "peer": true }, @@ -7382,6 +7365,7 @@ "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", "deprecated": "This package is no longer supported.", "dev": true, + "license": "ISC", "optional": true, "peer": true, "dependencies": { @@ -7831,6 +7815,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "license": "MIT", "optional": true, "dependencies": { "buffer": "^5.5.0", @@ -8110,6 +8095,7 @@ "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "peer": true, "dependencies": { @@ -8260,6 +8246,7 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "engines": { @@ -8446,6 +8433,7 @@ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "bin": { @@ -8516,6 +8504,7 @@ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true, + "license": "ISC", "optional": true, "peer": true }, @@ -9028,12 +9017,6 @@ "url": "https://github.com/sponsors/kossnocorp" } }, - "node_modules/date-fns-jalali": { - "version": "4.1.0-0", - "resolved": "https://registry.npmjs.org/date-fns-jalali/-/date-fns-jalali-4.1.0-0.tgz", - "integrity": "sha512-hTIP/z+t+qKwBDcmmsnmjWTduxCg+5KfdqWQvb2X/8C9+knYY6epN/pfxdDuyVlSVeFz0sM5eEfwIUQ70U4ckg==", - "license": "MIT" - }, "node_modules/dayjs": { "version": "1.11.13", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", @@ -9145,6 +9128,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", "optional": true, "engines": { "node": ">=4.0.0" @@ -9237,6 +9221,7 @@ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true, + "license": "MIT", "optional": true, "peer": true }, @@ -9282,6 +9267,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "license": "Apache-2.0", "optional": true, "engines": { "node": ">=8" @@ -10585,6 +10571,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "license": "(MIT OR WTFPL)", "optional": true, "engines": { "node": ">=6" @@ -11042,6 +11029,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT", "optional": true }, "node_modules/fs-extra": { @@ -11064,6 +11052,7 @@ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "dependencies": { @@ -11078,6 +11067,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "dependencies": { @@ -11092,6 +11082,7 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, + "license": "ISC", "optional": true, "peer": true }, @@ -11162,6 +11153,7 @@ "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", "deprecated": "This package is no longer supported.", "dev": true, + "license": "ISC", "optional": true, "peer": true, "dependencies": { @@ -11184,6 +11176,7 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, + "license": "MIT", "optional": true, "peer": true }, @@ -11192,6 +11185,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "engines": { @@ -11203,6 +11197,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "dependencies": { @@ -11358,6 +11353,7 @@ "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "license": "MIT", "optional": true }, "node_modules/glob": { @@ -11617,6 +11613,7 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", "dev": true, + "license": "ISC", "optional": true, "peer": true }, @@ -13872,6 +13869,7 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "dependencies": { @@ -13889,6 +13887,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "bin": { @@ -15409,6 +15408,7 @@ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "dependencies": { @@ -15424,6 +15424,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "dependencies": { @@ -15438,6 +15439,7 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, + "license": "ISC", "optional": true, "peer": true }, @@ -15446,6 +15448,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "bin": { @@ -15459,6 +15462,7 @@ "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "license": "MIT", "optional": true }, "node_modules/module-definition": { @@ -15585,6 +15589,7 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", "dev": true, + "license": "MIT", "optional": true, "peer": true }, @@ -15610,6 +15615,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "license": "MIT", "optional": true }, "node_modules/natural-compare": { @@ -15633,6 +15639,7 @@ "version": "3.71.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz", "integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==", + "license": "MIT", "optional": true, "dependencies": { "semver": "^7.3.5" @@ -15645,6 +15652,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT", "optional": true }, "node_modules/node-fetch": { @@ -15831,6 +15839,7 @@ "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", "deprecated": "This package is no longer supported.", "dev": true, + "license": "ISC", "optional": true, "peer": true, "dependencies": { @@ -16277,6 +16286,7 @@ "resolved": "https://registry.npmjs.org/canvas/-/canvas-3.0.0.tgz", "integrity": "sha512-NtcIBY88FjymQy+g2g5qnuP5IslrbWCQ3A6rSr1PeuYxVRapRZ3BZCrDyAakvI6CuDYidgZaf55ygulFVwROdg==", "hasInstallScript": true, + "license": "MIT", "optional": true, "dependencies": { "node-addon-api": "^7.0.0", @@ -16598,6 +16608,7 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", + "license": "MIT", "optional": true, "dependencies": { "detect-libc": "^2.0.0", @@ -16624,6 +16635,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", "optional": true, "dependencies": { "mimic-response": "^3.1.0" @@ -16639,6 +16651,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", "optional": true, "engines": { "node": ">=10" @@ -16665,6 +16678,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "optional": true, "dependencies": { "decompress-response": "^6.0.0", @@ -17032,6 +17046,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "optional": true, "dependencies": { "deep-extend": "^0.6.0", @@ -17047,12 +17062,14 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC", "optional": true }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "license": "MIT", "optional": true, "engines": { "node": ">=0.10.0" @@ -17097,34 +17114,17 @@ } }, "node_modules/react-day-picker": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-9.5.0.tgz", - "integrity": "sha512-WmJnPFVLnKh5Qscm7wavMNg86rqPverSWjx+zgK8/ZmGRSQ8c8OoqW10RI+AzAfT2atIxImpCUU2R9Z7Xb2SUA==", + "version": "8.10.1", + "resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-8.10.1.tgz", + "integrity": "sha512-TMx7fNbhLk15eqcMt+7Z7S2KF7mfTId/XJDjKE8f+IUcFn0l08/kI4FiYTL/0yuOLmEcbR4Fwe3GJf/NiiMnPA==", "license": "MIT", - "dependencies": { - "@date-fns/tz": "^1.2.0", - "date-fns": "^4.1.0", - "date-fns-jalali": "^4.1.0-0" - }, - "engines": { - "node": ">=18" - }, "funding": { "type": "individual", "url": "https://github.com/sponsors/gpbl" }, "peerDependencies": { - "react": ">=16.8.0" - } - }, - "node_modules/react-day-picker/node_modules/date-fns": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", - "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/kossnocorp" + "date-fns": "^2.28.0 || ^3.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, "node_modules/react-dom": { @@ -18373,6 +18373,7 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true, + "license": "ISC", "optional": true, "peer": true }, @@ -19431,6 +19432,7 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "dependencies": { @@ -19449,6 +19451,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "license": "MIT", "optional": true, "dependencies": { "chownr": "^1.1.1", @@ -19461,12 +19464,14 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC", "optional": true }, "node_modules/tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", "optional": true, "dependencies": { "bl": "^4.0.3", @@ -19484,6 +19489,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "engines": { @@ -19495,6 +19501,7 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, + "license": "ISC", "optional": true, "peer": true }, @@ -21887,6 +21894,7 @@ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, + "license": "ISC", "optional": true, "peer": true, "dependencies": { @@ -21898,6 +21906,7 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, + "license": "MIT", "optional": true, "peer": true }, @@ -21906,6 +21915,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "engines": { @@ -21917,6 +21927,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "dependencies": { diff --git a/package.json b/package.json index 17c7e930b3f..e687ccd06fa 100644 --- a/package.json +++ b/package.json @@ -59,9 +59,12 @@ "@radix-ui/react-avatar": "^1.1.2", "@radix-ui/react-checkbox": "^1.1.3", "@radix-ui/react-collapsible": "^1.1.2", + "@radix-ui/react-dialog": "^1.1.4", "@radix-ui/react-dropdown-menu": "^2.1.4", "@radix-ui/react-icons": "^1.3.2", + "@radix-ui/react-label": "^2.1.1", "@radix-ui/react-menubar": "^1.1.4", + "@radix-ui/react-popover": "^1.1.4", "@radix-ui/react-progress": "^1.1.1", "@radix-ui/react-radio-group": "^1.2.2", "@radix-ui/react-scroll-area": "^1.2.2", @@ -71,17 +74,12 @@ "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-switch": "^1.1.2", "@radix-ui/react-tabs": "^1.1.1", - "@vitejs/plugin-react": "^4.3.4", - "@pnotify/core": "^5.2.0", - "@pnotify/mobile": "^5.2.0", - "@radix-ui/react-dialog": "^1.1.4", - "@radix-ui/react-label": "^2.1.1", - "@radix-ui/react-popover": "^1.1.4", "@radix-ui/react-toast": "^1.2.4", "@radix-ui/react-tooltip": "^1.1.6", "@sentry/browser": "^8.47.0", "@tanstack/react-query": "^5.62.8", "@tanstack/react-query-devtools": "^5.62.7", + "@vitejs/plugin-react": "^4.3.4", "@yudiel/react-qr-scanner": "^2.1.0", "bowser": "^2.11.0", "browser-image-compression": "^2.0.2", @@ -91,8 +89,8 @@ "clsx": "^2.1.1", "cmdk": "^1.0.4", "cross-env": "^7.0.3", - "date-fns": "^3.6.0", "cypress": "^13.17.0", + "date-fns": "^3.6.0", "dayjs": "^1.11.13", "echarts": "^5.5.1", "echarts-for-react": "^3.0.2", @@ -112,13 +110,13 @@ "raviger": "^4.1.2", "react": "18.3.1", "react-copy-to-clipboard": "^5.1.0", - "react-day-picker": "^9.5.0", + "react-day-picker": "^8.10.1", "react-dom": "18.3.1", "react-google-recaptcha": "^3.1.0", "react-hook-form": "^7.53.2", - "react-intersection-observer": "^9.14.1", "react-i18next": "^15.2.0", "react-infinite-scroll-component": "^6.1.0", + "react-intersection-observer": "^9.14.1", "react-pdf": "^9.2.1", "react-webcam": "^7.2.0", "recharts": "^2.15.0", @@ -214,4 +212,4 @@ "node": ">=22.8.0" }, "packageManager": "npm@10.9.0" -} \ No newline at end of file +} diff --git a/scripts/setup-care-apps.ts b/scripts/setup-care-apps.ts index 003cc0117b6..7bfa14f9bad 100644 --- a/scripts/setup-care-apps.ts +++ b/scripts/setup-care-apps.ts @@ -46,7 +46,8 @@ const pluginMapContent = `// Use type assertion for the static import${plugins (plugin) => `// @ts-expect-error Remote module will be available at runtime\nimport ${plugin.camelCaseName}Manifest from "${plugin.repo}/manifest";`, ) - .join("\n")}import type { PluginManifest } from "./pluginTypes"; + .join("\n")} +import type { PluginManifest } from "./pluginTypes"; const pluginMap: PluginManifest[] = [${plugins.map((plugin) => `${plugin.camelCaseName}Manifest as PluginManifest`).join(",\n ")}]; diff --git a/src/Utils/request/errorHandler.ts b/src/Utils/request/errorHandler.ts index c5609181f13..31d54c3df6d 100644 --- a/src/Utils/request/errorHandler.ts +++ b/src/Utils/request/errorHandler.ts @@ -1,4 +1,5 @@ import { navigate } from "raviger"; +import { toast } from "sonner"; import * as Notifications from "@/Utils/Notifications"; import { HTTPError } from "@/Utils/request/types"; @@ -19,13 +20,18 @@ export function handleHttpError(error: Error) { const cause = error.cause; + if (isNotFound(error)) { + toast.error((cause?.detail as string) || "Not found"); + return; + } + if (isSessionExpired(cause)) { handleSessionExpired(); return; } if (isBadRequest(error)) { - Notifications.BadRequest({ errs: cause }); + Notifications.BadRequest({ errs: cause?.errors }); return; } @@ -52,3 +58,7 @@ function handleSessionExpired() { function isBadRequest(error: HTTPError) { return error.status === 400 || error.status === 406; } + +function isNotFound(error: HTTPError) { + return error.status === 404; +} diff --git a/src/Utils/request/uploadFile.ts b/src/Utils/request/uploadFile.ts index ea603e1754f..741325f41cf 100644 --- a/src/Utils/request/uploadFile.ts +++ b/src/Utils/request/uploadFile.ts @@ -29,13 +29,8 @@ const uploadFile = async ( } catch { error = xhr.responseText; } - if (typeof error === "object" && !Array.isArray(error)) { - Object.values(error).forEach((msg) => { - Notification.Error({ msg: msg || "Something went wrong!" }); - }); - } else { - Notification.Error({ msg: error || "Something went wrong!" }); - } + Notification.BadRequest({ errs: error.errors }); + reject(new Error("Client error")); reject(new Error("Client error")); } else { resolve(); diff --git a/src/components/Resource/ResourceFilter.tsx b/src/components/Resource/ResourceFilter.tsx index aa68136bf8b..e161fcf819a 100644 --- a/src/components/Resource/ResourceFilter.tsx +++ b/src/components/Resource/ResourceFilter.tsx @@ -25,13 +25,13 @@ const getDate = (value: any) => export default function ListFilter(props: any) { const { filter, onChange, closeFilter, removeFilters } = props; const [filterState, setFilterState] = useMergeState({ - origin_facility: filter.origin_facility || "", + origin_facility: filter.origin_facility || null, origin_facility_ref: null, - approving_facility: filter.approving_facility || "", + approving_facility: filter.approving_facility || null, approving_facility_ref: null, - assigned_facility: filter.assigned_facility || "", + assigned_facility: filter.assigned_facility || null, assigned_facility_ref: null, - emergency: filter.emergency || "--", + emergency: filter.emergency || null, created_date_before: filter.created_date_before || null, created_date_after: filter.created_date_after || null, modified_date_before: filter.modified_date_before || null, diff --git a/src/components/Users/CreateUserForm.tsx b/src/components/Users/CreateUserForm.tsx index 9bbaa1dbf57..09a3f5512f3 100644 --- a/src/components/Users/CreateUserForm.tsx +++ b/src/components/Users/CreateUserForm.tsx @@ -274,7 +274,7 @@ export default function CreateUserForm({ onSubmitSuccess }: Props) { Phone Number - + @@ -290,6 +290,7 @@ export default function CreateUserForm({ onSubmitSuccess }: Props) { diff --git a/src/components/ui/calendar.tsx b/src/components/ui/calendar.tsx index 83a7d187132..15cd3662a93 100644 --- a/src/components/ui/calendar.tsx +++ b/src/components/ui/calendar.tsx @@ -1,5 +1,3 @@ -"use client"; - import { ChevronLeftIcon, ChevronRightIcon } from "@radix-ui/react-icons"; import * as React from "react"; import { DayPicker } from "react-day-picker"; @@ -62,8 +60,8 @@ function Calendar({ ...classNames, }} components={{ - PreviousMonthButton: () => , - NextMonthButton: () => , + IconLeft: () => , + IconRight: () => , }} {...props} />