automatically save transaction draft

This commit is contained in:
MaysWind
2024-09-22 14:41:35 +08:00
parent 49df497f35
commit 4c13b7ad02
16 changed files with 384 additions and 26 deletions
@@ -145,6 +145,22 @@
<v-form>
<v-card-text>
<v-row>
<v-col cols="12" md="6">
<v-select
item-title="displayName"
item-value="value"
persistent-placeholder
:label="$t('Automatically Save Draft')"
:placeholder="$t('Automatically Save Draft')"
:items="[
{ value: 'disabled', displayName: $t('Disabled') },
{ value: 'enabled', displayName: $t('Enabled') },
{ value: 'confirmation', displayName: $t('Show Confirmation Every Time') }
]"
v-model="autoSaveTransactionDraft"
/>
</v-col>
<v-col cols="12" md="6">
<v-select
item-title="displayName"
@@ -275,6 +291,18 @@ export default {
this.settingsStore.setItemsCountInTransactionListPage(value);
}
},
autoSaveTransactionDraft: {
get: function () {
return this.settingsStore.appSettings.autoSaveTransactionDraft;
},
set: function (value) {
this.settingsStore.setAutoSaveTransactionDraft(value);
if (value === 'disabled') {
this.transactionsStore.clearTransactionDraft();
}
}
},
isAutoGetCurrentGeoLocation: {
get: function () {
return this.settingsStore.appSettings.autoGetCurrentGeoLocation;