Add custom checkbox component
This commit is contained in:
parent
7b5b16c1b2
commit
489aa88c4b
11
web/src/components/Checkbox.vue
Normal file
11
web/src/components/Checkbox.vue
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
const props = defineProps(["modelValue"]);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
:checked="modelValue"
|
||||||
|
@change="$emit('update:modelValue', ($event.target as HTMLInputElement)?.checked)"
|
||||||
|
class="dark:bg-slate-900">
|
||||||
|
</template>
|
@ -7,6 +7,7 @@ import TransactionEditRow from "./TransactionEditRow.vue";
|
|||||||
import { formatDate } from "../date";
|
import { formatDate } from "../date";
|
||||||
import { useAccountStore } from "../stores/budget-account";
|
import { useAccountStore } from "../stores/budget-account";
|
||||||
import Input from "./Input.vue";
|
import Input from "./Input.vue";
|
||||||
|
import Checkbox from "./Checkbox.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
transactionid: string,
|
transactionid: string,
|
||||||
@ -70,7 +71,7 @@ function getStatusSymbol() {
|
|||||||
{{ TX.GroupID ? "☀" : "" }}
|
{{ TX.GroupID ? "☀" : "" }}
|
||||||
{{ getStatusSymbol() }}
|
{{ getStatusSymbol() }}
|
||||||
<a @click="edit = true;">✎</a>
|
<a @click="edit = true;">✎</a>
|
||||||
<Input v-if="Reconciling && TX.Status != 'Reconciled'" type="checkbox" v-model="TX.Reconciled" />
|
<Checkbox v-if="Reconciling && TX.Status != 'Reconciled'" v-model="TX.Reconciled" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<TransactionEditRow v-if="edit" :transactionid="TX.ID" @save="edit = false" />
|
<TransactionEditRow v-if="edit" :transactionid="TX.ID" @save="edit = false" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user