Merge pull request '2949-client_basicdata_businesstype' (#681) from 2949-client_basicdata_businesstype into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #681 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
4b8d27a8be
|
@ -80,13 +80,15 @@
|
||||||
"principalType": "ROLE",
|
"principalType": "ROLE",
|
||||||
"principalId": "$everyone",
|
"principalId": "$everyone",
|
||||||
"permission": "ALLOW"
|
"permission": "ALLOW"
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"property": "logout",
|
"property": "logout",
|
||||||
"accessType": "EXECUTE",
|
"accessType": "EXECUTE",
|
||||||
"principalType": "ROLE",
|
"principalType": "ROLE",
|
||||||
"principalId": "$authenticated",
|
"principalId": "$authenticated",
|
||||||
"permission": "ALLOW"
|
"permission": "ALLOW"
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"property": "validateToken",
|
"property": "validateToken",
|
||||||
"accessType": "EXECUTE",
|
"accessType": "EXECUTE",
|
||||||
"principalType": "ROLE",
|
"principalType": "ROLE",
|
||||||
|
|
|
@ -152,6 +152,7 @@ export default {
|
||||||
salesPerson: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.salesPersonFk"]',
|
salesPerson: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.salesPersonFk"]',
|
||||||
channel: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.contactChannelFk"]',
|
channel: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.contactChannelFk"]',
|
||||||
transferor: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.transferorFk"]',
|
transferor: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.transferorFk"]',
|
||||||
|
businessType: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.businessTypeFk"]',
|
||||||
saveButton: 'vn-client-basic-data button[type=submit]'
|
saveButton: 'vn-client-basic-data button[type=submit]'
|
||||||
},
|
},
|
||||||
clientFiscalData: {
|
clientFiscalData: {
|
||||||
|
|
|
@ -35,6 +35,7 @@ describe('Client Edit basicData path', () => {
|
||||||
await page.write(selectors.clientBasicData.email, 'PWallace@verdnatura.es');
|
await page.write(selectors.clientBasicData.email, 'PWallace@verdnatura.es');
|
||||||
await page.autocompleteSearch(selectors.clientBasicData.channel, 'Rumors on the streets');
|
await page.autocompleteSearch(selectors.clientBasicData.channel, 'Rumors on the streets');
|
||||||
await page.autocompleteSearch(selectors.clientBasicData.transferor, 'Max Eisenhardt');
|
await page.autocompleteSearch(selectors.clientBasicData.transferor, 'Max Eisenhardt');
|
||||||
|
await page.autocompleteSearch(selectors.clientBasicData.businessType, 'Eventos');
|
||||||
await page.waitToClick(selectors.clientBasicData.saveButton);
|
await page.waitToClick(selectors.clientBasicData.saveButton);
|
||||||
const message = await page.waitForSnackbar();
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
@ -55,6 +56,13 @@ describe('Client Edit basicData path', () => {
|
||||||
expect(result).toEqual('David Haller');
|
expect(result).toEqual('David Haller');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should confirm the business type have been edited', async() => {
|
||||||
|
const result = await page
|
||||||
|
.waitToGetProperty(selectors.clientBasicData.businessType, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('Eventos');
|
||||||
|
});
|
||||||
|
|
||||||
it('should confirm the email have been edited', async() => {
|
it('should confirm the email have been edited', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(selectors.clientBasicData.email, 'value');
|
.waitToGetProperty(selectors.clientBasicData.email, 'value');
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
"BankEntity": {
|
"BankEntity": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"BusinessType": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"Client": {
|
"Client": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"name": "BusinessType",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "businessType"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "string",
|
||||||
|
"id": true
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acls": [{
|
||||||
|
"accessType": "READ",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$everyone",
|
||||||
|
"permission": "ALLOW"
|
||||||
|
}]
|
||||||
|
}
|
|
@ -168,6 +168,11 @@
|
||||||
"model": "ClientType",
|
"model": "ClientType",
|
||||||
"foreignKey": "clientTypeFk"
|
"foreignKey": "clientTypeFk"
|
||||||
},
|
},
|
||||||
|
"businessType": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "BusinessType",
|
||||||
|
"foreignKey": "businessTypeFk"
|
||||||
|
},
|
||||||
"addresses": {
|
"addresses": {
|
||||||
"type": "hasMany",
|
"type": "hasMany",
|
||||||
"model": "Address",
|
"model": "Address",
|
||||||
|
|
|
@ -20,6 +20,14 @@
|
||||||
rule
|
rule
|
||||||
vn-focus>
|
vn-focus>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
|
<vn-autocomplete
|
||||||
|
vn-one
|
||||||
|
ng-model="$ctrl.client.businessTypeFk"
|
||||||
|
url="BusinessTypes"
|
||||||
|
show-field="description"
|
||||||
|
value-field="code"
|
||||||
|
label="Business type">
|
||||||
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
|
|
|
@ -13,3 +13,4 @@ You can save multiple emails: >-
|
||||||
correo electrónico el principal
|
correo electrónico el principal
|
||||||
Contact: Contacto
|
Contact: Contacto
|
||||||
Undo changes: Deshacer cambios
|
Undo changes: Deshacer cambios
|
||||||
|
Business type: Tipo de negocio
|
Loading…
Reference in New Issue