diff --git a/src/components/common/SendSmsDialog.vue b/src/components/common/SendSmsDialog.vue new file mode 100644 index 000000000..269a4ec9a --- /dev/null +++ b/src/components/common/SendSmsDialog.vue @@ -0,0 +1,156 @@ + + + + + + +es: + Message: Mensaje + Send: Enviar + Characters remaining: Carácteres restantes + Special characters like accents counts as a multiple: Carácteres especiales como los acentos cuentan como varios + The destination can't be empty: El destinatario no puede estar vacio + The message can't be empty: El mensaje no puede estar vacio + The message it's too long: El mensaje es demasiado largo + diff --git a/src/components/common/VnDms.vue b/src/components/common/VnDms.vue index d5c59517d..08255f8a5 100644 --- a/src/components/common/VnDms.vue +++ b/src/components/common/VnDms.vue @@ -27,6 +27,10 @@ const $props = defineProps({ type: Object, default: null, }, + url: { + type: String, + default: null, + }, }); const warehouses = ref(); @@ -65,14 +69,15 @@ function mapperDms(data) { } function getUrl() { + if ($props.url) return $props.url; if ($props.formInitialData) return 'dms/' + $props.formInitialData.id + '/updateFile'; return `${$props.model}/${route.params.id}/uploadFile`; } async function save() { const body = mapperDms(dms.value); - await axios.post(getUrl(), body[0], body[1]); - emit('onDataSaved', body[1].params); + const response = await axios.post(getUrl(), body[0], body[1]); + emit('onDataSaved', body[1].params, response); } function defaultData() { diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 98c89c051..d1b2f5ccb 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -44,7 +44,7 @@ const props = defineProps({ }, offset: { type: Number, - default: 500, + default: 0, }, skeleton: { type: Boolean, @@ -54,6 +54,10 @@ const props = defineProps({ type: Function, default: null, }, + disableInfiniteScroll: { + type: Boolean, + default: false, + }, }); const emit = defineEmits(['onFetch', 'onPaginate']); @@ -122,10 +126,11 @@ async function paginate() { emit('onPaginate'); } -async function onLoad(...params) { - if (!store.data) return; +async function onLoad(index, done) { + if (!store.data) { + return done(); + } - const done = params[1]; if (store.data.length === 0 || !props.url) return done(false); pagination.value.page = pagination.value.page + 1; @@ -174,7 +179,8 @@ async function onLoad(...params) { v-if="store.data" @load="onLoad" :offset="offset" - class="full-width full-height" + :disable="disableInfiniteScroll || !arrayData.hasMoreData.value" + class="full-width" v-bind="$attrs" > diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 6afb7e31c..429c36e6e 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -75,6 +75,7 @@ export default { company: 'Company', fieldRequired: 'Field required', allowedFilesText: 'Allowed file types: { allowedContentTypes }', + smsSent: 'SMS sent', confirmDeletion: 'Confirm deletion', confirmDeletionMessage: 'Are you sure you want to delete this?', description: 'Description', @@ -971,6 +972,22 @@ export default { uncompleteTrays: 'There are incomplete trays', }, }, + 'route/roadmap': { + pageTitles: { + roadmap: 'Roadmap', + summary: 'Summary', + basicData: 'Basic Data', + stops: 'Stops' + }, + }, + roadmap: { + pageTitles: { + roadmap: 'Roadmap', + summary: 'Summary', + basicData: 'Basic Data', + stops: 'Stops' + }, + }, route: { pageTitles: { routes: 'Routes', @@ -979,6 +996,11 @@ export default { create: 'Create', basicData: 'Basic Data', summary: 'Summary', + RouteRoadmap: 'Roadmaps', + RouteRoadmapCreate: 'Create roadmap', + tickets: 'Tickets', + log: 'Log', + autonomous: 'Autonomous', }, cmr: { list: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index d47ee9b33..155fc4aaa 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -75,6 +75,7 @@ export default { company: 'Empresa', fieldRequired: 'Campo requerido', allowedFilesText: 'Tipos de archivo permitidos: { allowedContentTypes }', + smsSent: 'SMS enviado', confirmDeletion: 'Confirmar eliminación', confirmDeletionMessage: '¿Seguro que quieres eliminar?', description: 'Descripción', @@ -972,6 +973,22 @@ export default { uncompleteTrays: 'Hay bandejas sin completar', }, }, + 'route/roadmap': { + pageTitles: { + roadmap: 'Troncales', + summary: 'Resumen', + basicData: 'Datos básicos', + stops: 'Paradas' + }, + }, + roadmap: { + pageTitles: { + roadmap: 'Troncales', + summary: 'Resumen', + basicData: 'Datos básicos', + stops: 'Paradas' + }, + }, route: { pageTitles: { routes: 'Rutas', @@ -979,7 +996,12 @@ export default { RouteList: 'Listado', create: 'Crear', basicData: 'Datos básicos', - summary: 'Summary', + summary: 'Resumen', + RouteRoadmap: 'Troncales', + RouteRoadmapCreate: 'Crear troncal', + tickets: 'Tickets', + log: 'Historial', + autonomous: 'Autónomos', }, cmr: { list: { diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue new file mode 100644 index 000000000..a36656c1d --- /dev/null +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue @@ -0,0 +1,15 @@ + + diff --git a/src/pages/Route/Card/RouteAutonomousFilter.vue b/src/pages/Route/Card/RouteAutonomousFilter.vue new file mode 100644 index 000000000..ec30458ce --- /dev/null +++ b/src/pages/Route/Card/RouteAutonomousFilter.vue @@ -0,0 +1,237 @@ + + + + + +en: + params: + agencyModeFk: Agency route + m3: m³ + from: From + to: To + date: Date + agencyFk: Agency agreement + packages: Packages + price: Price + invoiceInFk: Received + supplierFk: Autonomous +es: + params: + agencyModeFk: Agencia ruta + m3: m³ + from: Desde + to: Hasta + date: Fecha + agencyFk: Agencia Acuerdo + packages: Bultos + price: Precio + invoiceInFk: Recibida + supplierFk: Autónomos + From: Desde + To: Hasta + Date: Fecha + Agency route: Agencia Ruta + Agency agreement: Agencia Acuerdo + Packages: Bultos + Price: Precio + Received: Recibida + Autonomous: Autónomos + diff --git a/src/pages/Route/Card/RouteForm.vue b/src/pages/Route/Card/RouteForm.vue index 604f04357..60693cbf1 100644 --- a/src/pages/Route/Card/RouteForm.vue +++ b/src/pages/Route/Card/RouteForm.vue @@ -11,12 +11,15 @@ 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"; const { t } = useI18n(); const route = useRoute(); const router = useRouter(); -const shelvingId = route.params?.id || null; -const isNew = Boolean(!shelvingId); +const stateStore = useStateStore(); +const shelvingId = ref(route.params?.id || null); +const isNew = Boolean(!shelvingId.value); const defaultInitialData = { agencyModeFk: null, created: null, @@ -78,6 +81,11 @@ const onSave = (data, response) => {