create update date
This commit is contained in:
@@ -205,7 +205,7 @@ const CreateRequest = () => {
|
||||
size={"sm"}
|
||||
fontSize={"sm"}
|
||||
rounded={"sm"}
|
||||
type={"transaction_date"}
|
||||
type={"date"}
|
||||
max={new Date().toISOString().split("T")[0]} // Disable future dates
|
||||
{...register("transaction_date")}
|
||||
/>
|
||||
|
||||
@@ -174,10 +174,9 @@ const ApproveHistory = () => {
|
||||
w={"100px"}
|
||||
isTruncated={true}
|
||||
display={"flex"}
|
||||
justifyContent={"end"}
|
||||
>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.transaction_date}
|
||||
{formatDate(item?.transaction_date)}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
@@ -202,9 +201,13 @@ const ApproveHistory = () => {
|
||||
py={"2px"}
|
||||
rounded={4}
|
||||
colorScheme={
|
||||
item?.transactionStatus === "APPROVED"
|
||||
? "green"
|
||||
: "red" // default color scheme if status doesn't match any condition
|
||||
item?.transactionStatus === "Approved"
|
||||
? "green"
|
||||
: item?.transactionStatus === "Pending"
|
||||
? "yellow"
|
||||
: item?.transactionStatus === "Reject"
|
||||
? "red"
|
||||
: "gray" // default border color if status doesn't match any condition
|
||||
}
|
||||
>
|
||||
{item.transactionStatus}
|
||||
|
||||
@@ -194,10 +194,9 @@ import {
|
||||
w={"100px"}
|
||||
isTruncated={true}
|
||||
display={"flex"}
|
||||
justifyContent={"end"}
|
||||
>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.transaction_date}
|
||||
{formatDate(item?.transaction_date)}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
@@ -222,9 +221,13 @@ import {
|
||||
py={"2px"}
|
||||
rounded={4}
|
||||
colorScheme={
|
||||
item?.transactionStatus === "APPROVED"
|
||||
? "green"
|
||||
: "red" // default color scheme if status doesn't match any condition
|
||||
item?.transactionStatus === "Approved"
|
||||
? "green"
|
||||
: item?.transactionStatus === "Pending"
|
||||
? "yellow"
|
||||
: item?.transactionStatus === "Reject"
|
||||
? "red"
|
||||
: "gray" // default border color if status doesn't match any condition
|
||||
}
|
||||
>
|
||||
{item.transactionStatus}
|
||||
|
||||
@@ -198,7 +198,7 @@ import RequestRejectModal from "./RequestRejectModal";
|
||||
"Transaction Date": (
|
||||
<Box isTruncated={true} display={'flex'} >
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.transaction_date}
|
||||
{formatDate(item?.transaction_date)}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
@@ -216,9 +216,24 @@ import RequestRejectModal from "./RequestRejectModal";
|
||||
),
|
||||
"Status": (
|
||||
<Box isTruncated={true} display={'flex'} >
|
||||
<Badge colorScheme='green' fontWeight={500} px={2} py={"2px"} rounded={4}>
|
||||
{item.transactionStatus}
|
||||
</Badge>
|
||||
<Badge
|
||||
my={1}
|
||||
fontWeight={500}
|
||||
px={2}
|
||||
py={"2px"}
|
||||
rounded={4}
|
||||
colorScheme={
|
||||
item?.transactionStatus === "Approved"
|
||||
? "green"
|
||||
: item?.transactionStatus === "Pending"
|
||||
? "yellow"
|
||||
: item?.transactionStatus === "Reject"
|
||||
? "red"
|
||||
: "gray" // default border color if status doesn't match any condition
|
||||
}
|
||||
>
|
||||
{item.transactionStatus}
|
||||
</Badge>
|
||||
</Box>
|
||||
),
|
||||
Action: (
|
||||
|
||||
Reference in New Issue
Block a user