refs #5287 locker added
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-02-27 08:39:46 +01:00
parent 1bc715cde5
commit 5d9220c5c0
13 changed files with 51 additions and 25 deletions

View File

@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- (Client -> Descriptor) Nuevo icono $ con barrotes para los clientes con impago
- (Trabajador -> Datos Básicos) Añadido nuevo campo Taquilla
- (Trabajador -> PDA) Nueva sección
### Changed
-

View File

@ -0,0 +1 @@
ALTER TABLE `vn`.`worker` ADD locker INT UNSIGNED NULL UNIQUE;

View File

@ -973,6 +973,7 @@ export default {
id: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(3) > section > span',
email: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(4) > section > span',
department: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(5) > section > span',
locker: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(10) > section > span',
userId: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(2) > section > span',
userName: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(3) > section > span',
role: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(4) > section > span',
@ -983,6 +984,7 @@ export default {
name: 'vn-worker-basic-data vn-textfield[ng-model="$ctrl.worker.firstName"]',
surname: 'vn-worker-basic-data vn-textfield[ng-model="$ctrl.worker.lastName"]',
phone: 'vn-worker-basic-data vn-textfield[ng-model="$ctrl.worker.phone"]',
locker: 'vn-worker-basic-data vn-input-number[ng-model="$ctrl.worker.locker"]',
saveButton: 'vn-worker-basic-data button[type=submit]'
},
workerPbx: {

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('Worker summary path', () => {
fdescribe('Worker summary path', () => {
const workerId = 3;
let browser;
let page;
@ -29,5 +29,6 @@ describe('Worker summary path', () => {
expect(await page.getProperty(selectors.workerSummary.userName, 'innerText')).toEqual('agency');
expect(await page.getProperty(selectors.workerSummary.role, 'innerText')).toEqual('agency');
expect(await page.getProperty(selectors.workerSummary.extension, 'innerText')).toEqual('1101');
expect(await page.getProperty(selectors.workerSummary.locker, 'innerText')).toEqual('-');
});
});

View File

@ -25,6 +25,7 @@ describe('Worker basic data path', () => {
await page.overwrite(selectors.workerBasicData.name, 'David C.');
await page.overwrite(selectors.workerBasicData.surname, 'H.');
await page.overwrite(selectors.workerBasicData.phone, '444332211');
await page.overwrite(selectors.workerBasicData.locker, '1');
await page.click(selectors.workerBasicData.saveButton);
const message = await page.waitForSnackbar();
@ -36,5 +37,6 @@ describe('Worker basic data path', () => {
expect(await page.waitToGetProperty(selectors.workerBasicData.name, 'value')).toEqual('David C.');
expect(await page.waitToGetProperty(selectors.workerBasicData.surname, 'value')).toEqual('H.');
expect(await page.waitToGetProperty(selectors.workerBasicData.phone, 'value')).toEqual('444332211');
expect(await page.waitToGetProperty(selectors.workerBasicData.locker, 'value')).toEqual('1');
});
});

View File

@ -263,6 +263,7 @@
"It is not possible to modify sales that their articles are from Floramondo": "No es posible modificar líneas de pedido cuyos artículos sean de Floramondo",
"It is not possible to modify cloned sales": "No es posible modificar líneas de pedido clonadas",
"A supplier with the same name already exists. Change the country.": "Un proveedor con el mismo nombre ya existe. Cambie el país.",
"There is no assigned email for this client": "No hay correo asignado para este cliente"
"There is no assigned email for this client": "No hay correo asignado para este cliente",
"This locker has already been assigned": "Esta taquilla ya ha sido asignada"
}

View File

@ -14,4 +14,8 @@ module.exports = Self => {
require('../methods/worker/holidays')(Self);
require('../methods/worker/activeContract')(Self);
require('../methods/worker/new')(Self);
Self.validatesUniquenessOf('locker', {
message: 'This locker has already been assigned'
});
};

View File

@ -55,6 +55,9 @@
},
"code": {
"type" : "string"
},
"locker": {
"type" : "number"
}
},
"relations": {

View File

@ -11,7 +11,7 @@
<vn-horizontal>
<vn-textfield
vn-one
label="Name"
label="Name"
ng-model="$ctrl.worker.firstName"
rule>
</vn-textfield>
@ -24,14 +24,14 @@
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Business phone"
vn-one
label="Business phone"
ng-model="$ctrl.worker.phone"
rule>
</vn-textfield>
<vn-textfield
vn-one
label="Mobile extension"
vn-one
label="Mobile extension"
ng-model="$ctrl.worker.mobileExtension"
rule>
</vn-textfield>
@ -73,11 +73,16 @@
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="SSN"
vn-one
label="SSN"
ng-model="$ctrl.worker.SSN"
rule>
</vn-textfield>
<vn-input-number
min="0"
label="Locker"
ng-model="$ctrl.worker.locker">
</vn-input-number>
</vn-horizontal>
</vn-vertical>
</vn-card>

View File

@ -5,4 +5,5 @@ SSN: NSS
Married: Casado/a
Single: Soltero/a
Business phone: Teléfono de empresa
Mobile extension: Extensión móvil
Mobile extension: Extensión móvil
Locker: Taquilla

View File

@ -11,23 +11,23 @@
<vn-horizontal class="vn-pa-md">
<vn-one>
<h4 ng-show="$ctrl.isHr">
<a
<a
ui-sref="worker.card.basicData({id:$ctrl.worker.id})">
<span translate vn-tooltip="Go to">Basic data</span>
</a>
</h4>
<h4
<h4
translates
ng-show="!$ctrl.isHr">
Basic data
</h4>
<vn-label-value label="Id"
<vn-label-value label="Id"
value="{{worker.id}}">
</vn-label-value>
<vn-label-value label="Email" no-ellipsize
value="{{worker.user.emailUser.email}}">
</vn-label-value>
<vn-label-value label="Department"
<vn-label-value label="Department"
value="{{worker.department.department.name}}">
</vn-label-value>
<vn-label-value
@ -38,33 +38,36 @@
{{::worker.boss.nickname}}
</span>
</vn-label-value>
<vn-label-value label="Mobile extension"
<vn-label-value label="Mobile extension"
value="{{worker.mobileExtension}}">
</vn-label-value>
<vn-label-value label="Business phone"
<vn-label-value label="Business phone"
value="{{worker.phone}}">
</vn-label-value>
<vn-label-value label="Personal phone"
<vn-label-value label="Personal phone"
value="{{worker.client.phone}}">
</vn-label-value>
</vn-label-value>
<vn-label-value label="Locker"
value="{{worker.locker}}">
</vn-label-value>
</vn-one>
<vn-one>
<h4 translate>User data</h4>
<vn-label-value label="User id"
<vn-label-value label="User id"
value="{{worker.userFk}}">
</vn-label-value>
<vn-label-value label="User"
<vn-label-value label="User"
value="{{worker.user.name}}">
</vn-label-value>
<vn-label-value label="Role"
<vn-label-value label="Role"
value="{{worker.user.role.name}}">
</vn-label-value>
<vn-label-value label="Extension"
<vn-label-value label="Extension"
value="{{worker.sip.extension}}">
</vn-label-value>
</vn-one>
</vn-horizontal>
</vn-card>
<vn-worker-descriptor-popover
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
</vn-worker-descriptor-popover>

View File

@ -1,3 +1,4 @@
Business phone: Teléfono de empresa
Personal phone: Teléfono personal
Mobile extension: Extensión móvil
Mobile extension: Extensión móvil
Locker: Taquilla