mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
support setting timezone type in reconciliation statement dialog / page
This commit is contained in:
@@ -273,6 +273,7 @@
|
||||
<account-balance-trends-bar-chart
|
||||
:loading="loading"
|
||||
:date-aggregation-type="chartDataDateAggregationType"
|
||||
:timezone-used-for-date-range="timezoneUsedForDateRange"
|
||||
:fiscal-year-start="fiscalYearStart"
|
||||
:items="reconciliationStatements?.transactions"
|
||||
:account="currentAccount"
|
||||
@@ -282,6 +283,9 @@
|
||||
|
||||
<f7-popover class="chart-data-date-aggregation-type-popover-menu">
|
||||
<f7-list dividers>
|
||||
<f7-list-item group-title>
|
||||
<small>{{ tt('Time Granularity') }}</small>
|
||||
</f7-list-item>
|
||||
<f7-list-item link="#" no-chevron popover-close
|
||||
:title="dateAggregationType.displayName"
|
||||
:class="{ 'list-item-selected': chartDataDateAggregationType === dateAggregationType.type }"
|
||||
@@ -292,6 +296,20 @@
|
||||
<f7-icon class="list-item-checked-icon" f7="checkmark_alt" v-if="chartDataDateAggregationType === dateAggregationType.type"></f7-icon>
|
||||
</template>
|
||||
</f7-list-item>
|
||||
<f7-list-item group-title>
|
||||
<small>{{ tt('Timezone Used for Date Range') }}</small>
|
||||
</f7-list-item>
|
||||
<f7-list-item link="#" no-chevron popover-close
|
||||
:title="timezoneType.displayName"
|
||||
:class="{ 'list-item-selected': timezoneUsedForDateRange === timezoneType.type }"
|
||||
:key="timezoneType.type"
|
||||
v-for="timezoneType in allTimezoneTypesUsedForDateRange"
|
||||
@click="setTimezoneUsedForDateRange(timezoneType.type)">
|
||||
<template #after>
|
||||
<f7-icon class="list-item-checked-icon" f7="checkmark_alt" v-if="timezoneUsedForDateRange === timezoneType.type"></f7-icon>
|
||||
</template>
|
||||
</f7-list-item>
|
||||
|
||||
</f7-list>
|
||||
</f7-popover>
|
||||
|
||||
@@ -352,7 +370,6 @@ import { TextDirection } from '@/core/text.ts';
|
||||
import { type TimeRangeAndDateType, DateRange, DateRangeScene } from '@/core/datetime.ts';
|
||||
import { AccountType } from '@/core/account.ts';
|
||||
import { TransactionType } from '@/core/transaction.ts';
|
||||
import { ChartDateAggregationType } from '@/core/statistics.ts';
|
||||
import { TRANSACTION_MIN_AMOUNT, TRANSACTION_MAX_AMOUNT } from '@/consts/transaction.ts';
|
||||
import { type TransactionReconciliationStatementResponseItemWithInfo } from '@/models/transaction.ts';
|
||||
|
||||
@@ -398,9 +415,12 @@ const {
|
||||
startTime,
|
||||
endTime,
|
||||
reconciliationStatements,
|
||||
chartDataDateAggregationType,
|
||||
timezoneUsedForDateRange,
|
||||
firstDayOfWeek,
|
||||
fiscalYearStart,
|
||||
allDateAggregationTypes,
|
||||
allTimezoneTypesUsedForDateRange,
|
||||
isCurrentLiabilityAccount,
|
||||
currentAccount,
|
||||
currentAccountCurrency,
|
||||
@@ -430,7 +450,6 @@ const loading = ref<boolean>(false);
|
||||
const loadingError = ref<unknown | null>(null);
|
||||
const queryDateRangeType = ref<number>(DateRange.ThisMonth.type);
|
||||
const showAccountBalanceTrendsCharts = ref<boolean>(false);
|
||||
const chartDataDateAggregationType = ref<number>(ChartDateAggregationType.Day.type);
|
||||
const transactionToDelete = ref<TransactionReconciliationStatementResponseItemWithInfo | null>(null);
|
||||
const newClosingBalance = ref<number>(0);
|
||||
const showCustomDateRangeSheet = ref<boolean>(false);
|
||||
@@ -671,6 +690,10 @@ function setChartDataDateAggregationType(type: number): void {
|
||||
chartDataDateAggregationType.value = type;
|
||||
}
|
||||
|
||||
function setTimezoneUsedForDateRange(type: number): void {
|
||||
timezoneUsedForDateRange.value = type;
|
||||
}
|
||||
|
||||
function renderExternal(vl: unknown, vlData: ReconciliationStatementVirtualListData): void {
|
||||
virtualDataItems.value = vlData;
|
||||
}
|
||||
|
||||
@@ -637,7 +637,7 @@ import {
|
||||
import {
|
||||
getCurrentUnixTime,
|
||||
parseDateTimeFromUnixTime,
|
||||
getDayFirstUnixTimeBySpecifiedUnixTime,
|
||||
getDayFirstDateTimeBySpecifiedUnixTime,
|
||||
getYearMonthFirstUnixTime,
|
||||
getYearMonthLastUnixTime,
|
||||
getShiftedDateRangeAndDateType,
|
||||
@@ -1057,7 +1057,7 @@ function changeDateFilter(dateType: number): void {
|
||||
if (dateType === DateRange.Custom.type) { // Custom
|
||||
if (!query.value.minTime || !query.value.maxTime) {
|
||||
customMaxDatetime.value = getCurrentUnixTime();
|
||||
customMinDatetime.value = getDayFirstUnixTimeBySpecifiedUnixTime(customMaxDatetime.value);
|
||||
customMinDatetime.value = getDayFirstDateTimeBySpecifiedUnixTime(customMaxDatetime.value).getUnixTime();
|
||||
} else {
|
||||
customMaxDatetime.value = query.value.maxTime;
|
||||
customMinDatetime.value = query.value.minTime;
|
||||
|
||||
Reference in New Issue
Block a user