Change label in Advance Payment in Total balance to currenct balance and hide project selection dropdown in PR and Advance.

This commit is contained in:
Kartik Sharma 2025-11-17 13:11:22 +05:30
parent c311324bad
commit 4f7ad519cf
2 changed files with 7 additions and 7 deletions

View File

@ -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}`);

View File

@ -67,7 +67,7 @@ const AdvancePaymentPage = () => {
<div className="col-md-8 d-flex align-items-center justify-content-end">
{balance ? (
<>
<label className="fs-5 fw-semibold">Total Balance : </label>
<label className="fs-5 fw-semibold">Current Balance : </label>
<span
className={`${
balance > 0 ? "text-success" : "text-danger"