($props.useLike ? { like: `%${val}%` } : val);
.q-field--outlined {
max-width: 100%;
}
+.q-field__inner {
+ .q-field__control {
+ min-height: auto !important;
+
+ display: flex;
+ align-items: flex-end;
+ .q-field__native.row {
+ min-height: auto !important;
+ }
+ }
+}
diff --git a/src/components/common/VnSelectDialog.vue b/src/components/common/VnSelectDialog.vue
index 17f893255..350aa9272 100644
--- a/src/components/common/VnSelectDialog.vue
+++ b/src/components/common/VnSelectDialog.vue
@@ -1,5 +1,5 @@
-
-
-
-
-
diff --git a/src/pages/Entry/EntryStockBought.vue b/src/pages/Entry/EntryStockBought.vue
index 4750a8417..0e8013586 100644
--- a/src/pages/Entry/EntryStockBought.vue
+++ b/src/pages/Entry/EntryStockBought.vue
@@ -47,7 +47,7 @@ const columns = [
},
},
{
- align: 'left',
+ align: 'center',
label: t('Reserve'),
name: 'reserve',
columnFilter: false,
@@ -76,7 +76,7 @@ const columns = [
name: 'tableActions',
actions: [
{
- title: t('More'),
+ title: t('View more details'),
icon: 'search',
isPrimary: true,
action: (row) => {
@@ -141,6 +141,10 @@ function setFooter(data) {
});
tableRef.value.footer = footer;
}
+
+function round(value) {
+ return Math.round(value * 100) / 100;
+}
@@ -152,7 +156,9 @@ function setFooter(data) {
:filter="filter"
@on-fetch="
(data) => {
- travel = data.find((data) => data.warehouseIn.code === 'VNH');
+ travel = data.find(
+ (data) => data.warehouseIn.code.toLowerCase() === 'vnh'
+ );
}
"
/>
@@ -206,7 +212,7 @@ function setFooter(data) {
-
+
@@ -243,7 +250,7 @@ function setFooter(data) {
- {{ tableRef.footer.reserve }}
+ {{ round(tableRef.footer.reserve) }}
@@ -253,11 +260,11 @@ function setFooter(data) {
tableRef.footer.reserve < tableRef.footer.bought,
}"
>
- {{ tableRef.footer.bought }}
+ {{ round(tableRef.footer.bought) }}
-
+
diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue
index 5157d957b..3dc565251 100644
--- a/src/pages/InvoiceOut/InvoiceOutList.vue
+++ b/src/pages/InvoiceOut/InvoiceOutList.vue
@@ -27,13 +27,16 @@ const { openReport } = usePrintService();
const columns = computed(() => [
{
- align: 'left',
+ align: 'center',
name: 'id',
label: t('invoiceOutList.tableVisibleColumns.id'),
chip: {
condition: () => true,
},
isId: true,
+ columnFilter: {
+ name: 'search',
+ },
},
{
align: 'left',
diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue
index fddf154a2..7d4d6b896 100644
--- a/src/pages/Item/ItemFixedPrice.vue
+++ b/src/pages/Item/ItemFixedPrice.vue
@@ -514,7 +514,7 @@ function handleOnDataSave({ CrudModelRef }) {
-
+
[
condition: () => true,
},
isId: true,
+ columnFilter: false,
},
{
align: 'left',
label: t('globals.name'),
name: 'name',
isTitle: true,
+ columnFilter: false,
+ columnClass: 'expand',
},
{
align: 'left',
@@ -70,18 +73,33 @@ const columns = computed(() => [
data-key="AgencyList"
:expr-builder="exprBuilder"
/>
-
+
+
es:
isOwn: Tiene propietario
diff --git a/src/pages/Route/Card/RouteListTicketsDialog.vue b/src/pages/Route/Card/RouteListTicketsDialog.vue
index ba07f859f..b9b2ee36b 100644
--- a/src/pages/Route/Card/RouteListTicketsDialog.vue
+++ b/src/pages/Route/Card/RouteListTicketsDialog.vue
@@ -167,8 +167,8 @@ const setTicketsRoute = async () => {
{{ props.value }}
-
+
diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue
new file mode 100644
index 000000000..51da4ec12
--- /dev/null
+++ b/src/pages/Route/RouteExtendedList.vue
@@ -0,0 +1,360 @@
+
+
+
+
+
+
+
+ {{ t('route.Select the starting date') }}
+
+
+
+
+
+
+
+
+ {{ t('globals.clone') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('route.Clone Selected Routes') }}
+
+
+ {{ t('route.Download selected routes as PDF') }}
+
+
+ {{ t('route.Mark as served') }}
+
+
+
+
diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue
index 1e20df99c..d0feb9a65 100644
--- a/src/pages/Route/RouteList.vue
+++ b/src/pages/Route/RouteList.vue
@@ -1,34 +1,19 @@
-
-
-
-
- {{ t('Select the starting date') }}
-
-
-
-
-
-
-
-
- {{ t('globals.clone') }}
-
-
-
-
-
-
-
- {{ t('Clone Selected Routes') }}
-
-
- {{ t('Download selected routes as PDF') }}
-
-
- {{ t('Mark as served') }}
-
+
+
+ {{ row?.workerUserName }}
+
+
-
-
-
-en:
- newRoute: New Route
- hourStarted: Started hour
- hourFinished: Finished hour
-es:
- From: Desde
- To: Hasta
- Worker: Trabajador
- Agency: Agencia
- Vehicle: Vehículo
- Volume: Volumen
- Date: Fecha
- Description: Descripción
- Hour started: Hora inicio
- Hour finished: Hora fin
- KmStart: Km inicio
- KmEnd: Km fin
- Served: Servida
- newRoute: Nueva Ruta
- Clone Selected Routes: Clonar rutas seleccionadas
- Select the starting date: Seleccione la fecha de inicio
- Stating date: Fecha de inicio
- Cancel: Cancelar
- Mark as served: Marcar como servidas
- Download selected routes as PDF: Descargar rutas seleccionadas como PDF
- Add ticket: Añadir tickets
- Preview: Vista previa
- Summary: Resumen
- Route is closed: La ruta está cerrada
- Route is not served: La ruta no está servida
- hourStarted: Hora de inicio
- hourFinished: Hora de fin
-
diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue
index d921dab1f..3687442f5 100644
--- a/src/pages/Route/RouteRoadmap.vue
+++ b/src/pages/Route/RouteRoadmap.vue
@@ -87,7 +87,7 @@ const columns = computed(() => [
actions: [
{
title: t('Ver cmr'),
- icon: 'visibility',
+ icon: 'preview',
isPrimary: true,
action: (row) => viewSummary(row?.id, RoadmapSummary),
},
diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue
index 5960636b0..3bdad4fec 100644
--- a/src/pages/Route/RouteTickets.vue
+++ b/src/pages/Route/RouteTickets.vue
@@ -342,10 +342,7 @@ const openSmsDialog = async () => {
-
+
{{ value }}
{{ t('Open buscaman') }}
@@ -353,7 +350,7 @@ const openSmsDialog = async () => {
-
+
{{ value }}
@@ -361,7 +358,7 @@ const openSmsDialog = async () => {
-
+
{{ value }}
diff --git a/src/pages/Route/locale/en.yml b/src/pages/Route/locale/en.yml
new file mode 100644
index 000000000..617d704d2
--- /dev/null
+++ b/src/pages/Route/locale/en.yml
@@ -0,0 +1,25 @@
+route:
+ Worker: Worker
+ Agency: Agency
+ Vehicle: Vehicle
+ Description: Description
+ hourStarted: H.Start
+ hourFinished: H.End
+ createRoute: Create route
+ From: From
+ To: To
+ Date: Date
+ KmStart: Km start
+ KmEnd: Km end
+ Served: Served
+ Clone Selected Routes: Clone selected routes
+ Select the starting date: Select the starting date
+ Stating date: Starting date
+ Cancel: Cancel
+ Mark as served: Mark as served
+ Download selected routes as PDF: Download selected routes as PDF
+ Add ticket: Add ticket
+ Preview: Preview
+ Summary: Summary
+ Route is closed: Route is closed
+ Route is not served: Route is not served
diff --git a/src/pages/Route/locale/es.yml b/src/pages/Route/locale/es.yml
new file mode 100644
index 000000000..ed96ad915
--- /dev/null
+++ b/src/pages/Route/locale/es.yml
@@ -0,0 +1,25 @@
+route:
+ Worker: Trabajador
+ Agency: Agencia
+ Vehicle: Vehículo
+ Description: Descripción
+ hourStarted: H.Inicio
+ hourFinished: H.Fin
+ createRoute: Crear ruta
+ From: Desde
+ To: Hasta
+ Date: Fecha
+ KmStart: Km inicio
+ KmEnd: Km fin
+ Served: Servida
+ Clone Selected Routes: Clonar rutas seleccionadas
+ Select the starting date: Seleccione la fecha de inicio
+ Stating date: Fecha de inicio
+ Cancel: Cancelar
+ Mark as served: Marcar como servidas
+ Download selected routes as PDF: Descargar rutas seleccionadas como PDF
+ Add ticket: Añadir tickets
+ Preview: Vista previa
+ Summary: Resumen
+ Route is closed: La ruta está cerrada
+ Route is not served: La ruta no está servida
diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue
index f8fbba0e4..177466478 100644
--- a/src/pages/Supplier/Card/SupplierAccounts.vue
+++ b/src/pages/Supplier/Card/SupplierAccounts.vue
@@ -113,6 +113,7 @@ const setWireTransfer = async () => {
option-label="bic"
option-value="id"
hide-selected
+ :roles-allowed-to-create="['financial']"
>
{
try {
const params = { ticketId: ticket.value.id, sales: props.sales };
const { data } = await axios.post(`Claims/createFromSales`, params);
- router.push({ name: 'ClaimBasicData', params: { id: data.id } });
+ push({ name: 'ClaimBasicData', params: { id: data.id } });
} catch (error) {
console.error('Error creating claim: ', error);
}
@@ -169,7 +169,7 @@ const createRefund = async (withWarehouse) => {
const { data } = await axios.post('Tickets/cloneAll', params);
const [refundTicket] = data;
notify(t('refundTicketCreated', { ticketId: refundTicket.id }), 'positive');
- router.push({ name: 'TicketSale', params: { id: refundTicket.id } });
+ push({ name: 'TicketSale', params: { id: refundTicket.id } });
} catch (error) {
console.error(error);
}
diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue
index b6a60122c..2ca0b5727 100644
--- a/src/pages/Ticket/Card/TicketSummary.vue
+++ b/src/pages/Ticket/Card/TicketSummary.vue
@@ -1,7 +1,7 @@
@@ -185,6 +167,18 @@ const onThermographCreated = async (data) => {
:filter="{ order: 'name' }"
auto-load
/>
+ (temperaturesOptions = data)"
+ auto-load
+ url="Temperatures"
+ />
+ (thermographsOptions = data)"
+ :filter="thermographFilter"
+ auto-load
+ />
{
(thermographForm.thermographId = data.id)
- "
+ @on-data-saved="onThermographCreated"
/>
@@ -271,6 +259,26 @@ const onThermographCreated = async (data) => {
option-label="name"
/>
+
+
+
+
+
+
{
-es:
- Select files: Selecciona ficheros
- Thermograph created: Termógrafo creado
- New thermograph: Nuevo termógrafo
+ es:
+ Select files: Selecciona ficheros
+ Thermograph created: Termógrafo creado
+ New thermograph: Nuevo termógrafo
diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue
index a0976e92c..e56f5d2ff 100644
--- a/src/pages/Travel/TravelList.vue
+++ b/src/pages/Travel/TravelList.vue
@@ -1,18 +1,14 @@
-
-
-
-
-
- {{ t('globals.collapseMenu') }}
-
-
-
-
-
import { onMounted, ref, computed, watch, onUnmounted } from 'vue';
import { useRoute } from 'vue-router';
-
+import VnInput from 'src/components/common/VnInput.vue';
import { useState } from 'src/composables/useState';
import axios from 'axios';
import { useArrayData } from 'composables/useArrayData';
@@ -144,7 +144,8 @@ watch(storeData, async (val) => {
});
const reFetch = async () => {
- await arrayData.fetch({ append: false });
+ const { data } = await arrayData.fetch({ append: false });
+ nodes.value = data;
};
onMounted(async () => {
@@ -182,6 +183,16 @@ onUnmounted(() => {
+
+
+
+
+
import('src/components/common/VnSectionMain.vue'),
- props: {
- leftDrawer: false,
- },
redirect: { name: 'RouteList' },
children: [
{
@@ -33,6 +37,15 @@ export default {
},
component: () => import('src/pages/Route/RouteList.vue'),
},
+ {
+ path: 'extended-list',
+ name: 'RouteExtendedList',
+ meta: {
+ title: 'RouteExtendedList',
+ icon: 'format_list_bulleted',
+ },
+ component: () => import('src/pages/Route/RouteExtendedList.vue'),
+ },
{
path: 'create',
name: 'RouteCreate',
@@ -78,7 +91,7 @@ export default {
name: 'AgencyList',
meta: {
title: 'agencyList',
- icon: 'view_list',
+ icon: 'list',
},
component: () =>
import('src/pages/Route/Agency/AgencyList.vue'),
diff --git a/test/cypress/integration/vnComponent/UserPanel.spec.js b/test/cypress/integration/vnComponent/UserPanel.spec.js
new file mode 100644
index 000000000..e83d07954
--- /dev/null
+++ b/test/cypress/integration/vnComponent/UserPanel.spec.js
@@ -0,0 +1,58 @@
+///
+describe('UserPanel', () => {
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit(`/#dashboard`);
+ cy.waitForElement('.q-page', 6000);
+ });
+
+ it('should notify when update user warehouse', () => {
+ const userWarehouse =
+ '.q-menu .q-gutter-xs > :nth-child(3) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native> .q-field__input';
+
+ // Abro el panel
+ cy.openUserPanel();
+
+ // Compruebo la opcion inicial
+ cy.get(userWarehouse).should('have.value', 'VNL').click();
+
+ // Actualizo la opción
+ getOption(3);
+
+ //Compruebo la notificación
+ cy.get('.q-notification').should('be.visible');
+ cy.get(userWarehouse).should('have.value', 'VNH');
+
+ //Restauro el valor
+ cy.get(userWarehouse).click();
+ getOption(2);
+ });
+ it('should notify when update user company', () => {
+ const userCompany =
+ '.q-menu .q-gutter-xs > :nth-child(2) > .q-field--float > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native> .q-field__input';
+
+ // Abro el panel
+ cy.openUserPanel();
+
+ // Compruebo la opcion inicial
+ cy.get(userCompany).should('have.value', 'Warehouse One').click();
+
+ //Actualizo la opción
+ getOption(2);
+
+ //Compruebo la notificación
+ cy.get('.q-notification').should('be.visible');
+ cy.get(userCompany).should('have.value', 'Warehouse Two');
+
+ //Restauro el valor
+ cy.get(userCompany).click();
+ getOption(1);
+ });
+});
+
+function getOption(index) {
+ cy.waitForElement('[role="listbox"]');
+ const option = `[role="listbox"] .q-item:nth-child(${index})`;
+ cy.get(option).click();
+}
diff --git a/test/cypress/integration/vnComponent/vnLocation.spec.js b/test/cypress/integration/vnComponent/vnLocation.spec.js
index 1872d3591..78dc38899 100644
--- a/test/cypress/integration/vnComponent/vnLocation.spec.js
+++ b/test/cypress/integration/vnComponent/vnLocation.spec.js
@@ -3,25 +3,90 @@ describe('VnLocation', () => {
const dialogInputs = '.q-dialog label input';
const createLocationButton = '.q-form > .q-card > .vn-row:nth-child(6) .--add-icon';
const inputLocation = '.q-form input[aria-label="Location"]';
+ const createForm = {
+ prefix: '.q-dialog__inner > .column > #formModel > .q-card',
+ sufix: ' .q-field__inner > .q-field__control',
+ };
+ describe('CreateFormDialog ', () => {
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
+ cy.waitForElement('.q-card');
+ cy.get(createLocationButton).click();
+ });
+ it('should filter provinces based on selected country', () => {
+ // Select a country
+ cy.selectOption(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(5)> ${createForm.sufix}`,
+ 'Ecuador'
+ );
+ // Verify that provinces are filtered
+ cy.get(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(3)> ${createForm.sufix}`
+ ).should('have.length', 1);
+
+ // Verify that towns are filtered
+ cy.get(
+ `${createForm.prefix} > :nth-child(4) > .q-field:nth-child(3)> ${createForm.sufix}`
+ ).should('have.length', 1);
+ });
+
+ it('should filter towns based on selected province', () => {
+ // Select a country
+ cy.selectOption(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(3)> ${createForm.sufix}`,
+ 'Ecuador'
+ );
+ // Verify that provinces are filtered
+ cy.get(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(3)> ${createForm.sufix}`
+ ).should('have.length', 1);
+
+ // Verify that towns are filtered
+ cy.get(
+ `${createForm.prefix} > :nth-child(4) > .q-field:nth-child(3)> ${createForm.sufix}`
+ ).should('have.length', 1);
+ });
+ it('should pass selected country', () => {
+ // Select a country
+ const country = 'Ecuador';
+ const province = 'Province five';
+ cy.selectOption(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(5)> ${createForm.sufix}`,
+ country
+ );
+ cy.selectOption(
+ `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix}`,
+ province
+ );
+ cy.get(
+ `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) > .q-icon`
+ ).click();
+ cy.get(
+ `#q-portal--dialog--4 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input`
+ ).should('have.value', province);
+ });
+ });
describe('Worker Create', () => {
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('/#/worker/create', { timeout: 5000 });
cy.waitForElement('.q-card');
+ cy.get(inputLocation).click();
});
it('Show all options', function () {
- cy.get(inputLocation).click();
cy.get(locationOptions).should('have.length.at.least', 5);
});
it('input filter location as "al"', function () {
- cy.get(inputLocation).click();
+ // cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('al');
cy.get(locationOptions).should('have.length.at.least', 4);
});
it('input filter location as "ecuador"', function () {
- cy.get(inputLocation).click();
+ // cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('ecuador');
cy.get(locationOptions).should('have.length.at.least', 1);
@@ -63,13 +128,11 @@ describe('VnLocation', () => {
cy.get(dialogInputs).eq(0).clear();
cy.get(dialogInputs).eq(0).type(postCode);
cy.selectOption(
- '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > .q-select > .q-field__inner > .q-field__control ',
+ `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix}`,
province
);
cy.get('.q-mt-lg > .q-btn--standard').click();
- cy.get('.q-dialog__inner > .column > #formModel > .q-card').should(
- 'not.exist'
- );
+ cy.get(`${createForm.prefix}`).should('not.exist');
checkVnLocation(postCode, province);
});
it('Create city', () => {
@@ -79,7 +142,7 @@ describe('VnLocation', () => {
cy.get(dialogInputs).eq(0).type(postCode);
// city create button
cy.get(
- '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > .q-select > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon'
+ `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
).click();
cy.selectOption('#q-portal--dialog--2 .q-select', 'one');
cy.get('#q-portal--dialog--2 .q-input').type(province);
@@ -89,9 +152,7 @@ describe('VnLocation', () => {
});
function checkVnLocation(postCode, province) {
- cy.get('.q-dialog__inner > .column > #formModel > .q-card').should(
- 'not.exist'
- );
+ cy.get(`${createForm.prefix}`).should('not.exist');
cy.get('.q-form > .q-card > .vn-row:nth-child(6)')
.find('input')
.invoke('val')
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index 43788f59f..83f45b721 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -248,3 +248,9 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
Cypress.Commands.add('openActionsDescriptor', () => {
cy.get('.header > :nth-child(3) > .q-btn__content > .q-icon').click();
});
+
+Cypress.Commands.add('openUserPanel', () => {
+ cy.get(
+ '.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
+ ).click();
+});