From 9325e7171cc2f066a33138cc6e9b4541fd2c4b09 Mon Sep 17 00:00:00 2001 From: Amos Machora Date: Tue, 23 Jul 2024 10:53:37 +0300 Subject: [PATCH] refactor: changes from code review --- .../bill-line-items.component.tsx | 2 +- .../bill-manager/modals/cancel-bill.modal.tsx | 6 +++-- .../bill-manager/modals/cancel-bill.scss | 26 +++---------------- .../bill-manager/patient-bills.component.tsx | 16 +++++------- .../workspaces/waive-bill-form.scss | 6 ++--- .../workspaces/waive-bill-form.workspace.tsx | 2 +- packages/esm-billing-app/src/index.ts | 1 - packages/esm-billing-app/translations/en.json | 3 +-- 8 files changed, 20 insertions(+), 42 deletions(-) diff --git a/packages/esm-billing-app/src/billable-services/bill-manager/bill-line-items.component.tsx b/packages/esm-billing-app/src/billable-services/bill-manager/bill-line-items.component.tsx index 002a42280..2d6eaa858 100644 --- a/packages/esm-billing-app/src/billable-services/bill-manager/bill-line-items.component.tsx +++ b/packages/esm-billing-app/src/billable-services/bill-manager/bill-line-items.component.tsx @@ -21,7 +21,7 @@ const BillLineItems: React.FC<{ bill: MappedBill }> = ({ bill }) => { const handleOpenEditLineItemWorkspace = (lineItem: LineItem) => { launchWorkspace('edit-bill-form', { - workspaceTitle: t('editBillForm' , 'Edit Bill Form'), + workspaceTitle: t('editBillForm', 'Edit Bill Form'), lineItem, }); }; diff --git a/packages/esm-billing-app/src/billable-services/bill-manager/modals/cancel-bill.modal.tsx b/packages/esm-billing-app/src/billable-services/bill-manager/modals/cancel-bill.modal.tsx index 7565b2598..94bf68aa2 100644 --- a/packages/esm-billing-app/src/billable-services/bill-manager/modals/cancel-bill.modal.tsx +++ b/packages/esm-billing-app/src/billable-services/bill-manager/modals/cancel-bill.modal.tsx @@ -1,17 +1,19 @@ import React from 'react'; import { ModalHeader, ModalBody, ModalFooter, Button } from '@carbon/react'; import styles from './cancel-bill.scss'; +import { useTranslation } from 'react-i18next'; export const CancelBillModal: React.FC<{ onClose: () => void; }> = ({ onClose }) => { + const { t } = useTranslation(); return ( - Cancel bill + {t('cancelBill', 'Cancel Bill')} - Are you sure you want to cancel this bill? Proceed cautiously. + {t('cancelBillDescription', 'Are you sure you want to cancel this bill? Proceed cautiously.')}