From 3fca303b4ec775f638bcae6b3bc222ca9131c0d3 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Tue, 18 Jun 2024 07:40:07 +0000 Subject: [PATCH] fix: attribute type & option store --- src/stores/options/index.ts | 12 ++++++++++++ src/stores/options/types.ts | 1 + src/stores/product-service/types.ts | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/stores/options/index.ts create mode 100644 src/stores/options/types.ts diff --git a/src/stores/options/index.ts b/src/stores/options/index.ts new file mode 100644 index 00000000..0d188675 --- /dev/null +++ b/src/stores/options/index.ts @@ -0,0 +1,12 @@ +import { ref } from 'vue'; +import { defineStore } from 'pinia'; + +const useOptionStore = defineStore('optionStore', () => { + const globalOption = ref(); + + return { + globalOption, + }; +}); + +export default useOptionStore; diff --git a/src/stores/options/types.ts b/src/stores/options/types.ts new file mode 100644 index 00000000..2541451e --- /dev/null +++ b/src/stores/options/types.ts @@ -0,0 +1 @@ +export type Option = { label: string; value: string }; diff --git a/src/stores/product-service/types.ts b/src/stores/product-service/types.ts index f0dba81f..2ba8b070 100644 --- a/src/stores/product-service/types.ts +++ b/src/stores/product-service/types.ts @@ -42,8 +42,8 @@ export interface ServiceCreate { export interface Attributes { additional: { - filName: string; - type: AdditionalType; + fieldName: string; + type?: AdditionalType; }[]; }