Changes in Payment Request List view adding Due Date, Created at and Payee.
This commit is contained in:
parent
c4b589460a
commit
c1be1dafc8
@ -44,8 +44,7 @@ const PaymentRequestList = ({ filters, groupBy = "submittedBy", search }) => {
|
|||||||
displayField = "Status";
|
displayField = "Status";
|
||||||
break;
|
break;
|
||||||
case "submittedBy":
|
case "submittedBy":
|
||||||
key = `${item?.createdBy?.firstName ?? ""} ${
|
key = `${item?.createdBy?.firstName ?? ""} ${item.createdBy?.lastName ?? ""
|
||||||
item.createdBy?.lastName ?? ""
|
|
||||||
}`.trim();
|
}`.trim();
|
||||||
displayField = "Submitted By";
|
displayField = "Submitted By";
|
||||||
break;
|
break;
|
||||||
@ -93,40 +92,52 @@ const PaymentRequestList = ({ filters, groupBy = "submittedBy", search }) => {
|
|||||||
align: "text-start",
|
align: "text-start",
|
||||||
getValue: (e) => e.title || "N/A",
|
getValue: (e) => e.title || "N/A",
|
||||||
},
|
},
|
||||||
// { key: "payee", label: "Payee", align: "text-start" },
|
// {
|
||||||
{
|
// key: "SubmittedBy",
|
||||||
key: "SubmittedBy",
|
// label: "Submitted By",
|
||||||
label: "Submitted By",
|
// align: "text-start",
|
||||||
align: "text-start",
|
// getValue: (e) =>
|
||||||
getValue: (e) =>
|
// `${e.createdBy?.firstName ?? ""} ${
|
||||||
`${e.createdBy?.firstName ?? ""} ${
|
// e.createdBy?.lastName ?? ""
|
||||||
e.createdBy?.lastName ?? ""
|
// }`.trim() || "N/A",
|
||||||
}`.trim() || "N/A",
|
// customRender: (e) => (
|
||||||
customRender: (e) => (
|
// <div
|
||||||
<div
|
// className="d-flex align-items-center cursor-pointer"
|
||||||
className="d-flex align-items-center cursor-pointer"
|
// onClick={() => navigate(`/employee/${e.createdBy?.id}`)}
|
||||||
onClick={() => navigate(`/employee/${e.createdBy?.id}`)}
|
// >
|
||||||
>
|
// <Avatar
|
||||||
<Avatar
|
// size="xs"
|
||||||
size="xs"
|
// classAvatar="m-0"
|
||||||
classAvatar="m-0"
|
// firstName={e.createdBy?.firstName}
|
||||||
firstName={e.createdBy?.firstName}
|
// lastName={e.createdBy?.lastName}
|
||||||
lastName={e.createdBy?.lastName}
|
// />
|
||||||
/>
|
// <span className="text-truncate">
|
||||||
<span className="text-truncate">
|
// {`${e.createdBy?.firstName ?? ""} ${
|
||||||
{`${e.createdBy?.firstName ?? ""} ${
|
// e.createdBy?.lastName ?? ""
|
||||||
e.createdBy?.lastName ?? ""
|
// }`.trim() || "N/A"}
|
||||||
}`.trim() || "N/A"}
|
// </span>
|
||||||
</span>
|
// </div>
|
||||||
</div>
|
// ),
|
||||||
),
|
// },
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: "createdAt",
|
key: "createdAt",
|
||||||
label: "Submitted On",
|
label: "Created At",
|
||||||
align: "text-start",
|
align: "text-start",
|
||||||
getValue: (e) => formatUTCToLocalTime(e?.createdAt),
|
getValue: (e) => formatUTCToLocalTime(e?.createdAt),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "payee",
|
||||||
|
label: "Payee",
|
||||||
|
align: "text-start",
|
||||||
|
getValue: (e) => e.payee || "N/A",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "dueDate",
|
||||||
|
label: "Due Date",
|
||||||
|
align: "text-start",
|
||||||
|
getValue: (e) => formatUTCToLocalTime(e?.dueDate),
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
key: "amount",
|
key: "amount",
|
||||||
label: "Amount",
|
label: "Amount",
|
||||||
@ -143,8 +154,7 @@ const PaymentRequestList = ({ filters, groupBy = "submittedBy", search }) => {
|
|||||||
align: "text-center",
|
align: "text-center",
|
||||||
getValue: (e) => (
|
getValue: (e) => (
|
||||||
<span
|
<span
|
||||||
className={`badge bg-label-${
|
className={`badge bg-label-${getColorNameFromHex(e?.expenseStatus?.color) || "secondary"
|
||||||
getColorNameFromHex(e?.expenseStatus?.color) || "secondary"
|
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{e?.expenseStatus?.name || "Unknown"}
|
{e?.expenseStatus?.name || "Unknown"}
|
||||||
@ -171,8 +181,8 @@ const PaymentRequestList = ({ filters, groupBy = "submittedBy", search }) => {
|
|||||||
const header = [
|
const header = [
|
||||||
"Request ID",
|
"Request ID",
|
||||||
"Request Title",
|
"Request Title",
|
||||||
"Submitted By",
|
"Created At",
|
||||||
"Submitted On",
|
"Due Date",
|
||||||
"Amount",
|
"Amount",
|
||||||
"Status",
|
"Status",
|
||||||
"Action",
|
"Action",
|
||||||
|
|||||||
@ -199,7 +199,7 @@ const ViewPaymentRequest = ({ requestId }) => {
|
|||||||
<div className="row text-start">
|
<div className="row text-start">
|
||||||
<div className="col-6 mb-3">
|
<div className="col-6 mb-3">
|
||||||
<label className="form-label me-2 mb-0 fw-semibold text-start">
|
<label className="form-label me-2 mb-0 fw-semibold text-start">
|
||||||
Supplier:
|
Payee:
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-6 mb-3">
|
<div className="col-6 mb-3">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user