Merge branch 'dev' into 8316-itemCardWithVnCardBeta
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2025-01-24 08:05:49 +00:00
commit 6e588278d8
29 changed files with 52 additions and 61 deletions

4
.gitignore vendored
View File

@ -29,5 +29,5 @@ yarn-error.log*
*.sln *.sln
# Cypress directories and files # Cypress directories and files
/tests/cypress/videos /test/cypress/videos
/tests/cypress/screenshots /test/cypress/screenshots

View File

@ -41,7 +41,7 @@ const card = toRef(props, 'item');
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<span class="link"> <span class="link" @click.stop>
{{ card.name }} {{ card.name }}
<ItemDescriptorProxy :id="card.id" /> <ItemDescriptorProxy :id="card.id" />
</span> </span>

View File

@ -170,10 +170,9 @@ export function useArrayData(key, userOptions) {
async function addOrder(field, direction = 'ASC') { async function addOrder(field, direction = 'ASC') {
const newOrder = field + ' ' + direction; const newOrder = field + ' ' + direction;
let order = store.order || []; const order = toArray(store.order);
if (typeof order == 'string') order = [order];
let index = order.findIndex((o) => o.split(' ')[0] === field); let index = getOrderIndex(order, field);
if (index > -1) { if (index > -1) {
order[index] = newOrder; order[index] = newOrder;
} else { } else {
@ -190,16 +189,23 @@ export function useArrayData(key, userOptions) {
} }
async function deleteOrder(field) { async function deleteOrder(field) {
let order = store.order ?? []; const order = toArray(store.order);
if (typeof order == 'string') order = [order]; const index = getOrderIndex(order, field);
const index = order.findIndex((o) => o.split(' ')[0] === field);
if (index > -1) order.splice(index, 1); if (index > -1) order.splice(index, 1);
store.order = order; store.order = order;
fetch({}); fetch({});
} }
function getOrderIndex(order, field) {
return order.findIndex((o) => o.split(' ')[0] === field);
}
function toArray(str = []) {
if (Array.isArray(str)) return str;
if (typeof str === 'string') return str.split(',').map((item) => item.trim());
}
function sanitizerParams(params, exprBuilder) { function sanitizerParams(params, exprBuilder) {
for (const param in params) { for (const param in params) {
if (params[param] === '' || params[param] === null) { if (params[param] === '' || params[param] === null) {
@ -290,8 +296,7 @@ export function useArrayData(key, userOptions) {
Object.assign(params, store.userParams); Object.assign(params, store.userParams);
if (params.filter) params.filter.skip = store.skip; if (params.filter) params.filter.skip = store.skip;
if (store?.order && typeof store?.order == 'string') store.order = [store.order]; if (store.order) params.filter.order = toArray(store.order);
if (store.order?.length) params.filter.order = [...store.order];
else delete params.filter.order; else delete params.filter.order;
return { filter, params, limit: filter.limit }; return { filter, params, limit: filter.limit };

View File

@ -312,11 +312,11 @@ input::-webkit-inner-spin-button {
} }
.q-item > .q-item__section:has(.q-checkbox) { .q-item > .q-item__section:has(.q-checkbox) {
max-width: min-content; max-width: fit-content;
} }
.row > .column:has(.q-checkbox) { .row > .column:has(.q-checkbox) {
max-width: min-content; max-width: fit-content;
} }
.q-field__inner { .q-field__inner {
.q-field__control { .q-field__control {

View File

@ -5,6 +5,7 @@ globals:
quantity: Quantity quantity: Quantity
language: Language language: Language
entity: Entity entity: Entity
preview: Preview
user: User user: User
details: Details details: Details
collapseMenu: Collapse lateral menu collapseMenu: Collapse lateral menu

View File

@ -5,6 +5,7 @@ globals:
language: Idioma language: Idioma
quantity: Cantidad quantity: Cantidad
entity: Entidad entity: Entidad
preview: Vista previa
user: Usuario user: Usuario
details: Detalles details: Detalles
collapseMenu: Contraer menú lateral collapseMenu: Contraer menú lateral

View File

@ -153,6 +153,7 @@ const updateDateParams = (value, params) => {
data-key="CustomerConsumption" data-key="CustomerConsumption"
url="Clients/consumption" url="Clients/consumption"
:order="['itemTypeFk', 'itemName', 'itemSize', 'description']" :order="['itemTypeFk', 'itemName', 'itemSize', 'description']"
:filter="{ where: { clientFk: route.params.id } }"
:columns="columns" :columns="columns"
search-url="consumption" search-url="consumption"
:user-params="userParams" :user-params="userParams"

View File

@ -187,14 +187,18 @@ const debtWarning = computed(() => {
</QBtn> </QBtn>
<QBtn <QBtn
:to="{ :to="{
name: 'AccountSummary', name: 'OrderList',
params: { id: entity.id }, query: {
createForm: JSON.stringify({
clientFk: entity.id,
}),
},
}" }"
size="md" size="md"
icon="face" icon="vn:basketadd"
color="primary" color="primary"
> >
<QTooltip>{{ t('Go to user') }}</QTooltip> <QTooltip>{{ t('globals.pageTitles.createOrder') }}</QTooltip>
</QBtn> </QBtn>
<QBtn <QBtn
v-if="entity.supplier" v-if="entity.supplier"
@ -218,14 +222,9 @@ en:
unpaidDated: 'Date {dated}' unpaidDated: 'Date {dated}'
unpaidAmount: 'Amount {amount}' unpaidAmount: 'Amount {amount}'
es: es:
Go to module index: Ir al índice del módulo
Customer ticket list: Listado de tickets del cliente Customer ticket list: Listado de tickets del cliente
Customer invoice out list: Listado de facturas del cliente Customer invoice out list: Listado de facturas del cliente
New order: Nuevo pedido
New ticket: Nuevo ticket
Go to user: Ir al usuario
Go to supplier: Ir al proveedor Go to supplier: Ir al proveedor
Customer unpaid: Cliente impago
Unpaid: Impagado Unpaid: Impagado
unpaidDated: 'Fecha {dated}' unpaidDated: 'Fecha {dated}'
unpaidAmount: 'Importe {amount}' unpaidAmount: 'Importe {amount}'

View File

@ -51,7 +51,6 @@ const openCreateForm = (type) => {
}; };
const clientFk = { const clientFk = {
ticket: 'clientId', ticket: 'clientId',
order: 'clientFk',
}; };
const key = clientFk[type]; const key = clientFk[type];
if (!key) return; if (!key) return;
@ -70,11 +69,6 @@ const openCreateForm = (type) => {
{{ t('globals.pageTitles.createTicket') }} {{ t('globals.pageTitles.createTicket') }}
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem v-ripple clickable @click="openCreateForm('order')">
<QItemSection>
{{ t('globals.pageTitles.createOrder') }}
</QItemSection>
</QItem>
<QItem v-ripple clickable> <QItem v-ripple clickable>
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection> <QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
</QItem> </QItem>

View File

@ -214,7 +214,7 @@ const toCustomerSamples = () => {
<template #custom-buttons> <template #custom-buttons>
<QBtn <QBtn
:disabled="isLoading || !sampleType?.hasPreview" :disabled="isLoading || !sampleType?.hasPreview"
:label="t('Preview')" :label="t('globals.preview')"
:loading="isLoading" :loading="isLoading"
@click.stop="getPreview()" @click.stop="getPreview()"
color="primary" color="primary"
@ -353,7 +353,6 @@ es:
Its only used when sample is sent: Se utiliza únicamente cuando se envía la plantilla Its only used when sample is sent: Se utiliza únicamente cuando se envía la plantilla
To who should the recipient replay?: ¿A quien debería responder el destinatario? To who should the recipient replay?: ¿A quien debería responder el destinatario?
Edit address: Editar dirección Edit address: Editar dirección
Preview: Vista previa
Email cannot be blank: Debes introducir un email Email cannot be blank: Debes introducir un email
Choose a sample: Selecciona una plantilla Choose a sample: Selecciona una plantilla
Choose a company: Selecciona una empresa Choose a company: Selecciona una empresa

View File

@ -147,7 +147,7 @@ es:
Supplier card: Ficha del proveedor Supplier card: Ficha del proveedor
All travels with current agency: Todos los envíos con la agencia actual All travels with current agency: Todos los envíos con la agencia actual
All entries with current supplier: Todas las entradas con el proveedor actual All entries with current supplier: Todas las entradas con el proveedor actual
Go to module index: Ir al índice del modulo Show entry report: Ver informe del pedido
Inventory entry: Es inventario Inventory entry: Es inventario
Virtual entry: Es una redada Virtual entry: Es una redada
</i18n> </i18n>

View File

@ -506,5 +506,4 @@ es:
New item: Nuevo artículo New item: Nuevo artículo
Create Item: Crear artículo Create Item: Crear artículo
You can search by id: Puedes buscar por id You can search by id: Puedes buscar por id
Preview: Vista previa
</i18n> </i18n>

View File

@ -63,7 +63,3 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
</CardDescriptor> </CardDescriptor>
</template> </template>
<i18n>
es:
Go to module index: Ir al índice del módulo
</i18n>

View File

@ -290,7 +290,7 @@ const columns = computed(() => [
}, },
}, },
{ {
title: t('salesTicketsTable.preview'), title: t('globals.preview'),
icon: 'preview', icon: 'preview',
color: 'primary', color: 'primary',
action: (row) => viewSummary(row.id, TicketSummary), action: (row) => viewSummary(row.id, TicketSummary),

View File

@ -33,7 +33,6 @@ salesTicketsTable:
isFragile: Is fragile isFragile: Is fragile
zone: Zone zone: Zone
goToLines: Go to lines goToLines: Go to lines
preview: Preview
total: Total total: Total
preparation: H.Prep preparation: H.Prep
payMethod: Pay method payMethod: Pay method

View File

@ -115,6 +115,7 @@ const removeTagGroupParam = (params, search, valIndex) => {
} else { } else {
params.tagGroups.splice(valIndex, 1); params.tagGroups.splice(valIndex, 1);
} }
search();
}; };
const setCategoryList = (data) => { const setCategoryList = (data) => {

View File

@ -142,7 +142,7 @@ const total = computed(() => {
const openDmsUploadDialog = async () => { const openDmsUploadDialog = async () => {
dmsDialog.value.rowsToCreateInvoiceIn = selectedRows.value dmsDialog.value.rowsToCreateInvoiceIn = selectedRows.value
.filter( .filter(
(agencyTerm) => agencyTerm.supplierFk === selectedRows.value?.[0].supplierFk (agencyTerm) => agencyTerm.supplierFk === selectedRows.value?.[0].supplierFk,
) )
.map((agencyTerm) => ({ .map((agencyTerm) => ({
routeFk: agencyTerm.routeFk, routeFk: agencyTerm.routeFk,
@ -277,5 +277,4 @@ es:
Price: Precio Price: Precio
Received: Recibida Received: Recibida
Autonomous: Autónomos Autonomous: Autónomos
Preview: Vista previa
</i18n> </i18n>

View File

@ -112,7 +112,7 @@ const removeSelection = async () => {
await Promise.all( await Promise.all(
selectedRows.value.map((roadmap) => { selectedRows.value.map((roadmap) => {
axios.delete(`Roadmaps/${roadmap.id}`); axios.delete(`Roadmaps/${roadmap.id}`);
}) }),
); );
}; };
@ -236,6 +236,5 @@ es:
Plate: Matrícula Plate: Matrícula
Price: Precio Price: Precio
Observations: Observaciones Observations: Observaciones
Preview: Vista previa
Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida
</i18n> </i18n>

View File

@ -33,7 +33,6 @@ route:
Mark as served: Mark as served Mark as served: Mark as served
Download selected routes as PDF: Download selected routes as PDF Download selected routes as PDF: Download selected routes as PDF
Add ticket: Add ticket Add ticket: Add ticket
Preview: Preview
Summary: Summary Summary: Summary
Route is closed: Route is closed Route is closed: Route is closed
Route is not served: Route is not served Route is not served: Route is not served

View File

@ -33,7 +33,7 @@ route:
Mark as served: Marcar como servidas Mark as served: Marcar como servidas
Download selected routes as PDF: Descargar rutas seleccionadas como PDF Download selected routes as PDF: Descargar rutas seleccionadas como PDF
Add ticket: Añadir tickets Add ticket: Añadir tickets
Preview: Vista previa preview: Vista previa
Summary: Resumen Summary: Resumen
Route is closed: La ruta está cerrada Route is closed: La ruta está cerrada
Route is not served: La ruta no está servida Route is not served: La ruta no está servida

View File

@ -188,7 +188,6 @@ const getEntryQueryParams = (supplier) => {
es: es:
All entries with current supplier: Todas las entradas con proveedor actual All entries with current supplier: Todas las entradas con proveedor actual
Go to client: Ir a cliente Go to client: Ir a cliente
Go to module index: Ir al índice del módulo
Inactive supplier: Proveedor inactivo Inactive supplier: Proveedor inactivo
Unverified supplier: Proveedor no verificado Unverified supplier: Proveedor no verificado
</i18n> </i18n>

View File

@ -239,7 +239,6 @@ function ticketFilter(ticket) {
<i18n> <i18n>
es: es:
This ticket is deleted: Este ticket está eliminado This ticket is deleted: Este ticket está eliminado
Go to module index: Ir al índice del modulo
Client inactive: Cliente inactivo Client inactive: Cliente inactivo
Client not checked: Cliente no verificado Client not checked: Cliente no verificado
Client has debt: Cliente con deuda Client has debt: Cliente con deuda

View File

@ -14,6 +14,9 @@ const filter = {
'warehouseOutFk', 'warehouseOutFk',
'cargoSupplierFk', 'cargoSupplierFk',
'agencyModeFk', 'agencyModeFk',
'isRaid',
'isDelivered',
'isReceived',
], ],
include: [ include: [
{ {

View File

@ -85,7 +85,6 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
<i18n> <i18n>
es: es:
Go to module index: Ir al índice del módulo
The travel will be deleted: El envío será eliminado The travel will be deleted: El envío será eliminado
Do you want to delete this travel?: ¿Quieres eliminar este envío? Do you want to delete this travel?: ¿Quieres eliminar este envío?
All travels with current agency: Todos los envíos con la agencia actual All travels with current agency: Todos los envíos con la agencia actual

View File

@ -11,7 +11,7 @@ const { t } = useI18n();
const counters = ref({ const counters = ref({
alquilerBandeja: { count: 0, id: 96001, title: 'CC Bandeja', isTray: true }, alquilerBandeja: { count: 0, id: 96001, title: 'CC Bandeja', isTray: true },
bandejaRota: { count: 0, id: 88381, title: 'CC Bandeja Rota', isTray: true }, bandejaRota: { count: 0, id: 88381, title: 'CC Bandeja Rota', isTray: true },
carryOficial: { count: 0, id: 96000, title: 'CC Carry OFICIAL TAG5' }, carryOficial: { count: 0, id: 96000, title: 'CC Carry OFICIAL TAG6' },
candadoRojo: { count: 0, id: 96002, title: 'CC Carry NO OFICIAL' }, candadoRojo: { count: 0, id: 96002, title: 'CC Carry NO OFICIAL' },
sacadores: { count: 0, id: 142260, title: 'CC Sacadores' }, sacadores: { count: 0, id: 142260, title: 'CC Sacadores' },
sinChapa: { count: 0, id: 2214, title: 'DC Carry Sin Placa CC' }, sinChapa: { count: 0, id: 2214, title: 'DC Carry Sin Placa CC' },

View File

@ -10,6 +10,7 @@ import axios from 'axios';
import VnImg from 'src/components/ui/VnImg.vue'; import VnImg from 'src/components/ui/VnImg.vue';
import EditPictureForm from 'components/EditPictureForm.vue'; import EditPictureForm from 'components/EditPictureForm.vue';
import WorkerDescriptorMenu from './WorkerDescriptorMenu.vue'; import WorkerDescriptorMenu from './WorkerDescriptorMenu.vue';
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
const $props = defineProps({ const $props = defineProps({
id: { id: {
@ -115,10 +116,13 @@ const handlePhotoUpdated = (evt = false) => {
:value="entity.user?.emailUser?.email" :value="entity.user?.emailUser?.email"
copy copy
/> />
<VnLv <VnLv :label="t('worker.list.department')">
:label="t('worker.list.department')" <template #value>
:value="entity.department ? entity.department.department.name : null" <span class="link" v-text="entity.department?.department?.name" />
/> <DepartmentDescriptorProxy :id="entity.department?.department?.id" />
</template>
</VnLv>
<VnLv :value="entity.phone"> <VnLv :value="entity.phone">
<template #label> <template #label>
{{ t('globals.phone') }} {{ t('globals.phone') }}

View File

@ -66,7 +66,3 @@ const setData = (entity) => {
</CardDescriptor> </CardDescriptor>
</template> </template>
<i18n>
es:
Go to module index: Ir al índice del módulo
</i18n>

View File

@ -90,7 +90,7 @@ const redirectToZoneSummary = (id) => {
color="primary" color="primary"
@click.stop="viewSummary(props.row.id, ZoneSummary)" @click.stop="viewSummary(props.row.id, ZoneSummary)"
> >
<QTooltip>{{ t('zoneClosingTable.preview') }}</QTooltip> <QTooltip>{{ t('globals.preview') }}</QTooltip>
</QIcon> </QIcon>
</div> </div>
</QTd> </QTd>

View File

@ -50,8 +50,7 @@ deliveryPanel:
postcode: Postcode postcode: Postcode
query: Query query: Query
noEventsWarning: No service for the specified zone noEventsWarning: No service for the specified zone
zoneClosingTable:
preview: Preview
warehouses: warehouses:
deleteTitle: This item will be deleted deleteTitle: This item will be deleted
deleteSubtitle: Are you sure you want to continue? deleteSubtitle: Are you sure you want to continue?