diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 4fa198ad..6244467c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -17,7 +17,7 @@ "@vee-validate/i18n": "~4.9.6", "@vee-validate/rules": "~4.9.6", "bootstrap": "^5.3.3", - "logitar-vue3-ui": "^2.0.5", + "logitar-vue3-ui": "^2.4.0", "nanoid": "^5.0.7", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", @@ -4542,9 +4542,9 @@ "dev": true }, "node_modules/logitar-vue3-ui": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/logitar-vue3-ui/-/logitar-vue3-ui-2.0.5.tgz", - "integrity": "sha512-7e6rE/6ledK9+BdrPHraOXneygLE9NEJnGXhFAuOJt/1UTdoxTN3iboU0GLX651y/9ULWFcdtKXTyyaNKc32Dw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/logitar-vue3-ui/-/logitar-vue3-ui-2.4.0.tgz", + "integrity": "sha512-p4JHMHcF1UaDTm14FgHXUszx1/qiDdaHBmidKOGS23vfA7Z2MZqSpcJfjxc0Ggy9SSh+9/VfORtpesp1UqobsQ==", "dependencies": { "md5": "^2.3.0", "nanoid": "^5.0.4" diff --git a/frontend/package.json b/frontend/package.json index 88dd8a34..d6a32294 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -24,7 +24,7 @@ "@vee-validate/i18n": "~4.9.6", "@vee-validate/rules": "~4.9.6", "bootstrap": "^5.3.3", - "logitar-vue3-ui": "^2.0.5", + "logitar-vue3-ui": "^2.4.0", "nanoid": "^5.0.7", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", diff --git a/frontend/src/components/articles/ArticleSelect.vue b/frontend/src/components/articles/ArticleSelect.vue index decf2326..f6c70ba4 100644 --- a/frontend/src/components/articles/ArticleSelect.vue +++ b/frontend/src/components/articles/ArticleSelect.vue @@ -1,25 +1,36 @@ diff --git a/frontend/src/components/articles/GtinInput.vue b/frontend/src/components/articles/GtinInput.vue index 76178cdf..70efcc2c 100644 --- a/frontend/src/components/articles/GtinInput.vue +++ b/frontend/src/components/articles/GtinInput.vue @@ -1,16 +1,9 @@ diff --git a/frontend/src/components/banners/BannerSelect.vue b/frontend/src/components/banners/BannerSelect.vue index 674860ff..92778408 100644 --- a/frontend/src/components/banners/BannerSelect.vue +++ b/frontend/src/components/banners/BannerSelect.vue @@ -1,25 +1,35 @@ diff --git a/frontend/src/components/departments/DepartmentEdit.vue b/frontend/src/components/departments/DepartmentEdit.vue index 56c24f76..79d84f52 100644 --- a/frontend/src/components/departments/DepartmentEdit.vue +++ b/frontend/src/components/departments/DepartmentEdit.vue @@ -35,11 +35,22 @@ function hide(): void { modalRef.value?.hide(); } +function setModel(department?: Department) { + number.value = department?.number ?? ""; + displayName.value = department?.displayName ?? ""; + description.value = department?.description ?? ""; +} + const emit = defineEmits<{ (e: "error", value: unknown): void; (e: "saved", value: Department): void; }>(); +function onCancel(): void { + setModel(props.department); + hide(); +} + const { handleSubmit, isSubmitting } = useForm(); const onSubmit = handleSubmit(async () => { try { @@ -61,9 +72,7 @@ const onSubmit = handleSubmit(async () => { watchEffect(() => { const department = props.department; - number.value = department?.number ?? ""; - displayName.value = department?.displayName ?? ""; - description.value = department?.description ?? ""; + setModel(department); }); @@ -83,7 +92,7 @@ watchEffect(() => {