瀏覽代碼

add RoleValueEnum

visuddhinanda 3 年之前
父節點
當前提交
8338b3a057
共有 1 個文件被更改,包括 31 次插入0 次删除
  1. 31 0
      dashboard/src/components/studio/table.ts

+ 31 - 0
dashboard/src/components/studio/table.ts

@@ -41,3 +41,34 @@ export const PublicityValueEnum = () => {
 		},
 	};
 };
+
+export const RoleValueEnum = () => {
+	const intl = useIntl();
+	return {
+		all: {
+			text: intl.formatMessage({
+				id: "tables.role.all",
+			}),
+		},
+		owner: {
+			text: intl.formatMessage({
+				id: "tables.role.owner",
+			}),
+		},
+		manager: {
+			text: intl.formatMessage({
+				id: "tables.role.manager",
+			}),
+		},
+		editor: {
+			text: intl.formatMessage({
+				id: "tables.role.editor",
+			}),
+		},
+		member: {
+			text: intl.formatMessage({
+				id: "tables.role.member",
+			}),
+		},
+	};
+};