import {getStatusTag} from "utils/statusUtils/Base"; export function getStatus(params) { return getStatusByText(params.row.status, params.row.creditor); } export function getStatusByText(status, creditor) { switch (status) { case "submitted": return getStatusTag({ color: "#f5a83d", text: "處理中" }) case "reviewed": return getStatusTag({ color: "#f5a83d", text: "處理中" }) case "confirmed": if (creditor) return getStatusTag({ color: "#22a13f", text: "待發布" }) else return getStatusTag({ color: "#22a13f", text: "待付款" }) case "published": return getStatusTag({ color: "#22a13f", text: "待付款" }) case "paid": return getStatusTag({ color: "#22a13f", text: "待發布" }) case "complated": return getStatusTag({ color: "#8a8784", text: "已完成" }) case "notAccepted": return getStatusTag({ color: "#d9372b", text: "不接受" }) case "resubmit": return getStatusTag({ color: "#757373", text: "需重新提交" }) case "cancelled": return getStatusTag({ color: "#909497", text: "已取消" }) case "withdrawn": return getStatusTag({ color: "#909497", text: "已撤銷" }) default: return getStatusTag({ text: status }) } } export function getStatusEng(params) { return getStatusByTextEng(params.row.status, params.row.creditor); } export function getStatusByTextEng(status, creditor) { switch (status) { case "submitted": return getStatusTag({ color: "#F1C40F", text: "Submitted" }) case "reviewed": return getStatusTag({ color: "#0C489E", text: "Reviewed" }) case "confirmed": if (creditor) return getStatusTag({ color: "#3498DB", text: "Pending Publish" }) else return getStatusTag({ color: "#F39C12", text: "Pending Payment" }) case "published": return getStatusTag({ color: "#F39C12", text: "Pending Payment" }) case "paid": return getStatusTag({ color: "#3498DB", text: "Pending Publish" }) case "complated": return getStatusTag({ color: "#8a8784", text: "Completed" }) case "notAccepted": return getStatusTag({ color: "#d9372b", text: "Not accepted" }) case "resubmit": return getStatusTag({ color: "#757373", text: "Re-submit Required" }) case "cancelled": return getStatusTag({ color: "#f5a83d", text: "Cancelled" }) case "withdrawn": return getStatusTag({ color: "#8a8784", text: "Withdrawn" }) default: return getStatusTag({ text: status }) } }