support changing account category order
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
<v-tabs show-arrows class="account-category-tabs my-4" direction="vertical"
|
||||
:disabled="loading" v-model="activeAccountCategoryType">
|
||||
<v-tab class="tab-text-truncate" :key="accountCategory.type" :value="accountCategory.type"
|
||||
v-for="accountCategory in AccountCategory.values()"
|
||||
v-for="accountCategory in AccountCategory.values(customAccountCategoryOrder)"
|
||||
v-show="!hideAccountCategoriesWithoutAccounts || (allCategorizedAccountsMap[accountCategory.type] && allCategorizedAccountsMap[accountCategory.type]!.accounts.length > 0)">
|
||||
<ItemIcon icon-type="account" :icon-id="accountCategory.defaultAccountIconId" />
|
||||
<div class="d-flex flex-column text-truncate ms-2">
|
||||
@@ -372,6 +372,8 @@ const {
|
||||
showHidden,
|
||||
displayOrderModified,
|
||||
showAccountBalance,
|
||||
customAccountCategoryOrder,
|
||||
defaultAccountCategory,
|
||||
firstDayOfWeek,
|
||||
fiscalYearStart,
|
||||
allAccounts,
|
||||
@@ -394,7 +396,7 @@ const reconciliationStatementDialog = useTemplateRef<ReconciliationStatementDial
|
||||
const moveAllTransactionsDialog = useTemplateRef<MoveAllTransactionsDialogType>('moveAllTransactionsDialog');
|
||||
const clearAllTransactionsDialog = useTemplateRef<ClearAllTransactionsDialogType>('clearAllTransactionsDialog');
|
||||
|
||||
const activeAccountCategoryType = ref<number>(AccountCategory.Default.type);
|
||||
const activeAccountCategoryType = ref<number>(defaultAccountCategory.value.type);
|
||||
const activeTab = ref<string>('accountPage');
|
||||
const activeSubAccount = ref<Record<string, string>>({});
|
||||
const accountToShowReconciliationStatement = ref<Account | null>(null);
|
||||
|
||||
@@ -229,6 +229,7 @@ type SnackBarType = InstanceType<typeof SnackBar>;
|
||||
|
||||
const { tt } = useI18n();
|
||||
const {
|
||||
defaultAccountCategory,
|
||||
editAccountId,
|
||||
clientSessionId,
|
||||
loading,
|
||||
@@ -279,7 +280,7 @@ const accountAmountTitle = computed<string>(() => {
|
||||
|
||||
const isAccountModified = computed<boolean>(() => {
|
||||
if (!editAccountId.value) {
|
||||
return !account.value.equals(Account.createNewAccount(userStore.currentUserDefaultCurrency, account.value.balanceTime ?? getCurrentUnixTimeForNewAccount()));
|
||||
return !account.value.equals(Account.createNewAccount(defaultAccountCategory, userStore.currentUserDefaultCurrency, account.value.balanceTime ?? getCurrentUnixTimeForNewAccount()));
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
@@ -293,7 +294,7 @@ function open(options?: { id?: string, currentAccount?: Account, category?: numb
|
||||
loading.value = true;
|
||||
submitting.value = false;
|
||||
|
||||
const newAccount = Account.createNewAccount(userStore.currentUserDefaultCurrency, getCurrentUnixTimeForNewAccount());
|
||||
const newAccount = Account.createNewAccount(defaultAccountCategory, userStore.currentUserDefaultCurrency, getCurrentUnixTimeForNewAccount());
|
||||
account.value.fillFrom(newAccount);
|
||||
subAccounts.value = [];
|
||||
currentAccountIndex.value = -1;
|
||||
|
||||
Reference in New Issue
Block a user