diff --git a/CHANGELOG.md b/CHANGELOG.md index c97c4181f..43bd6da77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - (Tickets) => Se añade la opción de clonar ticket. #6951 - (Parking) => Se añade la sección Parking. #5186 +- (Rutas) => Se añade el campo "servida" a la tabla y se añade también a los filtros. #7130 + ### Changed ### Fixed diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index b259bf8be..f516f473d 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -127,7 +127,6 @@ async function paginate() { } function endPagination() { - hasMoreData.value = arrayData.hasMoreData.value; isLoading.value = false; emit('onFetch', store.data); emit('onPaginate'); @@ -183,11 +182,12 @@ defineExpose({ fetch, addFilter }); + diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 093806567..a87ccbb96 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -98,7 +98,7 @@ export function useArrayData(key, userOptions) { const { limit } = filter; hasMoreData.value = response.data.length >= limit; - + store.hasMoreData = hasMoreData.value; if (append) { if (!store.data) store.data = []; for (const row of response.data) store.data.push(row); @@ -169,7 +169,7 @@ export function useArrayData(key, userOptions) { } async function loadMore() { - if (!hasMoreData.value) return; + if (!hasMoreData.value && !store.hasMoreData) return; store.skip = store.limit * page.value; page.value += 1; diff --git a/src/pages/Customer/locale/en.yml b/src/pages/Customer/locale/en.yml index 67bfa6622..6eb7cfa85 100644 --- a/src/pages/Customer/locale/en.yml +++ b/src/pages/Customer/locale/en.yml @@ -1,4 +1,4 @@ customerFilter: filter: - name: 'Name' - socialName: 'Social name' + name: Name + socialName: Social name diff --git a/src/pages/Customer/locale/es.yml b/src/pages/Customer/locale/es.yml index ec1981257..8fed37092 100644 --- a/src/pages/Customer/locale/es.yml +++ b/src/pages/Customer/locale/es.yml @@ -1,4 +1,4 @@ customerFilter: filter: - name: 'Nombre' - socialName: 'Razón Social' + name: Nombre + socialName: Razón Social diff --git a/src/pages/Entry/Card/EntryBasicData.vue b/src/pages/Entry/Card/EntryBasicData.vue index 4a8cf154a..12e03fd32 100644 --- a/src/pages/Entry/Card/EntryBasicData.vue +++ b/src/pages/Entry/Card/EntryBasicData.vue @@ -2,6 +2,7 @@ import { ref } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; +import { useRole } from 'src/composables/useRole'; import FetchData from 'components/FetchData.vue'; import FormModel from 'components/FormModel.vue'; @@ -15,6 +16,8 @@ import { toDate } from 'src/filters'; const route = useRoute(); const { t } = useI18n(); +const { hasAny } = useRole(); +const isAdministrative = () => hasAny(['administrative']); const suppliersOptions = ref([]); const travelsOptions = ref([]); @@ -206,6 +209,7 @@ const onFilterTravelSelected = (formData, id) => {
diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index d52989ff9..1956140ed 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -1,8 +1,8 @@ entryList: list: - inventoryEntry: 'Inventory entry' - virtualEntry: 'Virtual entry' + inventoryEntry: Inventory entry + virtualEntry: Virtual entry entryFilter: filter: - search: 'General search' - reference: 'Reference' + search: General search + reference: Reference diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index 2dc1dfb3a..192d03542 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -1,8 +1,8 @@ entryList: list: - inventoryEntry: 'Es inventario' - virtualEntry: 'Es una redada' + inventoryEntry: Es inventario + virtualEntry: Es una redada entryFilter: filter: - search: 'Búsqueda general' - reference: 'Referencia' + search: Búsqueda general + reference: Referencia diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue index 5adaeca94..2c4a19be5 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue @@ -257,7 +257,7 @@ const requiredFieldRule = (val) => val || t('globals.requiredField'); const isAdministrative = () => hasAny(['administrative']); const isAgricultural = () => - invoiceIn.value.supplier.sageWithholdingFk == config.value[0].sageWithholdingFk; + invoiceIn.value?.supplier?.sageWithholdingFk === config.value[0]?.sageWithholdingFk; function showPdfInvoice() { if (isAgricultural()) openReport(`InvoiceIns/${entityId.value}/invoice-in-pdf`); diff --git a/src/pages/Route/Card/RouteFilter.vue b/src/pages/Route/Card/RouteFilter.vue index 4be1981ab..bbd71df49 100644 --- a/src/pages/Route/Card/RouteFilter.vue +++ b/src/pages/Route/Card/RouteFilter.vue @@ -197,6 +197,15 @@ const warehouseList = ref([]); /> + + + + + @@ -212,6 +221,7 @@ en: workerFk: Worker from: From to: To + Served: Served es: params: warehouseFk: Almacén @@ -229,4 +239,5 @@ es: Worker: Trabajador From: Desde To: Hasta + Served: Servida diff --git a/src/pages/Route/Card/RouteForm.vue b/src/pages/Route/Card/RouteForm.vue index 60693cbf1..7087037b0 100644 --- a/src/pages/Route/Card/RouteForm.vue +++ b/src/pages/Route/Card/RouteForm.vue @@ -11,8 +11,8 @@ import VnInputDate from 'components/common/VnInputDate.vue'; import VnInput from 'components/common/VnInput.vue'; import axios from 'axios'; import VnInputTime from 'components/common/VnInputTime.vue'; -import RouteSearchbar from "pages/Route/Card/RouteSearchbar.vue"; -import {useStateStore} from "stores/useStateStore"; +import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue'; +import { useStateStore } from 'stores/useStateStore'; const { t } = useI18n(); const route = useRoute(); @@ -26,6 +26,7 @@ const defaultInitialData = { description: '', vehicleFk: null, workerFk: null, + isOk: false, }; const workerList = ref([]); @@ -211,6 +212,7 @@ const onSave = (data, response) => { size="sm" v-model="data.isOk" :label="t('Is served')" + clearable />
diff --git a/src/pages/Route/Card/RouteSummary.vue b/src/pages/Route/Card/RouteSummary.vue index 34b0dfebd..9316c0f83 100644 --- a/src/pages/Route/Card/RouteSummary.vue +++ b/src/pages/Route/Card/RouteSummary.vue @@ -187,6 +187,15 @@ const ticketColumns = ref([ :label="t('route.summary.packages')" :value="getTotalPackages(entity.tickets)" /> +
@@ -278,6 +287,10 @@ en: m3: m³ packaging: Packaging ticket: Ticket + closed: Closed + open: Open + yes: Yes + no: No es: route: summary: @@ -301,4 +314,8 @@ es: client: Cliente warehouse: Almacén packaging: Encajado + closed: Cerrada + open: Abierta + yes: Sí + no: No diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 94c05ad54..773b4f773 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -95,6 +95,13 @@ const columns = computed(() => [ sortable: true, align: 'left', }, + { + name: 'isServed', + label: t('Served'), + field: (row) => Boolean(row.isOk), + sortable: true, + align: 'left', + }, { name: 'actions', label: '', @@ -265,7 +272,7 @@ const openTicketsDialog = (id) => { auto-load >