mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
modify method name
This commit is contained in:
+1
-1
@@ -345,7 +345,7 @@ export function arrayContainsFieldValue(array, fieldName, value) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function categoriedArrayToPlainArray(object) {
|
export function categorizedArrayToPlainArray(object) {
|
||||||
const ret = [];
|
const ret = [];
|
||||||
|
|
||||||
for (let field in object) {
|
for (let field in object) {
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ import { useExchangeRatesStore } from '@/stores/exchangeRates.js';
|
|||||||
|
|
||||||
import assetConstants from '@/consts/asset.js';
|
import assetConstants from '@/consts/asset.js';
|
||||||
import categoryConstants from '@/consts/category.js';
|
import categoryConstants from '@/consts/category.js';
|
||||||
import { categoriedArrayToPlainArray } from '@/lib/common.js';
|
import { categorizedArrayToPlainArray } from '@/lib/common.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
mdiArrowLeft,
|
mdiArrowLeft,
|
||||||
@@ -415,7 +415,7 @@ export default {
|
|||||||
let submitCategories = [];
|
let submitCategories = [];
|
||||||
|
|
||||||
if (self.usePresetCategories) {
|
if (self.usePresetCategories) {
|
||||||
submitCategories = categoriedArrayToPlainArray(self.allPresetCategories);
|
submitCategories = categorizedArrayToPlainArray(self.allPresetCategories);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.rootStore.register({
|
self.rootStore.register({
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ import { mapStores } from 'pinia';
|
|||||||
import { useTransactionCategoriesStore } from '@/stores/transactionCategory.js';
|
import { useTransactionCategoriesStore } from '@/stores/transactionCategory.js';
|
||||||
|
|
||||||
import categoryConstants from '@/consts/category.js';
|
import categoryConstants from '@/consts/category.js';
|
||||||
import { categoriedArrayToPlainArray } from '@/lib/common.js';
|
import { categorizedArrayToPlainArray } from '@/lib/common.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
mdiDotsVertical
|
mdiDotsVertical
|
||||||
@@ -131,7 +131,7 @@ export default {
|
|||||||
|
|
||||||
self.submitting = true;
|
self.submitting = true;
|
||||||
|
|
||||||
const submitCategories = categoriedArrayToPlainArray(self.allPresetCategories);
|
const submitCategories = categorizedArrayToPlainArray(self.allPresetCategories);
|
||||||
|
|
||||||
self.transactionCategoriesStore.addCategories({
|
self.transactionCategoriesStore.addCategories({
|
||||||
categories: submitCategories
|
categories: submitCategories
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ import { useTransactionCategoriesStore } from '@/stores/transactionCategory.js';
|
|||||||
import { useExchangeRatesStore } from '@/stores/exchangeRates.js';
|
import { useExchangeRatesStore } from '@/stores/exchangeRates.js';
|
||||||
|
|
||||||
import categoryConstants from '@/consts/category.js';
|
import categoryConstants from '@/consts/category.js';
|
||||||
import { getNameByKeyValue, categoriedArrayToPlainArray } from '@/lib/common.js';
|
import { getNameByKeyValue, categorizedArrayToPlainArray } from '@/lib/common.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: [
|
props: [
|
||||||
@@ -298,7 +298,7 @@ export default {
|
|||||||
let submitCategories = [];
|
let submitCategories = [];
|
||||||
|
|
||||||
if (self.usePresetCategories) {
|
if (self.usePresetCategories) {
|
||||||
submitCategories = categoriedArrayToPlainArray(self.allPresetCategories);
|
submitCategories = categorizedArrayToPlainArray(self.allPresetCategories);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.rootStore.register({
|
self.rootStore.register({
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ import { mapStores } from 'pinia';
|
|||||||
import { useTransactionCategoriesStore } from '@/stores/transactionCategory.js';
|
import { useTransactionCategoriesStore } from '@/stores/transactionCategory.js';
|
||||||
|
|
||||||
import categoryConstants from '@/consts/category.js';
|
import categoryConstants from '@/consts/category.js';
|
||||||
import { getObjectOwnFieldCount, categoriedArrayToPlainArray } from '@/lib/common.js';
|
import { getObjectOwnFieldCount, categorizedArrayToPlainArray } from '@/lib/common.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: [
|
props: [
|
||||||
@@ -115,7 +115,7 @@ export default {
|
|||||||
self.submitting = true;
|
self.submitting = true;
|
||||||
self.$showLoading(() => self.submitting);
|
self.$showLoading(() => self.submitting);
|
||||||
|
|
||||||
const submitCategories = categoriedArrayToPlainArray(self.allPresetCategories);
|
const submitCategories = categorizedArrayToPlainArray(self.allPresetCategories);
|
||||||
|
|
||||||
self.transactionCategoriesStore.addCategories({
|
self.transactionCategoriesStore.addCategories({
|
||||||
categories: submitCategories
|
categories: submitCategories
|
||||||
|
|||||||
Reference in New Issue
Block a user