+
diff --git a/src/components/PaymentRequest/PaymentRequestList.jsx b/src/components/PaymentRequest/PaymentRequestList.jsx
index 8df4c3d9..241662be 100644
--- a/src/components/PaymentRequest/PaymentRequestList.jsx
+++ b/src/components/PaymentRequest/PaymentRequestList.jsx
@@ -253,7 +253,7 @@ const PaymentRequestList = ({ filters, groupBy = "submittedBy", search }) => {
{" "}
-
+
{displayField} :{" "}
{" "}
diff --git a/src/components/PaymentRequest/ViewPaymentRequest.jsx b/src/components/PaymentRequest/ViewPaymentRequest.jsx
index 8c65c219..612af4af 100644
--- a/src/components/PaymentRequest/ViewPaymentRequest.jsx
+++ b/src/components/PaymentRequest/ViewPaymentRequest.jsx
@@ -411,7 +411,7 @@ const ViewPaymentRequest = ({ requestId }) => {
- {
};
const collectionColumns = [
- {
- key: "invoiceDate",
- label: "Invoice Date",
- getValue: (col) => (
-
- {formatUTCToLocalTime(col.invoiceDate)}
-
- ),
- align: "text-start",
- },
{
key: "invoiceId",
label: "Invoice No",
@@ -88,18 +75,33 @@ const CollectionList = ({ fromDate, toDate, isPending, searchString }) => {
align: "text-start",
},
{
- key: "submittedDate",
- label: "Submission Date",
+ key: "invoiceDate",
+ label: "Invoice Date",
getValue: (col) => (
- {formatUTCToLocalTime(col.createdAt)}
+ {formatUTCToLocalTime(col.invoiceDate)}
),
- align: "text-center",
+ align: "text-start",
},
+
+
+ // {
+ // key: "submittedDate",
+ // label: "Submission Date",
+ // getValue: (col) => (
+ //
+ // {formatUTCToLocalTime(col.createdAt)}
+ //
+ // ),
+ // align: "text-center",
+ // },
{
key: "expectedSubmittedDate",
label: "Expected Payment Date",
@@ -145,6 +147,19 @@ const CollectionList = ({ fromDate, toDate, isPending, searchString }) => {
),
align: "text-end",
},
+ {
+ key: "status",
+ label: "Status",
+ getValue: (col) => (
+
+ {col.markAsCompleted ? "Active" : "In-active"}
+
+ ),
+ align: "text-center",
+ },
];
if (isLoading) return ;
@@ -186,84 +201,84 @@ const CollectionList = ({ fromDate, toDate, isPending, searchString }) => {
canViewCollection ||
canEditCollection ||
canCreate) && (
-
-
+ |
+ )}
))
) : (
diff --git a/src/components/collections/ManageCollection.jsx b/src/components/collections/ManageCollection.jsx
index 68667d61..71d33517 100644
--- a/src/components/collections/ManageCollection.jsx
+++ b/src/components/collections/ManageCollection.jsx
@@ -227,7 +227,7 @@ const ManageCollection = ({ collectionId, onClose }) => {
- {
- {
- {
return (
Collection Details
-
+
+
+
+ {/* Row 0: Balance Amount + Expected Payment Date */}
+
+ {/* Balance Amount */}
+
+ Balance Amount :
+
+ {formatFigure(data?.balanceAmount, {
+ type: "currency",
+ currency: "INR",
+ })}
+
+
+
+ {/* Expected Payment Date */}
+
+ Expected Payment Date :
+
+ {formatUTCToLocalTime(data?.exceptedPaymentDate)}
+
+
+
+
+
+ {/* Project and Status */}
{data?.project?.name}
- {" "}
- {data?.isActive ? "Active" : "Inactive"}
+ {data?.markAsCompleted ? "Active" : "Inactive"}
{(isAdmin || canEditCollection) &&
- !data?.receivedInvoicePayments && (
+ !data?.receivedInvoicePayments &&
+ !data?.markAsCompleted && (
)}
+
+ {/* Title */}
-
+
+ {/* Invoice Number */}
Invoice Number:
{data?.invoiceNumber}
- {/* Row 2: E-Invoice Number + Project */}
+
+ {/* E-Invoice Number */}
E-Invoice Number:
@@ -77,15 +106,15 @@ const ViewCollection = ({ onClose }) => {
- {/* Row 3: Invoice Date + Client Submitted Date */}
+ {/* Invoice Date */}
Invoice Date:
-
- {formatUTCToLocalTime(data?.invoiceDate)}
-
+ {formatUTCToLocalTime(data?.invoiceDate)}
+
+ {/* Client Submitted Date */}
Client Submission Date:
@@ -94,17 +123,8 @@ const ViewCollection = ({ onClose }) => {
- {/* Row 4: Expected Payment Date + Mark as Completed */}
-
-
- Expected Payment Date:
-
- {formatUTCToLocalTime(data?.exceptedPaymentDate)}
-
-
-
- {/* Row 5: Basic Amount + Tax Amount */}
+ {/* Basic Amount */}
Basic Amount :
@@ -116,6 +136,8 @@ const ViewCollection = ({ onClose }) => {
+
+ {/* Tax Amount */}
Tax Amount :
@@ -127,25 +149,16 @@ const ViewCollection = ({ onClose }) => {
- {/* Row 6: Balance Amount + Created At */}
-
-
- Balance Amount :
-
- {formatFigure(data?.balanceAmount, {
- type: "currency",
- currency: "INR",
- })}
-
-
-
+
+ {/* Created At */}
Created At :
{formatUTCToLocalTime(data?.createdAt)}
- {/* Row 7: Created By */}
+
+ {/* Created By */}
Created By :
@@ -161,23 +174,23 @@ const ViewCollection = ({ onClose }) => {
+
{/* Description */}
- Description :
+ Description :
{data?.description}
+ {/* Attachments */}
-
-
+
{data?.attachments?.map((doc) => {
const isImage = doc.contentType?.includes("image");
-
return (
{
-
- {/* Tabs Navigation */}
+ {/* Tabs Section */}
+
-
-
- {/* Tab Content */}
{activeTab === "payments" && (
@@ -252,6 +260,7 @@ const ViewCollection = ({ onClose }) => {
+
);
};
diff --git a/src/components/common/DateRangePicker.jsx b/src/components/common/DateRangePicker.jsx
index b8dde3bd..ff293bde 100644
--- a/src/components/common/DateRangePicker.jsx
+++ b/src/components/common/DateRangePicker.jsx
@@ -178,7 +178,7 @@ export const DateRangePicker1 = ({
{
diff --git a/src/hooks/useCollections.jsx b/src/hooks/useCollections.jsx
index c300462d..119f465b 100644
--- a/src/hooks/useCollections.jsx
+++ b/src/hooks/useCollections.jsx
@@ -84,6 +84,7 @@ export const useMarkedPaymentReceived = (onSuccessCallBack) => {
await CollectionRepository.markPaymentReceived(payload),
onSuccess: async () => {
client.invalidateQueries({ queryKey: ["collections"] });
+ client.invalidateQueries({ queryKey: ["collection"] });
showToast("Payment Received marked Successfully", "success");
if (onSuccessCallBack) onSuccessCallBack();
},
diff --git a/src/pages/PaymentRequest/PaymentRequestPage.jsx b/src/pages/PaymentRequest/PaymentRequestPage.jsx
index f4c8bb55..f530f5b0 100644
--- a/src/pages/PaymentRequest/PaymentRequestPage.jsx
+++ b/src/pages/PaymentRequest/PaymentRequestPage.jsx
@@ -73,13 +73,13 @@ const PaymentRequestPage = () => {
{/* Top Bar */}
-
+
setSearch(e.target.value)}
/>
diff --git a/src/pages/RecurringExpense/RecurringExpensePage.jsx b/src/pages/RecurringExpense/RecurringExpensePage.jsx
index 02121b04..7acf8947 100644
--- a/src/pages/RecurringExpense/RecurringExpensePage.jsx
+++ b/src/pages/RecurringExpense/RecurringExpensePage.jsx
@@ -47,7 +47,7 @@ const RecurringExpensePage = () => {
{/* Breadcrumb */}
{
{/* Top Bar */}
-
- {/* Left side: Search + Filter */}
-
- setSearch(e.target.value)}
- />
+
+ {/* Left Column: Search + Filter */}
+
+
- {/* Right side: Add Button */}
-
+ {/* Right Column: Add Button */}
+
+
@@ -135,7 +138,7 @@ const RecurringExpensePage = () => {
/>
)}
- {viewRecurring.view && (
+ {viewRecurring.view && (
{
}
recurringId={viewRecurring.recurringId}
/>
-
+
)}
diff --git a/src/pages/collections/CollectionPage.jsx b/src/pages/collections/CollectionPage.jsx
index aac80d26..c5eb0ea2 100644
--- a/src/pages/collections/CollectionPage.jsx
+++ b/src/pages/collections/CollectionPage.jsx
@@ -82,18 +82,18 @@ const CollectionPage = () => {
const handleMarkedPayment = (payload) => {
MarkedReceived(payload);
};
- if (isAdmin === undefined ||
- canAddPayment === undefined ||
- canEditCollection === undefined ||
- canViewCollection === undefined ||
+ if (isAdmin === undefined ||
+ canAddPayment === undefined ||
+ canEditCollection === undefined ||
+ canViewCollection === undefined ||
canCreate === undefined
-) {
- return Checking access... ;
-}
+ ) {
+ return Checking access... ;
+ }
-if (!isAdmin && !canAddPayment && !canEditCollection && !canViewCollection && !canCreate) {
- return ;
-}
+ if (!isAdmin && !canAddPayment && !canEditCollection && !canViewCollection && !canCreate) {
+ return ;
+ }
return (
@@ -101,15 +101,15 @@ if (!isAdmin && !canAddPayment && !canEditCollection && !canViewCollection && !c
data={[{ label: "Home", link: "/" }, { label: "Collection" }]}
/>
-
-
-
+
+
+ {/* Left side: Date Picker + Show Pending */}
+
-
-
-
-
-
- {" "}
+ {/* Right side: Search + Add Button */}
+
+
setSearchText(e.target.value)}
- placeholder="search Collection"
+ placeholder="Search Collection"
className="form-control form-control-sm"
/>
- { (canCreate || isAdmin) && (
-
-)}
+ {(canCreate || isAdmin) && ( )}
+
handleMarkedPayment(processedPayment?.invoiceId)}
|