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/package.json b/package.json index 88f430d7b..8398eb3f3 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "@intlify/unplugin-vue-i18n": "^0.8.1", "@pinia/testing": "^0.1.2", "@quasar/app-vite": "^1.7.3", + "@quasar/quasar-app-extension-qcalendar": "4.0.0-beta.15", "@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0", "@vue/test-utils": "^2.4.4", "autoprefixer": "^10.4.14", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3fe7df55..bdff559cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,6 +49,9 @@ devDependencies: '@quasar/app-vite': specifier: ^1.7.3 version: 1.7.3(eslint@8.56.0)(pinia@2.1.7)(quasar@2.14.5)(vue-router@4.2.5)(vue@3.4.19) + '@quasar/quasar-app-extension-qcalendar': + specifier: 4.0.0-beta.15 + version: 4.0.0-beta.15 '@quasar/quasar-app-extension-testing-unit-vitest': specifier: ^0.4.0 version: 0.4.0(@vue/test-utils@2.4.4)(quasar@2.14.5)(vite@5.1.4)(vitest@0.31.4)(vue@3.4.19) @@ -912,6 +915,13 @@ packages: resolution: {integrity: sha512-SlOhwzXyPQHWgQIS2ncyDdYdksCJvUYNtgsDQqzAKEG3r3d/ejOxvThle79HTK3Q6HB+gQWFG21Ux00Osr5XSw==} dev: false + /@quasar/quasar-app-extension-qcalendar@4.0.0-beta.15: + resolution: {integrity: sha512-i6hQkcP70LXLfVMPZMKQjSg3681gjZmASV3vq6ULzc0LhtBiPneLdVNNtH2itkWxAmaUj+1heQDI5Pa0F7VKLQ==} + engines: {node: '>= 10.0.0', npm: '>= 5.6.0', yarn: '>= 1.6.0'} + dependencies: + '@quasar/quasar-ui-qcalendar': 4.0.0-beta.19 + dev: true + /@quasar/quasar-app-extension-testing-unit-vitest@0.4.0(@vue/test-utils@2.4.4)(quasar@2.14.5)(vite@5.1.4)(vitest@0.31.4)(vue@3.4.19): resolution: {integrity: sha512-eyzdUdmZiCueNS+5nedjMmzdbpCetSrtdGIwW6KplW1dTzRbLiNvYUjpBOxQGmJCgEhWy9zuswJ7MZ/bTql24Q==} engines: {node: '>= 12.22.1', npm: '>= 6.14.12', yarn: '>= 1.17.3'} @@ -939,6 +949,10 @@ packages: - vite dev: true + /@quasar/quasar-ui-qcalendar@4.0.0-beta.19: + resolution: {integrity: sha512-BT0G2JjgKl1bqNrY5utcYeoy8gK+U9k3Pz1YDi1OB265W/jHU6nFoWMEUdY3JdvMccwkXTL2DLVyl3eqAUyLyg==} + dev: true + /@quasar/render-ssr-error@1.0.3: resolution: {integrity: sha512-A8RF99q6/sOSe1Ighnh5syEIbliD3qUYEJd2HyfFyBPSMF+WYGXon5dmzg4nUoK662NgOggInevkDyBDJcZugg==} engines: {node: '>= 16'} diff --git a/quasar.extensions.json b/quasar.extensions.json index e5c5cbfaa..867769090 100644 --- a/quasar.extensions.json +++ b/quasar.extensions.json @@ -1,7 +1,6 @@ { - "@quasar/testing-unit-vitest": { - "options": [ - "scripts" - ] - } -} \ No newline at end of file + "@quasar/testing-unit-vitest": { + "options": ["scripts"] + }, + "@quasar/qcalendar": {} +} diff --git a/src/boot/i18n.js b/src/boot/i18n.js index ede8f5114..b23b6d5fd 100644 --- a/src/boot/i18n.js +++ b/src/boot/i18n.js @@ -1,7 +1,6 @@ import { boot } from 'quasar/wrappers'; import { createI18n } from 'vue-i18n'; import messages from 'src/i18n'; -import { locales } from 'src/i18n/handle'; const i18n = createI18n({ locale: navigator.language || navigator.userLanguage, @@ -13,9 +12,8 @@ const i18n = createI18n({ legacy: false, }); -export default boot(async ({ app }) => { +export default boot(({ app }) => { // Set i18n instance on app - await locales(); app.use(i18n); }); diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index c8fa5809c..fb3ac10c3 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -24,6 +24,10 @@ const $props = defineProps({ type: String, default: '', }, + limit: { + type: Number, + default: 20, + }, saveUrl: { type: String, default: null, @@ -76,6 +80,7 @@ defineExpose({ reset, hasChanges, saveChanges, + getChanges, }); async function fetch(data) { @@ -260,6 +265,7 @@ watch(formUrl, async () => { + + +
+
+
+ + Video + + + + + +
+
+
+
- - -
-
-
- - Videoheader - - - - - -
-
-
-
-
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/Card/EntryBuys.vue b/src/pages/Entry/Card/EntryBuys.vue index 0208b49ba..3b39840c8 100644 --- a/src/pages/Entry/Card/EntryBuys.vue +++ b/src/pages/Entry/Card/EntryBuys.vue @@ -268,16 +268,11 @@ const importBuys = () => { const toggleGroupingMode = async (buy, mode) => { try { - const grouping = 1; - const packing = 2; - const groupingMode = mode === 'grouping' ? grouping : packing; - - const newGroupingMode = buy.groupingMode === groupingMode ? 0 : groupingMode; - + const groupingMode = mode === 'grouping' ? mode : 'packing'; + const newGroupingMode = buy.groupingMode === groupingMode ? null : groupingMode; const params = { groupingMode: newGroupingMode, }; - await axios.patch(`Buys/${buy.id}`, params); buy.groupingMode = newGroupingMode; } catch (err) { @@ -287,9 +282,9 @@ const toggleGroupingMode = async (buy, mode) => { const lockIconType = (groupingMode, mode) => { if (mode === 'packing') { - return groupingMode === 2 ? 'lock' : 'lock_open'; + return groupingMode === 'packing' ? 'lock' : 'lock_open'; } else { - return groupingMode === 1 ? 'lock' : 'lock_open'; + return groupingMode === 'grouping' ? 'lock' : 'lock_open'; } }; 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/Item/Card/ItemBasicData.vue b/src/pages/Item/Card/ItemBasicData.vue new file mode 100644 index 000000000..334cf049d --- /dev/null +++ b/src/pages/Item/Card/ItemBasicData.vue @@ -0,0 +1 @@ + diff --git a/src/pages/Item/ItemCreate.vue b/src/pages/Item/ItemCreate.vue index e20f67ac3..18e7522cb 100644 --- a/src/pages/Item/ItemCreate.vue +++ b/src/pages/Item/ItemCreate.vue @@ -1 +1,170 @@ - + + + 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..220f93f30 100644 --- a/src/pages/Route/Card/RouteSummary.vue +++ b/src/pages/Route/Card/RouteSummary.vue @@ -73,9 +73,9 @@ const ticketColumns = ref([ align: 'left', }, { - name: 'warehouse', - label: t('route.summary.warehouse'), - field: (row) => row?.warehouseName, + name: 'state', + label: t('route.summary.state'), + field: (row) => row?.ticketStateName, sortable: false, align: 'left', }, @@ -187,6 +187,15 @@ const ticketColumns = ref([ :label="t('route.summary.packages')" :value="getTotalPackages(entity.tickets)" /> +
@@ -274,10 +283,14 @@ en: city: City pc: PC client: Client - warehouse: Warehouse + state: State m3: m³ packaging: Packaging ticket: Ticket + closed: Closed + open: Open + yes: Yes + no: No es: route: summary: @@ -299,6 +312,10 @@ es: city: Población pc: CP client: Cliente - warehouse: Almacén + state: Estado 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 >