From 9e18dda02f434b410a2dbe0fa5887d4a3b4ec4a7 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Mon, 10 Nov 2025 17:08:23 +0530 Subject: [PATCH] Adding End Date at the view Recurring Expense. --- .../RecurringExpense/ViewRecurringExpense.jsx | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/components/RecurringExpense/ViewRecurringExpense.jsx b/src/components/RecurringExpense/ViewRecurringExpense.jsx index 34d5650e..5c9d2baa 100644 --- a/src/components/RecurringExpense/ViewRecurringExpense.jsx +++ b/src/components/RecurringExpense/ViewRecurringExpense.jsx @@ -31,9 +31,8 @@ const ViewRecurringExpense = ({ RecurringId }) => {
{data?.recurringPaymentUID} {data?.status?.name || "N/A"} @@ -68,8 +67,8 @@ const ViewRecurringExpense = ({ RecurringId }) => {
{data?.amount != null ? `${data?.currency?.symbol ?? "¥"} ${Number( - data.amount - ).toFixed(2)} ${data?.currency?.currencyCode ?? "CN"}` + data.amount + ).toFixed(2)} ${data?.currency?.currencyCode ?? "CN"}` : "N/A"}
@@ -147,11 +146,11 @@ const ViewRecurringExpense = ({ RecurringId }) => {
{data?.notifyTo?.length > 0 ? data.notifyTo?.map((user, index) => ( - - {user.email} - {index < data?.notifyTo?.length - 1 && ", "} - - )) + + {user.email} + {index < data?.notifyTo?.length - 1 && ", "} + + )) : "N/A"}
@@ -234,10 +233,12 @@ const ViewRecurringExpense = ({ RecurringId }) => { className="form-label me-2 mb-0 fw-semibold text-start" style={{ minWidth: "130px" }} > - Number of Iteration : + End Date : -
- {data?.numberOfIteration || "N/A"} +
+ {data?.endDate + ? formatUTCToLocalTime(data.endDate, true) + : "N/A"}
@@ -259,9 +260,8 @@ const ViewRecurringExpense = ({ RecurringId }) => { lastName={data?.createdBy?.lastName} /> - {`${data?.createdBy?.firstName ?? ""} ${ - data?.createdBy?.lastName ?? "" - }`.trim() || "N/A"} + {`${data?.createdBy?.firstName ?? ""} ${data?.createdBy?.lastName ?? "" + }`.trim() || "N/A"} @@ -283,9 +283,8 @@ const ViewRecurringExpense = ({ RecurringId }) => { lastName={data.updatedBy.lastName} /> - {`${data.updatedBy.firstName ?? ""} ${ - data.updatedBy.lastName ?? "" - }`.trim() || "N/A"} + {`${data.updatedBy.firstName ?? ""} ${data.updatedBy.lastName ?? "" + }`.trim() || "N/A"}