Skip to content

Commit 246bbca

Browse files
committed
fix: typescript warnings
1 parent 2be2fdd commit 246bbca

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

client/src/_vue/components/base/ImportCategoryMapping.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ const mapping = ref<Record<string, number | null>>({})
6969
const prefill = () => {
7070
const next: Record<string, number | null> = {}
7171
for (const raw of props.importedCategories) {
72-
const key = raw // keep original for server
72+
const key = raw
7373
const n = normalize(raw)
7474
const exact = byNormalizedName.value.get(n)
7575
7676
if (exact) {
77-
next[key] = exact.id
77+
next[key] = exact.id ?? null
7878
continue
7979
}
8080
@@ -89,9 +89,9 @@ const prefill = () => {
8989
}
9090
9191
if (picked) {
92-
next[key] = picked.id
92+
next[key] = picked.id ?? null
9393
} else {
94-
next[key] = defaultCategory.value ? defaultCategory.value.id : null
94+
next[key] = defaultCategory.value?.id ?? null
9595
}
9696
}
9797
mapping.value = next

client/src/_vue/components/forms/AccountProjectionForm.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const props = defineProps<{
2323
const transactionStore = useTransactionStore();
2424
const statStore = useStatisticsStore();
2525
const sharedStore = useSharedStore();
26-
// const accountStore = useAccountStore();
26+
const accountStore = useAccountStore();
2727
const toastStore = useToastStore();
2828
2929
const categories = ref<CategoryOrGroup[]>([]);
@@ -169,6 +169,7 @@ const v$ = useVuelidate(rules, { record });
169169
async function saveProjection() {
170170
// TODO: Implement save
171171
try {
172+
await accountStore
172173
} catch (e) {
173174
toastStore.errorResponseToast(e)
174175
}

0 commit comments

Comments
 (0)