diff --git a/src/Components/Facility/AddInventoryForm.tsx b/src/Components/Facility/AddInventoryForm.tsx index df217cad3ec..9e4f761b550 100644 --- a/src/Components/Facility/AddInventoryForm.tsx +++ b/src/Components/Facility/AddInventoryForm.tsx @@ -146,7 +146,7 @@ export const AddInventoryForm = (props: any) => { if (unitName === "Dozen") { return Number(unitData.quantity) * 12; } - if (unitName === "Gram") { + if (unitName === "gram") { return Number(unitData.quantity) / 1000; } return Number(unitData.quantity); @@ -238,6 +238,11 @@ export const AddInventoryForm = (props: any) => { }; // if user has selected "Add stock" or "stockValidation" function is true if (data.is_incoming || stockValidation(data)) { + // if user has selected grams as unit then convert it to kg + if (data.unit === 5) { + data.quantity = data.quantity / 1000; + data.unit = 6; + } const res = await dispatchAction(postInventory(data, { facilityId })); setIsLoading(false); diff --git a/src/Components/Patient/PatientInfoCard.tsx b/src/Components/Patient/PatientInfoCard.tsx index e49607629fa..78e299fe218 100644 --- a/src/Components/Patient/PatientInfoCard.tsx +++ b/src/Components/Patient/PatientInfoCard.tsx @@ -348,7 +348,11 @@ export default function PatientInfoCard(props: {
{!consultation?.discharge_reason ? ( - UNKNOWN + + {consultation.suggestion === "OP" + ? "OP file closed" + : "UNKNOWN"} + ) : consultation?.discharge_reason === "EXP" ? ( EXPIRED ) : ( diff --git a/src/Components/Shifting/ListFilter.tsx b/src/Components/Shifting/ListFilter.tsx index c5b3555e8c4..ef366d5b038 100644 --- a/src/Components/Shifting/ListFilter.tsx +++ b/src/Components/Shifting/ListFilter.tsx @@ -410,7 +410,6 @@ export default function ListFilter(props: any) { name="patient_phone_number" value={filterState.patient_phone_number} onChange={handleFormFieldChange} - errorClassName="hidden" types={["mobile", "landline"]} />
- - - - +
+ +
+
+ +
); }