From 0dac26131a8a2c6d6b39f59c7c9c36020db18ad6 Mon Sep 17 00:00:00 2001 From: kentah <158997636+KentaHizume@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:17:50 +0900 Subject: [PATCH] =?UTF-8?q?Enum=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=83=AD=E3=83=BC=E3=83=AB=E3=82=92=E5=8F=82=E7=85=A7?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dressca-frontend/admin/src/shared/constants/roles.ts | 6 ++++++ .../admin/src/views/catalog/ItemsAddView.vue | 3 ++- .../admin/src/views/catalog/ItemsEditView.vue | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 samples/web-csr/dressca-frontend/admin/src/shared/constants/roles.ts diff --git a/samples/web-csr/dressca-frontend/admin/src/shared/constants/roles.ts b/samples/web-csr/dressca-frontend/admin/src/shared/constants/roles.ts new file mode 100644 index 000000000..da4ca61d1 --- /dev/null +++ b/samples/web-csr/dressca-frontend/admin/src/shared/constants/roles.ts @@ -0,0 +1,6 @@ +/** + * ユーザーのロールを表す文字列列挙型です。 + */ +export enum Roles { + ADMIN = 'Admin', +} diff --git a/samples/web-csr/dressca-frontend/admin/src/views/catalog/ItemsAddView.vue b/samples/web-csr/dressca-frontend/admin/src/views/catalog/ItemsAddView.vue index 2f737fd34..5fe8c0759 100644 --- a/samples/web-csr/dressca-frontend/admin/src/views/catalog/ItemsAddView.vue +++ b/samples/web-csr/dressca-frontend/admin/src/views/catalog/ItemsAddView.vue @@ -15,6 +15,7 @@ import type { GetCatalogCategoriesResponse, } from '@/generated/api-client'; import { useAuthenticationStore } from '@/stores/authentication/authentication'; +import { Roles } from '@/shared/constants/roles'; const router = useRouter(); const customErrorHandler = useCustomErrorHandler(); @@ -213,7 +214,7 @@ onMounted(async () => {