From 4e2358d722e99a3bba1bddbbd1fe2dc36957d506 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 11 Jun 2024 11:58:06 +0200 Subject: [PATCH 01/11] fix: point 3 --- src/router/modules/department.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/modules/department.js b/src/router/modules/department.js index dfd5e64ba..9aab40534 100644 --- a/src/router/modules/department.js +++ b/src/router/modules/department.js @@ -9,7 +9,7 @@ export default { moduleName: 'Department', }, component: RouterView, - redirect: { name: 'DepartmentCard' }, + redirect: { name: 'WorkerDepartment' }, menus: { main: [], card: ['DepartmentBasicData'], From fe2412f6d903572cca25727a2421a4f80a6a944a Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 11 Jun 2024 11:58:20 +0200 Subject: [PATCH 02/11] fix: point 1 --- src/pages/Department/Card/DepartmentDescriptorProxy.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Department/Card/DepartmentDescriptorProxy.vue b/src/pages/Department/Card/DepartmentDescriptorProxy.vue index 07a6b6af1..5b556f655 100644 --- a/src/pages/Department/Card/DepartmentDescriptorProxy.vue +++ b/src/pages/Department/Card/DepartmentDescriptorProxy.vue @@ -1,6 +1,6 @@ + + diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index 6cb7291dc..71b926308 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -12,7 +12,7 @@ export default { redirect: { name: 'TicketMain' }, menus: { main: ['TicketList'], - card: ['TicketBoxing', 'TicketSms', 'TicketSale'], + card: ['TicketBoxing', 'TicketSms', 'TicketSale', 'TicketLog'], }, children: [ { @@ -93,6 +93,15 @@ export default { }, component: () => import('src/pages/Ticket/Card/TicketSms.vue'), }, + { + path: 'log', + name: 'TicketLog', + meta: { + title: 'log', + icon: 'history', + }, + component: () => import('src/pages/Ticket/Card/TicketLog.vue'), + }, ], }, ], From 47768faea45d079659f731685e38fabdfa5dfaeb Mon Sep 17 00:00:00 2001 From: wbuezas Date: Thu, 20 Jun 2024 09:42:32 -0300 Subject: [PATCH 05/11] Change model --- src/pages/Ticket/Card/TicketLog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Ticket/Card/TicketLog.vue b/src/pages/Ticket/Card/TicketLog.vue index a15e89cb6..94b63a117 100644 --- a/src/pages/Ticket/Card/TicketLog.vue +++ b/src/pages/Ticket/Card/TicketLog.vue @@ -3,5 +3,5 @@ import VnLog from 'src/components/common/VnLog.vue'; From 9ce49bf1083ad5df1748907f9699df00ce76bfe1 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 21 Jun 2024 11:31:09 +0200 Subject: [PATCH 06/11] fix: TravelLog --- src/pages/Travel/Card/TravelLog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Travel/Card/TravelLog.vue b/src/pages/Travel/Card/TravelLog.vue index 1a2667ff7..a1f774769 100644 --- a/src/pages/Travel/Card/TravelLog.vue +++ b/src/pages/Travel/Card/TravelLog.vue @@ -2,5 +2,5 @@ import VnLog from 'src/components/common/VnLog.vue'; From febc7f1f469a20c70c66b5b909ab679a9e1916ac Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 21 Jun 2024 11:33:14 +0200 Subject: [PATCH 07/11] fix: notify icon style --- src/boot/axios.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/boot/axios.js b/src/boot/axios.js index e3e7289af..4fd83ddea 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -1,11 +1,10 @@ import axios from 'axios'; -import { Notify } from 'quasar'; import { useSession } from 'src/composables/useSession'; import { Router } from 'src/router'; -import { i18n } from './i18n'; +import useNotify from 'src/composables/useNotify.js'; const session = useSession(); -const { t } = i18n.global; +const { notify } = useNotify(); axios.defaults.baseURL = '/api/'; @@ -27,10 +26,7 @@ const onResponse = (response) => { const isSaveRequest = method === 'patch'; if (isSaveRequest) { - Notify.create({ - message: t('globals.dataSaved'), - type: 'positive', - }); + notify('globals.dataSaved', 'positive'); } return response; @@ -67,10 +63,7 @@ const onResponseError = (error) => { return Promise.reject(error); } - Notify.create({ - message: t(message), - type: 'negative', - }); + notify(message, 'negative'); return Promise.reject(error); }; From 891c0d2347159527d0493bc7ccf349eaed612f38 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 21 Jun 2024 13:05:28 +0200 Subject: [PATCH 08/11] feat: refs 6238 show notes & create vnPopup --- src/components/common/VnPopup.vue | 23 +++++++++++++++++++++ src/components/ui/CardDescriptor.vue | 3 ++- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Travel/ExtraCommunity.vue | 30 +++++++++++++++++++++------- 5 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 src/components/common/VnPopup.vue diff --git a/src/components/common/VnPopup.vue b/src/components/common/VnPopup.vue new file mode 100644 index 000000000..7dcb08f53 --- /dev/null +++ b/src/components/common/VnPopup.vue @@ -0,0 +1,23 @@ + + diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index b2084479d..8bb2a603e 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -39,6 +39,7 @@ const $props = defineProps({ }); const state = useState(); +const route = useRoute(); const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); let arrayData; @@ -57,7 +58,7 @@ onBeforeMount(async () => { store = arrayData.store; entity = computed(() => (Array.isArray(store.data) ? store.data[0] : store.data)); // It enables to load data only once if the module is the same as the dataKey - if ($props.dataKey !== useRoute().meta.moduleName) await getData(); + if ($props.dataKey !== route.meta.moduleName || !route.params.id) await getData(); watch( () => [$props.url, $props.filter], async () => await getData() diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index b3a85eefa..645e12b7a 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -113,6 +113,7 @@ globals: name: Name new: New comment: Comment + observations: Observations errors: statusUnauthorized: Access denied statusInternalServerError: An internal server error has ocurred diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index d03ee9d5c..29373efd0 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -113,6 +113,7 @@ globals: name: Nombre new: Nuevo comment: Comentario + observations: Observaciones errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue index 639c7d894..480240b26 100644 --- a/src/pages/Travel/ExtraCommunity.vue +++ b/src/pages/Travel/ExtraCommunity.vue @@ -2,7 +2,6 @@ import { onMounted, ref, computed, watch } from 'vue'; import { QBtn } from 'quasar'; import { useI18n } from 'vue-i18n'; -import { useRouter } from 'vue-router'; import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue'; @@ -19,8 +18,8 @@ import { usePrintService } from 'composables/usePrintService'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import axios from 'axios'; import RightMenu from 'src/components/common/RightMenu.vue'; +import VnPopup from 'src/components/common/VnPopup.vue'; -const router = useRouter(); const stateStore = useStateStore(); const { t } = useI18n(); const { openReport } = usePrintService(); @@ -125,6 +124,10 @@ const tableColumnComponents = { component: 'span', attrs: {}, }, + notes: { + component: 'span', + attrs: {}, + }, }; const columns = computed(() => [ @@ -250,6 +253,14 @@ const columns = computed(() => [ sortable: true, format: (value) => toDate(value), }, + { + label: t('notes'), + field: '', + name: 'notes', + align: 'center', + showValue: false, + sortable: true, + }, ]); async function getData() { @@ -298,10 +309,6 @@ const saveFieldValue = async (val, field, index) => { } }; -const navigateToTravelId = (id) => { - router.push({ path: `/travel/${id}` }); -}; - const stopEventPropagation = (event, col) => { // Detener la propagación del evento de los siguientes elementos para evitar el click sobre la row que dispararía la función navigateToTravelId if (!['ref', 'id', 'cargoSupplierNickname', 'kg'].includes(col.name)) return; @@ -486,7 +493,7 @@ const getColor = (percentage) => { { + + + + + @@ -675,6 +690,7 @@ en: physicKg: Phy. KG shipped: W. shipped landed: W. landed + observations: Observations es: searchExtraCommunity: Buscar por envío extra comunitario From bebb20c76f45b1f87211b07a1ee962a691154af5 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 21 Jun 2024 13:07:43 +0200 Subject: [PATCH 09/11] fix: refs 6238 drop locale --- src/pages/Travel/ExtraCommunity.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue index 480240b26..0a00c6419 100644 --- a/src/pages/Travel/ExtraCommunity.vue +++ b/src/pages/Travel/ExtraCommunity.vue @@ -690,7 +690,6 @@ en: physicKg: Phy. KG shipped: W. shipped landed: W. landed - observations: Observations es: searchExtraCommunity: Buscar por envío extra comunitario From 606c629d7755d0bdf95e200a86e1005aef3fb880 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 21 Jun 2024 13:47:42 +0200 Subject: [PATCH 10/11] feat: refs #6238 function name --- src/components/CrudModel.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index fe15d2db1..406516d46 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -135,7 +135,7 @@ async function onSubmit() { await saveChanges($props.saveFn ? formData.value : null); } -async function onSumbitAndGo() { +async function onSubmitAndGo() { await onSubmit(); push({ path: $props.goTo }); } @@ -324,7 +324,7 @@ watch(formUrl, async () => { /> Date: Fri, 21 Jun 2024 13:53:35 +0200 Subject: [PATCH 11/11] fix: refs 6238 replace style --- src/pages/Travel/ExtraCommunity.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue index 0a00c6419..98648512f 100644 --- a/src/pages/Travel/ExtraCommunity.vue +++ b/src/pages/Travel/ExtraCommunity.vue @@ -615,7 +615,13 @@ const getColor = (percentage) => { - +