Merge branch 'dev' into 5690-redondeo_ticketProblems
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
1308efb98d
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -5,7 +5,7 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [2330.01] - 2023-07-27
|
## [2334.01] - 2023-08-24
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
@ -14,6 +14,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
||||||
|
## [2332.01] - 2023-08-09
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- (Trabajadores -> Gestión documental) Soporte para Docuware
|
||||||
|
- (General -> Agencia) Soporte para Viaexpress
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- (General -> Tickets) Devuelve el motivo por el cual no es editable
|
||||||
|
- (Desplegables -> Trabajadores) Mejorados
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
|
||||||
## [2330.01] - 2023-07-27
|
## [2330.01] - 2023-07-27
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -24,7 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- (General -> Iconos) Añadidos nuevos iconos
|
- (General -> Iconos) Añadidos nuevos iconos
|
||||||
- (Clientes -> Razón social) Nuevas restricciones por pais
|
- (Clientes -> Razón social) Permite crear clientes con la misma razón social según el país
|
||||||
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -47,7 +47,7 @@ module.exports = Self => {
|
||||||
const user = await Self.findById(userId, {fields: ['hasGrant']}, myOptions);
|
const user = await Self.findById(userId, {fields: ['hasGrant']}, myOptions);
|
||||||
|
|
||||||
const userToUpdate = await Self.findById(id, {
|
const userToUpdate = await Self.findById(id, {
|
||||||
fields: ['id', 'name', 'hasGrant', 'roleFk', 'password'],
|
fields: ['id', 'name', 'hasGrant', 'roleFk', 'password', 'email'],
|
||||||
include: {
|
include: {
|
||||||
relation: 'role',
|
relation: 'role',
|
||||||
scope: {
|
scope: {
|
||||||
|
|
|
@ -20,7 +20,7 @@ module.exports = function(Self) {
|
||||||
Self.validatesFormatOf('email', {
|
Self.validatesFormatOf('email', {
|
||||||
message: 'Invalid email',
|
message: 'Invalid email',
|
||||||
allowNull: true,
|
allowNull: true,
|
||||||
allowBlank: true,
|
allowBlank: false,
|
||||||
with: /^[\w|.|-]+@[\w|-]+(\.[\w|-]+)*(,[\w|.|-]+@[\w|-]+(\.[\w|-]+)*)*$/
|
with: /^[\w|.|-]+@[\w|-]+(\.[\w|-]+)*(,[\w|.|-]+@[\w|-]+(\.[\w|-]+)*)*$/
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -115,6 +115,14 @@ module.exports = function(Self) {
|
||||||
Self.validateLogin = async function(user, password) {
|
Self.validateLogin = async function(user, password) {
|
||||||
let loginInfo = Object.assign({password}, Self.userUses(user));
|
let loginInfo = Object.assign({password}, Self.userUses(user));
|
||||||
token = await Self.login(loginInfo, 'user');
|
token = await Self.login(loginInfo, 'user');
|
||||||
|
|
||||||
|
const userToken = await token.user.get();
|
||||||
|
try {
|
||||||
|
await Self.app.models.Account.sync(userToken.name, password);
|
||||||
|
} catch (err) {
|
||||||
|
console.warn(err);
|
||||||
|
}
|
||||||
|
|
||||||
return {token: token.id, ttl: token.ttl};
|
return {token: token.id, ttl: token.ttl};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -360,13 +360,13 @@ INSERT INTO `vn`.`contactChannel`(`id`, `name`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`, `hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`, `businessTypeFk`)
|
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`, `hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`, `businessTypeFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
(1101, 'Bruce Wayne', '84612325V', 'BATMAN', 'Alfred', '1007 MOUNTAIN DRIVE, GOTHAM', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||||
(1102, 'Petter Parker', '87945234L', 'Spider man', 'Aunt May', '20 Ingram Street, Queens, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
(1102, 'Petter Parker', '87945234L', 'SPIDER MAN', 'Aunt May', '20 INGRAM STREET, QUEENS, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||||
(1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
(1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||||
(1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
(1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||||
(1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'),
|
(1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||||
(1106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'City of New York, New York, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
|
(1106, 'DavidCharlesHaller', '53136686Q', 'LEGION', 'Charles Xavier', 'CITY OF NEW YORK, NEW YORK, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
|
||||||
(1107, 'Hank Pym', '09854837G', 'Ant man', 'Hawk', 'Anthill, San Francisco, California', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
|
(1107, 'Hank Pym', '09854837G', 'ANT MAN', 'Hawk', 'ANTHILL, SAN FRANCISCO, CALIFORNIA', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
|
||||||
(1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'),
|
(1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'),
|
||||||
(1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'),
|
(1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'),
|
||||||
(1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'),
|
(1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'),
|
||||||
|
|
|
@ -73,8 +73,8 @@ describe('Client create path', () => {
|
||||||
|
|
||||||
it(`should attempt to create a new user with all it's data but wrong email`, async() => {
|
it(`should attempt to create a new user with all it's data but wrong email`, async() => {
|
||||||
await page.write(selectors.createClientView.name, 'Carol Danvers');
|
await page.write(selectors.createClientView.name, 'Carol Danvers');
|
||||||
await page.write(selectors.createClientView.socialName, 'AVG tax');
|
await page.write(selectors.createClientView.socialName, 'AVG TAX');
|
||||||
await page.write(selectors.createClientView.street, 'Many places');
|
await page.write(selectors.createClientView.street, 'MANY PLACES');
|
||||||
await page.clearInput(selectors.createClientView.email);
|
await page.clearInput(selectors.createClientView.email);
|
||||||
await page.write(selectors.createClientView.email, 'incorrect email format');
|
await page.write(selectors.createClientView.email, 'incorrect email format');
|
||||||
await page.waitToClick(selectors.createClientView.createButton);
|
await page.waitToClick(selectors.createClientView.createButton);
|
||||||
|
|
|
@ -61,7 +61,7 @@ describe('Client Edit fiscalData path', () => {
|
||||||
await page.clearInput(selectors.clientFiscalData.fiscalId);
|
await page.clearInput(selectors.clientFiscalData.fiscalId);
|
||||||
await page.write(selectors.clientFiscalData.fiscalId, 'INVALID!');
|
await page.write(selectors.clientFiscalData.fiscalId, 'INVALID!');
|
||||||
await page.clearInput(selectors.clientFiscalData.address);
|
await page.clearInput(selectors.clientFiscalData.address);
|
||||||
await page.write(selectors.clientFiscalData.address, 'Somewhere edited');
|
await page.write(selectors.clientFiscalData.address, 'SOMEWHERE EDITED');
|
||||||
await page.autocompleteSearch(selectors.clientFiscalData.country, 'España');
|
await page.autocompleteSearch(selectors.clientFiscalData.country, 'España');
|
||||||
await page.autocompleteSearch(selectors.clientFiscalData.province, 'Province one');
|
await page.autocompleteSearch(selectors.clientFiscalData.province, 'Province one');
|
||||||
await page.clearInput(selectors.clientFiscalData.city);
|
await page.clearInput(selectors.clientFiscalData.city);
|
||||||
|
@ -190,7 +190,7 @@ describe('Client Edit fiscalData path', () => {
|
||||||
const verifiedData = await page.checkboxState(selectors.clientFiscalData.verifiedDataCheckbox);
|
const verifiedData = await page.checkboxState(selectors.clientFiscalData.verifiedDataCheckbox);
|
||||||
|
|
||||||
expect(fiscalId).toEqual('94980061C');
|
expect(fiscalId).toEqual('94980061C');
|
||||||
expect(address).toEqual('Somewhere edited');
|
expect(address).toEqual('SOMEWHERE EDITED');
|
||||||
expect(postcode).toContain('46000');
|
expect(postcode).toContain('46000');
|
||||||
expect(sageTax).toEqual('Operaciones no sujetas');
|
expect(sageTax).toEqual('Operaciones no sujetas');
|
||||||
expect(sageTransaction).toEqual('Regularización de inversiones');
|
expect(sageTransaction).toEqual('Regularización de inversiones');
|
||||||
|
|
|
@ -28,7 +28,7 @@ describe('Client lock verified data path', () => {
|
||||||
it('should edit the social name', async() => {
|
it('should edit the social name', async() => {
|
||||||
await page.waitForSelector(selectors.clientFiscalData.socialName);
|
await page.waitForSelector(selectors.clientFiscalData.socialName);
|
||||||
await page.clearInput(selectors.clientFiscalData.socialName);
|
await page.clearInput(selectors.clientFiscalData.socialName);
|
||||||
await page.write(selectors.clientFiscalData.socialName, 'Captain America Civil War');
|
await page.write(selectors.clientFiscalData.socialName, 'CAPTAIN AMERICA CIVIL WAR');
|
||||||
await page.waitToClick(selectors.clientFiscalData.saveButton);
|
await page.waitToClick(selectors.clientFiscalData.saveButton);
|
||||||
const message = await page.waitForSnackbar();
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ describe('Client lock verified data path', () => {
|
||||||
await page.reloadSection('client.card.fiscalData');
|
await page.reloadSection('client.card.fiscalData');
|
||||||
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Captain America Civil War');
|
expect(result).toEqual('CAPTAIN AMERICA CIVIL WAR');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ describe('Client lock verified data path', () => {
|
||||||
await page.reloadSection('client.card.fiscalData');
|
await page.reloadSection('client.card.fiscalData');
|
||||||
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Ant man and the Wasp');
|
expect(result).toEqual('ANT MAN AND THE WASP');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ describe('Client lock verified data path', () => {
|
||||||
await page.reloadSection('client.card.fiscalData');
|
await page.reloadSection('client.card.fiscalData');
|
||||||
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('new social name edition');
|
expect(result).toEqual('NEW SOCIAL NAME EDITION');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ describe('Client summary path', () => {
|
||||||
it('should display fiscal address details', async() => {
|
it('should display fiscal address details', async() => {
|
||||||
const result = await page.waitToGetProperty(selectors.clientSummary.street, 'innerText');
|
const result = await page.waitToGetProperty(selectors.clientSummary.street, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('20 Ingram Street');
|
expect(result).toContain('20 INGRAM STREET');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display some fiscal data', async() => {
|
it('should display some fiscal data', async() => {
|
||||||
|
|
|
@ -23,7 +23,7 @@ describe('Worker create path', () => {
|
||||||
await page.write(selectors.workerCreate.fi, '78457139E');
|
await page.write(selectors.workerCreate.fi, '78457139E');
|
||||||
await page.write(selectors.workerCreate.phone, '12356789');
|
await page.write(selectors.workerCreate.phone, '12356789');
|
||||||
await page.write(selectors.workerCreate.postcode, '46680');
|
await page.write(selectors.workerCreate.postcode, '46680');
|
||||||
await page.write(selectors.workerCreate.street, 'S/ Doomstadt');
|
await page.write(selectors.workerCreate.street, 'S/ DOOMSTADT');
|
||||||
await page.write(selectors.workerCreate.email, 'doctorDoom@marvel.com');
|
await page.write(selectors.workerCreate.email, 'doctorDoom@marvel.com');
|
||||||
await page.write(selectors.workerCreate.iban, 'ES9121000418450200051332');
|
await page.write(selectors.workerCreate.iban, 'ES9121000418450200051332');
|
||||||
|
|
||||||
|
|
|
@ -339,8 +339,9 @@ export default class SmartTable extends Component {
|
||||||
if (!header) return;
|
if (!header) return;
|
||||||
|
|
||||||
const tbody = this.element.querySelector('tbody');
|
const tbody = this.element.querySelector('tbody');
|
||||||
const columns = header.querySelectorAll('th');
|
if (!tbody) return;
|
||||||
|
|
||||||
|
const columns = header.querySelectorAll('th');
|
||||||
const hasSearchRow = tbody.querySelector('tr#searchRow');
|
const hasSearchRow = tbody.querySelector('tr#searchRow');
|
||||||
if (hasSearchRow) {
|
if (hasSearchRow) {
|
||||||
if (this.$inputsScope)
|
if (this.$inputsScope)
|
||||||
|
|
|
@ -179,6 +179,8 @@
|
||||||
"You can not use the same password": "You can not use the same password",
|
"You can not use the same password": "You can not use the same password",
|
||||||
"Valid priorities": "Valid priorities: %d",
|
"Valid priorities": "Valid priorities: %d",
|
||||||
"Negative basis of tickets": "Negative basis of tickets: {{ticketsIds}}",
|
"Negative basis of tickets": "Negative basis of tickets: {{ticketsIds}}",
|
||||||
|
"Social name should be uppercase": "Social name should be uppercase",
|
||||||
|
"Street should be uppercase": "Street should be uppercase",
|
||||||
"You don't have enough privileges.": "You don't have enough privileges.",
|
"You don't have enough privileges.": "You don't have enough privileges.",
|
||||||
"This ticket is locked.": "This ticket is locked.",
|
"This ticket is locked.": "This ticket is locked.",
|
||||||
"This ticket is not editable.": "This ticket is not editable.",
|
"This ticket is not editable.": "This ticket is not editable.",
|
||||||
|
|
|
@ -305,11 +305,14 @@
|
||||||
"The renew period has not been exceeded": "El periodo de renovación no ha sido superado",
|
"The renew period has not been exceeded": "El periodo de renovación no ha sido superado",
|
||||||
"Valid priorities": "Prioridades válidas: %d",
|
"Valid priorities": "Prioridades válidas: %d",
|
||||||
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}",
|
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}",
|
||||||
"The company has not informed the supplier account for bank transfers": "La empresa no tiene informado la cuenta de proveedor para transferencias bancarias",
|
"You cannot assign an alias that you are not assigned to": "No puede asignar un alias que no tenga asignado",
|
||||||
|
"The company has not informed the supplier account for bank transfers": "La empresa no tiene informado la cuenta de proveedor para transferencias bancarias",
|
||||||
"You cannot assign/remove an alias that you are not assigned to": "No puede asignar/eliminar un alias que no tenga asignado",
|
"You cannot assign/remove an alias that you are not assigned to": "No puede asignar/eliminar un alias que no tenga asignado",
|
||||||
"This invoice has a linked vehicle.": "Esta factura tiene un vehiculo vinculado",
|
"This invoice has a linked vehicle.": "Esta factura tiene un vehiculo vinculado",
|
||||||
"You don't have enough privileges.": "No tienes suficientes permisos.",
|
"You don't have enough privileges.": "No tienes suficientes permisos.",
|
||||||
"This ticket is locked.": "Este ticket está bloqueado.",
|
"This ticket is locked.": "Este ticket está bloqueado.",
|
||||||
"This ticket is not editable.": "Este ticket no es editable.",
|
"This ticket is not editable.": "Este ticket no es editable.",
|
||||||
"The ticket doesn't exist.": "No existe el ticket."
|
"The ticket doesn't exist.": "No existe el ticket.",
|
||||||
|
"Social name should be uppercase": "La razón social debe ir en mayúscula",
|
||||||
|
"Street should be uppercase": "La dirección fiscal debe ir en mayúscula"
|
||||||
}
|
}
|
|
@ -7,8 +7,8 @@ describe('Client Create', () => {
|
||||||
email: 'Deadpool@marvel.com',
|
email: 'Deadpool@marvel.com',
|
||||||
fi: '16195279J',
|
fi: '16195279J',
|
||||||
name: 'Wade',
|
name: 'Wade',
|
||||||
socialName: 'Deadpool Marvel',
|
socialName: 'DEADPOOL MARVEL',
|
||||||
street: 'Wall Street',
|
street: 'WALL STREET',
|
||||||
city: 'New York',
|
city: 'New York',
|
||||||
businessTypeFk: 'florist',
|
businessTypeFk: 'florist',
|
||||||
provinceFk: 1
|
provinceFk: 1
|
||||||
|
|
|
@ -36,6 +36,20 @@ module.exports = Self => {
|
||||||
min: 3, max: 10
|
min: 3, max: 10
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Self.validatesFormatOf('street', {
|
||||||
|
message: 'Street should be uppercase',
|
||||||
|
allowNull: false,
|
||||||
|
allowBlank: false,
|
||||||
|
with: /^[^a-z]*$/
|
||||||
|
});
|
||||||
|
|
||||||
|
Self.validatesFormatOf('socialName', {
|
||||||
|
message: 'Social name should be uppercase',
|
||||||
|
allowNull: false,
|
||||||
|
allowBlank: false,
|
||||||
|
with: /^[^a-z]*$/
|
||||||
|
});
|
||||||
|
|
||||||
Self.validateAsync('socialName', socialNameIsUnique, {
|
Self.validateAsync('socialName', socialNameIsUnique, {
|
||||||
message: 'The company name must be unique'
|
message: 'The company name must be unique'
|
||||||
});
|
});
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
ng-model="$ctrl.client.socialName"
|
ng-model="$ctrl.client.socialName"
|
||||||
info="Only letters, numbers and spaces can be used"
|
info="Only letters, numbers and spaces can be used"
|
||||||
required="true"
|
required="true"
|
||||||
|
ng-keyup="$ctrl.client.socialName = $ctrl.client.socialName.toUpperCase()"
|
||||||
rule>
|
rule>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
|
@ -46,6 +47,7 @@
|
||||||
vn-two
|
vn-two
|
||||||
label="Street"
|
label="Street"
|
||||||
ng-model="$ctrl.client.street"
|
ng-model="$ctrl.client.street"
|
||||||
|
ng-keyup="$ctrl.client.street = $ctrl.client.street.toUpperCase()"
|
||||||
rule>
|
rule>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
label="Recovery email"
|
label="Recovery email"
|
||||||
ng-model="$ctrl.account.email"
|
ng-model="$ctrl.account.email"
|
||||||
info="This email is used for user to regain access their account."
|
info="This email is used for user to regain access their account."
|
||||||
rule="VnUser.name">
|
rule="VnUser.email">
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
name: invoice in
|
||||||
|
columns:
|
||||||
|
id: id
|
||||||
|
serialNumber: serial number
|
||||||
|
serial: serial
|
||||||
|
supplierFk: supplier
|
||||||
|
issued: issued
|
||||||
|
supplierRef: supplierRef
|
||||||
|
isBooked: is booked
|
||||||
|
currencyFk: currency
|
||||||
|
created: created
|
||||||
|
companyFk: company
|
||||||
|
docFk: document
|
||||||
|
booked: booked
|
||||||
|
operated: operated
|
||||||
|
bookEntried: book entried
|
||||||
|
isVatDeductible: is VAT deductible
|
||||||
|
withholdingSageFk: withholding
|
||||||
|
expenceFkDeductible: expence deductible
|
||||||
|
editorFk: editor
|
|
@ -0,0 +1,20 @@
|
||||||
|
name: factura recibida
|
||||||
|
columns:
|
||||||
|
id: id
|
||||||
|
serialNumber: número de serie
|
||||||
|
serial: serie
|
||||||
|
supplierFk: proveedor
|
||||||
|
issued: fecha emisión
|
||||||
|
supplierRef: referéncia proveedor
|
||||||
|
isBooked: facturado
|
||||||
|
currencyFk: moneda
|
||||||
|
created: creado
|
||||||
|
companyFk: empresa
|
||||||
|
docFk: documento
|
||||||
|
booked: fecha contabilización
|
||||||
|
operated: fecha entrega
|
||||||
|
bookEntried: fecha asiento
|
||||||
|
isVatDeductible: impuesto deducible
|
||||||
|
withholdingSageFk: código de retención
|
||||||
|
expenceFkDeductible: gasto deducible
|
||||||
|
editorFk: editor
|
|
@ -0,0 +1,9 @@
|
||||||
|
name: invoice in due day
|
||||||
|
columns:
|
||||||
|
id: id
|
||||||
|
invoiceInFk: invoice in
|
||||||
|
dueDated: due date
|
||||||
|
bankFk: bank
|
||||||
|
amount: amount
|
||||||
|
foreignValue : foreign amount
|
||||||
|
created: created
|
|
@ -0,0 +1,9 @@
|
||||||
|
name: vencimientos factura recibida
|
||||||
|
columns:
|
||||||
|
id: id
|
||||||
|
invoiceInFk: factura
|
||||||
|
dueDated: fecha vto.
|
||||||
|
bankFk: banco
|
||||||
|
amount: importe
|
||||||
|
foreignValue : importe divisa
|
||||||
|
created: creado
|
|
@ -0,0 +1,12 @@
|
||||||
|
name: invoice in tax
|
||||||
|
columns:
|
||||||
|
id: id
|
||||||
|
invoiceInFk: invoice in
|
||||||
|
taxCodeFk: tax
|
||||||
|
taxableBase: taxable base
|
||||||
|
expenceFk: expence
|
||||||
|
foreignValue: foreign amount
|
||||||
|
taxTypeSageFk: tax type
|
||||||
|
transactionTypeSageFk: transaction type
|
||||||
|
created: created
|
||||||
|
editorFk: editor
|
|
@ -0,0 +1,12 @@
|
||||||
|
name: factura recibida impuesto
|
||||||
|
columns:
|
||||||
|
id: id
|
||||||
|
invoiceInFk: factura recibida
|
||||||
|
taxCodeFk: código IVA
|
||||||
|
taxableBase: base imponible
|
||||||
|
expenceFk: código gasto
|
||||||
|
foreignValue: importe divisa
|
||||||
|
taxTypeSageFk: código impuesto
|
||||||
|
transactionTypeSageFk: código transacción
|
||||||
|
created: creado
|
||||||
|
editorFk: editor
|
|
@ -67,7 +67,7 @@ module.exports = function(Self) {
|
||||||
throw new UserError(`This ticket is already invoiced`);
|
throw new UserError(`This ticket is already invoiced`);
|
||||||
|
|
||||||
const priceZero = ticket.totalWithVat == 0;
|
const priceZero = ticket.totalWithVat == 0;
|
||||||
if (priceZero)
|
if (ticketsIds.length == 1 && priceZero)
|
||||||
throw new UserError(`A ticket with an amount of zero can't be invoiced`);
|
throw new UserError(`A ticket with an amount of zero can't be invoiced`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,9 @@ module.exports = Self => {
|
||||||
if (isSubordinate === false)
|
if (isSubordinate === false)
|
||||||
throw new UserError(`You don't have enough privileges`);
|
throw new UserError(`You don't have enough privileges`);
|
||||||
|
|
||||||
const subordinate = await Worker.findById(ctx.args.workerFk);
|
const subordinate = await Worker.findById(ctx.args.workerFk, {fields: ['id']});
|
||||||
filter = mergeFilters(filter, {where: {
|
filter = mergeFilters(filter, {where: {
|
||||||
userFk: subordinate.userFk
|
userFk: subordinate.id
|
||||||
}});
|
}});
|
||||||
|
|
||||||
return Self.find(filter);
|
return Self.find(filter);
|
||||||
|
|
|
@ -20,11 +20,11 @@ describe('Worker new', () => {
|
||||||
const employeeId = 1;
|
const employeeId = 1;
|
||||||
const defaultWorker = {
|
const defaultWorker = {
|
||||||
fi: '78457139E',
|
fi: '78457139E',
|
||||||
name: 'defaultWorker',
|
name: 'DEFAULTERWORKER',
|
||||||
firstName: 'default',
|
firstName: 'DEFAULT',
|
||||||
lastNames: 'worker',
|
lastNames: 'WORKER',
|
||||||
email: 'defaultWorker@mydomain.com',
|
email: 'defaultWorker@mydomain.com',
|
||||||
street: 'S/ defaultWorkerStreet',
|
street: 'S/ DEFAULTWORKERSTREET',
|
||||||
city: 'defaultWorkerCity',
|
city: 'defaultWorkerCity',
|
||||||
provinceFk: 1,
|
provinceFk: 1,
|
||||||
companyFk: 442,
|
companyFk: 442,
|
||||||
|
|
|
@ -25,8 +25,7 @@
|
||||||
"type" : "string"
|
"type" : "string"
|
||||||
},
|
},
|
||||||
"userFk": {
|
"userFk": {
|
||||||
"type" : "number",
|
"type" : "number"
|
||||||
"required": true
|
|
||||||
},
|
},
|
||||||
"bossFk": {
|
"bossFk": {
|
||||||
"type" : "number"
|
"type" : "number"
|
||||||
|
|
|
@ -32,6 +32,28 @@ class Controller extends Descriptor {
|
||||||
this.vnApp.showSuccess(this.$t('Department deleted.'));
|
this.vnApp.showSuccess(this.$t('Department deleted.'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadData() {
|
||||||
|
const filter = {
|
||||||
|
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
|
||||||
|
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMail', 'hasToMistake', 'clientFk'],
|
||||||
|
include: [
|
||||||
|
{relation: 'client',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'name']
|
||||||
|
}},
|
||||||
|
{
|
||||||
|
relation: 'worker',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'firstName', 'lastName']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
return this.getData(`Departments/${this.id}`, {filter})
|
||||||
|
.then(res => this.entity = res.data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.$inject = ['$element', '$scope', '$rootScope'];
|
Controller.$inject = ['$element', '$scope', '$rootScope'];
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
filter="::$ctrl.filter"
|
filter="::$ctrl.filter"
|
||||||
data="$ctrl.hours">
|
data="$ctrl.hours">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<div ng-if="$ctrl.card.hasWorkCenter">
|
<div>
|
||||||
<vn-card class="vn-pa-lg vn-w-lg">
|
<vn-card class="vn-pa-lg vn-w-lg">
|
||||||
<vn-table model="model" auto-load="false">
|
<vn-table model="model" auto-load="false">
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
|
@ -106,12 +106,6 @@
|
||||||
</vn-button>
|
</vn-button>
|
||||||
</vn-button-bar>
|
</vn-button-bar>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
ng-if="!$ctrl.card.hasWorkCenter"
|
|
||||||
class="bg-title"
|
|
||||||
translate>
|
|
||||||
Autonomous worker
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<vn-side-menu side="right">
|
<vn-side-menu side="right">
|
||||||
<div class="vn-pa-md">
|
<div class="vn-pa-md">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-back",
|
"name": "salix-back",
|
||||||
"version": "23.32.01",
|
"version": "23.34.01",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-back",
|
"name": "salix-back",
|
||||||
"version": "23.32.01",
|
"version": "23.34.01",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "Salix backend",
|
"description": "Salix backend",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
|
@ -539,9 +539,9 @@
|
||||||
<Stroke>2</Stroke>
|
<Stroke>2</Stroke>
|
||||||
<Width>4</Width>
|
<Width>4</Width>
|
||||||
</GraphicShape>
|
</GraphicShape>
|
||||||
<GraphicShape xsi:type="WindowText" Style="Cross" IsPrint="true" PageAlignment="None" Locked="false" bStroke="true" bFill="true" Direction="Angle90" X="613" Y="24" Alignment="Left" AlignPointX="613" AlignPointY="24" FontScript="Default" FontCmd="Arial,118.2266,B
" FontHeight="1" FontWidth="1" TextSpace="0" bSpaceCropping="false">
|
<GraphicShape xsi:type="WindowText" Style="Cross" IsPrint="true" PageAlignment="None" Locked="false" bStroke="true" bFill="true" Direction="Angle90" X="564" Y="32" Alignment="Left" AlignPointX="564" AlignPointY="32" FontScript="Default" FontCmd="Arial,118.2266,B
" FontHeight="1" FontWidth="1" TextSpace="0" bSpaceCropping="false">
|
||||||
<qHitOnCircumferance>false</qHitOnCircumferance>
|
<qHitOnCircumferance>false</qHitOnCircumferance>
|
||||||
<Selected>false</Selected>
|
<Selected>true</Selected>
|
||||||
<iBackground_color>4294967295</iBackground_color>
|
<iBackground_color>4294967295</iBackground_color>
|
||||||
<Id>5</Id>
|
<Id>5</Id>
|
||||||
<ItemLabel>W5</ItemLabel>
|
<ItemLabel>W5</ItemLabel>
|
||||||
|
@ -571,15 +571,15 @@
|
||||||
<BoundRectHeight>2896</BoundRectHeight>
|
<BoundRectHeight>2896</BoundRectHeight>
|
||||||
<BoundRect>
|
<BoundRect>
|
||||||
<Location>
|
<Location>
|
||||||
<X>187</X>
|
<X>138</X>
|
||||||
<Y>24</Y>
|
<Y>32</Y>
|
||||||
</Location>
|
</Location>
|
||||||
<Size>
|
<Size>
|
||||||
<Width>426</Width>
|
<Width>426</Width>
|
||||||
<Height>2896</Height>
|
<Height>2896</Height>
|
||||||
</Size>
|
</Size>
|
||||||
<X>187</X>
|
<X>138</X>
|
||||||
<Y>24</Y>
|
<Y>32</Y>
|
||||||
<Width>426</Width>
|
<Width>426</Width>
|
||||||
<Height>2896</Height>
|
<Height>2896</Height>
|
||||||
</BoundRect>
|
</BoundRect>
|
||||||
|
@ -621,14 +621,14 @@
|
||||||
<Setup bInfinityPrint="false" LabelLength="610" LabelWidth="100" LeftMargin="0" TopMargin="0" LabelType="1" GapLength="3" FeedLength="0" ZSign="43" BlackMark="3" Position="0" Speed="2" Copy="1" bCopyDataBase="false" CopyField="None" Stripper="0" LabelsPerCut="0" DoubleCut_Enable="false" DoubleCut_OffsetLen="0" DoubleCut_FirstCutMode="1" Rotate180="200" Stop="35" Darkness="5" Number="1" bCutDataBase="false" bBatchCut="false" bNumberDataBase="false" NumberField="None" PageDirection="Portrait" PrintMode="0" PowerRFID="10" LengthRFID="0" RetryRFID="3" DrawMode="0">
|
<Setup bInfinityPrint="false" LabelLength="610" LabelWidth="100" LeftMargin="0" TopMargin="0" LabelType="1" GapLength="3" FeedLength="0" ZSign="43" BlackMark="3" Position="0" Speed="2" Copy="1" bCopyDataBase="false" CopyField="None" Stripper="0" LabelsPerCut="0" DoubleCut_Enable="false" DoubleCut_OffsetLen="0" DoubleCut_FirstCutMode="1" Rotate180="200" Stop="35" Darkness="5" Number="1" bCutDataBase="false" bBatchCut="false" bNumberDataBase="false" NumberField="None" PageDirection="Portrait" PrintMode="0" PowerRFID="10" LengthRFID="0" RetryRFID="3" DrawMode="0">
|
||||||
<Layout Shape="0" AcrossType="Copied" PageDirection="Portrait" HorAcross="1" VerAcross="1" HorGap="0" VerGap="0" HorAcrossMode1="1" VerAcrossMode1="1" LabelMode="0" HorGapMode1="0" VerGapMode1="0" BottomMargin="0" RightMargin="0" />
|
<Layout Shape="0" AcrossType="Copied" PageDirection="Portrait" HorAcross="1" VerAcross="1" HorGap="0" VerGap="0" HorAcrossMode1="1" VerAcrossMode1="1" LabelMode="0" HorGapMode1="0" VerGapMode1="0" BottomMargin="0" RightMargin="0" />
|
||||||
<Description>New label
|
<Description>New label
|
||||||
Lang:(es-ES) OS:Microsoft Windows NT 10.0.22000.0(Win32NT)</Description>
|
Lang:(es-ES) OS:Microsoft Windows NT 10.0.19045.0(Win32NT)</Description>
|
||||||
<UnitType>Mm</UnitType>
|
<UnitType>Mm</UnitType>
|
||||||
<Dpi>203</Dpi>
|
<Dpi>203</Dpi>
|
||||||
</Setup>
|
</Setup>
|
||||||
<PrinterModel />
|
<PrinterModel />
|
||||||
<PrinterLanguage>EZPL</PrinterLanguage>
|
<PrinterLanguage>EZPL</PrinterLanguage>
|
||||||
<USBName>GODEX G300#132207AB</USBName>
|
<USBName>00000000</USBName>
|
||||||
<COMName>None</COMName>
|
<COMName>COM1</COMName>
|
||||||
<CommunicationType>USB</CommunicationType>
|
<CommunicationType>USB</CommunicationType>
|
||||||
<NetworkIPAddress>2886794855</NetworkIPAddress>
|
<NetworkIPAddress>2886794855</NetworkIPAddress>
|
||||||
<NetworkPort>9100</NetworkPort>
|
<NetworkPort>9100</NetworkPort>
|
|
@ -1,9 +1,9 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"filename": "model.ezp",
|
"filename": "model.ezpx",
|
||||||
"component": "printer-setup",
|
"component": "printer-setup",
|
||||||
"path": "/assets/files/model.ezp",
|
"path": "/assets/files/model.ezpx",
|
||||||
"cid": "model.ezp"
|
"cid": "model.ezpx"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename": "port.png",
|
"filename": "port.png",
|
||||||
|
|
Loading…
Reference in New Issue