Bugs solved on method Client.activeSalesPerson()
This commit is contained in:
parent
749681ac73
commit
ae7a8f1245
|
@ -116,7 +116,7 @@ describe('Edit basicData path', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.getInputValue(selectors.clientBasicData.salesPersonInput)
|
.getInputValue(selectors.clientBasicData.salesPersonInput)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('accessory accessory');
|
expect(result).toEqual('accessory');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,16 @@ module.exports = Self => {
|
||||||
let params = [];
|
let params = [];
|
||||||
|
|
||||||
if (where) {
|
if (where) {
|
||||||
sqlWhere = `AND (em.firstName REGEXP ? OR em.name REGEXP ?)`;
|
if (where.firstName) {
|
||||||
let search = where.firstName.regexp;
|
sqlWhere = `AND (em.firstName REGEXP ? OR em.name REGEXP ?)`;
|
||||||
params.push(search);
|
let search = where.firstName.regexp;
|
||||||
params.push(search);
|
params.push(search);
|
||||||
|
params.push(search);
|
||||||
|
}
|
||||||
|
if (where.id) {
|
||||||
|
sqlWhere = `AND em.id = ?`;
|
||||||
|
params.push(where.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (filter.limit) {
|
if (filter.limit) {
|
||||||
sqlLimit = `LIMIT ?`;
|
sqlLimit = `LIMIT ?`;
|
||||||
|
|
Loading…
Reference in New Issue