Bring submit button to work
This commit is contained in:
parent
6576c994c9
commit
84c95d0c4e
@ -47,8 +47,14 @@ const payload = computed(() => JSON.stringify({
|
|||||||
const transactionsStore = useTransactionsStore();
|
const transactionsStore = useTransactionsStore();
|
||||||
function saveTransaction(e: MouseEvent) {
|
function saveTransaction(e: MouseEvent) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
function Save() {
|
||||||
transactionsStore.saveTransaction(payload.value);
|
transactionsStore.saveTransaction(payload.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({Save});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -16,6 +16,12 @@ defineProps<{
|
|||||||
accountid: string
|
accountid: string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const modalInputRow = ref<TransactionInputRow>(null);
|
||||||
|
|
||||||
|
function submitModal() {
|
||||||
|
modalInputRow.value.Save();
|
||||||
|
}
|
||||||
|
|
||||||
const accounts = useAccountStore();
|
const accounts = useAccountStore();
|
||||||
const transactions = useTransactionsStore();
|
const transactions = useTransactionsStore();
|
||||||
const TargetReconcilingBalance = ref(0);
|
const TargetReconcilingBalance = ref(0);
|
||||||
@ -146,7 +152,7 @@ function createReconcilationTransaction() {
|
|||||||
/>
|
/>
|
||||||
</table>
|
</table>
|
||||||
<div class="md:hidden">
|
<div class="md:hidden">
|
||||||
<Modal>
|
<Modal @submit="submitModal">
|
||||||
<template #placeholder>
|
<template #placeholder>
|
||||||
<Button
|
<Button
|
||||||
class="fixed right-4 bottom-4 font-bold text-lg bg-blue-500 py-2"
|
class="fixed right-4 bottom-4 font-bold text-lg bg-blue-500 py-2"
|
||||||
@ -155,6 +161,7 @@ function createReconcilationTransaction() {
|
|||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
<TransactionInputRow
|
<TransactionInputRow
|
||||||
|
ref="modalInputRow"
|
||||||
class="grid grid-cols-2"
|
class="grid grid-cols-2"
|
||||||
:budgetid="budgetid"
|
:budgetid="budgetid"
|
||||||
:accountid="accountid"
|
:accountid="accountid"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user