code refactor
This commit is contained in:
@@ -105,7 +105,7 @@ const transactionTagsStore = useTransactionTagsStore();
|
||||
const selectedItemIds = ref<string[]>(copyArrayTo(props.modelValue, []));
|
||||
const newTag = ref<TransactionTag | null>(null);
|
||||
|
||||
const allTags = computed(() => transactionTagsStore.allTransactionTags);
|
||||
const allTags = computed<TransactionTag[]>(() => transactionTagsStore.allTransactionTags);
|
||||
|
||||
const noAvailableTag = computed<boolean>(() => {
|
||||
if (transactionTagsStore.allTransactionTags) {
|
||||
|
||||
@@ -287,10 +287,10 @@ const transactionTagsStore = useTransactionTagsStore();
|
||||
const confirmDialog = useTemplateRef<ConfirmDialogType>('confirmDialog');
|
||||
const snackbar = useTemplateRef<SnackBarType>('snackbar');
|
||||
|
||||
const tags = computed(() => transactionTagsStore.allTransactionTags);
|
||||
const noAvailableTag = computed(() => isNoAvailableTag(tags.value, showHidden.value));
|
||||
const availableTagCount = computed(() => getAvailableTagCount(tags.value, showHidden.value));
|
||||
const hasEditingTag = computed(() => !!(newTag.value || (editingTag.value.id && editingTag.value.id !== '')));
|
||||
const tags = computed<TransactionTag[]>(() => transactionTagsStore.allTransactionTags);
|
||||
const noAvailableTag = computed<boolean>(() => isNoAvailableTag(tags.value, showHidden.value));
|
||||
const availableTagCount = computed<number>(() => getAvailableTagCount(tags.value, showHidden.value));
|
||||
const hasEditingTag = computed<boolean>(() => !!(newTag.value || (editingTag.value.id && editingTag.value.id !== '')));
|
||||
|
||||
function isTagModified(tag: TransactionTag): boolean {
|
||||
if (tag.id) {
|
||||
|
||||
@@ -181,11 +181,11 @@ const { showToast, routeBackOnError } = useI18nUIComponents();
|
||||
|
||||
const transactionTagsStore = useTransactionTagsStore();
|
||||
|
||||
const tags = computed(() => transactionTagsStore.allTransactionTags);
|
||||
const firstShowingId = computed(() => getFirstShowingId(tags.value, showHidden.value));
|
||||
const lastShowingId = computed(() => getLastShowingId(tags.value, showHidden.value));
|
||||
const noAvailableTag = computed(() => isNoAvailableTag(tags.value, showHidden.value));
|
||||
const hasEditingTag = computed(() => !!(newTag.value || (editingTag.value.id && editingTag.value.id !== '')));
|
||||
const tags = computed<TransactionTag[]>(() => transactionTagsStore.allTransactionTags);
|
||||
const firstShowingId = computed<string | null>(() => getFirstShowingId(tags.value, showHidden.value));
|
||||
const lastShowingId = computed<string | null>(() => getLastShowingId(tags.value, showHidden.value));
|
||||
const noAvailableTag = computed<boolean>(() => isNoAvailableTag(tags.value, showHidden.value));
|
||||
const hasEditingTag = computed<boolean>(() => !!(newTag.value || (editingTag.value.id && editingTag.value.id !== '')));
|
||||
|
||||
function isTagModified(tag: TransactionTag): boolean {
|
||||
if (tag.id) {
|
||||
|
||||
Reference in New Issue
Block a user