diff --git a/package.json b/package.json index 063cf6de4..7be20a842 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.20.0", + "version": "24.22.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index de4724e55..000de4336 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -81,6 +81,7 @@ defineExpose({ hasChanges, saveChanges, getChanges, + formData, }); async function fetch(data) { diff --git a/src/components/FilterItemForm.vue b/src/components/FilterItemForm.vue index e031999e2..7af9adf93 100644 --- a/src/components/FilterItemForm.vue +++ b/src/components/FilterItemForm.vue @@ -1,7 +1,6 @@ @@ -68,6 +73,8 @@ defineExpose({ :class="{ required: $attrs.required }" @keyup.enter="onEnterPress()" :clearable="false" + :rules="[inputRules]" + :lazy-rules="true" > @@ -85,3 +92,9 @@ defineExpose({ + + en: + inputMin: Must be more than {value} + es: + inputMin: Debe ser mayor a {value} + diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 2053eceb1..fe0866292 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -15,6 +15,10 @@ const props = defineProps({ type: Boolean, default: false, }, + emitDateFormat: { + type: Boolean, + default: false, + }, }); const hover = ref(false); @@ -37,7 +41,10 @@ const value = computed({ return props.modelValue; }, set(value) { - emit('update:modelValue', joinDateAndTime(value, time.value)); + emit( + 'update:modelValue', + props.emitDateFormat ? new Date(value) : joinDateAndTime(value, time.value) + ); }, }); diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 05c74f00a..e8083dec2 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -57,7 +57,7 @@ const $props = defineProps({ }); const { t } = useI18n(); -const requiredFieldRule = (val) => !!val || t('globals.fieldRequired'); +const requiredFieldRule = (val) => val ?? t('globals.fieldRequired'); const { optionLabel, optionValue, options, modelValue } = toRefs($props); const myOptions = ref([]); @@ -167,6 +167,7 @@ watch(modelValue, (newValue) => { hide-selected fill-input ref="vnSelectRef" + lazy-rules :class="{ required: $attrs.required }" :rules="$attrs.required ? [requiredFieldRule] : null" virtual-scroll-slice-size="options.length" diff --git a/src/css/app.scss b/src/css/app.scss index 770df8e01..2e524e693 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -141,15 +141,6 @@ select:-webkit-autofill { background-color: var(--vn-section-color); } -.q-checkbox { - & .q-checkbox__label { - color: var(--vn-text-color); - } - & .q-checkbox__inner { - color: var(--vn-label-color); - } -} - .tr-header { color: var(--vn-label-color); } diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 26cfa6489..d8fb231f0 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -95,6 +95,10 @@ globals: agency: Agency workCenters: Work centers modes: Modes + zones: Zones + zonesList: Zones + deliveryList: Delivery days + upcomingList: Upcoming deliveries created: Created worker: Worker now: Now @@ -521,7 +525,7 @@ claim: records: records card: claimId: Claim ID - assignedTo: Assigned + attendedBy: Attended by created: Created state: State ticketId: Ticket ID @@ -559,6 +563,7 @@ claim: responsible: Responsible worker: Worker redelivery: Redelivery + changeState: Change state basicData: customer: Customer assignedTo: Assigned @@ -1136,8 +1141,10 @@ item: tax: Tax log: Log botanical: Botanical + shelving: Shelving itemTypeCreate: New item type family: Item Type + lastEntries: Last entries descriptor: item: Item buyer: Buyer @@ -1227,6 +1234,12 @@ item/itemType: itemType: Item type basicData: Basic data summary: Summary +zone: + pageTitles: + zones: Zone + zonesList: Zones + deliveryList: Delivery days + upcomingList: Upcoming deliveries components: topbar: {} itemsFilterPanel: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index cb2be6dc9..67e075935 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -95,6 +95,10 @@ globals: agency: Agencia workCenters: Centros de trabajo modes: Modos + zones: Zonas + zonesList: Zonas + deliveryList: Días de entrega + upcomingList: Próximos repartos created: Fecha creación worker: Trabajador now: Ahora @@ -519,7 +523,7 @@ claim: records: registros card: claimId: ID reclamación - assignedTo: Asignada a + attendedBy: Atendida por created: Creada state: Estado ticketId: ID ticket @@ -557,6 +561,7 @@ claim: responsible: Responsable worker: Trabajador redelivery: Devolución + changeState: Cambiar estado basicData: customer: Cliente assignedTo: Asignada a @@ -1135,8 +1140,10 @@ item: botanical: 'Botánico' barcode: 'Código de barras' log: Historial + shelving: Carros itemTypeCreate: Nueva familia family: Familia + lastEntries: Últimas entradas descriptor: item: Artículo buyer: Comprador @@ -1226,6 +1233,12 @@ item/itemType: itemType: Familia basicData: Datos básicos summary: Resumen +zone: + pageTitles: + zones: Zona + zonesList: Zonas + deliveryList: Días de entrega + upcomingList: Próximos repartos components: topbar: {} itemsFilterPanel: diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue index be2efa31a..e2450a5e5 100644 --- a/src/pages/Claim/Card/ClaimBasicData.vue +++ b/src/pages/Claim/Card/ClaimBasicData.vue @@ -41,10 +41,6 @@ const claimStates = ref([]); const claimStatesCopy = ref([]); const optionsList = ref([]); -function setWorkers(data) { - workers.value = data; - workersCopy.value = data; -} const workersOptions = ref([]); function setClaimStates(data) { diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue index 968f1e294..aae999117 100644 --- a/src/pages/Claim/Card/ClaimDescriptor.vue +++ b/src/pages/Claim/Card/ClaimDescriptor.vue @@ -11,6 +11,7 @@ import VnLv from 'src/components/ui/VnLv.vue'; import useCardDescription from 'src/composables/useCardDescription'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import { getUrl } from 'src/composables/getUrl'; +import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue'; const $props = defineProps({ id: { @@ -73,8 +74,9 @@ const filter = { const STATE_COLOR = { pending: 'warning', - managed: 'info', + incomplete: 'info', resolved: 'positive', + canceled: 'negative', }; function stateColor(code) { return STATE_COLOR[code]; @@ -127,17 +129,24 @@ onMounted(async () => { - + + + + {{ entity.ticket?.zone?.name }} + + + + import { onMounted, ref, computed } from 'vue'; -import { useRoute } from 'vue-router'; +import { useRoute, useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { toDate, toCurrency } from 'src/filters'; import CardSummary from 'components/ui/CardSummary.vue'; @@ -13,8 +13,11 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; +import axios from 'axios'; +import dashIfEmpty from 'src/filters/dashIfEmpty'; const route = useRoute(); +const router = useRouter(); const { t } = useI18n(); const { getTokenMultimedia } = useSession(); const token = getTokenMultimedia(); @@ -27,7 +30,7 @@ const $props = defineProps({ }); const entityId = computed(() => $props.id || route.params.id); - +const ClaimStates = ref([]); const claimUrl = ref(); const salixUrl = ref(); const claimDmsRef = ref(); @@ -99,8 +102,9 @@ const detailsColumns = ref([ const STATE_COLOR = { pending: 'warning', - managed: 'info', + incomplete: 'info', resolved: 'positive', + canceled: 'negative', }; function stateColor(code) { return STATE_COLOR[code]; @@ -162,6 +166,10 @@ function openDialog(dmsId) { multimediaSlide.value = dmsId; multimediaDialog.value = true; } +async function changeState(value) { + await axios.patch(`Claims/updateClaim/${entityId.value}`, { claimStateFk: value }); + router.go(route.fullPath); +} @@ -171,6 +179,7 @@ function openDialog(dmsId) { @on-fetch="(data) => setClaimDms(data)" ref="claimDmsRef" /> + (ClaimStates = data)" auto-load /> {{ claim.id }} - {{ claim.client.name }} ({{ claim.client.id }}) + + + + + + + {{ item.description }} + + + + + + @@ -447,4 +486,8 @@ function openDialog(dmsId) { .zindex { z-index: 1; } + +.change-state { + width: 10%; +} diff --git a/src/pages/Entry/Card/EntryBuysImport.vue b/src/pages/Entry/Card/EntryBuysImport.vue index 705f56b68..6d856f068 100644 --- a/src/pages/Entry/Card/EntryBuysImport.vue +++ b/src/pages/Entry/Card/EntryBuysImport.vue @@ -251,6 +251,7 @@ const redirectToBuysView = () => { > diff --git a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue index 476a0f31e..0e68b740f 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue @@ -70,7 +70,7 @@ const columns = computed(() => [ const isNotEuro = (code) => code != 'EUR'; async function insert() { - await axios.post('/InvoiceInDueDays/new ', { id: +invoiceId }); + await axios.post('/InvoiceInDueDays/new', { id: +invoiceId }); await invoiceInFormRef.value.reload(); } diff --git a/src/pages/Item/Card/CreateIntrastatForm.vue b/src/pages/Item/Card/CreateIntrastatForm.vue new file mode 100644 index 000000000..3fd1ffe22 --- /dev/null +++ b/src/pages/Item/Card/CreateIntrastatForm.vue @@ -0,0 +1,52 @@ + + + + + + + + + + + + diff --git a/src/pages/Item/Card/ItemBasicData.vue b/src/pages/Item/Card/ItemBasicData.vue index 334cf049d..7e8fa1d92 100644 --- a/src/pages/Item/Card/ItemBasicData.vue +++ b/src/pages/Item/Card/ItemBasicData.vue @@ -1 +1,233 @@ -Item basic data + + + (itemTypesOptions = data)" + auto-load + /> + (itemsWithNameOptions = data)" + auto-load + /> + (intrastatsOptions = data)" + auto-load + /> + (expensesOptions = data)" + auto-load + /> + + + + + + + + {{ scope.opt?.name }} + + {{ scope.opt?.category?.name }} + + + + + + + + + + + + + + + + + + + {{ scope.opt?.name }} + #{{ scope.opt?.id }} + + + + + + + + + + onIntrastatCreated(requestResponse, data) + " + /> + + + + + {{ scope.opt?.description }} + #{{ scope.opt?.id }} + + + + + + + + + + + + + + + + + + + + + + {{ t('basicData.isFragileTooltip') }} + + + + + + + + {{ t('basicData.isPhotoRequestedTooltip') }} + + + + + + + + + + diff --git a/src/pages/Item/Card/ItemLastEntries.vue b/src/pages/Item/Card/ItemLastEntries.vue new file mode 100644 index 000000000..5200db239 --- /dev/null +++ b/src/pages/Item/Card/ItemLastEntries.vue @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + {{ row.entryFk }} + + + + + + + {{ dashIfEmpty(row.packing) }} + {{ t('lastEntries.packing') }} + + + + + {{ value }} + + {{ t('lastEntries.grouping') }}/{{ t('lastEntries.packing') }} + + + + + + {{ dashIfEmpty(row.grouping) }} + {{ t('lastEntries.grouping') }} + + + + + + + {{ toCurrency(row.cost, 'EUR', 3) }} + + {{ t('lastEntries.cost') }}: + {{ toCurrency(dashIfEmpty(row.buyingValue), 'EUR', 3) }} + {{ t('lastEntries.package') }}: + {{ toCurrency(dashIfEmpty(row.packageValue), 'EUR', 3) + }} + {{ $t('lastEntries.freight') }}: + {{ toCurrency(dashIfEmpty(row.freightValue), 'EUR', 3) + }} + {{ t('lastEntries.comission') }}: + {{ toCurrency(dashIfEmpty(row.comissionValue), 'EUR', 3) }} + + + + + + + + + diff --git a/src/pages/Item/Card/ItemShelving.vue b/src/pages/Item/Card/ItemShelving.vue new file mode 100644 index 000000000..7e7faab36 --- /dev/null +++ b/src/pages/Item/Card/ItemShelving.vue @@ -0,0 +1,279 @@ + + + + (parkingsOptions = data)" + /> + (shelvingsOptions = data)" + /> + + + + + + {{ t('shelvings.total') }} + + + + + {{ t('shelvings.totalLabels') }} + + : {{ totalLabels }} + + + + + + + {{ t('shelvings.removeLines') }} + + + + + + + + + + + + + + + + + + {{ row.longName }} + + + + + + diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue index 95f4380e4..b3cdfffb1 100644 --- a/src/pages/Item/Card/ItemTags.vue +++ b/src/pages/Item/Card/ItemTags.vue @@ -1 +1,191 @@ -Item tags (CREAR CUANDO SE DESARROLLE EL MODULO DE ITEMS) + + + + (tagOptions = data)" + auto-load + /> + + + + + + + handleTagSelected(rows, index, $event) + " + :required="true" + :rules="validate('itemTag.tagFk')" + /> + + + + + + + {{ t('itemTags.removeTag') }} + + + + + + + + {{ t('itemTags.addTag') }} + + + + + + + + + diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml index f0904c272..c08c71f48 100644 --- a/src/pages/Item/locale/en.yml +++ b/src/pages/Item/locale/en.yml @@ -1,3 +1,17 @@ +shelvings: + created: Created + item: Item + concept: Concept + parking: Parking + shelving: Shelving + label: Label + packing: Packing + total: Total + totalLabels: Total labels + removeLines: Remove selected lines + shelvingsRemoved: ItemShelvings removed + removeConfirmTitle: Selected lines will be deleted + removeConfirmSubtitle: Are you sure you want to continue? itemDiary: date: Date id: Id @@ -11,6 +25,56 @@ itemDiary: showBefore: Show what's before the inventory since: Since warehouse: Warehouse +basicData: + type: Type + reference: Reference + relevancy: Relevancy + stems: Stems + multiplier: Multiplier + generic: Generic + intrastat: Intrastat + expense: Expense + weightByPiece: Weight/Piece + boxUnits: Units/Box + recycledPlastic: Recycled plastic + nonRecycledPlastic: Non recycled plastic + description: Description + isActive: Active + hasKgPrice: Price in kg + isFragile: Fragile + isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...) + isPhotoRequested: Do photo + isPhotoRequestedTooltip: This item does need a photo +createIntrastatForm: + title: New intrastat + identifier: Identifier + description: Description tax: country: Country class: Class +lastEntries: + since: Since + to: To + ig: Ig + warehouse: Warehouse + landed: Landed + entry: Entry + pvp: PVP + label: Label + packing: Packing + grouping: Grouping + stems: Stems + quantity: Quantity + cost: Cost + kg: Kg. + cube: Cube + supplier: Supplier + package: Package + freight: Freight + comission: Comission +itemTags: + removeTag: Remove tag + addTag: Add tag + tag: Tag + value: Value + relevancy: Relevancy diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml index ae3022b1d..9b6a51b8a 100644 --- a/src/pages/Item/locale/es.yml +++ b/src/pages/Item/locale/es.yml @@ -1,3 +1,17 @@ +shelvings: + created: Creado + item: Artículo + concept: Concepto + parking: Parking + shelving: Matrícula + label: Etiqueta + packing: Packing + total: Total + totalLabels: Total etiquetas + removeLines: Eliminar líneas seleccionadas + shelvingsRemoved: Carros eliminados + removeConfirmTitle: Las líneas seleccionadas serán eliminadas + removeConfirmSubtitle: ¿Seguro que quieres continuar? itemDiary: date: Fecha id: Id @@ -11,6 +25,56 @@ itemDiary: showBefore: Mostrar lo anterior al inventario since: Desde warehouse: Almacén +basicData: + type: Tipo + reference: Referencia + relevancy: Relevancia + stems: Tallos + multiplier: Multiplicador + generic: Genérico + intrastat: Intrastat + expense: Gasto + weightByPiece: Peso (gramos)/tallo + boxUnits: Unidades/caja + recycledPlastic: Plástico reciclado + nonRecycledPlastic: Plástico no reciclado + description: Descripción + isActive: Activo + hasKgPrice: Precio en kg + isFragile: Frágil + isFragileTooltip: Se muestra en la web app, que este artículo no puede viajar (coronas, palmas, ...) + isPhotoRequested: Hacer foto + isPhotoRequestedTooltip: Este artículo necesita una foto +createIntrastatForm: + title: Nuevo intrastat + identifier: Identificador + description: Descripción tax: country: País class: Clase +lastEntries: + since: Desde + to: Hasta + ig: Ig + warehouse: Almacén + landed: F. Entrega + entry: Entrada + pvp: PVP + label: Etiquetas + packing: Packing + grouping: Grouping + stems: Tallos + quantity: Cantidad + cost: Coste + kg: Kg. + cube: Cubo + supplier: Proveedor + package: Embalaje + freight: Porte + comission: Comisión +itemTags: + removeTag: Quitar etiqueta + addTag: Añadir etiqueta + tag: Etiqueta + value: Valor + relevancy: Relevancia diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 364ae04a6..af501240b 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -188,7 +188,7 @@ async function changeState(value) { :label="t('ticket.summary.landed')" :value="toDate(ticket.landed)" /> - + {{ t('ticket.summary.consigneePhone') }} diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue index 3295a2234..4f1786a67 100644 --- a/src/pages/Worker/Card/WorkerBasicData.vue +++ b/src/pages/Worker/Card/WorkerBasicData.vue @@ -27,7 +27,6 @@ const workerFilter = { }, { relation: 'sip', scope: { fields: ['extension', 'secret'] } }, { relation: 'department', scope: { include: { relation: 'department' } } }, - { relation: 'client', scope: { fields: ['phone'] } }, ], }; const workersFilter = { @@ -87,11 +86,6 @@ const maritalStatus = [ :label="t('Mobile extension')" clearable /> - @@ -163,7 +157,6 @@ es: Last name: Apellidos Business phone: Teléfono de empresa Mobile extension: Extensión móvil - Personal phone: Teléfono personal Boss: Jefe Marital status: Estado civil Married: Casado/a diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue index e0047bf9e..d76ef6f59 100644 --- a/src/pages/Worker/Card/WorkerCard.vue +++ b/src/pages/Worker/Card/WorkerCard.vue @@ -1,15 +1,12 @@ { }); const worker = ref(); -const filter = computed(() => { - return { where: { id: entityId.value } }; -}); +const filter = { + include: [ + { + relation: 'user', + scope: { + fields: ['email', 'name', 'nickname'], + }, + }, + { + relation: 'department', + scope: { + include: [ + { + relation: 'department', + }, + ], + }, + }, + { + relation: 'sip', + }, + ], +}; const sip = ref(null); watch( @@ -61,7 +81,7 @@ const setData = (entity) => { { workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`; }); -const filter = computed(() => { - return { where: { id: entityId.value } }; -}); +const filter = { + include: [ + { + relation: 'user', + scope: { + fields: ['email', 'name', 'nickname', 'roleFk'], + include: { + relation: 'role', + scope: { + fields: ['name'], + }, + }, + }, + }, + { + relation: 'department', + scope: { + include: { + relation: 'department', + scope: { + fields: ['name'], + }, + }, + }, + }, + { + relation: 'boss', + }, + { + relation: 'client', + }, + { + relation: 'sip', + }, + ], +}; - + {{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }} @@ -75,6 +103,12 @@ const filter = computed(() => { + + + {{ t('worker.summary.personalPhone') }} + + + diff --git a/src/pages/Zone/Card/ZoneBasicData.vue b/src/pages/Zone/Card/ZoneBasicData.vue new file mode 100644 index 000000000..5d57b920e --- /dev/null +++ b/src/pages/Zone/Card/ZoneBasicData.vue @@ -0,0 +1,103 @@ + + + + (agencyOptions = data)" + auto-load + url="agencies" + /> + (zoneOptions = data)" + auto-load + url="zones" + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +es: + Name: Nombre + Agency: Agencia + Max m³: Medida máxima + Maximum m³: M³ maximo + Traveling days: Dias de viaje + Closing: Cierre + Price: Precio + Bonus: Bonificación + Inflation: Inflación + Volumetric: Volumétrico + diff --git a/src/pages/Zone/Card/ZoneCalendar.vue b/src/pages/Zone/Card/ZoneCalendar.vue new file mode 100644 index 000000000..e69de29bb diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue new file mode 100644 index 000000000..948636c55 --- /dev/null +++ b/src/pages/Zone/Card/ZoneCard.vue @@ -0,0 +1,6 @@ + + + + diff --git a/src/pages/Zone/Card/ZoneDescriptor.vue b/src/pages/Zone/Card/ZoneDescriptor.vue new file mode 100644 index 000000000..93e951801 --- /dev/null +++ b/src/pages/Zone/Card/ZoneDescriptor.vue @@ -0,0 +1,96 @@ + + + + + + + + {{ t('Summary') }} + + + + + + {{ console.log('entity', entity) }} + + + + + + + + + + +es: + Summary: Detalles + The zone will be deleted: El envío será eliminado + Do you want to delete this zone?: ¿Quieres eliminar este envío? + All zones with current agency: Todos los envíos con la agencia actual + Agency: Agencia + Closing hour: Hora de cierre + zoneing days: Días de viaje + Price: Precio + Bonus: Bonificación + diff --git a/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue new file mode 100644 index 000000000..b6c7f28b3 --- /dev/null +++ b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue @@ -0,0 +1,93 @@ + + + + + + + {{ t('To clone zone') }} + + + + + + {{ t('deleteOrder') }} + + + + +en: + deleteOrder: Delete order + confirmDeletion: Confirm deletion + confirmDeletionMessage: Are you sure you want to delete this order? + +es: + To clone zone: Clonar zone + deleteOrder: Eliminar pedido + confirmDeletion: Confirmar eliminación + confirmDeletionMessage: Seguro que quieres eliminar este pedido? + + diff --git a/src/pages/Zone/Card/ZoneDescriptorProxy.vue b/src/pages/Zone/Card/ZoneDescriptorProxy.vue new file mode 100644 index 000000000..15c5fb0e5 --- /dev/null +++ b/src/pages/Zone/Card/ZoneDescriptorProxy.vue @@ -0,0 +1,16 @@ + + + + + + + diff --git a/src/pages/Zone/Card/ZoneLocations.vue b/src/pages/Zone/Card/ZoneLocations.vue new file mode 100644 index 000000000..e4305c898 --- /dev/null +++ b/src/pages/Zone/Card/ZoneLocations.vue @@ -0,0 +1 @@ +Zone Locations diff --git a/src/pages/Zone/Card/ZoneLog.vue b/src/pages/Zone/Card/ZoneLog.vue new file mode 100644 index 000000000..373d210b5 --- /dev/null +++ b/src/pages/Zone/Card/ZoneLog.vue @@ -0,0 +1,6 @@ + + + + diff --git a/src/pages/Zone/Card/ZoneSummary.vue b/src/pages/Zone/Card/ZoneSummary.vue new file mode 100644 index 000000000..00df03cb0 --- /dev/null +++ b/src/pages/Zone/Card/ZoneSummary.vue @@ -0,0 +1,94 @@ + + + + + + {{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }} + + + + + + + + + + + + + + + {{ t('zone.summary.phoneExtension') }} + + + + + + {{ t('zone.summary.entPhone') }} + + + + + + + + + + + + + {{ t('zone.summary.sipExtension') }} + + + + + + + diff --git a/src/pages/Zone/Card/ZoneWarehouses.vue b/src/pages/Zone/Card/ZoneWarehouses.vue new file mode 100644 index 000000000..7ff73a5e9 --- /dev/null +++ b/src/pages/Zone/Card/ZoneWarehouses.vue @@ -0,0 +1,53 @@ + + + + + + + + + + + + + {{ t('Remove row') }} + + + + + + + + + + + + es: + Remove row: Eliminar fila + diff --git a/src/pages/Zone/Delivery/ZoneDeliveryCreate.vue b/src/pages/Zone/Delivery/ZoneDeliveryCreate.vue new file mode 100644 index 000000000..a48eaf278 --- /dev/null +++ b/src/pages/Zone/Delivery/ZoneDeliveryCreate.vue @@ -0,0 +1,432 @@ + + + + + + + + + + + + + {{ + t('zone.warnings.minHeightBetweenTrays') + + zoneConfig.minHeightBetweenTrays + + ' cm' + }} + + {{ + t('zone.warnings.maxZoneHeight') + + zoneConfig.maxZoneHeight + + ' cm' + }} + + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('zone.delivery.trayColor') }} + + + + + + + + + + + + + + + + + diff --git a/src/pages/Zone/Delivery/ZoneDeliveryList.vue b/src/pages/Zone/Delivery/ZoneDeliveryList.vue new file mode 100644 index 000000000..695388a9b --- /dev/null +++ b/src/pages/Zone/Delivery/ZoneDeliveryList.vue @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue b/src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue new file mode 100644 index 000000000..6bc04c428 --- /dev/null +++ b/src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue @@ -0,0 +1,432 @@ + + + + + + + + + + + + + {{ + t('zone.warnings.minHeightBetweenTrays') + + zoneConfig.minHeightBetweenTrays + + ' cm' + }} + + {{ + t('zone.warnings.maxZoneHeight') + + zoneConfig.maxZoneHeight + + ' cm' + }} + + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('zone.upcoming.trayColor') }} + + + + + + + + + + + + + + + + + diff --git a/src/pages/Zone/Upcoming/ZoneUpcomingList.vue b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue new file mode 100644 index 000000000..2d3016f25 --- /dev/null +++ b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/Zone/ZoneCreate.vue b/src/pages/Zone/ZoneCreate.vue new file mode 100644 index 000000000..93ea9589b --- /dev/null +++ b/src/pages/Zone/ZoneCreate.vue @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('zone.warnings.noData') }} + + + + + + + + + + + + + + + + diff --git a/src/pages/Zone/ZoneDeliveryDays.vue b/src/pages/Zone/ZoneDeliveryDays.vue new file mode 100644 index 000000000..485500dba --- /dev/null +++ b/src/pages/Zone/ZoneDeliveryDays.vue @@ -0,0 +1 @@ +Zone Delivery days diff --git a/src/pages/Zone/ZoneFilterPanel.vue b/src/pages/Zone/ZoneFilterPanel.vue new file mode 100644 index 000000000..94765919d --- /dev/null +++ b/src/pages/Zone/ZoneFilterPanel.vue @@ -0,0 +1,55 @@ + + + + (agencies = data)" + auto-load + /> + + + + + + + + + + + + + + + + diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue new file mode 100644 index 000000000..f260eb134 --- /dev/null +++ b/src/pages/Zone/ZoneList.vue @@ -0,0 +1,112 @@ + + + + (agencyOptions = data)" + :filter="{ fields: ['id', 'name'] }" + auto-load + /> + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('zone.list.create') }} + + + + diff --git a/src/pages/Zone/ZoneMain.vue b/src/pages/Zone/ZoneMain.vue new file mode 100644 index 000000000..66ce78f23 --- /dev/null +++ b/src/pages/Zone/ZoneMain.vue @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/src/pages/Zone/ZoneUpcoming.vue b/src/pages/Zone/ZoneUpcoming.vue new file mode 100644 index 000000000..d405c95f6 --- /dev/null +++ b/src/pages/Zone/ZoneUpcoming.vue @@ -0,0 +1,53 @@ + + + + + + + + + + + + {{ t(`${getWeekDay(/*detail.shipped*/)}`) }} - + {{ t /*'detail.shipped'*/() }} + + + + diff --git a/src/pages/Zone/locale/en.yml b/src/pages/Zone/locale/en.yml new file mode 100644 index 000000000..e62111d57 --- /dev/null +++ b/src/pages/Zone/locale/en.yml @@ -0,0 +1,19 @@ +zone: + list: + volume: Volume + clone: Clone + id: Id + name: Name + agency: Agency + close: Close + price: Price + create: Create zone + openSummary: Details + create: + name: Name + agency: Agency + close: Close + price: Price + type: + submit: Save + reset: Reset diff --git a/src/pages/Zone/locale/es.yml b/src/pages/Zone/locale/es.yml new file mode 100644 index 000000000..5d7a265bf --- /dev/null +++ b/src/pages/Zone/locale/es.yml @@ -0,0 +1,19 @@ +zone: + list: + volume: Volumen + clone: Clonar + id: Id + name: Nombre + agency: Agencia + close: Cierre + price: Precio + create: Crear zona + openSummary: Detalles + create: + name: Nombre + agency: Agencia + close: Cierre + price: Precio + type: + submit: Guardar + reset: Reiniciar diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 941358d26..7fff2f2e5 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -17,6 +17,7 @@ import roadmap from './roadmap'; import Parking from './parking'; import Agency from './agency'; import ItemType from './itemType'; +import Zone from './zone'; export default [ Item, @@ -38,4 +39,5 @@ export default [ Parking, Agency, ItemType, + Zone, ]; diff --git a/src/router/modules/item.js b/src/router/modules/item.js index d79ac3071..6e8659747 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -26,6 +26,9 @@ export default { 'ItemTax', 'ItemBotanical', 'ItemBarcode', + 'ItemShelving', + 'ItemLastEntries', + 'ItemTags', ], }, children: [ @@ -135,6 +138,15 @@ export default { }, component: () => import('src/pages/Item/Card/ItemTags.vue'), }, + { + path: 'last-entries', + name: 'ItemLastEntries', + meta: { + title: 'lastEntries', + icon: 'vn:regentry', + }, + component: () => import('src/pages/Item/Card/ItemLastEntries.vue'), + }, { path: 'tax', name: 'ItemTax', @@ -144,6 +156,24 @@ export default { }, component: () => import('src/pages/Item/Card/ItemTax.vue'), }, + { + path: 'botanical', + name: 'ItemBotanical', + meta: { + title: 'botanical', + icon: 'local_florist', + }, + component: () => import('src/pages/Item/Card/ItemBotanical.vue'), + }, + { + path: 'shelving', + name: 'ItemShelving', + meta: { + title: 'shelving', + icon: 'vn:inventory', + }, + component: () => import('src/pages/Item/Card/ItemShelving.vue'), + }, { path: 'barcode', name: 'ItemBarcode', diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js new file mode 100644 index 000000000..079dfaa84 --- /dev/null +++ b/src/router/modules/zone.js @@ -0,0 +1,160 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/zone', + name: 'Zone', + meta: { + title: 'zones', + icon: 'vn:zone', + moduleName: 'Zone', + }, + component: RouterView, + redirect: { name: 'ZoneMain' }, + menus: { + main: [ + /*'ZoneList', 'ZoneDeliveryList', 'ZoneUpcomingList'*/ + ], + card: [ + // + ], + }, + children: [ + // { + // path: '/zone', + // name: 'ZoneMain', + // component: () => import('src/pages/Zone/ZoneMain.vue'), + // redirect: { name: 'ZoneList' }, + // children: [ + // { + // path: 'list', + // name: 'ZoneList', + // meta: { + // title: 'zonesList', + // icon: 'vn:zone', + // }, + // component: () => import('src/pages/Zone/ZoneList.vue'), + // }, + // { + // path: 'create', + // name: 'ZoneCreate', + // meta: { + // title: 'zoneCreate', + // icon: 'create', + // }, + // component: () => import('src/pages/Zone/ZoneCreate.vue'), + // }, + // { + // path: ':id/edit', + // name: 'ZoneEdit', + // meta: { + // title: 'zoneEdit', + // icon: 'edit', + // }, + // component: () => import('src/pages/Zone/ZoneCreate.vue'), + // }, + // { + // path: 'counter', + // name: 'ZoneCounter', + // meta: { + // title: 'zoneCounter', + // icon: 'add_circle', + // }, + // component: () => import('src/pages/Zone/ZoneCounter.vue'), + // }, + // ], + // }, + { + name: 'ZoneCard', + path: ':id', + component: () => import('src/pages/Zone/Card/ZoneCard.vue'), + redirect: { name: 'ZoneSummary' }, + children: [ + { + name: 'ZoneSummary', + path: 'summary', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => import('src/pages/Zone/Card/ZoneSummary.vue'), + }, + // { + // path: '/zone/delivery', + // name: 'ZoneDeliveryMain', + // component: () => import('src/pages/Zone/ZoneMain.vue'), + // redirect: { name: 'ZoneDeliveryList' }, + // children: [ + // { + // path: 'list', + // name: 'ZoneDeliveryList', + // meta: { + // title: 'deliveryList', + // icon: 'today', + // }, + // component: () => + // import('src/pages/Zone/Delivery/ZoneDeliveryList.vue'), + // }, + // { + // path: 'create', + // name: 'ZoneDeliveryCreate', + // meta: { + // title: 'deliveryCreate', + // icon: 'create', + // }, + // component: () => + // import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'), + // }, + // { + // path: ':id/edit', + // name: 'ZoneDeliveryEdit', + // meta: { + // title: 'deliveryEdit', + // icon: 'edit', + // }, + // component: () => + // import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'), + // }, + // ], + // }, + // { + // path: '/zone/upcoming', + // name: 'ZoneUpcomingMain', + // component: () => import('src/pages/Zone/ZoneMain.vue'), + // redirect: { name: 'ZoneUpcomingList' }, + // children: [ + // { + // path: 'list', + // name: 'ZoneUpcomingList', + // meta: { + // title: 'upcomingList', + // icon: 'today', + // }, + // component: () => + // import('src/pages/Zone/Upcoming/ZoneUpcomingList.vue'), + // }, + // { + // path: 'create', + // name: 'ZoneUpcomingCreate', + // meta: { + // title: 'upcomingCreate', + // icon: 'create', + // }, + // component: () => + // import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'), + // }, + // { + // path: ':id/edit', + // name: 'ZoneUpcomingEdit', + // meta: { + // title: 'upcomingEdit', + // icon: 'edit', + // }, + // component: () => + // import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'), + // }, + // ], + // }, + ], + }, + ], +}; diff --git a/src/router/routes.js b/src/router/routes.js index 92145d44e..04780ee17 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -17,6 +17,7 @@ import entry from 'src/router/modules/entry'; import roadmap from 'src/router/modules/roadmap'; import parking from 'src/router/modules/parking'; import agency from 'src/router/modules/agency'; +import zone from 'src/router/modules/zone'; const routes = [ { @@ -75,6 +76,7 @@ const routes = [ parking, agency, ItemType, + zone, { path: '/:catchAll(.*)*', name: 'NotFound', diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index f075301f6..ee1e04e9b 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -21,6 +21,7 @@ export const useNavigationStore = defineStore('navigationStore', () => { 'ticket', 'worker', 'wagon', + 'zone', ]; const pinnedModules = ref([]); const role = useRole(); diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 28a8aa979..e7f8cb9d9 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -38,6 +38,15 @@ Cypress.Commands.add('login', (user) => { }, }).then((response) => { window.localStorage.setItem('token', response.body.token); + cy.request({ + method: 'GET', + url: '/api/VnUsers/ShareToken', + headers: { + Authorization: window.localStorage.getItem('token'), + }, + }).then(({ body }) => { + window.localStorage.setItem('tokenMultimedia', body.multimediaToken.id); + }); }); });