From 7742c017b30ac0771dde8ffcaed33eb0880e3de6 Mon Sep 17 00:00:00 2001 From: Ashraf Mohammed <98876115+AshrafMd-1@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:22:19 +0530 Subject: [PATCH 1/6] fix loading (#7643) --- src/Components/Patient/SampleDetails.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Patient/SampleDetails.tsx b/src/Components/Patient/SampleDetails.tsx index f66805a3ded..a3d3df95c21 100644 --- a/src/Components/Patient/SampleDetails.tsx +++ b/src/Components/Patient/SampleDetails.tsx @@ -265,7 +265,7 @@ export const SampleDetails = ({ id }: DetailRoute) => { ); }; - if (isLoading) { + if (isLoading || !sampleDetails) { return ; } From c331b845a57b64b1466ea327ae712e625300e20f Mon Sep 17 00:00:00 2001 From: Pranshu Aggarwal <70687348+Pranshu1902@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:33:39 +0530 Subject: [PATCH 2/6] Add option to mark notification as unread (#7553) * add option to mark notification as unread * Update src/Locale/en/Notifications.json Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> * fix lint errrors * fix lint with updated prettier --------- Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> --- .../Notifications/NotificationsList.tsx | 33 +++++++++++++++---- src/Locale/en/Notifications.json | 1 + src/Redux/api.tsx | 5 +++ 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/Components/Notifications/NotificationsList.tsx b/src/Components/Notifications/NotificationsList.tsx index 02cb1f4fa8b..c9e6720e6ad 100644 --- a/src/Components/Notifications/NotificationsList.tsx +++ b/src/Components/Notifications/NotificationsList.tsx @@ -46,6 +46,16 @@ const NotificationTile = ({ setIsMarkingAsRead(false); }; + const handleMarkAsUnRead = async () => { + setIsMarkingAsRead(true); + await request(routes.markNotificationAsUnRead, { + pathParams: { id: result.id }, + body: { read_at: null }, + }); + setResult({ ...result, read_at: null }); + setIsMarkingAsRead(false); + }; + const resultUrl = (event: string, data: any) => { switch (event) { case "PATIENT_CREATED": @@ -107,24 +117,33 @@ const NotificationTile = ({
{ event.stopPropagation(); - handleMarkAsRead(); + if (result.read_at) { + handleMarkAsUnRead(); + } else { + handleMarkAsRead(); + } }} > - {t("mark_as_read")} + + {result.read_at ? t("mark_as_unread") : t("mark_as_read")} + (), }, + markNotificationAsUnRead: { + path: "/api/v1/notification/{id}/", + method: "PATCH", + TRes: Type(), + }, getPublicKey: { path: "/api/v1/notification/public_key/", method: "GET", From 48db450d15e66789d0e8a33f02d3e4c0c359bc93 Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Thu, 18 Apr 2024 16:22:26 +0530 Subject: [PATCH 3/6] added support for various abha qr in scan and pull (#7565) --- src/Components/ABDM/LinkABHANumberModal.tsx | 4 ++-- src/Components/ABDM/models.ts | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Components/ABDM/LinkABHANumberModal.tsx b/src/Components/ABDM/LinkABHANumberModal.tsx index fe789e6c909..d7dfc9f60c1 100644 --- a/src/Components/ABDM/LinkABHANumberModal.tsx +++ b/src/Components/ABDM/LinkABHANumberModal.tsx @@ -194,12 +194,12 @@ const ScanABHAQRSection = ({ body: { patientId, hidn: abha?.hidn, - phr: abha?.hid, + phr: (abha?.phr ?? abha?.hid) as string, name: abha?.name, gender: abha?.gender, dob: abha?.dob.replace(/\//g, "-"), address: abha?.address, - "dist name": abha?.district_name, + "dist name": abha?.["dist name"] ?? abha?.district_name, "state name": abha?.["state name"], }, }); diff --git a/src/Components/ABDM/models.ts b/src/Components/ABDM/models.ts index 957dc9c2d17..9dc362f5cac 100644 --- a/src/Components/ABDM/models.ts +++ b/src/Components/ABDM/models.ts @@ -123,10 +123,12 @@ export interface ILinkViaQRBody { export interface ABHAQRContent { address: string; distlgd: string; - district_name: string; + district_name?: string; dob: string; - gender: "M"; - hid: string; + gender: "M" | "F" | "O"; + hid?: string; + phr?: string; + "dist name"?: string; hidn: string; mobile: string; name: string; From 78bdc551587c095dabed92b07a115c07f7f41331 Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:57:13 +0530 Subject: [PATCH 4/6] flaky test (#7657) --- cypress/e2e/assets_spec/assets_creation.cy.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cypress/e2e/assets_spec/assets_creation.cy.ts b/cypress/e2e/assets_spec/assets_creation.cy.ts index f8edc2bb172..cd3489a14d8 100644 --- a/cypress/e2e/assets_spec/assets_creation.cy.ts +++ b/cypress/e2e/assets_spec/assets_creation.cy.ts @@ -160,12 +160,10 @@ describe("Asset", () => { assetPage.interceptAssetCreation(); assetPage.clickCreateAsset(); assetPage.verifyAssetCreation(); - assetSearchPage.typeSearchKeyword("New Test Asset Vital"); assetSearchPage.pressEnter(); - assetPage.openCreatedAsset(); - assetPage.configureVitalAsset("Host name", "192.168.1.64"); + assetPage.configureVitalAsset("Host name", "192.168.1.20"); assetPage.clickConfigureVital(); }); From e84087a71225a70ad61b5560d8b27f898a6d648e Mon Sep 17 00:00:00 2001 From: Ashesh <3626859+Ashesh3@users.noreply.github.com> Date: Sat, 20 Apr 2024 18:05:41 +0530 Subject: [PATCH 5/6] Fix round type display and qr field (#7666) --- .../DailyRounds/LogUpdateCardAttribute.tsx | 12 ++++++++++++ src/Components/Form/FormFields/TextFormField.tsx | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx index 3afed28dda8..d3e4b03be0a 100644 --- a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx @@ -62,6 +62,18 @@ const LogUpdateCardAttribute = ({
); + case "rounds_type": + return ( +
+ + + {(attributeValue as string) === "VENTILATOR" + ? "Critical Care" + : (attributeValue as string)} + +
+ ); + default: return (
diff --git a/src/Components/Form/FormFields/TextFormField.tsx b/src/Components/Form/FormFields/TextFormField.tsx index b2a84e51595..8f1ee341e34 100644 --- a/src/Components/Form/FormFields/TextFormField.tsx +++ b/src/Components/Form/FormFields/TextFormField.tsx @@ -100,7 +100,7 @@ const TextFormField = forwardRef((props: TextFormFieldProps, ref) => { ); const _trailing = trailing === trailingFocused ? ( -
+
{trailing}
) : ( From 768a5b39b19156e59414175e03e7ff6a247c5970 Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Sat, 20 Apr 2024 18:47:18 +0530 Subject: [PATCH 6/6] minor case issue (#7668) --- .../Consultations/DailyRounds/LogUpdateCardAttribute.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx index d3e4b03be0a..4e5b7408266 100644 --- a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx @@ -68,7 +68,7 @@ const LogUpdateCardAttribute = ({ {(attributeValue as string) === "VENTILATOR" - ? "Critical Care" + ? "CRITICAL CARE" : (attributeValue as string)}