support "Add Another" in transaction add page / dialog (#471)
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
</f7-list>
|
||||
|
||||
<f7-block-title>{{ tt('Transaction List Page') }}</f7-block-title>
|
||||
<f7-list strong inset dividers>
|
||||
<f7-list strong inset dividers class="settings-list">
|
||||
<f7-list-item>
|
||||
<template #after-title>
|
||||
{{ tt('Show Monthly Total Amount') }}
|
||||
@@ -91,7 +91,33 @@
|
||||
</f7-list>
|
||||
|
||||
<f7-block-title>{{ tt('Transaction Edit Page') }}</f7-block-title>
|
||||
<f7-list strong inset dividers>
|
||||
<f7-list strong inset dividers class="settings-list">
|
||||
<f7-list-item
|
||||
class="item-truncate-after-text"
|
||||
link="#"
|
||||
@click="showQuickAddButtonActionInMobileTransactionEditPagePopup = true"
|
||||
>
|
||||
<template #after-title>
|
||||
<div class="item-actual-title">
|
||||
<span>{{ tt('Quick Add Button Action') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #after>
|
||||
{{ findDisplayNameByType(allTransactionQuickAddButtonActionTypes, quickAddButtonActionInMobileTransactionEditPage) }}
|
||||
</template>
|
||||
<list-item-selection-popup value-type="item"
|
||||
key-field="type" value-field="type"
|
||||
title-field="displayName"
|
||||
:title="tt('Quick Add Button Action')"
|
||||
:enable-filter="true"
|
||||
:filter-placeholder="tt('Quick Add Button Action')"
|
||||
:filter-no-items-text="tt('No results')"
|
||||
:items="allTransactionQuickAddButtonActionTypes"
|
||||
v-model:show="showQuickAddButtonActionInMobileTransactionEditPagePopup"
|
||||
v-model="quickAddButtonActionInMobileTransactionEditPage">
|
||||
</list-item-selection-popup>
|
||||
</f7-list-item>
|
||||
|
||||
<f7-list-item
|
||||
class="item-truncate-after-text"
|
||||
link="#"
|
||||
@@ -138,7 +164,7 @@
|
||||
</f7-list>
|
||||
|
||||
<f7-block-title>{{ tt('Account List Page') }}</f7-block-title>
|
||||
<f7-list strong inset dividers>
|
||||
<f7-list strong inset dividers class="settings-list">
|
||||
<f7-list-item
|
||||
class="item-truncate-after-text"
|
||||
link="/settings/filter/account?type=accountListTotalAmount"
|
||||
@@ -168,7 +194,7 @@
|
||||
</f7-list>
|
||||
|
||||
<f7-block-title>{{ tt('Exchange Rates Data Page') }}</f7-block-title>
|
||||
<f7-list strong inset dividers>
|
||||
<f7-list strong inset dividers class="settings-list">
|
||||
<f7-list-item
|
||||
class="item-truncate-after-text"
|
||||
link="#"
|
||||
@@ -209,11 +235,12 @@ import { useSettingsStore } from '@/stores/setting.ts';
|
||||
import { useAccountsStore } from '@/stores/account.ts';
|
||||
import { useTransactionCategoriesStore } from '@/stores/transactionCategory.ts';
|
||||
|
||||
import type { TypeAndDisplayName } from '@/core/base.ts';
|
||||
import { CategoryType } from '@/core/category.ts';
|
||||
|
||||
import { findNameByValue, findDisplayNameByType } from '@/lib/common.ts';
|
||||
|
||||
const { tt } = useI18n();
|
||||
const { tt, getAllTransactionQuickAddButtonActionTypes } = useI18n();
|
||||
const { showToast } = useI18nUIComponents();
|
||||
const {
|
||||
loadingAccounts,
|
||||
@@ -242,9 +269,17 @@ const accountsStore = useAccountsStore();
|
||||
const transactionCategoriesStore = useTransactionCategoriesStore();
|
||||
|
||||
const showTimezoneUsedForStatisticsInHomePagePopup = ref<boolean>(false);
|
||||
const showQuickAddButtonActionInMobileTransactionEditPagePopup = ref<boolean>(false);
|
||||
const showAutoSaveTransactionDraftPopup = ref<boolean>(false);
|
||||
const showCurrencySortByInExchangeRatesPagePopup = ref<boolean>(false);
|
||||
|
||||
const allTransactionQuickAddButtonActionTypes = computed<TypeAndDisplayName[]>(() => getAllTransactionQuickAddButtonActionTypes());
|
||||
|
||||
const quickAddButtonActionInMobileTransactionEditPage = computed<number>({
|
||||
get: () => settingsStore.appSettings.quickAddButtonActionInMobileTransactionEditPage,
|
||||
set: (value) => settingsStore.setQuickAddButtonActionInMobileTransactionEditPage(value)
|
||||
});
|
||||
|
||||
const alwaysShowTransactionPicturesInMobileTransactionEditPage = computed<boolean>({
|
||||
get: () => settingsStore.appSettings.alwaysShowTransactionPicturesInMobileTransactionEditPage,
|
||||
set: (value) => settingsStore.setAlwaysShowTransactionPicturesInMobileTransactionEditPage(value)
|
||||
|
||||
Reference in New Issue
Block a user