-
-
- {formatCurrency(data?.amount, data?.currency?.currencyCode)}
+ {/* Row 2 */}
+
+
+
+
{data?.payee}
+
+
+
+
+
+
+ {formatCurrency(data?.amount, data?.currency?.currencyCode)}
+
-
- {/* Row 3 */}
- {/*
+ {/* Row 3 */}
+ {/*
*/}
- {data?.gstNumber && (
+ {data?.gstNumber && (
+
+
+
+
{data?.gstNumber}
+
+
+ )}
+
+ {/* Row 4 */}
-
{data?.gstNumber}
+
+ {data?.expenseStatus?.name}
+
- )}
-
- {/* Row 4 */}
-
-
-
-
- {data?.expenseStatus?.name}
-
-
-
-
-
-
-
{data?.preApproved ? "Yes" : "No"}
-
-
-
-
-
-
-
{data?.project?.name}
-
-
-
-
-
-
- {formatUTCToLocalTime(data?.createdAt, true)}
-
-
-
-
- {/* Row 6 */}
- {data?.createdBy && (
-
-
+
+
+
+ {data?.preApproved ? "Yes" : "No"}
+
+
+
+
+
+
+
+
{data?.project?.name}
+
+
+
+
+
+
+ {formatUTCToLocalTime(data?.createdAt, true)}
+
+
+
+
+ {/* Row 6 */}
+ {data?.createdBy && (
+
-
-
- {`${data?.createdBy?.firstName ?? ""} ${
- data?.createdBy?.lastName ?? ""
- }`.trim() || "N/A"}
-
-
-
-
- )}
- {data?.paidBy && (
-
-
-
-
-
-
- {`${data?.paidBy?.firstName ?? ""} ${
- data?.paidBy?.lastName ?? ""
- }`.trim() || "N/A"}
-
-
-
-
- )}
-
-
-
-
{data?.description}
-
-
-
-
-
-
-
- {data?.documents?.map((doc) => {
- const isImage = doc?.contentType?.includes("image");
-
- return (
-
{
- if (isImage) {
- setDocumentView({
- IsOpen: true,
- Image: doc.preSignedUrl,
- });
- }
- }}
- >
-
-
- {doc.fileName}
-
+ Created By :
+
+
+
+
+ {`${data?.createdBy?.firstName ?? ""} ${
+ data?.createdBy?.lastName ?? ""
+ }`.trim() || "N/A"}
+
+
- );
- })}
-
-
-
- {data?.paidTransactionId && (
-
-
-
- {data?.paidTransactionId }
-
-
-
- {formatUTCToLocalTime(data?.paidAt)}
-
-
+
+ )}
{data?.paidBy && (
- <>
-
-
- )}
-
-
- {Array.isArray(data?.nextStatus) && data?.nextStatus.length > 0 && (
- <>
- {IsPaymentProcess && nextStatusWithPermission?.length > 0 && (
-
-
- Transaction Id
-
- {errors.paidTransactionId && (
-
- {errors.paidTransactionId.message}
-
- )}
-
-
- Transaction Date
-
- {errors.paidAt && (
-
- {errors.paidAt.message}
-
- )}
-
-
- Paid By
-
-
-
- )}
-
- {((nextStatusWithPermission.length > 0 && !isRejectedRequest) ||
- (isRejectedRequest && isCreatedBy)) && (
- <>
-
- Comment
-
-
- {errors.comment && (
-
- {errors.comment.message}
-
- )}
- >
- )}
-
- {nextStatusWithPermission?.length > 0 &&
- (!isRejectedRequest || isCreatedBy) && (
-
- {nextStatusWithPermission?.map((status, index) => (
-
- ))}
-
- )}
-
- >
- )}
-
-
+
+
+
+
);
};
diff --git a/src/components/common/TimeLine.jsx b/src/components/common/TimeLine.jsx
new file mode 100644
index 00000000..2d8b997e
--- /dev/null
+++ b/src/components/common/TimeLine.jsx
@@ -0,0 +1,73 @@
+
+import React from "react";
+
+const Timeline = ({ items = [], transparent = true }) => {
+ return (
+
+ {items.map((item) => (
+ -
+
+
+
+
+
{item.title}
+ {item.timeAgo}
+
+
+ {item.description &&
{item.description}
}
+
+ {item.attachments && item.attachments.length > 0 && (
+
+ {item.attachments.map((att, i) => (
+
+ {att.icon &&

}
+
{att.name}
+
+ ))}
+
+ )}
+
+ {item.users && item.users.length > 0 && (
+
+
+ {item.users.map((user, i) => (
+ -
+ {user.avatar ? (
+
+ ) : (
+
+ {user.name}
+
+ )}
+
+ ))}
+
+
+ {item.users[0]?.role && (
+
+
{item.users[0].name}
+
{item.users[0].role}
+
+ )}
+
+ )}
+
+
+ ))}
+
+ );
+};
+
+export default Timeline;
diff --git a/src/hooks/masterHook/useMaster.js b/src/hooks/masterHook/useMaster.js
index 614496fa..991719e9 100644
--- a/src/hooks/masterHook/useMaster.js
+++ b/src/hooks/masterHook/useMaster.js
@@ -152,13 +152,13 @@ export const useContactTags = () => {
export const useExpenseCategory = () => {
const {
- data: ExpenseTypes = [],
+ data: ExpenseCategories = [],
isLoading: loading,
error,
} = useQuery({
queryKey: ["Expense Category"],
queryFn: async () => {
- const res = await MasterRespository.getExpenseCategory()
+ const res = await MasterRespository.getExpenseCategory();
return res.data;
},
onError: (error) => {
@@ -171,7 +171,7 @@ export const useExpenseCategory = () => {
},
});
- return { ExpenseTypes, loading, error };
+ return { ExpenseCategories, loading, error };
};
export const usePaymentMode = () => {
const {
diff --git a/src/pages/PaymentRequest/PaymentRequestPage.jsx b/src/pages/PaymentRequest/PaymentRequestPage.jsx
index f7b25e1a..be53bd31 100644
--- a/src/pages/PaymentRequest/PaymentRequestPage.jsx
+++ b/src/pages/PaymentRequest/PaymentRequestPage.jsx
@@ -120,11 +120,11 @@ const PaymentRequestPage = () => {
{ViewRequest.view && (
setVieRequest({ requestId: null, view: false })}
>
-
+
)}