change client.name for client.socialName
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-02-23 09:52:45 +01:00
parent 8a8951b8b0
commit a5614e5d5d
4 changed files with 10 additions and 7 deletions

View File

@ -28,7 +28,7 @@ describe('Client defaulter path', () => {
const salesPersonName =
await page.waitToGetProperty(selectors.clientDefaulter.firstSalesPersonName, 'innerText');
expect(clientName).toEqual('Ororo Munroe');
expect(clientName).toEqual('Batman');
expect(salesPersonName).toEqual('salesPersonNick');
});

View File

@ -56,7 +56,7 @@ module.exports = Self => {
FROM (
SELECT
DISTINCT c.id clientFk,
c.name clientName,
c.socialName clientName,
c.salesPersonFk,
u.nickname salesPersonName,
d.amount,

View File

@ -47,12 +47,12 @@ describe('defaulter filter()', () => {
try {
const options = {transaction: tx};
const ctx = {req: {accessToken: {userId: authUserId}}, args: {search: 'bruce'}};
const ctx = {req: {accessToken: {userId: authUserId}}, args: {search: 'spider'}};
const result = await models.Defaulter.filter(ctx, null, options);
const firstRow = result[0];
expect(firstRow.clientName).toEqual('Bruce Wayne');
expect(firstRow.clientName).toEqual('Spider man');
await tx.rollback();
} catch (e) {

View File

@ -16,8 +16,8 @@ export default class Controller extends Section {
field: 'clientName',
autocomplete: {
url: 'Clients',
showField: 'name',
valueField: 'name'
showField: 'socialName',
valueField: 'socialName'
}
},
{
@ -34,7 +34,6 @@ export default class Controller extends Section {
field: 'workerFk',
autocomplete: {
url: 'Workers/activeWithInheritedRole',
where: `{role: 'salesPerson'}`,
searchFunction: '{firstName: $search}',
showField: 'nickname',
valueField: 'id',
@ -48,6 +47,10 @@ export default class Controller extends Section {
valueField: 'observation',
}
},
{
field: 'created',
searchable: false
},
{
field: 'defaulterSinced',
searchable: false