From 7769eb91ff07691682332236d403626150ee85c2 Mon Sep 17 00:00:00 2001 From: Sulochan Khadka <122200551+Sulochan-khadka@users.noreply.github.com> Date: Tue, 10 Sep 2024 13:34:09 +0530 Subject: [PATCH 01/13] Remove clear all filters when no filters are applied. (#8466) --- .../Facility/DischargedPatientsList.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Components/Facility/DischargedPatientsList.tsx b/src/Components/Facility/DischargedPatientsList.tsx index 5a7d706ee87..6603f3964af 100644 --- a/src/Components/Facility/DischargedPatientsList.tsx +++ b/src/Components/Facility/DischargedPatientsList.tsx @@ -417,12 +417,15 @@ const DischargedPatientsList = ({ ), ]} children={ - <> - {qParams.last_consultation_admitted_bed_type_list && - LastAdmittedToTypeBadges()} - {qParams.last_consultation__consent_types && - HasConsentTypesBadges()} - + (qParams.last_consultation_admitted_bed_type_list || + qParams.last_consultation__consent_types) && ( + <> + {qParams.last_consultation_admitted_bed_type_list && + LastAdmittedToTypeBadges()} + {qParams.last_consultation__consent_types && + HasConsentTypesBadges()} + + ) } /> From 80a8a4761d3629bfb30a501e66e1d54d58c80ba2 Mon Sep 17 00:00:00 2001 From: JOSHIK ROSHAN <96165631+JOSHIK27@users.noreply.github.com> Date: Tue, 10 Sep 2024 09:04:38 +0100 Subject: [PATCH 02/13] enhanced AutocompleteFormField (#8414) --- src/Components/Form/FormFields/Autocomplete.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/Form/FormFields/Autocomplete.tsx b/src/Components/Form/FormFields/Autocomplete.tsx index 2addbfa9b33..c5bec6f99d6 100644 --- a/src/Components/Form/FormFields/Autocomplete.tsx +++ b/src/Components/Form/FormFields/Autocomplete.tsx @@ -163,6 +163,7 @@ export const Autocomplete = (props: AutocompleteProps) => { id={props.id} > props.onChange(selection.value)} From ca468236105c8fe5077278eb20f9efbd0e425653 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Tue, 10 Sep 2024 13:35:46 +0530 Subject: [PATCH 03/13] Fixes Autocomplete input erroring when combobox input is cleared (#8501) --- src/Components/Form/FormFields/Autocomplete.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Form/FormFields/Autocomplete.tsx b/src/Components/Form/FormFields/Autocomplete.tsx index c5bec6f99d6..f1c52853e37 100644 --- a/src/Components/Form/FormFields/Autocomplete.tsx +++ b/src/Components/Form/FormFields/Autocomplete.tsx @@ -166,7 +166,7 @@ export const Autocomplete = (props: AutocompleteProps) => { immediate disabled={props.disabled} value={(value ?? props.placeholder ?? "Select") as T} - onChange={(selection: any) => props.onChange(selection.value)} + onChange={(selection: any) => props.onChange(selection?.value)} >
From b2a72c39cc5e01ec48c7de1425d387f43345205e Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Tue, 10 Sep 2024 13:36:31 +0530 Subject: [PATCH 04/13] Fixes PDF Viewer clipping out in different display zoom settings (#8496) --- src/Components/Common/PDFViewer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Common/PDFViewer.tsx b/src/Components/Common/PDFViewer.tsx index 28cacc09b48..a9566a01fc7 100644 --- a/src/Components/Common/PDFViewer.tsx +++ b/src/Components/Common/PDFViewer.tsx @@ -13,7 +13,7 @@ export default function PDFViewer( pdfjs.GlobalWorkerOptions.workerSrc = "/pdf.worker.min.mjs"; return ( -
+
Date: Tue, 10 Sep 2024 13:37:10 +0530 Subject: [PATCH 05/13] Procedures: consultation #8366 (#8477) Co-authored-by: Rithvik Nishad --- src/Components/Facility/ConsultationForm.tsx | 2 +- src/Locale/en/Consultation.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/Components/Facility/ConsultationForm.tsx index f9faffaba0f..2cfe9c8f4df 100644 --- a/src/Components/Facility/ConsultationForm.tsx +++ b/src/Components/Facility/ConsultationForm.tsx @@ -1361,7 +1361,7 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => { className="col-span-6" ref={fieldRef["procedure"]} > - Procedures + {t("procedure_suggestions")} Date: Tue, 10 Sep 2024 13:51:14 +0530 Subject: [PATCH 06/13] =?UTF-8?q?Adds=20support=20for=20=F0=9F=94=8D=20Zoo?= =?UTF-8?q?m=20In=20&=20Out=20for=20=F0=9F=96=A8=EF=B8=8F=20Print=20Previe?= =?UTF-8?q?w=20component=20(#8487)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CAREUI/interactive/Zoom.tsx | 97 ++++++++++++++++++++++++++++++++ src/CAREUI/misc/PrintPreview.tsx | 32 +++++++---- src/Locale/en/Common.json | 3 +- 3 files changed, 120 insertions(+), 12 deletions(-) create mode 100644 src/CAREUI/interactive/Zoom.tsx diff --git a/src/CAREUI/interactive/Zoom.tsx b/src/CAREUI/interactive/Zoom.tsx new file mode 100644 index 00000000000..bf5747f9b91 --- /dev/null +++ b/src/CAREUI/interactive/Zoom.tsx @@ -0,0 +1,97 @@ +import { createContext, ReactNode, useContext, useState } from "react"; +import ButtonV2 from "../../Components/Common/components/ButtonV2"; +import CareIcon from "../icons/CareIcon"; + +type ProviderValue = { + scale: number; + zoomIn: () => void; + zoomOut: () => void; +}; + +const ZoomContext = createContext(null); + +type Props = { + initialScale?: number; + scaleRatio?: number; + children: ReactNode; +}; + +export const ZoomProvider = ({ + initialScale = 1, + scaleRatio = 1.25, + children, +}: Props) => { + const [scale, setScale] = useState(initialScale); + + return ( + setScale((scale) => scale * scaleRatio), + zoomOut: () => setScale((scale) => scale / scaleRatio), + }} + > + {children} + + ); +}; + +export const ZoomTransform = (props: { + children: ReactNode; + className?: string; +}) => { + const ctx = useContext(ZoomContext); + + if (ctx == null) { + throw new Error("Component must be used with ZoomProvider"); + } + + return ( +
+ {props.children} +
+ ); +}; + +export const ZoomControls = (props: { disabled?: boolean }) => { + const ctx = useContext(ZoomContext); + + if (ctx == null) { + throw new Error("Component must be used with ZoomProvider"); + } + + return ( +
+ + + + + {Math.round(ctx.scale * 100)}% + + + + +
+ ); +}; diff --git a/src/CAREUI/misc/PrintPreview.tsx b/src/CAREUI/misc/PrintPreview.tsx index 243826c7337..fe8b09b173c 100644 --- a/src/CAREUI/misc/PrintPreview.tsx +++ b/src/CAREUI/misc/PrintPreview.tsx @@ -3,6 +3,9 @@ import ButtonV2 from "../../Components/Common/components/ButtonV2"; import CareIcon from "../icons/CareIcon"; import { classNames } from "../../Utils/utils"; import Page from "../../Components/Common/components/Page"; +import useBreakpoints from "../../Common/hooks/useBreakpoints"; +import { useTranslation } from "react-i18next"; +import { ZoomControls, ZoomProvider, ZoomTransform } from "../interactive/Zoom"; type Props = { children: ReactNode; @@ -12,24 +15,31 @@ type Props = { }; export default function PrintPreview(props: Props) { + const normalScale = useBreakpoints({ default: 0.44, md: 1 }); + const { t } = useTranslation(); + return (
-
- window.print()}> +
+ - Print + {t("print")}
-
-
- {props.children} -
-
+ + +
+ {props.children} +
+
+ + +
); diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json index 24855e05d70..0d021ba2f9e 100644 --- a/src/Locale/en/Common.json +++ b/src/Locale/en/Common.json @@ -66,6 +66,7 @@ "contact_person_number": "Contact person number", "referral_letter": "Referral Letter", "close": "Close", + "print": "Print", "print_referral_letter": "Print Referral Letter", "date_of_positive_covid_19_swab": "Date of Positive Covid 19 Swab", "patient_no": "OP/IP No", @@ -201,4 +202,4 @@ "oxygen_information": "Oxygen Information", "deleted_successfully": "{{name}} deleted successfully", "delete_item": "Delete {{name}}" -} +} \ No newline at end of file From d3ca662ff61d856fffc034e45ef251f9005e1755 Mon Sep 17 00:00:00 2001 From: Shivank Kacker Date: Tue, 10 Sep 2024 17:16:25 +0530 Subject: [PATCH 07/13] Reorder classnames only on pre-commit (#8497) --- .prettierrc.json | 3 --- package.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index 96ff50bd324..e3a9c2acae9 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -7,8 +7,5 @@ "arrowParens": "always", "tailwindFunctions": [ "classNames" - ], - "plugins": [ - "prettier-plugin-tailwindcss" ] } \ No newline at end of file diff --git a/package.json b/package.json index 0b3d1547ee0..07996f9aa5c 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ }, "lint-staged": { "*.{ts,tsx,js,jsx}": [ - "prettier --write --ignore-unknown", + "prettier --write --ignore-unknown --plugin prettier-plugin-tailwindcss", "eslint --fix", "git update-index --again" ] From 07d75b1e60e853bb1b8c3bdc1e60bc84c680c31f Mon Sep 17 00:00:00 2001 From: Aditya Jindal Date: Tue, 10 Sep 2024 17:19:24 +0530 Subject: [PATCH 08/13] Added: Warning for unsupported browsers (#8417) Co-authored-by: Rithvik Nishad Co-authored-by: RaCl Co-authored-by: rithviknishad Co-authored-by: Aakash Singh --- .gitignore | 2 +- package-lock.json | 258 +++++++++---------- package.json | 7 +- src/Components/Auth/Login.tsx | 2 + src/Components/ErrorPages/BrowserWarning.tsx | 35 +++ src/Locale/en/Common.json | 5 +- 6 files changed, 169 insertions(+), 140 deletions(-) create mode 100644 src/Components/ErrorPages/BrowserWarning.tsx diff --git a/.gitignore b/.gitignore index 2bf54f0c767..d02d753ca3d 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ stats.json public/build-meta.json .vscode/* !.vscode/launch.json - +src/supportedBrowsers.ts # Reason React /lib/bs/** diff --git a/package-lock.json b/package-lock.json index b9b0c4d0583..4615e263405 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,9 @@ "@sentry/browser": "^8.12.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", "axios": "^1.6.8", + "bowser": "^2.11.0", "browser-image-compression": "^2.0.2", + "browserslist-useragent-regexp": "^4.1.3", "cross-env": "^7.0.3", "dayjs": "^1.11.11", "echarts": "^5.5.0", @@ -2475,19 +2477,6 @@ "dev": true, "peer": true }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@eslint/js": { "version": "8.57.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", @@ -4449,26 +4438,19 @@ "version": "8.56.10", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "dev": true, + "optional": true, "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" } }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "peer": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "0.0.51", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==" + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true }, "node_modules/@types/estree-jsx": { "version": "1.0.5", @@ -5333,11 +5315,9 @@ "optional": true }, "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "peer": true, + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "bin": { "acorn": "bin/acorn" }, @@ -5345,6 +5325,15 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "peer": true, + "peerDependencies": { + "acorn": "^8" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -5443,7 +5432,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "devOptional": true, "engines": { "node": ">=8" } @@ -5539,6 +5527,14 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/argue-cli": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/argue-cli/-/argue-cli-2.1.0.tgz", + "integrity": "sha512-dgojXfc4SiqmNwe38PnbT3zJasrz7g62dLAPD+VFT5RJb8W7LGRqw2IFd2ES+plnhsp4HYNJmFqMU1tCThdCww==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", @@ -5924,6 +5920,12 @@ "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", "dev": true }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", + "license": "MIT" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -5985,6 +5987,45 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/browserslist-useragent-regexp": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/browserslist-useragent-regexp/-/browserslist-useragent-regexp-4.1.3.tgz", + "integrity": "sha512-+KteEIVlrE2eJOmtteWhcs3wYKjbFd9fVPzPlj4VGggKMyf9orf+zjmlNt91ekInZ2zqox5ArEZD/tKXDj0v9Q==", + "funding": [ + "https://opencollective.com/browserslist-useragent-regexp", + "https://ko-fi.com/dangreen" + ], + "license": "MIT", + "dependencies": { + "argue-cli": "^2.1.0", + "easy-table": "^1.2.0", + "picocolors": "^1.0.0", + "regexp-tree": "^0.1.24", + "ua-regexes-lite": "^1.2.1" + }, + "bin": { + "bluare": "dist/cli.js", + "browserslist-useragent-regexp": "dist/cli.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "browserslist": ">=4.0.0" + } + }, + "node_modules/browserslist-useragent-regexp/node_modules/easy-table": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.2.0.tgz", + "integrity": "sha512-OFzVOv03YpvtcWGe5AayU5G2hgybsg3iqA6drU8UaoZyB9jLGMTrz9+asnLp/E+6qPh88yEI1gvyZFZ41dmgww==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "optionalDependencies": { + "wcwidth": "^1.0.1" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -6253,9 +6294,9 @@ } }, "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "peer": true, "engines": { "node": ">=6.0" @@ -6332,7 +6373,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, "optional": true, "engines": { "node": ">=0.8" @@ -6915,7 +6955,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, "optional": true, "dependencies": { "clone": "^1.0.2" @@ -7285,9 +7324,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", - "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -7708,18 +7747,6 @@ "eslint": ">=8.0.0" } }, - "node_modules/eslint-mdx/node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/eslint-plugin-i18next": { "version": "6.0.9", "resolved": "https://registry.npmjs.org/eslint-plugin-i18next/-/eslint-plugin-i18next-6.0.9.tgz", @@ -7934,15 +7961,11 @@ "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=10" } }, "node_modules/eslint/node_modules/globals": { @@ -7968,19 +7991,6 @@ "dev": true, "peer": true }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -7998,18 +8008,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -8024,9 +8022,9 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "peer": true, "dependencies": { @@ -12287,18 +12285,6 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, - "node_modules/micromark-extension-mdxjs/node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/micromark-factory-destination": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.0.tgz", @@ -15221,6 +15207,15 @@ "@babel/runtime": "^7.8.4" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -17011,17 +17006,6 @@ } } }, - "node_modules/terser/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -17277,6 +17261,19 @@ "node": ">= 0.8.0" } }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typed-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", @@ -17369,6 +17366,18 @@ "node": ">=14.17" } }, + "node_modules/ua-regexes-lite": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ua-regexes-lite/-/ua-regexes-lite-1.2.1.tgz", + "integrity": "sha512-ling4WX4ZtxXjmSMHzuI8PGos2brw/6gG3YuVWn5RunHoQjeCokpFeMe/ti+R8E7kOTLE2FqBG4bMdFQLFwcJQ==", + "funding": [ + "https://opencollective.com/browserslist-useragent-regexp", + "https://ko-fi.com/dangreen" + ], + "engines": { + "node": ">=14" + } + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -18568,7 +18577,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, "optional": true, "dependencies": { "defaults": "^1.0.3" @@ -18590,21 +18598,20 @@ "optional": true }, "node_modules/webpack": { - "version": "5.91.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", - "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "peer": true, "dependencies": { - "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", + "acorn-import-attributes": "^1.9.5", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.16.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -18651,27 +18658,6 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "peer": true }, - "node_modules/webpack/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/webpack/node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "peer": true, - "peerDependencies": { - "acorn": "^8" - } - }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", diff --git a/package.json b/package.json index 07996f9aa5c..95cea780b72 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "license": "MIT", "scripts": { "build:react": "cross-env NODE_ENV=production vite build", - "build": "npm run generate-build-meta && npm run build:react", + "build": "npm run generate-build-meta && npm run supported-browsers && npm run build:react", "dev": "vite", "preview": "cross-env NODE_ENV=production vite preview", "generate-build-meta": "node ./scripts/generate-build-version.js", @@ -40,7 +40,8 @@ "prepare": "husky install", "lint": "eslint ./src", "lint-fix": "eslint ./src --fix", - "format": "prettier ./src --write" + "format": "prettier ./src --write", + "supported-browsers": "echo \"export default $(browserslist-useragent-regexp --allowHigherVersions --ignorePatch --ignoreMinor);\" | sed 's/\\x1b\\[[0-9;]*m//g' > src/supportedBrowsers.ts" }, "dependencies": { "@fontsource/inter": "^5.0.18", @@ -52,7 +53,9 @@ "@sentry/browser": "^8.12.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", "axios": "^1.6.8", + "bowser": "^2.11.0", "browser-image-compression": "^2.0.2", + "browserslist-useragent-regexp": "^4.1.3", "cross-env": "^7.0.3", "dayjs": "^1.11.11", "echarts": "^5.5.0", diff --git a/src/Components/Auth/Login.tsx b/src/Components/Auth/Login.tsx index 17ecf061ef2..fa8325075dc 100644 --- a/src/Components/Auth/Login.tsx +++ b/src/Components/Auth/Login.tsx @@ -13,6 +13,7 @@ import rehypeRaw from "rehype-raw"; import { useAuthContext } from "../../Common/hooks/useAuthUser"; import FiltersCache from "../../Utils/FiltersCache"; import { classNames } from "../../Utils/utils"; +import BrowserWarning from "../ErrorPages/BrowserWarning"; import careConfig from "@careConfig"; export const Login = (props: { forgot?: boolean }) => { @@ -157,6 +158,7 @@ export const Login = (props: { forgot?: boolean }) => { return (
+ {!forgotPassword && }
diff --git a/src/Components/ErrorPages/BrowserWarning.tsx b/src/Components/ErrorPages/BrowserWarning.tsx new file mode 100644 index 00000000000..4eb0b7c7e10 --- /dev/null +++ b/src/Components/ErrorPages/BrowserWarning.tsx @@ -0,0 +1,35 @@ +import React from "react"; +import supportedBrowsers from "../../supportedBrowsers"; +import bowser from "bowser"; +import { useTranslation } from "react-i18next"; + +const BrowserWarning = () => { + const { t } = useTranslation(); + const notSupported = React.useMemo(() => { + const userAgent = window.navigator.userAgent; + if (!supportedBrowsers.test(userAgent)) { + const browser = bowser.getParser(userAgent).getBrowser(); + return { + name: browser.name || "Unknown", + version: browser.version || "Unknown", + }; + } + }, []); + + if (!notSupported) { + return null; + } + + return ( +
+
+

{t("unsupported_browser")}

+

+ {t("unsupported_browser_description", notSupported)} +

+
+
+ ); +}; + +export default BrowserWarning; diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json index 0d021ba2f9e..432d5979bed 100644 --- a/src/Locale/en/Common.json +++ b/src/Locale/en/Common.json @@ -201,5 +201,8 @@ "are_you_sure_want_to_delete": "Are you sure you want to delete {{name}}?", "oxygen_information": "Oxygen Information", "deleted_successfully": "{{name}} deleted successfully", - "delete_item": "Delete {{name}}" + "delete_item": "Delete {{name}}", + "unsupported_browser": "Unsupported Browser", + "unsupported_browser_description": "Your browser ({{name}} version {{version}}) is not supported. Please update your browser to the latest version or switch to a supported browser for the best experience." + } \ No newline at end of file From 2f0a824f45421609b8c9313dd6e3764549d935bd Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:28:13 +0300 Subject: [PATCH 09/13] New Cypress Test | Verify the Functionality of Critical Care | (#8517) --- .../e2e/patient_spec/patient_logupdate.cy.ts | 105 +++++++++++++++++- .../pageobject/Patient/PatientLogupdate.ts | 57 +++++++++- .../DailyRounds/DefaultLogUpdateCard.tsx | 1 + .../Form/FormFields/RangeFormField.tsx | 2 +- .../LogUpdate/CriticalCareEditor.tsx | 1 + .../LogUpdate/CriticalCarePreview.tsx | 1 + 6 files changed, 161 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/patient_spec/patient_logupdate.cy.ts b/cypress/e2e/patient_spec/patient_logupdate.cy.ts index 13e69e33211..773b0087d80 100644 --- a/cypress/e2e/patient_spec/patient_logupdate.cy.ts +++ b/cypress/e2e/patient_spec/patient_logupdate.cy.ts @@ -27,6 +27,12 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { const patientSpo2 = "15"; const patientRhythmType = "Regular"; const patientRhythm = "Normal Rhythm"; + const patientEtco2 = "50"; + const patientOxygenFlowRate = "40"; + const patientBloodSugar = "52"; + const patientInsulinDosage = "56"; + const patientFluidBalance = "500"; + const patientNetBalance = "1000"; before(() => { loginPage.loginAsDisctrictAdmin(); @@ -39,6 +45,88 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.awaitUrl("/patients"); }); + it("Create a basic critical care log update for a admitted patient and edit it", () => { + patientPage.visitPatient("Dummy Patient 10"); + patientLogupdate.clickLogupdate(); + cy.verifyNotification("Please assign a bed to the patient"); + patientLogupdate.selectBed("Dummy Bed 2"); + cy.closeNotification(); + patientLogupdate.clickLogupdate(); + patientLogupdate.selectPatientCategory(patientCategory); + patientLogupdate.selectRoundType("Detailed Update"); + cy.submitButton("Save and Continue"); + cy.verifyNotification("Detailed Update log created successfully"); + cy.closeNotification(); + // Select two Section - First One is Respiratory Support + patientLogupdate.selectCriticalCareSection("Respiratory Support"); + patientLogupdate.selectNoBilateralAirFlow(); + patientLogupdate.typeEtco2(patientEtco2); + patientLogupdate.selectOxygenSupport(); + patientLogupdate.typeOxygenFlowRate(patientOxygenFlowRate); + patientLogupdate.typeVentilatorSpo2(patientSpo2); + cy.submitButton("Update Details"); + cy.verifyNotification("Respiratory Support details succesfully updated."); + cy.closeNotification(); + // Second Section will be Blood Sugar + patientLogupdate.selectCriticalCareSection("Blood Sugar"); + patientLogupdate.typeBloodSugar(patientBloodSugar); + patientLogupdate.typeInsulinDosage(patientInsulinDosage); + cy.get("#insulin_intake_frequency-option-BD").click(); + cy.submitButton("Update Details"); + cy.verifyNotification("Blood Sugar details succesfully updated."); + // Submit the form and verify the details + cy.submitButton("Complete"); + cy.verifyNotification("Detailed Log Update filed successfully"); + cy.closeNotification(); + cy.contains("button", "Daily Rounds").click(); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); + cy.verifyContentPresence("#respiratory-support", [ + patientEtco2, + patientOxygenFlowRate, + ]); + cy.verifyContentPresence("#blood-sugar", [ + patientBloodSugar, + patientInsulinDosage, + ]); + // Go back and edit the data on a third section + patientLogupdate.clickGoBackConsultation(); + cy.contains("button", "Daily Rounds").click(); + patientLogupdate.clickLogUpdateUpdateLog( + "#dailyround-entry", + patientCategory, + ); + patientLogupdate.selectCriticalCareSection("Dialysis"); + patientLogupdate.typeFluidBalance(patientFluidBalance); + patientLogupdate.typeNetBalance(patientNetBalance); + cy.submitButton("Update Details"); + cy.verifyNotification("Dialysis details succesfully updated."); + cy.closeNotification(); + cy.submitButton("Complete"); + cy.verifyNotification("Detailed Log Update filed successfully"); + cy.closeNotification(); + //Reverify the editted and newly added data + cy.contains("button", "Daily Rounds").click(); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); + cy.verifyContentPresence("#respiratory-support", [ + patientEtco2, + patientOxygenFlowRate, + ]); + cy.verifyContentPresence("#blood-sugar", [ + patientBloodSugar, + patientInsulinDosage, + ]); + cy.verifyContentPresence("#dialysis", [ + patientFluidBalance, + patientNetBalance, + ]); + }); + it("Create a new Progress log update for a admitted patient and edit it", () => { patientPage.visitPatient("Dummy Patient 12"); patientLogupdate.clickLogupdate(); @@ -77,7 +165,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.verifyNotification("Progress Note log created successfully"); cy.closeNotification(); // modify the relevant critical care log update - cy.contains("button", "Neurological Monitoring").click(); + patientLogupdate.selectCriticalCareSection("Neurological Monitoring"); cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click(); cy.get("#left_pupil_light_reaction-option-FIXED").click(); cy.submitButton("Update Details"); @@ -91,7 +179,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.closeNotification(); // Verify the data reflection cy.contains("button", "Daily Rounds").click(); - patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); cy.verifyContentPresence("#consultation-preview", [ patientCategory, patientTemperature, @@ -158,7 +249,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.closeNotification(); // edit the card and verify the data. cy.contains("button", "Daily Rounds").click(); - patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); cy.verifyContentPresence("#consultation-preview", [ patientCategory, patientDiastolic, @@ -179,7 +273,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.submitButton("Continue"); cy.verifyNotification("Brief Update log updated successfully"); cy.contains("button", "Daily Rounds").click(); - patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); cy.verifyContentPresence("#consultation-preview", [ patientModifiedDiastolic, patientModifiedSystolic, diff --git a/cypress/pageobject/Patient/PatientLogupdate.ts b/cypress/pageobject/Patient/PatientLogupdate.ts index ca238fe115c..8a4c11ab25b 100644 --- a/cypress/pageobject/Patient/PatientLogupdate.ts +++ b/cypress/pageobject/Patient/PatientLogupdate.ts @@ -70,13 +70,20 @@ class PatientLogupdate { cy.get("#rhythm_detail").click().type(rhythm); } - clickLogupdateCard(element, patientCategory) { + clickLogUpdateViewDetails(element, patientCategory) { cy.get(element).scrollIntoView(); cy.verifyContentPresence(element, [patientCategory]); cy.get(element).first().contains("View Details").click(); cy.wait(3000); } + clickLogUpdateUpdateLog(element, patientCategory) { + cy.get(element).scrollIntoView(); + cy.verifyContentPresence(element, [patientCategory]); + cy.get(element).first().contains("Update Log").click(); + cy.wait(3000); + } + clickUpdateDetail() { cy.verifyAndClickElement("#consultation-preview", "Update Details"); cy.wait(3000); @@ -90,5 +97,53 @@ class PatientLogupdate { cy.get("#consultation_tab_nav").scrollIntoView(); cy.verifyAndClickElement("#consultation_tab_nav", "Vitals"); } + + selectNoBilateralAirFlow() { + cy.get("#bilateral_air_entry-option-false").click(); + } + + typeEtco2(etco2: string) { + cy.get("#etco2-range-input").type(etco2); + } + + selectOxygenSupport() { + cy.get("#respiratory_support-option-OXYGEN_SUPPORT").click(); + } + + selectNonBreathingModality() { + cy.get("#ventilator_oxygen_modality-option-NON_REBREATHING_MASK").click(); + } + + typeOxygenFlowRate(flowRate: string) { + cy.get("#oxygen_flow_rate-range-input").type(flowRate); + } + + typeVentilatorSpo2(spo2: string) { + cy.get("#ventilator_spo2-range-input").type(spo2); + } + + selectCriticalCareSection(sectionName: string) { + cy.contains("button", sectionName).click(); + } + + typeBloodSugar(bloodSugar: string) { + cy.get("#blood_sugar_level-range-input").type(bloodSugar); + } + + typeInsulinDosage(insulinDosage: string) { + cy.get("#insulin_intake_dose-range-input").type(insulinDosage); + } + + clickGoBackConsultation() { + cy.get("#back-to-consultation").click(); + } + + typeFluidBalance(fluid: string) { + cy.get("#dialysis_fluid_balance-range-input").type(fluid); + } + + typeNetBalance(netBalance: string) { + cy.get("#dialysis_net_balance-range-input").type(netBalance); + } } export default PatientLogupdate; diff --git a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx b/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx index ae18e85e0d8..9096e66b69b 100644 --- a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx @@ -48,6 +48,7 @@ const DefaultLogUpdateCard = ({ round, ...props }: Props) => { {t("view_details")}
{ if (current) { diff --git a/src/Components/LogUpdate/CriticalCarePreview.tsx b/src/Components/LogUpdate/CriticalCarePreview.tsx index 67ad693ff48..61f4f2a3567 100644 --- a/src/Components/LogUpdate/CriticalCarePreview.tsx +++ b/src/Components/LogUpdate/CriticalCarePreview.tsx @@ -46,6 +46,7 @@ export default function CriticalCarePreview(props: Props) {
From 541ca1743d41254dbee91111fc41108a086cb8ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:27:29 +0530 Subject: [PATCH 10/13] Bump @fontsource/inter from 5.0.18 to 5.0.21 (#8508) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4615e263405..d67bca71a47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.5.4", "license": "MIT", "dependencies": { - "@fontsource/inter": "^5.0.18", + "@fontsource/inter": "^5.0.21", "@googlemaps/react-wrapper": "^1.1.35", "@googlemaps/typescript-guards": "^2.0.3", "@headlessui/react": "^2.1.2", @@ -2550,9 +2550,9 @@ "license": "MIT" }, "node_modules/@fontsource/inter": { - "version": "5.0.18", - "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.0.18.tgz", - "integrity": "sha512-YCsoYPTcs713sI7tLtxaPrIhXAXvEetGg5Ry02ivA8qUOb3fQHojbK/X9HLD5OOKvFUNR2Ynkwb1kR1hVKQHpw==" + "version": "5.0.21", + "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.0.21.tgz", + "integrity": "sha512-Y4Ph0bYD5IfW8r9PSeiNjLvM6D/Bh5+YT9jOKiBqW3YS+AEBlmy8v74TpTNeZAvL3zHmikHCnzaKw7ob8LZiKQ==" }, "node_modules/@googlemaps/js-api-loader": { "version": "1.16.6", diff --git a/package.json b/package.json index 95cea780b72..6374c444222 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "supported-browsers": "echo \"export default $(browserslist-useragent-regexp --allowHigherVersions --ignorePatch --ignoreMinor);\" | sed 's/\\x1b\\[[0-9;]*m//g' > src/supportedBrowsers.ts" }, "dependencies": { - "@fontsource/inter": "^5.0.18", + "@fontsource/inter": "^5.0.21", "@googlemaps/react-wrapper": "^1.1.35", "@googlemaps/typescript-guards": "^2.0.3", "@headlessui/react": "^2.1.2", From 382a55a2019a488314199014bcd0b7f441fe2bd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:47:18 +0530 Subject: [PATCH 11/13] Bump @sentry/browser from 8.12.0 to 8.29.0 (#8509) --- package-lock.json | 194 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 98 insertions(+), 98 deletions(-) diff --git a/package-lock.json b/package-lock.json index d67bca71a47..4cc50cbe999 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@headlessui/react": "^2.1.2", "@pnotify/core": "^5.2.0", "@pnotify/mobile": "^5.2.0", - "@sentry/browser": "^8.12.0", + "@sentry/browser": "^8.29.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", "axios": "^1.6.8", "bowser": "^2.11.0", @@ -3765,178 +3765,178 @@ ] }, "node_modules/@sentry-internal/browser-utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.12.0.tgz", - "integrity": "sha512-h7HRqED15Qa+DRt8iZGna24Z331nglgjPzdFn4+u+jvnZrehUjH0vjsfuj7qhwSUNZu8Rxi1ZlUYFURjLDTKCA==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.29.0.tgz", + "integrity": "sha512-6HpyQkaqPvK6Lnigjlarq/LDYgXT2OBNf24RK7z0ipJSxSIpmtelfzHbnwWYnypNDXfTDdPm97fZEenQHryYJA==", "dependencies": { - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/browser-utils/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/browser-utils/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/browser-utils/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.12.0.tgz", - "integrity": "sha512-PvQ14wVOPmzRdYdmXD791CqERZZC4jZa5hnyBKBuF6ZpifIQ4Uk7spPu6ZO+Ympx3GtRlpYjk4dbjHyNSfYTwA==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.29.0.tgz", + "integrity": "sha512-yAL5YMEFk4XaeVRUGEguydahRzaQrNPAaWRv6k+XRzCv9CGBhxb14KXQc9X/penlauMFcDfgelCPKcTqcf6wDw==", "dependencies": { - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.12.0.tgz", - "integrity": "sha512-TJceMtzRnY3SCvt3nFDu9rlT00Le7SaV2RL3D7SyDuijvJbWvIw3DRk7yutpF8c9YKO9j6FMa4NlkCJ+YAnnKQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.29.0.tgz", + "integrity": "sha512-Xgv/eYucsm7GaGKms2ClQ02NpD07MxjoTjp1/vYZm0H4Q08dVphVZrQp7hL1oX/VD9mb5SFyyKuuIRqIu7S8RA==", "dependencies": { - "@sentry-internal/browser-utils": "8.12.0", - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry-internal/browser-utils": "8.29.0", + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.12.0.tgz", - "integrity": "sha512-0slfHZ3TD3MKeBu5NEGuKuecxStX23gts5L3mGFJd/zwsd04A31fhVmo6agIkxnZbOU4GPX/7HPWIeevkvy3ig==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.29.0.tgz", + "integrity": "sha512-W2YbZRvp2lYC50V51fNLcnoIiK1Km4vSc+v6SL7c//lv2qpyumoUAAIDKY+14s8Lgt1RsR6rfZhfheD4O/6WSQ==", "dependencies": { - "@sentry-internal/replay": "8.12.0", - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry-internal/replay": "8.29.0", + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" @@ -3957,48 +3957,48 @@ } }, "node_modules/@sentry/browser": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.12.0.tgz", - "integrity": "sha512-H82dmr7KQWoS2DQc5dJko5wNepltcEro1EM4mBeL2YmVbNRtoZzD3HQTpbxJJuFsTvEMZevvez5HFlpUgxmIwQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.29.0.tgz", + "integrity": "sha512-aKTy4H/3RI0q9LIeepesjWGlGNeh4HGFfwQjzHME8gcWCQ5LSlzYX4U+hu2yp7r1Jfd9MUTFfOuuLih2HGLGsQ==", "dependencies": { - "@sentry-internal/browser-utils": "8.12.0", - "@sentry-internal/feedback": "8.12.0", - "@sentry-internal/replay": "8.12.0", - "@sentry-internal/replay-canvas": "8.12.0", - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry-internal/browser-utils": "8.29.0", + "@sentry-internal/feedback": "8.29.0", + "@sentry-internal/replay": "8.29.0", + "@sentry-internal/replay-canvas": "8.29.0", + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/browser/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/browser/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry/browser/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" diff --git a/package.json b/package.json index 6374c444222..d00207b47c8 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@headlessui/react": "^2.1.2", "@pnotify/core": "^5.2.0", "@pnotify/mobile": "^5.2.0", - "@sentry/browser": "^8.12.0", + "@sentry/browser": "^8.29.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", "axios": "^1.6.8", "bowser": "^2.11.0", From fc822b5acfa71ded7e8c1d71fe93e1968825655d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:47:48 +0530 Subject: [PATCH 12/13] Bump axios from 1.6.8 to 1.7.7 (#8454) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4cc50cbe999..dec462f006f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@pnotify/mobile": "^5.2.0", "@sentry/browser": "^8.29.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", - "axios": "^1.6.8", + "axios": "^1.7.7", "bowser": "^2.11.0", "browser-image-compression": "^2.0.2", "browserslist-useragent-regexp": "^4.1.3", @@ -5798,9 +5798,9 @@ "dev": true }, "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", diff --git a/package.json b/package.json index d00207b47c8..8dcd4e13954 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@pnotify/mobile": "^5.2.0", "@sentry/browser": "^8.29.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", - "axios": "^1.6.8", + "axios": "^1.7.7", "bowser": "^2.11.0", "browser-image-compression": "^2.0.2", "browserslist-useragent-regexp": "^4.1.3", From d1bc4c89803e58f3f6ab0683ce4aa0571d36ff0a Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Tue, 10 Sep 2024 19:43:55 +0300 Subject: [PATCH 13/13] Fixed Cypress Flaky test in user advance filter (#8519) --- cypress/e2e/users_spec/user_homepage.cy.ts | 58 ++++++++++++---------- cypress/pageobject/Users/UserSearch.ts | 10 ---- 2 files changed, 32 insertions(+), 36 deletions(-) diff --git a/cypress/e2e/users_spec/user_homepage.cy.ts b/cypress/e2e/users_spec/user_homepage.cy.ts index b1ecd567d86..0cf25cacfc8 100644 --- a/cypress/e2e/users_spec/user_homepage.cy.ts +++ b/cypress/e2e/users_spec/user_homepage.cy.ts @@ -3,11 +3,18 @@ import { UserPage } from "../../pageobject/Users/UserSearch"; describe("User Homepage", () => { const userPage = new UserPage(); - const usernameToTest = "devdoctor"; - const currentuser = "devdistrictadmin"; const loginPage = new LoginPage(); - const phone_number = "9876543219"; - const alt_phone_number = "9876543219"; + const currentuser = "devdistrictadmin"; + const firstName = "Dummy"; + const lastName = "Nurse"; + const role = "Nurse"; + const state = "Kerala"; + const district = "Ernakulam"; + const phoneNumber = "8878825662"; + const altPhoneNumber = "8878825662"; + const homeFacility = "Dummy Facility 40"; + const nurseUserName = "dummynurse1"; + const doctorUserName = "devdoctor"; before(() => { loginPage.loginAsDisctrictAdmin(); @@ -22,33 +29,32 @@ describe("User Homepage", () => { it("User advance filter functionality", () => { userPage.clickAdvancedFilters(); - userPage.typeInFirstName("Dev"); - userPage.typeInLastName("Doctor"); - userPage.selectRole("Doctor"); - userPage.selectState("Kerala"); - userPage.selectDistrict("Ernakulam"); - userPage.typeInPhoneNumber(phone_number); - userPage.typeInAltPhoneNumber(alt_phone_number); - userPage.selectHomeFacility("Dummy Facility 40"); + userPage.typeInFirstName(firstName); + userPage.typeInLastName(lastName); + userPage.selectRole(role); + userPage.selectState(state); + userPage.selectDistrict(district); + userPage.typeInPhoneNumber(phoneNumber); + userPage.typeInAltPhoneNumber(altPhoneNumber); + userPage.selectHomeFacility(homeFacility); userPage.applyFilter(); - userPage.verifyUrlafteradvancefilter(); - userPage.checkUsernameText(usernameToTest); - userPage.verifyDataTestIdText("First Name", "First Name: Dev"); - userPage.verifyDataTestIdText("Last Name", "Last Name: Doctor"); + userPage.checkUsernameText(nurseUserName); + // Verify the badges related to the data + userPage.verifyDataTestIdText("First Name", `First Name: ${firstName}`); + userPage.verifyDataTestIdText("Last Name", `Last Name: ${lastName}`); userPage.verifyDataTestIdText( "Phone Number", - "Phone Number: +919876543219", + `Phone Number: +91${phoneNumber}`, ); userPage.verifyDataTestIdText( "WhatsApp no.", - "WhatsApp no.: +919876543219", + `WhatsApp no.: +91${altPhoneNumber}`, ); - userPage.verifyDataTestIdText("Role", "Role: Doctor"); + userPage.verifyDataTestIdText("Role", `Role: ${role}`); userPage.verifyDataTestIdText( "Home Facility", - "Home Facility: Dummy Facility 40", + `Home Facility: ${homeFacility}`, ); - userPage.verifyDataTestIdText("District", "District: Ernakulam"); userPage.clearFilters(); userPage.verifyDataTestIdNotVisible("First Name"); userPage.verifyDataTestIdNotVisible("Last Name"); @@ -61,14 +67,14 @@ describe("User Homepage", () => { it("Search by username", () => { userPage.checkSearchInputVisibility(); - userPage.typeInSearchInput(usernameToTest); - userPage.checkUrlForUsername(usernameToTest); - userPage.checkUsernameText(usernameToTest); + userPage.typeInSearchInput(doctorUserName); + userPage.checkUrlForUsername(doctorUserName); + userPage.checkUsernameText(doctorUserName); userPage.checkUsernameBadgeVisibility(true); userPage.clearSearchInput(); userPage.checkUsernameBadgeVisibility(false); - userPage.typeInSearchInput(usernameToTest); - userPage.checkUsernameText(usernameToTest); + userPage.typeInSearchInput(doctorUserName); + userPage.checkUsernameText(doctorUserName); userPage.clickRemoveIcon(); userPage.checkUsernameBadgeVisibility(false); userPage.checkUsernameText(currentuser); diff --git a/cypress/pageobject/Users/UserSearch.ts b/cypress/pageobject/Users/UserSearch.ts index 56d1a81395d..0c214e92706 100644 --- a/cypress/pageobject/Users/UserSearch.ts +++ b/cypress/pageobject/Users/UserSearch.ts @@ -22,16 +22,6 @@ export class UserPage { cy.url().should("include", `username=${username}`); } - verifyUrlafteradvancefilter() { - cy.url() - .should("include", "first_name=Dev") - .and("include", "last_name=Doctor") - .and("include", "phone_number=%2B919876543219") - .and("include", "alt_phone_number=%2B919876543219") - .and("include", "user_type=Doctor") - .and("include", "district=7"); - } - checkUsernameText(username: string) { cy.get(this.usernameText).should("have.text", username); }