mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
migrate setting.js and logger.js to ts
This commit is contained in:
@@ -8,7 +8,7 @@ import { PARENT_ACCOUNT_CURRENCY_PLACEHOLDER } from '@/consts/currency.ts';
|
||||
import { DEFAULT_ACCOUNT_ICON_ID } from '@/consts/icon.ts';
|
||||
import { DEFAULT_ACCOUNT_COLOR } from '@/consts/color.ts';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
import { isNumber, isEquals } from '@/lib/common.ts';
|
||||
import { getCurrentUnixTime } from '@/lib/datetime.ts';
|
||||
import { getCategorizedAccountsMap, getAllFilteredAccountsBalance } from '@/lib/account.js';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
import { isEquals } from '@/lib/common.ts';
|
||||
import { getCurrentUnixTime, formatUnixTime } from '@/lib/datetime.ts';
|
||||
import { getExchangedAmount } from '@/lib/numeral.ts';
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import { useExchangeRatesStore } from './exchangeRates.js';
|
||||
|
||||
import userState from '@/lib/userstate.js';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
import { isObject, isString } from '@/lib/common.ts';
|
||||
|
||||
export const useRootStore = defineStore('root', {
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
getThisYearLastUnixTime
|
||||
} from '@/lib/datetime.ts';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
|
||||
function updateTransactionDateRange(state) {
|
||||
const userStore = useUserStore();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia';
|
||||
|
||||
import { WeekDay } from '@/core/datetime.ts';
|
||||
import { DEFAULT_CURRENCY_CODE } from '@/consts/currency.ts';
|
||||
import * as settings from '@/lib/settings.js';
|
||||
import * as settings from '@/lib/settings.ts';
|
||||
|
||||
export const useSettingsStore = defineStore('settings', {
|
||||
state: () => ({
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
import { DEFAULT_ACCOUNT_ICON, DEFAULT_CATEGORY_ICON } from '@/consts/icon.ts';
|
||||
import { DEFAULT_ACCOUNT_COLOR, DEFAULT_CATEGORY_COLOR } from '@/consts/color.ts';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
import {
|
||||
isEquals,
|
||||
isNumber,
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { useUserStore } from './user.js';
|
||||
|
||||
import userState from '@/lib/userstate.js';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
import { isObject } from '@/lib/common.ts';
|
||||
|
||||
export const useTokensStore = defineStore('tokens', {
|
||||
|
||||
@@ -14,7 +14,7 @@ import { TransactionType, TransactionTagFilterType } from '@/core/transaction.ts
|
||||
import { TRANSACTION_MIN_AMOUNT, TRANSACTION_MAX_AMOUNT } from '@/consts/transaction.ts';
|
||||
import userState from '@/lib/userstate.js';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
import {
|
||||
isDefined,
|
||||
isNumber,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { DEFAULT_CATEGORY_ICON_ID } from '@/consts/icon.ts';
|
||||
import { DEFAULT_CATEGORY_COLOR } from '@/consts/color.ts';
|
||||
import { isEquals } from '@/lib/common.ts';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
|
||||
function loadTransactionCategoryList(state, allCategories) {
|
||||
state.allTransactionCategories = allCategories;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia';
|
||||
|
||||
import { isEquals } from '@/lib/common.ts';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
|
||||
function loadTransactionTagList(state, tags) {
|
||||
state.allTransactionTags = tags;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { TransactionType } from '@/core/transaction.ts';
|
||||
import { TemplateType } from '@/core/template.ts';
|
||||
import { isDefined, isObject, isArray, isEquals } from '@/lib/common.ts';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
|
||||
function loadTransactionTemplateList(state, templateType, templates) {
|
||||
state.allTransactionTemplates[templateType] = templates;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia';
|
||||
|
||||
import userState from '@/lib/userstate.js';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
import { isBoolean } from '@/lib/common.ts';
|
||||
|
||||
export const useTwoFactorAuthStore = defineStore('twoFactorAuth', {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { useSettingsStore } from './setting.js';
|
||||
|
||||
import userState from '@/lib/userstate.js';
|
||||
import services from '@/lib/services.js';
|
||||
import logger from '@/lib/logger.js';
|
||||
import logger from '@/lib/logger.ts';
|
||||
import {
|
||||
isObject,
|
||||
isNumber
|
||||
|
||||
Reference in New Issue
Block a user