refs #5297 feat(worker): iban and bankEntity not required
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
be6d416f67
commit
c62f8e1c14
|
@ -25,7 +25,6 @@ describe('Worker create path', () => {
|
|||
await page.write(selectors.workerCreate.postcode, '46680');
|
||||
await page.write(selectors.workerCreate.street, 'S/ Doomstadt');
|
||||
await page.write(selectors.workerCreate.email, 'doctorDoom@marvel.com');
|
||||
await page.write(selectors.workerCreate.iban, 'ES9121000418450200051332');
|
||||
|
||||
// should check for autocompleted worker code and worker user name
|
||||
const workerCode = await page
|
||||
|
|
|
@ -54,18 +54,6 @@ module.exports = Self => {
|
|||
description: `The worker province`,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
arg: 'iban',
|
||||
type: 'string',
|
||||
description: `The worker iban`,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
arg: 'bankEntityFk',
|
||||
type: 'number',
|
||||
description: `The worker bank entity`,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
arg: 'companyFk',
|
||||
type: 'number',
|
||||
|
@ -101,6 +89,16 @@ module.exports = Self => {
|
|||
type: 'date',
|
||||
description: `The worker birth`,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
arg: 'iban',
|
||||
type: 'string',
|
||||
description: `The worker iban`,
|
||||
},
|
||||
{
|
||||
arg: 'bankEntityFk',
|
||||
type: 'number',
|
||||
description: `The worker bank entity`,
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
|
|
|
@ -27,8 +27,6 @@ describe('Worker new', () => {
|
|||
street: 'S/ defaultWorkerStreet',
|
||||
city: 'defaultWorkerCity',
|
||||
provinceFk: 1,
|
||||
iban: 'ES8304879798578129532677',
|
||||
bankEntityFk: 128,
|
||||
companyFk: 442,
|
||||
postcode: '46680',
|
||||
phone: '123456789',
|
||||
|
|
|
@ -8,6 +8,11 @@ export default class Controller extends Section {
|
|||
}
|
||||
|
||||
onSubmit() {
|
||||
if (!this.worker.iban && !this.worker.bankEntityFk) {
|
||||
delete this.worker.iban;
|
||||
delete this.worker.bankEntityFk;
|
||||
}
|
||||
|
||||
return this.$.watcher.submit().then(json => {
|
||||
this.$state.go('worker.card.basicData', {id: json.data.id});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue