table.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import { useIntl } from "react-intl";
  2. export const PublicityValueEnum = () => {
  3. const intl = useIntl();
  4. return {
  5. all: {
  6. text: intl.formatMessage({
  7. id: "tables.publicity.all",
  8. }),
  9. status: "Default",
  10. },
  11. 0: {
  12. text: intl.formatMessage({
  13. id: "tables.publicity.disable",
  14. }),
  15. status: "Default",
  16. },
  17. 10: {
  18. text: intl.formatMessage({
  19. id: "tables.publicity.private",
  20. }),
  21. status: "Processing",
  22. },
  23. 20: {
  24. text: intl.formatMessage({
  25. id: "tables.publicity.public.bylink",
  26. }),
  27. status: "Processing",
  28. },
  29. 30: {
  30. text: intl.formatMessage({
  31. id: "tables.publicity.public",
  32. }),
  33. status: "Success",
  34. },
  35. 40: {
  36. text: intl.formatMessage({
  37. id: "tables.publicity.public.edit",
  38. }),
  39. status: "Success",
  40. },
  41. };
  42. };
  43. export const RoleValueEnum = () => {
  44. const intl = useIntl();
  45. return {
  46. all: {
  47. text: intl.formatMessage({
  48. id: "tables.role.all",
  49. }),
  50. },
  51. owner: {
  52. text: intl.formatMessage({
  53. id: "tables.role.owner",
  54. }),
  55. },
  56. manager: {
  57. text: intl.formatMessage({
  58. id: "tables.role.manager",
  59. }),
  60. },
  61. editor: {
  62. text: intl.formatMessage({
  63. id: "tables.role.editor",
  64. }),
  65. },
  66. member: {
  67. text: intl.formatMessage({
  68. id: "tables.role.member",
  69. }),
  70. },
  71. };
  72. };