fix cannot create transaction tag in transaction edit dialog
This commit is contained in:
@@ -38,8 +38,8 @@ export class TransactionTag implements TransactionTagInfoResponse {
|
|||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static createNewTag(): TransactionTag {
|
public static createNewTag(name?: string): TransactionTag {
|
||||||
return new TransactionTag('', '', 0, false);
|
return new TransactionTag('', name || '', 0, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -406,7 +406,8 @@ import { TemplateType, ScheduledTemplateFrequencyType } from '@/core/template.ts
|
|||||||
import { TRANSACTION_MAX_PICTURE_COUNT } from '@/consts/transaction.ts';
|
import { TRANSACTION_MAX_PICTURE_COUNT } from '@/consts/transaction.ts';
|
||||||
import { KnownErrorCode } from '@/consts/api.ts';
|
import { KnownErrorCode } from '@/consts/api.ts';
|
||||||
import { SUPPORTED_IMAGE_EXTENSIONS } from '@/consts/file.ts';
|
import { SUPPORTED_IMAGE_EXTENSIONS } from '@/consts/file.ts';
|
||||||
import logger from '@/lib/logger.ts';
|
import { TransactionTag } from '@/models/transaction_tag.ts';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isArray,
|
isArray,
|
||||||
getNameByKeyValue
|
getNameByKeyValue
|
||||||
@@ -427,6 +428,7 @@ import {
|
|||||||
isTransactionPicturesEnabled,
|
isTransactionPicturesEnabled,
|
||||||
getMapProvider
|
getMapProvider
|
||||||
} from '@/lib/server_settings.ts';
|
} from '@/lib/server_settings.ts';
|
||||||
|
import logger from '@/lib/logger.ts';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
mdiDotsVertical,
|
mdiDotsVertical,
|
||||||
@@ -1181,9 +1183,7 @@ export default {
|
|||||||
self.submitting = true;
|
self.submitting = true;
|
||||||
|
|
||||||
self.transactionTagsStore.saveTag({
|
self.transactionTagsStore.saveTag({
|
||||||
tag: {
|
tag: TransactionTag.createNewTag(tagName)
|
||||||
name: tagName
|
|
||||||
}
|
|
||||||
}).then(tag => {
|
}).then(tag => {
|
||||||
self.submitting = false;
|
self.submitting = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user