diff --git a/src/pages/Ticket/Card/TicketService.vue b/src/pages/Ticket/Card/TicketService.vue index bacad697e..5d9688834 100644 --- a/src/pages/Ticket/Card/TicketService.vue +++ b/src/pages/Ticket/Card/TicketService.vue @@ -10,17 +10,16 @@ import TicketCreateServiceType from './TicketCreateServiceType.vue'; import VnInput from 'src/components/common/VnInput.vue'; import { useArrayData } from 'src/composables/useArrayData'; -import { useStateStore } from 'stores/useStateStore'; import useNotify from 'src/composables/useNotify.js'; import axios from 'axios'; -const stateStore = useStateStore(); const route = useRoute(); const router = useRouter(); const { t } = useI18n(); const ticketServiceTypeFetchRef = ref(null); const ticketServiceCrudRef = ref(null); const ticketServiceOptions = ref([]); +const selected = ref([]); const arrayData = useArrayData('TicketNotes'); const { store } = arrayData; const { notify } = useNotify(); @@ -28,11 +27,6 @@ const { notify } = useNotify(); const selectedServices = ref(new Set()); const defaultTaxClass = ref(null); -const toggleCheckSelection = (id) => { - if (selectedServices.value.has(id)) selectedServices.value.delete(id); - else selectedServices.value.add(id); -}; - const crudModelFilter = computed(() => ({ where: { ticketFk: route.params.id }, })); @@ -50,6 +44,8 @@ watch( } ); +onMounted(async () => await getDefaultTaxClass()); + const createRefund = async () => { try { if (!selectedServices.value.size) return; @@ -88,7 +84,29 @@ const getDefaultTaxClass = async () => { } }; -onMounted(async () => await getDefaultTaxClass()); +const columns = computed(() => [ + { + name: 'description', + label: t('service.description'), + field: (row) => row.ticketServiceTypeFk, + sortable: true, + align: 'left', + }, + { + name: 'quantity', + label: t('service.quantity'), + field: (row) => row.quantity, + sortable: true, + align: 'left', + }, + { + name: 'price', + label: t('service.price'), + field: (row) => row.price, + sortable: true, + align: 'left', + }, +]); @@ -98,41 +116,37 @@ onMounted(async () => await getDefaultTaxClass()); auto-load url="TicketServiceTypes" /> - - - - - - - - - + + + + + + + + await getDefaultTaxClass()); /> + + + + + + + + - - - {{ t('service.removeNote') }} - - - - - - {{ t('service.addService') }} - - - - - - + + + + + + + +