From a0c6f5393049c4795fcc1adde4829b3c88dbe6a4 Mon Sep 17 00:00:00 2001 From: robertfausk Date: Thu, 2 Jan 2025 15:21:49 +0100 Subject: [PATCH] Migrate modal in SystemicQuestionList from bootstrap-vue to vuetify 2 #248 --- .../js/components/Clients/ClientList.vue | 2 +- .../SystemicQuestionForm.vue | 17 +- .../SystemicQuestionList.vue | 166 ++++++++---------- 3 files changed, 93 insertions(+), 92 deletions(-) diff --git a/web/assets/js/components/Clients/ClientList.vue b/web/assets/js/components/Clients/ClientList.vue index fad231a0..1f54cf88 100755 --- a/web/assets/js/components/Clients/ClientList.vue +++ b/web/assets/js/components/Clients/ClientList.vue @@ -188,7 +188,7 @@ export default { const editClient = ref(null); const clients = computed(() => clientStore.getClients); - const isLoading = computed(() => clientStore.isLoading); + const isLoading = computed(() => clientStore.isLoadingChange || clientStore.isLoadingCreate); const error = computed(() => clientStore.getErrors); onMounted(async () => { diff --git a/web/assets/js/components/SystemicQuestions/SystemicQuestionForm.vue b/web/assets/js/components/SystemicQuestions/SystemicQuestionForm.vue index 7954866f..184c26a6 100755 --- a/web/assets/js/components/SystemicQuestions/SystemicQuestionForm.vue +++ b/web/assets/js/components/SystemicQuestions/SystemicQuestionForm.vue @@ -124,11 +124,22 @@ export default { return this.clientStore.getClients; }, }, - async created() { - this.client = this.initialClient; - this.question = this.initialQuestion; + async mounted() { + await this.setInitialValues(); + }, + watch: { + initialQuestion: async function () { + await this.setInitialValues(); + }, + initialClient: async function () { + await this.setInitialValues(); + }, }, methods: { + async setInitialValues() { + this.client = this.initialClient; + this.question = this.initialQuestion; + }, async handleSubmit() { this.$emit('submit', { client: this.client, diff --git a/web/assets/js/components/SystemicQuestions/SystemicQuestionList.vue b/web/assets/js/components/SystemicQuestions/SystemicQuestionList.vue index 8bb9dbc8..3b4b6683 100755 --- a/web/assets/js/components/SystemicQuestions/SystemicQuestionList.vue +++ b/web/assets/js/components/SystemicQuestions/SystemicQuestionList.vue @@ -1,12 +1,15 @@ + + + - - - + + + Systemische Frage ändern + + + + + +