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