Refactor status text color function and finalized transactionpdf component

This commit is contained in:
Keannu Christian Bernasol 2023-12-29 17:33:48 +08:00
parent db8b93a7db
commit b9bf114904
4 changed files with 127 additions and 80 deletions

View file

@ -0,0 +1,18 @@
import { colors } from "../../styles";
export default function StatusTextColor(status: string) {
if (
status === "Pending Approval" ||
status === "Returned: Pending Checking"
) {
return colors.orange;
} else if (
status === "Approved" ||
status === "Finalized" ||
status === "Borrowed"
) {
return colors.green;
} else {
return colors.red;
}
}