refactor: refs #8388 clean up imports and improve variable naming in InvoiceInDueDay.vue
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
ca596b418a
commit
92a282d71c
|
@ -3,33 +3,26 @@ import { ref, computed, onBeforeMount } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { toDate } from 'src/filters';
|
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import { getTotal } from 'src/composables/getTotal';
|
import { getTotal } from 'src/composables/getTotal';
|
||||||
// import CrudModel from 'src/components/CrudModel.vue'; // Removed CrudModel import
|
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
|
||||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
|
||||||
import { toCurrency } from 'filters/index';
|
import { toCurrency } from 'filters/index';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue'; // Added VnTable import
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { notify } = useNotify(); // Keep notify if used elsewhere, otherwise remove
|
const { notify } = useNotify();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const arrayData = useArrayData();
|
const arrayData = useArrayData();
|
||||||
const invoiceIn = computed(() => arrayData.store.data);
|
const invoiceIn = computed(() => arrayData.store.data);
|
||||||
const currency = computed(() => invoiceIn.value?.currency?.code);
|
const currency = computed(() => invoiceIn.value?.currency?.code);
|
||||||
|
|
||||||
const rowsSelected = ref([]);
|
const rowsSelected = ref([]);
|
||||||
const invoiceInDueDayTableRef = ref(); // Renamed ref for VnTable
|
const invoiceInDueDayTableRef = ref();
|
||||||
const invoiceId = +route.params.id;
|
const invoiceId = +route.params.id;
|
||||||
const filter = { where: { invoiceInFk: invoiceId } };
|
const filter = { where: { invoiceInFk: invoiceId } };
|
||||||
const areRows = ref(false);
|
const areRows = ref(false);
|
||||||
const totalTaxableBase = ref();
|
const totalTaxableBase = ref();
|
||||||
const totalVat = ref();
|
const totalVat = ref();
|
||||||
|
|
||||||
// Access formData from VnTable's internal CrudModelRef
|
|
||||||
const tableRows = computed(
|
const tableRows = computed(
|
||||||
() => invoiceInDueDayTableRef.value?.CrudModelRef?.formData || [],
|
() => invoiceInDueDayTableRef.value?.CrudModelRef?.formData || [],
|
||||||
);
|
);
|
||||||
|
@ -139,6 +132,7 @@ onBeforeMount(async () => await setTaxableBase());
|
||||||
:column-search="false"
|
:column-search="false"
|
||||||
:disable-option="{ card: true }"
|
:disable-option="{ card: true }"
|
||||||
class="q-pa-none"
|
class="q-pa-none"
|
||||||
|
|
||||||
>
|
>
|
||||||
<template #column-footer-amount>
|
<template #column-footer-amount>
|
||||||
<QChip
|
<QChip
|
||||||
|
|
Loading…
Reference in New Issue