From b6aa5d99efc1c2498aea25a95f11239409563f1f Mon Sep 17 00:00:00 2001 From: Abhimanyu Rajeesh <63541653+abhimanyurajeesh@users.noreply.github.com> Date: Thu, 20 Feb 2025 18:01:40 +0530 Subject: [PATCH 1/9] Refactor organization search to use query params (#10717) --- .../organizations/FacilityOrganizationView.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pages/Facility/settings/organizations/FacilityOrganizationView.tsx b/src/pages/Facility/settings/organizations/FacilityOrganizationView.tsx index 5efc8fc4076..4aec8578195 100644 --- a/src/pages/Facility/settings/organizations/FacilityOrganizationView.tsx +++ b/src/pages/Facility/settings/organizations/FacilityOrganizationView.tsx @@ -1,6 +1,5 @@ import { useQuery } from "@tanstack/react-query"; import { Link } from "raviger"; -import { useState } from "react"; import { useTranslation } from "react-i18next"; import CareIcon from "@/CAREUI/icons/CareIcon"; @@ -62,11 +61,10 @@ function OrganizationCard({ export default function FacilityOrganizationView({ id, facilityId }: Props) { const { t } = useTranslation(); - const { qParams, Pagination, resultsPerPage } = useFilters({ + const { qParams, Pagination, resultsPerPage, updateQuery } = useFilters({ limit: 12, cacheBlacklist: ["username"], }); - const [searchQuery, setSearchQuery] = useState(""); const { data: children, isLoading } = useQuery({ queryKey: [ @@ -76,7 +74,7 @@ export default function FacilityOrganizationView({ id, facilityId }: Props) { id, qParams.page, resultsPerPage, - searchQuery, + qParams.search, ], queryFn: query.debounced(routes.facilityOrganization.list, { pathParams: { facilityId }, @@ -84,7 +82,7 @@ export default function FacilityOrganizationView({ id, facilityId }: Props) { parent: id, offset: ((qParams.page || 1) - 1) * resultsPerPage, limit: resultsPerPage, - name: searchQuery || undefined, + name: qParams.search || undefined, }, }), }); @@ -102,9 +100,9 @@ export default function FacilityOrganizationView({ id, facilityId }: Props) { /> { - setSearchQuery(e.target.value); + updateQuery({ search: e.target.value || undefined }); }} className="w-full pl-8" /> From ac6ba9c30b29b73ce4e2b186c916b622ca04f0ed Mon Sep 17 00:00:00 2001 From: Mahendar Chikolla <119734520+Mahendar0701@users.noreply.github.com> Date: Thu, 20 Feb 2025 19:44:55 +0530 Subject: [PATCH 2/9] Add count to resource and encounter page (#10700) --- src/components/Resource/ResourceList.tsx | 17 ++++++++++++++++- src/pages/Encounters/EncounterList.tsx | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/components/Resource/ResourceList.tsx b/src/components/Resource/ResourceList.tsx index 566a19dedde..288b7780ec3 100644 --- a/src/components/Resource/ResourceList.tsx +++ b/src/components/Resource/ResourceList.tsx @@ -103,7 +103,22 @@ export default function ResourceList({ facilityId }: { facilityId: string }) { const resources = queryResources?.results || []; return ( - + + {isLoading + ? t("loading") + : t("entity_count", { + count: queryResources?.count ?? 0, + entity: "Resource", + })} + + } + >
diff --git a/src/pages/Encounters/EncounterList.tsx b/src/pages/Encounters/EncounterList.tsx index 18f5331bb3b..39667da3bd9 100644 --- a/src/pages/Encounters/EncounterList.tsx +++ b/src/pages/Encounters/EncounterList.tsx @@ -213,7 +213,22 @@ export function EncounterList({ const { t } = useTranslation(); return ( - + + {isLoading + ? t("loading") + : t("entity_count", { + count: queryEncounters?.count ?? 0, + entity: "Encounter", + })} + + } + >
From bb382e842e378e52fa80bd6d29f2a49a1d8ace63 Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Thu, 20 Feb 2025 20:04:16 +0530 Subject: [PATCH 3/9] Fixed Pagination in facility specific user tab (#10729) --- src/components/Facility/FacilityUsers.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Facility/FacilityUsers.tsx b/src/components/Facility/FacilityUsers.tsx index 76f1dfd008f..8fced137410 100644 --- a/src/components/Facility/FacilityUsers.tsx +++ b/src/components/Facility/FacilityUsers.tsx @@ -22,7 +22,7 @@ import { useView } from "@/Utils/useView"; export default function FacilityUsers(props: { facilityId: string }) { const { t } = useTranslation(); - const { qParams, updateQuery, Pagination } = useFilters({ + const { qParams, updateQuery, Pagination, resultsPerPage } = useFilters({ limit: 15, cacheBlacklist: ["username"], }); @@ -33,13 +33,13 @@ export default function FacilityUsers(props: { facilityId: string }) { let usersList: JSX.Element = <>; const { data: userListData, isFetching: userListFetching } = useQuery({ - queryKey: ["facilityUsers", facilityId, qParams], + queryKey: ["facilityUsers", facilityId, qParams, resultsPerPage], queryFn: query.debounced(routes.facility.getUsers, { pathParams: { facility_id: facilityId }, queryParams: { username: qParams.username, - limit: qParams.limit, - offset: (qParams.page - 1) * qParams.limit, + limit: resultsPerPage, + offset: (qParams.page - 1) * resultsPerPage, }, }), enabled: !!facilityId, From 89918fe016d99a36686a1161cdf0f28b2822fadb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 20:38:17 +0530 Subject: [PATCH 4/9] Update dependency vite-plugin-checker to ^0.9.0 (#10730) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 266 +++++++++++++++++++++------------------------- package.json | 4 +- 2 files changed, 121 insertions(+), 149 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b338809fe9..6f14216fc5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "care_fe", - "version": "3.3.0", + "version": "3.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "care_fe", - "version": "3.3.0", + "version": "3.4.0", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -134,7 +134,7 @@ "unimported": "^1.31.0", "uuid": "^11.0.2", "vite": "^5.4.10", - "vite-plugin-checker": "^0.8.0", + "vite-plugin-checker": "^0.9.0", "vite-plugin-pwa": "^0.21.0", "vite-plugin-static-copy": "^2.0.0", "zod": "^3.23.8" @@ -17187,23 +17187,26 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz", - "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==", + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", + "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.2", + "fdir": "^6.4.3", "picomatch": "^4.0.2" }, "engines": { "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", - "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", + "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", "dev": true, "license": "MIT", "peerDependencies": { @@ -18089,6 +18092,19 @@ "node": ">=4" } }, + "node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/unimported": { "version": "1.31.1", "resolved": "https://registry.npmjs.org/unimported/-/unimported-1.31.1.tgz", @@ -18916,26 +18932,21 @@ } }, "node_modules/vite-plugin-checker": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/vite-plugin-checker/-/vite-plugin-checker-0.8.0.tgz", - "integrity": "sha512-UA5uzOGm97UvZRTdZHiQVYFnd86AVn8EVaD4L3PoVzxH+IZSfaAw14WGFwX9QS23UW3lV/5bVKZn6l0w+q9P0g==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/vite-plugin-checker/-/vite-plugin-checker-0.9.0.tgz", + "integrity": "sha512-gf/zc0KWX8ATEOgnpgAM1I+IbvWkkO80RB+FxlLtC5cabXSesbJmAUw6E+mMDDMGIT+VHAktmxJZpMTt3lSubQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.12.13", - "ansi-escapes": "^4.3.0", - "chalk": "^4.1.1", - "chokidar": "^3.5.1", - "commander": "^8.0.0", - "fast-glob": "^3.2.7", - "fs-extra": "^11.1.0", - "npm-run-path": "^4.0.1", - "strip-ansi": "^6.0.0", - "tiny-invariant": "^1.1.0", - "vscode-languageclient": "^7.0.0", - "vscode-languageserver": "^7.0.0", - "vscode-languageserver-textdocument": "^1.0.1", - "vscode-uri": "^3.0.2" + "@babel/code-frame": "^7.26.2", + "chokidar": "^4.0.3", + "npm-run-path": "^6.0.0", + "picocolors": "^1.1.1", + "picomatch": "^4.0.2", + "strip-ansi": "^7.1.0", + "tiny-invariant": "^1.3.3", + "tinyglobby": "^0.2.12", + "vscode-uri": "^3.1.0" }, "engines": { "node": ">=14.16" @@ -18943,14 +18954,14 @@ "peerDependencies": { "@biomejs/biome": ">=1.7", "eslint": ">=7", - "meow": "^9.0.0", + "meow": "^13.2.0", "optionator": "^0.9.1", - "stylelint": ">=13", + "stylelint": ">=16", "typescript": "*", "vite": ">=2.0.0", "vls": "*", "vti": "*", - "vue-tsc": "~2.1.6" + "vue-tsc": "~2.2.2" }, "peerDependenciesMeta": { "@biomejs/biome": { @@ -18982,58 +18993,106 @@ } } }, - "node_modules/vite-plugin-checker/node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "node_modules/vite-plugin-checker/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/vite-plugin-checker/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", "dependencies": { - "type-fest": "^0.21.3" + "readdirp": "^4.0.1" }, "engines": { - "node": ">=8" + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/vite-plugin-checker/node_modules/npm-run-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", + "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^4.0.0", + "unicorn-magic": "^0.3.0" + }, + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/vite-plugin-checker/node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "node_modules/vite-plugin-checker/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 12" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/vite-plugin-checker/node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "node_modules/vite-plugin-checker/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "engines": { + "node": ">=12" }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vite-plugin-checker/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=14.14" + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, - "node_modules/vite-plugin-checker/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "node_modules/vite-plugin-checker/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/vite-plugin-pwa": { @@ -19536,97 +19595,10 @@ "node": ">=0.10.0" } }, - "node_modules/vscode-jsonrpc": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz", - "integrity": "sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0 || >=10.0.0" - } - }, - "node_modules/vscode-languageclient": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz", - "integrity": "sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimatch": "^3.0.4", - "semver": "^7.3.4", - "vscode-languageserver-protocol": "3.16.0" - }, - "engines": { - "vscode": "^1.52.0" - } - }, - "node_modules/vscode-languageclient/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/vscode-languageclient/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/vscode-languageserver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz", - "integrity": "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==", - "dev": true, - "license": "MIT", - "dependencies": { - "vscode-languageserver-protocol": "3.16.0" - }, - "bin": { - "installServerIntoExtension": "bin/installServerIntoExtension" - } - }, - "node_modules/vscode-languageserver-protocol": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz", - "integrity": "sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==", - "dev": true, - "license": "MIT", - "dependencies": { - "vscode-jsonrpc": "6.0.0", - "vscode-languageserver-types": "3.16.0" - } - }, - "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", - "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", - "dev": true, - "license": "MIT" - }, - "node_modules/vscode-languageserver-types": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz", - "integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==", - "dev": true, - "license": "MIT" - }, "node_modules/vscode-uri": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", - "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", + "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index 695fc983700..781a160f862 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "care_fe", - "version": "3.3.0", + "version": "3.4.0", "description": "Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.", "private": true, "repository": { @@ -174,7 +174,7 @@ "unimported": "^1.31.0", "uuid": "^11.0.2", "vite": "^5.4.10", - "vite-plugin-checker": "^0.8.0", + "vite-plugin-checker": "^0.9.0", "vite-plugin-pwa": "^0.21.0", "vite-plugin-static-copy": "^2.0.0", "zod": "^3.23.8" From 39f79e20479497f691387c9eac764ad9f804307c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 20:40:13 +0530 Subject: [PATCH 5/9] Update all dependencies (minor, patch) (#10709) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6f14216fc5e..271aab0f8e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5195,9 +5195,9 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.66.7", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.66.7.tgz", - "integrity": "sha512-qd3q/tUpF2K1xItfPZddk1k/8pSXnovg41XyCqJgPoyYEirMBtB0sVEVVQ/CsAOngzgWtBPXimVf4q4kM9uO6A==", + "version": "5.66.8", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.66.8.tgz", + "integrity": "sha512-LqYHYArmM7ycyT1I/Txc/n6KzI8S/hBFw2SQ9Uj1GpbZ89AvZLEvetquiQEHkZ5rFEm+iVNpZ6zYjTiPmJ9N5Q==", "license": "MIT", "dependencies": { "@tanstack/query-core": "5.66.4" @@ -5211,9 +5211,9 @@ } }, "node_modules/@tanstack/react-query-devtools": { - "version": "5.66.7", - "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.66.7.tgz", - "integrity": "sha512-40z4PPkz06tYIF0vwLZZIZfZxKUH4OAaBOR14blCFyYm6hlU6qc+M82mkZ+D00HcEMhV7P4XeJiEuDhFq0q9Qw==", + "version": "5.66.8", + "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.66.8.tgz", + "integrity": "sha512-OOdGk4ijs1SEliluWoE5D0ghxwDQz4x2LKzO69K6++VuxtizONXEXtk/oC3QGa9Tru/2CQmsJ5HUk8pmUAi9Qg==", "license": "MIT", "dependencies": { "@tanstack/query-devtools": "5.65.0" @@ -5223,7 +5223,7 @@ "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { - "@tanstack/react-query": "^5.66.7", + "@tanstack/react-query": "^5.66.8", "react": "^18 || ^19" } }, @@ -10841,9 +10841,9 @@ } }, "node_modules/i18next-browser-languagedetector": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-8.0.3.tgz", - "integrity": "sha512-beOOLArattPBc2YZG5IXGJytdYFgUR7cS8Wd6HT4IczIoWKgmTspOQ2yasaGklelVo5seLPmnEKvLHR+E/MdWQ==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-8.0.4.tgz", + "integrity": "sha512-f3frU3pIxD50/Tz20zx9TD9HobKYg47fmAETb117GKGPrhwcSSPJDoCposXlVycVebQ9GQohC3Efbpq7/nnJ5w==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.23.2" @@ -18789,9 +18789,9 @@ } }, "node_modules/uuid": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.5.tgz", - "integrity": "sha512-508e6IcKLrhxKdBbcA2b4KQZlLVp2+J5UwQ6F7Drckkc5N9ZJwFa4TgWtsww9UG8fGHbm6gbV19TdM5pQ4GaIA==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", "dev": true, "funding": [ "https://github.com/sponsors/broofa", From e2505482d8533e8a8d608acc8da16a7015972b98 Mon Sep 17 00:00:00 2001 From: Tanuj Nainwal <125687187+Tanuj1718@users.noreply.github.com> Date: Fri, 21 Feb 2025 01:52:28 +0530 Subject: [PATCH 6/9] fix: Organization Users page needs responsiveness (#10413) Co-authored-by: Jacob John Jeevan --- src/components/Common/UserSelector.tsx | 2 +- src/components/Users/UserListAndCard.tsx | 5 +++- .../components/EditFacilityUserRoleSheet.tsx | 24 +++++++++++-------- .../components/LinkFacilityUserSheet.tsx | 10 ++++---- src/pages/Organization/OrganizationUsers.tsx | 4 ++-- .../Organization/components/LinkUserSheet.tsx | 13 +++++----- 6 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/components/Common/UserSelector.tsx b/src/components/Common/UserSelector.tsx index 5c898e336da..3d068034791 100644 --- a/src/components/Common/UserSelector.tsx +++ b/src/components/Common/UserSelector.tsx @@ -71,7 +71,7 @@ export default function UserSelector({ className="size-6 rounded-full" /> -

+

{formatName(selected)}

diff --git a/src/components/Users/UserListAndCard.tsx b/src/components/Users/UserListAndCard.tsx index bf8b2b3e96d..c11c2bc5199 100644 --- a/src/components/Users/UserListAndCard.tsx +++ b/src/components/Users/UserListAndCard.tsx @@ -64,7 +64,10 @@ export const UserStatusIndicator = ({ ) : ( - + {t("never_logged_in")} diff --git a/src/pages/Facility/settings/organizations/components/EditFacilityUserRoleSheet.tsx b/src/pages/Facility/settings/organizations/components/EditFacilityUserRoleSheet.tsx index dfae40ba31f..6af8838d2dd 100644 --- a/src/pages/Facility/settings/organizations/components/EditFacilityUserRoleSheet.tsx +++ b/src/pages/Facility/settings/organizations/components/EditFacilityUserRoleSheet.tsx @@ -157,18 +157,22 @@ export default function EditUserRoleSheet({
-
-
- {t("username")} -

{userRole.user.username}

+
+
+
+ {t("username")} +

+ {userRole.user.username} +

+
+
+ + {t("current_role")} + +

{userRole.role.name}

+
- - {t("current_role")} - -

{userRole.role.name}

-
-
{t("last_login")}{" "} diff --git a/src/pages/Facility/settings/organizations/components/LinkFacilityUserSheet.tsx b/src/pages/Facility/settings/organizations/components/LinkFacilityUserSheet.tsx index c0cb464b2b1..8c7cea2e719 100644 --- a/src/pages/Facility/settings/organizations/components/LinkFacilityUserSheet.tsx +++ b/src/pages/Facility/settings/organizations/components/LinkFacilityUserSheet.tsx @@ -136,16 +136,16 @@ export default function LinkFacilityUserSheet({ {selectedUser && (
-
+
-
- +
+

{selectedUser.first_name} {selectedUser.last_name} - +

{selectedUser.email} @@ -153,7 +153,7 @@ export default function LinkFacilityUserSheet({
-
+
Username

{selectedUser.username} diff --git a/src/pages/Organization/OrganizationUsers.tsx b/src/pages/Organization/OrganizationUsers.tsx index e05e6374097..b81c3313b17 100644 --- a/src/pages/Organization/OrganizationUsers.tsx +++ b/src/pages/Organization/OrganizationUsers.tsx @@ -102,7 +102,7 @@ export default function OrganizationUsers({ id, navOrganizationId }: Props) { return (

-
+
-
+
{ diff --git a/src/pages/Organization/components/LinkUserSheet.tsx b/src/pages/Organization/components/LinkUserSheet.tsx index 967783d61be..a442cdf1a3e 100644 --- a/src/pages/Organization/components/LinkUserSheet.tsx +++ b/src/pages/Organization/components/LinkUserSheet.tsx @@ -111,7 +111,7 @@ export default function LinkUserSheet({ return ( - @@ -135,16 +135,16 @@ export default function LinkUserSheet({ {selectedUser && (
-
+
-
- +
+

{selectedUser.first_name} {selectedUser.last_name} - +

{selectedUser.email} @@ -154,7 +154,7 @@ export default function LinkUserSheet({
Username -

+

{selectedUser.username}

@@ -192,7 +192,6 @@ export default function LinkUserSheet({
- +
-
+
-
- -
- - - -

- {facilityData?.name} -

-
- -

- {facilityData?.name} -

-
-
-
-
+
+

+ {facilityData?.name} +

+

+ {facilityData?.facility_type} +

- - - - - - {hasPermissionToEditCoverImage && ( - setEditCoverImage(true)} + + {/* + TODO: add delete facility + + + {t("delete_facility")} + + + + + {t("delete_facility")} + + + {t("delete_facility_confirmation", { + name: facilityData?.name, + })} + + + + {t("cancel")} +
deleteFacility()} + className={cn( + buttonVariants({ variant: "destructive" }), + )} + // disabled={isDeleting} > - - {t("edit_cover_photo")} - - )} - - { - e.preventDefault(); - }} - > - - {t("update_facility")} - - } - /> - - {/* TODO: add delete facility */} - {/* - e.preventDefault()} - > - - {t("delete_facility")} - - */} - - - - {t("delete_facility")} - - - {t("delete_facility_confirmation", { - name: facilityData?.name, - })} - - - - - {t("cancel")} - - deleteFacility()} - className={cn( - buttonVariants({ variant: "destructive" }), - )} - disabled={isDeleting} - > - {isDeleting ? t("deleting") : t("delete")} - - - - - - - - + {isDeleting ? t("deleting") : t("delete")} +
+
+
+
*/}
+
+ {hasPermissionToEditCoverImage && ( + + )} +
- - -
-
- -
- {facilityData?.geo_organization && ( -
- {renderGeoOrganizations( - facilityData?.geo_organization, - )} -
- )} +
+ + + {t("edit_facility_details")} + + } + /> +
+
+ + +
+
+ + {t("address")} + + + {facilityData.address} +
-
-
-
-
+
+ + {t("mobile_number")} + + -
+ +
+ +
+ + {t("location_details")} + + + {/* Add Location Link Here */} +
-
-
-
+ + + + +
+ {facilityData.geo_organization && + renderGeoOrganizations( + facilityData.geo_organization, + ).map((item, index) => ( +
+ + {item.label} + + + {item.value} + +
+ ))} +
+
+
+
{facilityData?.features?.some((feature: number) => FACILITY_FEATURE_TYPES.some((f) => f.id === feature), @@ -383,7 +360,7 @@ export const FacilityHome = ({ facilityId }: Props) => { {getFacilityFeatureIcon(feature)} From 213fb25bc0ed57fb2596182b9646726792f801ae Mon Sep 17 00:00:00 2001 From: Tanuj Nainwal <125687187+Tanuj1718@users.noreply.github.com> Date: Fri, 21 Feb 2025 01:55:29 +0530 Subject: [PATCH 8/9] solved cover image upload type error (#10630) --- src/components/Common/AvatarEditModal.tsx | 41 +++++++++++++++++------ 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/src/components/Common/AvatarEditModal.tsx b/src/components/Common/AvatarEditModal.tsx index 3c278ea80b0..7ef393d0fa8 100644 --- a/src/components/Common/AvatarEditModal.tsx +++ b/src/components/Common/AvatarEditModal.tsx @@ -62,8 +62,8 @@ const AvatarEditModal = ({ const [selectedFile, setSelectedFile] = useState(); const [preview, setPreview] = useState(); const [isCameraOpen, setIsCameraOpen] = useState(false); - const webRef = useRef(null); - const [previewImage, setPreviewImage] = useState(null); + const webRef = useRef(null); + const [previewImage, setPreviewImage] = useState(null); const [isCaptureImgBeingUploaded, setIsCaptureImgBeingUploaded] = useState(false); const [constraint, setConstraint] = useState( @@ -81,16 +81,35 @@ const AvatarEditModal = ({ }, []); const captureImage = () => { - setPreviewImage(webRef.current.getScreenshot()); - const canvas = webRef.current.getCanvas(); - canvas?.toBlob((blob: Blob) => { - const myFile = new File([blob], "image.png", { - type: blob.type, - }); - setSelectedFile(myFile); + if (webRef.current) { + setPreviewImage(webRef.current.getScreenshot()); + } + const canvas = webRef.current?.getCanvas(); + canvas?.toBlob((blob) => { + if (blob) { + const myFile = new File([blob], "image.png", { + type: blob.type, + }); + setSelectedFile(myFile); + } else { + toast.error(t("failed_to_capture_image")); + } }); }; - + const stopCamera = useCallback(() => { + try { + if (webRef.current) { + const openCamera = webRef.current?.video?.srcObject as MediaStream; + if (openCamera) { + openCamera.getTracks().forEach((track) => track.stop()); + } + } + } catch { + toast.error("Failed to stop camera"); + } finally { + setIsCameraOpen(false); + } + }, []); const closeModal = () => { setPreview(undefined); setIsProcessing(false); @@ -410,7 +429,7 @@ const AvatarEditModal = ({ onClick={() => { setPreviewImage(null); setIsCameraOpen(false); - webRef.current.stopCamera(); + stopCamera(); }} disabled={isProcessing} > From d58936da559c1bbbf103a2ee1b4cdec697697270 Mon Sep 17 00:00:00 2001 From: Agastya Gaur <71458414+Agastya18@users.noreply.github.com> Date: Fri, 21 Feb 2025 07:57:17 +0530 Subject: [PATCH 9/9] Fixes delete button alignment in ValueSet Form (#10737) --- src/components/ValueSet/ValueSetForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ValueSet/ValueSetForm.tsx b/src/components/ValueSet/ValueSetForm.tsx index b3e76eaaa23..bea305bc5f2 100644 --- a/src/components/ValueSet/ValueSetForm.tsx +++ b/src/components/ValueSet/ValueSetForm.tsx @@ -374,6 +374,7 @@ function RuleFields({ )} />