|
|
@@ -3,17 +3,17 @@ |
|
|
|
import {getStatusTag} from "utils/statusUtils/Base"; |
|
|
|
|
|
|
|
export function getStatus(params) { |
|
|
|
return getStatusByText(params.row.status); |
|
|
|
return getStatusByText(params.row.status, params.row.creditor); |
|
|
|
} |
|
|
|
|
|
|
|
export function getStatusByText(status) { |
|
|
|
export function getStatusByText(status, creditor) { |
|
|
|
switch (status) { |
|
|
|
case "submitted": |
|
|
|
return getStatusTag({ color: "#f5a83d", text: "處理中" }) |
|
|
|
case "reviewed": |
|
|
|
return getStatusTag({ color: "#f5a83d", text: "處理中" }) |
|
|
|
case "confirmed": |
|
|
|
if (localStorage.getItem('userData').creditor) |
|
|
|
if (creditor) |
|
|
|
return getStatusTag({ color: "#22a13f", text: "待發布" }) |
|
|
|
else |
|
|
|
return getStatusTag({ color: "#22a13f", text: "待付款" }) |
|
|
@@ -37,16 +37,16 @@ export function getStatusByText(status) { |
|
|
|
} |
|
|
|
|
|
|
|
export function getStatusEng(params) { |
|
|
|
return getStatusByTextEng(params.row.status); |
|
|
|
return getStatusByTextEng(params.row.status, params.row.creditor); |
|
|
|
} |
|
|
|
export function getStatusByTextEng(status) { |
|
|
|
export function getStatusByTextEng(status, creditor) { |
|
|
|
switch (status) { |
|
|
|
case "submitted": |
|
|
|
return getStatusTag({ color: "#f5a83d", text: "Submitted" }) |
|
|
|
case "reviewed": |
|
|
|
return getStatusTag({ color: "#0C489E", text: "Reviewed" }) |
|
|
|
case "confirmed": |
|
|
|
if (localStorage.getItem('userData').creditor) |
|
|
|
if (creditor) |
|
|
|
return getStatusTag({ color: "#22a13f", text: "Pending Publish" }) |
|
|
|
else |
|
|
|
return getStatusTag({ color: "#22a13f", text: "Pending Payment" }) |
|
|
|