From 424ff568cd3aa8f3ae56e079a2d840a2f331339d Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 3 Aug 2022 14:58:58 +0200 Subject: [PATCH] feat(ticketBoxing): fix front --- src/i18n/en/index.js | 6 +- src/i18n/es/index.js | 6 ++ src/pages/Ticket/Card/TicketBoxing.vue | 97 +++++++++++++++++++------- 3 files changed, 81 insertions(+), 28 deletions(-) diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index b12eb9530..16c7ab7e0 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -56,8 +56,10 @@ export default { basicData: 'Basic Data' }, boxing: { - expedition: 'Expedición', - item: 'Artículo' + expedition: 'Expedition', + item: 'Item', + created: 'Created', + worker: 'Worker' } }, components: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 82f136062..67e3801b8 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -54,6 +54,12 @@ export default { list: 'Listado', createTicket: 'Crear ticket', basicData: 'Datos básicos' + }, + boxing: { + expedition: 'Expedición', + item: 'Artículo', + created: 'Creado', + worker: 'Trabajador' } }, components: { diff --git a/src/pages/Ticket/Card/TicketBoxing.vue b/src/pages/Ticket/Card/TicketBoxing.vue index 2232df6d6..716310336 100644 --- a/src/pages/Ticket/Card/TicketBoxing.vue +++ b/src/pages/Ticket/Card/TicketBoxing.vue @@ -3,6 +3,7 @@ import { useI18n } from 'vue-i18n'; import { computed, ref, onMounted } from 'vue'; import { useRouter } from 'vue-router'; import axios from 'axios'; +import { date } from 'quasar'; const router = useRouter(); const { t } = useI18n(); @@ -17,48 +18,92 @@ const entityId = computed(function () { const expeditions = ref({}); const url = ref({}); +//const video = ref({}); async function fetch() { const filter = { where: { - ticketFk: entityId.value - } - } + ticketFk: entityId.value, + }, + }; const { data } = await axios.get(`/api/Expeditions/filter`, { - params: { filter } + params: { filter }, }); if (data) expeditions.value = data; - console.log(expeditions.value) + console.log(expeditions.value); } async function selectVideo(expeditionId) { - url.value = `http://localhost:8080/api/Boxings/getVideo?id=${expeditionId}` + url.value = `${window.location.origin}/api/Boxings/getVideo?id=${expeditionId}`; } +/*async function getVideo(expeditionId) { + const { data } = await axios.get(`/api/Boxings/getVideo?id=${expeditionId}`); + const myUrl = window.URL.createObjectURL(new Blob([data])); + console.log(myUrl); + if (data) url.value = data; +}*/ +