From 4f7ad519cf59277539e7f68ae5ee1ecd17fb3456 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Mon, 17 Nov 2025 13:11:22 +0530 Subject: [PATCH] Change label in Advance Payment in Total balance to currenct balance and hide project selection dropdown in PR and Advance. --- src/components/Layout/Header.jsx | 12 ++++++------ src/pages/AdvancePayment/AdvancePaymentPage.jsx | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Layout/Header.jsx b/src/components/Layout/Header.jsx index 3c4b5f86..0437539e 100644 --- a/src/components/Layout/Header.jsx +++ b/src/components/Layout/Header.jsx @@ -46,8 +46,12 @@ const Header = () => { pathname ); const isExpensePage = /^\/expenses$/.test(pathname); + const isPaymentRequest = /^\/payment-request$/.test(pathname); + const isRecurringExpense = /^\/recurring-payment$/.test(pathname); + const isAdvancePayment = /^\/advance-payment$/.test(pathname); + const isServiceProjectPage = /^\/service-projects\/[0-9a-fA-F-]{36}$/.test(pathname); - return !(isDirectoryPath || isProfilePage || isExpensePage); + return !(isDirectoryPath || isProfilePage || isExpensePage || isPaymentRequest || isRecurringExpense || isAdvancePayment ||isServiceProjectPage); }; const allowedProjectStatusIds = [ "603e994b-a27f-4e5d-a251-f3d69b0498ba", @@ -59,11 +63,7 @@ const Header = () => { if (!Array.isArray(roles)) return "User"; let role = roles.find((role) => role.id === joRoleId); return role ? role.name : "User"; - }; - - - - + }; const handleProfilePage = () => { navigate(`/employee/${profile?.employeeInfo?.id}`); diff --git a/src/pages/AdvancePayment/AdvancePaymentPage.jsx b/src/pages/AdvancePayment/AdvancePaymentPage.jsx index 03296604..e81c69a5 100644 --- a/src/pages/AdvancePayment/AdvancePaymentPage.jsx +++ b/src/pages/AdvancePayment/AdvancePaymentPage.jsx @@ -67,7 +67,7 @@ const AdvancePaymentPage = () => {
{balance ? ( <> - + 0 ? "text-success" : "text-danger"