Show is_open in EditAccount
This commit is contained in:
parent
8899ff5772
commit
4fb3c2a335
@ -3,12 +3,14 @@ import { computed, ref } from 'vue';
|
|||||||
import Modal from '../components/Modal.vue';
|
import Modal from '../components/Modal.vue';
|
||||||
import { useAccountStore } from '../stores/budget-account';
|
import { useAccountStore } from '../stores/budget-account';
|
||||||
import Input from '../components/Input.vue';
|
import Input from '../components/Input.vue';
|
||||||
|
import Checkbox from '../components/Checkbox.vue';
|
||||||
|
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
const CurrentAccount = computed(() => accountStore.CurrentAccount);
|
const CurrentAccount = computed(() => accountStore.CurrentAccount);
|
||||||
|
|
||||||
const accountName = ref("");
|
const accountName = ref("");
|
||||||
const accountOnBudget = ref(true);
|
const accountOnBudget = ref(true);
|
||||||
|
const accountOpen = ref(true);
|
||||||
|
|
||||||
function editAccount(e : any) {
|
function editAccount(e : any) {
|
||||||
accountStore.EditAccount(CurrentAccount.value?.ID ?? "", accountName.value, accountOnBudget.value);
|
accountStore.EditAccount(CurrentAccount.value?.ID ?? "", accountName.value, accountOnBudget.value);
|
||||||
@ -17,6 +19,7 @@ function editAccount(e : any) {
|
|||||||
function openEditAccount(e : any) {
|
function openEditAccount(e : any) {
|
||||||
accountName.value = CurrentAccount.value?.Name ?? "";
|
accountName.value = CurrentAccount.value?.Name ?? "";
|
||||||
accountOnBudget.value = CurrentAccount.value?.OnBudget ?? true;
|
accountOnBudget.value = CurrentAccount.value?.OnBudget ?? true;
|
||||||
|
accountOpen.value = CurrentAccount.value?.IsOpen ?? true;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -33,13 +36,20 @@ function openEditAccount(e : any) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2 px-7 py-3">
|
<div class="mt-2 px-7 py-3">
|
||||||
<Input
|
<Checkbox
|
||||||
class="border-2"
|
class="border-2"
|
||||||
type="checkbox"
|
|
||||||
v-model="accountOnBudget"
|
v-model="accountOnBudget"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<label>On Budget</label>
|
<label>On Budget</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mt-2 px-7 py-3">
|
||||||
|
<Checkbox
|
||||||
|
class="border-2"
|
||||||
|
v-model="accountOpen"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<label>Open</label>
|
||||||
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
@ -16,6 +16,7 @@ export interface Account {
|
|||||||
ID: string
|
ID: string
|
||||||
Name: string
|
Name: string
|
||||||
OnBudget: boolean
|
OnBudget: boolean
|
||||||
|
IsOpen: boolean
|
||||||
ClearedBalance: number
|
ClearedBalance: number
|
||||||
WorkingBalance: number
|
WorkingBalance: number
|
||||||
ReconciledBalance: number
|
ReconciledBalance: number
|
||||||
|
Loading…
x
Reference in New Issue
Block a user