Streamlined stores

This commit is contained in:
2024-10-22 18:47:27 +02:00
parent 780ab85a9e
commit 9140765772
45 changed files with 384 additions and 387 deletions

View File

@@ -6,20 +6,7 @@ import { useAccountStore } from '@/stores/account.store';
import { ref } from 'vue';
const showConfirmDialog = ref(false)
const updateInProgress = ref(false)
const accountStore = useAccountStore()
function deleteAccount() {
// todo
}
async function updateAccount() {
updateInProgress.value = true
await accountStore.updateAccount()
updateInProgress.value = false
}
</script>
<template>
@@ -32,6 +19,7 @@ async function updateAccount() {
<outlined-button
prepend-icon="mdi-delete"
color="red"
:loading="accountStore.fetchInProgress"
@click="showConfirmDialog = true"
>
{{ $t("account.delete") }}
@@ -42,7 +30,8 @@ async function updateAccount() {
<outlined-button
prepend-icon="mdi-content-save"
color="green"
@click="updateAccount"
:loading="accountStore.fetchInProgress"
@click="accountStore.updateAccount()"
>
{{ $t("save") }}
</outlined-button>
@@ -54,6 +43,6 @@ async function updateAccount() {
v-model="showConfirmDialog"
:title="$t('dialog.deleteAccount.title')"
:description="$t('dialog.deleteAccount.description')"
:onConfirm="deleteAccount"
/>
<!-- todo :onConfirm="deleteAccount" -->
</template>