+
+ {dictionary.billings.summary}
+
+
+
+ {`${dictionary.billings.utility_service} ${fromDate} - ${toDate}`}
+
+ {billDetails?.billCharges && (
+ <>
+
+
+ >
+ )}
+
+
+
+
+
{billDetails?.subTotal}
+
+
+
+ {billDetails?.billTaxes &&
}
+
+
+
+
+
+
{billDetails?.dueAmount}
+
+
+
+ );
+};
+
+export default BillingSummary;
diff --git a/webapp/app/components/dashboard/currentBill.tsx b/webapp/app/components/dashboard/currentBill.tsx
index 65b307f..6d81304 100644
--- a/webapp/app/components/dashboard/currentBill.tsx
+++ b/webapp/app/components/dashboard/currentBill.tsx
@@ -1,27 +1,22 @@
import { Button } from "@/components/ui/button";
-import { DictionaryType } from "@/types";
-
-class BillDetails {
- customerId:number =1;
- fromDate: string = "03/01/2025";
- toDate: string = "03/31/2025";
- dueDate: string = "03/30/2025";
- dueAmount: string = "$50";
-}
+import { BillDetails, DictionaryType } from "@/types";
const CurrentBill = ({
dictionary,
- billDetails = new BillDetails(),
+ billDetails,
+ setShowBillDetails,
}: {
dictionary: DictionaryType;
- billDetails?: BillDetails;
+ billDetails: BillDetails;
+ setShowBillDetails?: (showBillDetails: boolean) => void;
}) => {
const { fromDate, toDate, dueDate, dueAmount } = billDetails;
return (
-
+
{dictionary.billings.current_bill}
+
{`${dictionary.billings.utility_service} ${fromDate} - ${toDate}`}
@@ -42,7 +37,7 @@ const CurrentBill = ({