diff --git a/CHANGELOG.md b/CHANGELOG.md
index d15ad787db..9f493764a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [2416.01] - 2024-04-18
+
+### Added
+
+### Fixed
+
+- (General) => Se vuelven a mostrar los parámetros en la url al aplicar un filtro
+
## [2414.01] - 2024-04-04
### Added
diff --git a/cypress.config.js b/cypress.config.js
index 1934f833e0..e2046d6c4e 100644
--- a/cypress.config.js
+++ b/cypress.config.js
@@ -3,6 +3,7 @@ const { defineConfig } = require('cypress');
module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:9000/',
+ experimentalStudio: true,
fixturesFolder: 'test/cypress/fixtures',
screenshotsFolder: 'test/cypress/screenshots',
supportFile: 'test/cypress/support/index.js',
diff --git a/package.json b/package.json
index a35020b66d..82f21efe63 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "salix-front",
- "version": "24.14.0",
+ "version": "24.16.0",
"description": "Salix frontend",
"productName": "Salix",
"author": "Verdnatura",
diff --git a/src/App.vue b/src/App.vue
index d0d8c93587..27cc34c382 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -16,7 +16,7 @@ onMounted(() => {
if (availableLocales.includes(userLang)) {
locale.value = userLang;
} else {
- locale.value = fallbackLocale;
+ locale.value = fallbackLocale.value;
}
});
diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue
index 47836c05b7..02e84849c3 100644
--- a/src/components/CreateNewPostcodeForm.vue
+++ b/src/components/CreateNewPostcodeForm.vue
@@ -28,8 +28,23 @@ const countriesOptions = ref([]);
const provincesOptions = ref([]);
const townsLocationOptions = ref([]);
-const onDataSaved = (dataSaved) => {
- emit('onDataSaved', dataSaved);
+const onDataSaved = (formData) => {
+ const newPostcode = {
+ ...formData
+ };
+ const townObject = townsLocationOptions.value.find(
+ ({id}) => id === formData.townFk
+ );
+ newPostcode.town = townObject?.name;
+ const provinceObject = provincesOptions.value.find(
+ ({id}) => id === formData.provinceFk
+ );
+ newPostcode.province = provinceObject?.name;
+ const countryObject = countriesOptions.value.find(
+ ({id}) => id === formData.countryFk
+ );
+ newPostcode.country = countryObject?.country;
+ emit('onDataSaved', newPostcode);
};
const onCityCreated = async ({ name, provinceFk }, formData) => {
@@ -73,7 +88,7 @@ const onProvinceCreated = async ({ name }, formData) => {
:title="t('New postcode')"
:subtitle="t('Please, ensure you put the correct data!')"
:form-initial-data="postcodeFormData"
- @on-data-saved="onDataSaved($event)"
+ @on-data-saved="onDataSaved"
>
diff --git a/src/components/FetchData.vue b/src/components/FetchData.vue
index 6d4e79f24e..1fdd9a5f57 100644
--- a/src/components/FetchData.vue
+++ b/src/components/FetchData.vue
@@ -1,5 +1,5 @@
@@ -284,6 +285,9 @@ defineExpose({
/>
diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue
index cdf19d492d..1e1480293d 100644
--- a/src/components/ui/CardSummary.vue
+++ b/src/components/ui/CardSummary.vue
@@ -74,7 +74,7 @@ async function fetch() {
-
+
@@ -97,7 +97,6 @@ async function fetch() {
.cardSummary {
width: 100%;
-
.summaryHeader {
text-align: center;
font-size: 20px;
@@ -132,6 +131,7 @@ async function fetch() {
padding: 7px;
font-size: 16px;
min-width: 275px;
+ box-shadow: none;
.vn-label-value {
display: flex;
diff --git a/src/components/ui/VnLinkPhone.vue b/src/components/ui/VnLinkPhone.vue
index 4445b99c9b..b04ab3e5be 100644
--- a/src/components/ui/VnLinkPhone.vue
+++ b/src/components/ui/VnLinkPhone.vue
@@ -15,7 +15,6 @@ const { t } = useI18n();
color="primary"
padding="none"
:href="`sip:${props.phoneNumber}`"
- :title="t('globals.microsip')"
@click.stop
/>
diff --git a/src/components/ui/VnSubToolbar.vue b/src/components/ui/VnSubToolbar.vue
index 0184470570..22eebdf368 100644
--- a/src/components/ui/VnSubToolbar.vue
+++ b/src/components/ui/VnSubToolbar.vue
@@ -14,7 +14,7 @@ onUnmounted(() => {
-
+
@@ -24,6 +24,11 @@ onUnmounted(() => {
+
es:
diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue
index 8f8213f1cc..0e53fbed77 100644
--- a/src/pages/InvoiceIn/InvoiceInFilter.vue
+++ b/src/pages/InvoiceIn/InvoiceInFilter.vue
@@ -29,6 +29,7 @@ const suppliersRef = ref();
order="nickname"
limit="30"
@on-fetch="(data) => (suppliers = data)"
+ auto-load
/>
@@ -38,46 +39,6 @@ const suppliersRef = ref();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
{
if (selectedCards.value.size === 1) {
const [invoiceOut] = selectedCardsArray;
- const url = `api/InvoiceOuts/${invoiceOut.id}/download?access_token=${token}`;
+ const url = `api/InvoiceOuts/${invoiceOut.id}/download?access_token=${tokenMultimedia}`;
window.open(url, '_blank');
} else {
const invoiceOutIdsArray = selectedCardsArray.map(
@@ -75,7 +75,7 @@ const openPdf = () => {
const invoiceOutIds = invoiceOutIdsArray.join(',');
const params = new URLSearchParams({
- access_token: token,
+ access_token: tokenMultimedia,
ids: invoiceOutIds,
});
diff --git a/src/pages/Login/LoginMain.vue b/src/pages/Login/LoginMain.vue
index f920854c63..fcde51edff 100644
--- a/src/pages/Login/LoginMain.vue
+++ b/src/pages/Login/LoginMain.vue
@@ -55,7 +55,7 @@ async function onSubmit() {
if (res.response?.data?.error?.code === 'REQUIRES_2FA') {
Notify.create({
message: t('login.twoFactorRequired'),
- icon: 'phonelink_lock',
+ icon: 'phoneLink_lock',
type: 'warning',
});
params.keepLogin = keepLogin.value;
diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue
index b1d5d41591..4053b57c7b 100644
--- a/src/pages/Route/RouteRoadmap.vue
+++ b/src/pages/Route/RouteRoadmap.vue
@@ -277,7 +277,6 @@ function navigateToRoadmapSummary(event, row) {
.route-list {
width: 100%;
}
-
.table-actions {
gap: 12px;
}
diff --git a/src/pages/Supplier/Card/SupplierDms.vue b/src/pages/Supplier/Card/SupplierDms.vue
new file mode 100644
index 0000000000..2848f858d1
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierDms.vue
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue
index 5d2b629444..bf818ef775 100644
--- a/src/pages/Ticket/Card/TicketSummary.vue
+++ b/src/pages/Ticket/Card/TicketSummary.vue
@@ -1,5 +1,5 @@
+
+
+ (workersOptions = data)"
+ auto-load
+ url="Workers/search"
+ />
+ (countriesOptions = data)"
+ auto-load
+ url="Countries"
+ />
+ (educationLevelsOptions = data)"
+ auto-load
+ url="EducationLevels"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt?.name }}
+
+ {{ scope.opt?.nickname }},
+ {{ scope.opt?.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Name: Nombre
+ Last name: Apellidos
+ Business phone: Teléfono de empresa
+ Mobile extension: Extensión móvil
+ Boss: Jefe
+ Marital status: Estado civil
+ Married: Casado/a
+ Single: Soltero/a
+ Origin country: País origen
+ Education level: Nivel educación
+ SSN: NSS
+ Locker: Taquilla
+
diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue
index 5144b3bfa6..a20ad55469 100644
--- a/src/pages/Worker/Card/WorkerDescriptor.vue
+++ b/src/pages/Worker/Card/WorkerDescriptor.vue
@@ -1,5 +1,5 @@
+
+
+
+
diff --git a/src/pages/Worker/Card/WorkerPBX.vue b/src/pages/Worker/Card/WorkerPBX.vue
new file mode 100644
index 0000000000..681194061b
--- /dev/null
+++ b/src/pages/Worker/Card/WorkerPBX.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/modules/Supplier.js b/src/router/modules/Supplier.js
index 379a2c2c2d..64c48146b7 100644
--- a/src/router/modules/Supplier.js
+++ b/src/router/modules/Supplier.js
@@ -22,6 +22,7 @@ export default {
'SupplierAddresses',
'SupplierConsumption',
'SupplierAgencyTerm',
+ 'SupplierDms',
],
},
children: [
@@ -161,6 +162,15 @@ export default {
component: () =>
import('src/pages/Supplier/Card/SupplierAgencyTerm.vue'),
},
+ {
+ path: 'dms',
+ name: 'SupplierDms',
+ meta: {
+ title: 'dms',
+ icon: 'smb_share',
+ },
+ component: () => import('src/pages/Supplier/Card/SupplierDms.vue'),
+ },
{
path: 'agency-term/create',
name: 'SupplierAgencyTermCreate',
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index 7a83ebd11e..4af2eea50a 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -12,7 +12,15 @@ export default {
redirect: { name: 'WorkerMain' },
menus: {
main: ['WorkerList', 'WorkerDepartment'],
- card: ['WorkerNotificationsManager', 'WorkerPda', 'WorkerLog', 'WorkerDms'],
+ card: [
+ 'WorkerBasicData',
+ 'WorkerNotes',
+ 'WorkerPda',
+ 'WorkerNotificationsManager',
+ 'WorkerPBX',
+ 'WorkerLog',
+ 'WorkerDms',
+ ],
departmentCard: ['BasicData'],
},
children: [
@@ -66,6 +74,41 @@ export default {
},
component: () => import('src/pages/Worker/Card/WorkerSummary.vue'),
},
+ {
+ path: 'basic-data',
+ name: 'WorkerBasicData',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerBasicData.vue'),
+ },
+ {
+ path: 'notes',
+ name: 'NotesCard',
+ redirect: { name: 'WorkerNotes' },
+ children: [
+ {
+ path: '',
+ name: 'WorkerNotes',
+ meta: {
+ title: 'notes',
+ icon: 'vn:notes',
+ },
+ component: () =>
+ import('src/pages/Worker/Card/WorkerNotes.vue'),
+ },
+ ],
+ },
+ {
+ name: 'WorkerPda',
+ path: 'pda',
+ meta: {
+ title: 'pda',
+ icon: 'phone_android',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerPda.vue'),
+ },
{
name: 'WorkerNotificationsManager',
path: 'notifications',
@@ -77,13 +120,13 @@ export default {
import('src/pages/Worker/Card/WorkerNotificationsManager.vue'),
},
{
- name: 'WorkerPda',
- path: 'pda',
+ path: 'pbx',
+ name: 'WorkerPBX',
meta: {
- title: 'pda',
- icon: 'phone_android',
+ title: 'pbx',
+ icon: 'vn:pbx',
},
- component: () => import('src/pages/Worker/Card/WorkerPda.vue'),
+ component: () => import('src/pages/Worker/Card/WorkerPBX.vue'),
},
{
name: 'WorkerDms',
diff --git a/test/cypress/integration/VnLocation.spec.js b/test/cypress/integration/VnLocation.spec.js
index 5892e3ad5b..3a90afce9e 100644
--- a/test/cypress/integration/VnLocation.spec.js
+++ b/test/cypress/integration/VnLocation.spec.js
@@ -8,41 +8,41 @@ describe('VnLocation', () => {
cy.visit('/#/worker/create');
cy.waitForElement('.q-card');
});
-
- it('Show all options', function() {
- cy.get(inputLocation).click();
- cy.get(locationOptions).should('have.length',5);
+ 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() {
+ it('input filter location as "al"', function() {
cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('al');
- cy.get(locationOptions).should('have.length',3);
+ cy.get(locationOptions).should('have.length.at.least',3);
});
it('input filter location as "ecuador"', function() {
cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('ecuador');
- cy.get(locationOptions).should('have.length',1);
+ cy.get(locationOptions).should('have.length.at.least',1);
cy.get(`${locationOptions}:nth-child(1)`).click();
cy.get(':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon').click();
-
});
});
describe('Fiscal-data',()=>{
- const inputLocation = ':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control';
-
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('/#/supplier/567/fiscal-data', {timeout: 2000});
cy.waitForElement('.q-card');
});
-
- it('Show locations options', function() {
- cy.get(inputLocation).click();
- cy.get(locationOptions).should('have.length', 5);
+ it('Create postCode', function() {
+ cy.get(':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(3) > .q-icon').click();
+ cy.get(' .q-card > h1').should('have.text', 'New postcode');
+ cy.get('.q-card > :nth-child(4) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(1) > input').clear('12');
+ cy.get('.q-card > :nth-child(4) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(1) > input').type('1234453');
+ cy.selectOption('.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > :nth-child(2) > .q-field > .q-field__inner > .q-field__control ', 'Valencia');
+ cy.selectOption('.q-dialog__inner > .column > #formModel > .q-card > :nth-child(5) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control ', 'Province one');
+ cy.selectOption('.q-dialog__inner > .column > #formModel > .q-card > :nth-child(5) > :nth-child(2) > .q-field > .q-field__inner > .q-field__control ', 'España');
+ cy.get('.q-mt-lg > .q-btn--standard').click();
});
});
})
diff --git a/test/cypress/integration/ticket/ticketDescriptor.spec.js b/test/cypress/integration/ticket/ticketDescriptor.spec.js
index c212d3b4ad..22401f0b4c 100644
--- a/test/cypress/integration/ticket/ticketDescriptor.spec.js
+++ b/test/cypress/integration/ticket/ticketDescriptor.spec.js
@@ -1,7 +1,7 @@
///
describe('Ticket descriptor', () => {
const toCloneOpt = '.q-list > :nth-child(5)';
- const warehouseValue = '.summaryBody > :nth-child(2) > :nth-child(6) > .value > span';
+ const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span';
const summaryHeader = '.summaryHeader > div';
beforeEach(() => {
diff --git a/test/cypress/integration/vnSearchBar.spec.js b/test/cypress/integration/vnSearchBar.spec.js
index 3db7897737..f1f3a9e827 100644
--- a/test/cypress/integration/vnSearchBar.spec.js
+++ b/test/cypress/integration/vnSearchBar.spec.js
@@ -36,7 +36,7 @@ describe('VnSearchBar', () => {
const checkCardListAndUrl = (expectedLength) => {
cy.get(cardList).then(($cardList) => {
expect($cardList.find('.q-card').length).to.equal(expectedLength);
- cy.url().then((currentUrl) => expect(currentUrl).to.equal(url));
+ cy.url().then((currentUrl) => expect(currentUrl).to.contain(url));
});
};
});
diff --git a/test/vitest/__tests__/components/common/VnLog.spec.js b/test/vitest/__tests__/components/common/VnLog.spec.js
index b654bff9bb..53d2732a07 100644
--- a/test/vitest/__tests__/components/common/VnLog.spec.js
+++ b/test/vitest/__tests__/components/common/VnLog.spec.js
@@ -38,10 +38,10 @@ describe('VnLog', () => {
action: 'update',
changedModel: 'Claim',
oldInstance: {
- hasToPickUp: false,
+ pickup: null,
},
newInstance: {
- hasToPickUp: true,
+ pickup: 'agency',
},
creationDate: '2023-09-18T12:25:34.000Z',
changedModelId: '1',
diff --git a/test/vitest/__tests__/composables/useArrayData.spec.js b/test/vitest/__tests__/composables/useArrayData.spec.js
new file mode 100644
index 0000000000..ae0ca73685
--- /dev/null
+++ b/test/vitest/__tests__/composables/useArrayData.spec.js
@@ -0,0 +1,31 @@
+import { describe, expect, it, beforeAll } from 'vitest';
+import { axios } from 'app/test/vitest/helper';
+import { useArrayData } from 'composables/useArrayData';
+
+describe('useArrayData', () => {
+ let arrayData;
+ beforeAll(() => {
+ axios.get.mockResolvedValue({ data: [] });
+ arrayData = useArrayData('InvoiceIn', { url: 'invoice-in/list' });
+ Object.defineProperty(window.location, 'href', {
+ writable: true,
+ value: 'localhost:9000/invoice-in/list',
+ });
+
+ // Mock the window.history.pushState method within useArrayData
+ window.history.pushState = (data, title, url) => (window.location.href = url);
+
+ // Mock the URL constructor within useArrayData
+ global.URL = class URL {
+ constructor(url) {
+ this.hash = url.split('localhost:9000/')[1];
+ }
+ };
+ });
+
+ it('should add the params to the url', async () => {
+ arrayData.store.userParams = { supplierFk: 2 };
+ arrayData.updateStateParams();
+ expect(window.location.href).contain('params=%7B%22supplierFk%22%3A2%7D');
+ });
+});