Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

71 linhas
2.8 KiB

  1. import {getStatusTag} from "utils/statusUtils/Base";
  2. export function getStatus(params) {
  3. return getStatusByText(params.row.status, params.row.creditor);
  4. }
  5. export function getStatusByText(status, creditor) {
  6. switch (status) {
  7. case "submitted":
  8. return getStatusTag({ color: "#f5a83d", text: "處理中" })
  9. case "reviewed":
  10. return getStatusTag({ color: "#f5a83d", text: "處理中" })
  11. case "confirmed":
  12. if (creditor)
  13. return getStatusTag({ color: "#22a13f", text: "待發布" })
  14. else
  15. return getStatusTag({ color: "#22a13f", text: "待付款" })
  16. case "published":
  17. return getStatusTag({ color: "#22a13f", text: "待付款" })
  18. case "paid":
  19. return getStatusTag({ color: "#22a13f", text: "待發布" })
  20. case "complated":
  21. return getStatusTag({ color: "#8a8784", text: "已完成" })
  22. case "notAccepted":
  23. return getStatusTag({ color: "#d9372b", text: "不接受" })
  24. case "resubmit":
  25. return getStatusTag({ color: "#757373", text: "需重新提交" })
  26. case "cancelled":
  27. return getStatusTag({ color: "#909497", text: "已取消" })
  28. case "withdrawn":
  29. return getStatusTag({ color: "#909497", text: "已撤銷" })
  30. default:
  31. return getStatusTag({ text: status })
  32. }
  33. }
  34. export function getStatusEng(params) {
  35. return getStatusByTextEng(params.row.status, params.row.creditor);
  36. }
  37. export function getStatusByTextEng(status, creditor) {
  38. switch (status) {
  39. case "submitted":
  40. return getStatusTag({ color: "#F1C40F", text: "Submitted" })
  41. case "reviewed":
  42. return getStatusTag({ color: "#0C489E", text: "Reviewed" })
  43. case "confirmed":
  44. if (creditor)
  45. return getStatusTag({ color: "#3498DB", text: "Pending Publish" })
  46. else
  47. return getStatusTag({ color: "#F39C12", text: "Pending Payment" })
  48. case "published":
  49. return getStatusTag({ color: "#F39C12", text: "Pending Payment" })
  50. case "paid":
  51. return getStatusTag({ color: "#3498DB", text: "Pending Publish" })
  52. case "complated":
  53. return getStatusTag({ color: "#8a8784", text: "Completed" })
  54. case "notAccepted":
  55. return getStatusTag({ color: "#d9372b", text: "Not accepted" })
  56. case "resubmit":
  57. return getStatusTag({ color: "#757373", text: "Re-submit Required" })
  58. case "cancelled":
  59. return getStatusTag({ color: "#f5a83d", text: "Cancelled" })
  60. case "withdrawn":
  61. return getStatusTag({ color: "#8a8784", text: "Withdrawn" })
  62. default:
  63. return getStatusTag({ text: status })
  64. }
  65. }