Merge branch 'migrate_main' of https://git.marcoaiot.com/admin/marco.pms.web into migrate_main
This commit is contained in:
commit
78faab1b1e
@ -77,7 +77,7 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
||||
|
||||
switch (field) {
|
||||
case "transactionDate":
|
||||
key = item?.transactionDate?.split("T")[0];
|
||||
key = formatUTCToLocalTime(item?.transactionDate);
|
||||
displayField = "Transaction Date";
|
||||
break;
|
||||
case "status":
|
||||
@ -85,9 +85,8 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
||||
displayField = "Status";
|
||||
break;
|
||||
case "submittedBy":
|
||||
key = `${item?.createdBy?.firstName ?? ""} ${
|
||||
item.createdBy?.lastName ?? ""
|
||||
}`.trim();
|
||||
key = `${item?.createdBy?.firstName ?? ""} ${item.createdBy?.lastName ?? ""
|
||||
}`.trim();
|
||||
displayField = "Submitted By";
|
||||
break;
|
||||
case "project":
|
||||
@ -145,9 +144,8 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
||||
label: "Submitted By",
|
||||
align: "text-start",
|
||||
getValue: (e) =>
|
||||
`${e.createdBy?.firstName ?? ""} ${
|
||||
e.createdBy?.lastName ?? ""
|
||||
}`.trim() || "N/A",
|
||||
`${e.createdBy?.firstName ?? ""} ${e.createdBy?.lastName ?? ""
|
||||
}`.trim() || "N/A",
|
||||
customRender: (e) => (
|
||||
<div
|
||||
className="d-flex align-items-center cursor-pointer"
|
||||
@ -160,9 +158,8 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
||||
lastName={e.createdBy?.lastName}
|
||||
/>
|
||||
<span className="text-truncate">
|
||||
{`${e.createdBy?.firstName ?? ""} ${
|
||||
e.createdBy?.lastName ?? ""
|
||||
}`.trim() || "N/A"}
|
||||
{`${e.createdBy?.firstName ?? ""} ${e.createdBy?.lastName ?? ""
|
||||
}`.trim() || "N/A"}
|
||||
</span>
|
||||
</div>
|
||||
),
|
||||
@ -194,9 +191,8 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
||||
align: "text-center",
|
||||
getValue: (e) => (
|
||||
<span
|
||||
className={`badge bg-label-${
|
||||
getColorNameFromHex(e?.status?.color) || "secondary"
|
||||
}`}
|
||||
className={`badge bg-label-${getColorNameFromHex(e?.status?.color) || "secondary"
|
||||
}`}
|
||||
>
|
||||
{e.status?.name || "Unknown"}
|
||||
</span>
|
||||
@ -312,26 +308,22 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
||||
(col.isAlwaysVisible || groupBy !== col.key) && (
|
||||
<td
|
||||
key={col.key}
|
||||
className={`d-table-cell ml-2 ${
|
||||
col.align ?? ""
|
||||
} `}
|
||||
className={`d-table-cell ml-2 ${col.align ?? ""
|
||||
} `}
|
||||
>
|
||||
<div
|
||||
className={`d-flex px-2 ${
|
||||
col.key === "status"
|
||||
className={`d-flex px-2 ${col.key === "status"
|
||||
? "justify-content-center"
|
||||
: ""
|
||||
}
|
||||
${
|
||||
col.key === "amount"
|
||||
? "justify-content-end"
|
||||
: ""
|
||||
}
|
||||
${
|
||||
col.key === "submitted"
|
||||
? "justify-content-center"
|
||||
: ""
|
||||
}
|
||||
}
|
||||
${col.key === "amount"
|
||||
? "justify-content-end"
|
||||
: ""
|
||||
}
|
||||
${col.key === "submitted"
|
||||
? "justify-content-center"
|
||||
: ""
|
||||
}
|
||||
`}
|
||||
>
|
||||
{col.customRender
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user