change route for hasRoute
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
405494c85b
commit
831bfb0352
|
@ -84,7 +84,7 @@ module.exports = Self => {
|
|||
description: `Whether to show only tickets with problems`
|
||||
},
|
||||
{
|
||||
arg: 'route',
|
||||
arg: 'hasRoute',
|
||||
type: 'boolean',
|
||||
description: `Whether to show only tickets with route`
|
||||
},
|
||||
|
@ -193,7 +193,7 @@ module.exports = Self => {
|
|||
|
||||
case 'alertLevel':
|
||||
return {'ts.alertLevel': value};
|
||||
case 'route':
|
||||
case 'hasRoute':
|
||||
if (value == true)
|
||||
return {'t.routeFk': {neq: null}};
|
||||
return {'t.routeFk': null};
|
||||
|
|
|
@ -228,7 +228,7 @@ describe('ticket filter()', () => {
|
|||
try {
|
||||
const options = {transaction: tx};
|
||||
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args: {route: true}};
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args: {hasRoute: true}};
|
||||
const filter = {};
|
||||
const result = await models.Ticket.filter(ctx, filter, options);
|
||||
|
||||
|
@ -247,11 +247,11 @@ describe('ticket filter()', () => {
|
|||
try {
|
||||
const options = {transaction: tx};
|
||||
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args: {route: false}};
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args: {hasRoute: false}};
|
||||
const filter = {};
|
||||
const result = await models.Ticket.filter(ctx, filter, options);
|
||||
|
||||
expect(result.length).toEqual(2);
|
||||
expect(result.length).toEqual(5);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
|
@ -266,11 +266,11 @@ describe('ticket filter()', () => {
|
|||
try {
|
||||
const options = {transaction: tx};
|
||||
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args: {route: null}};
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args: {hasRoute: null}};
|
||||
const filter = {};
|
||||
const result = await models.Ticket.filter(ctx, filter, options);
|
||||
|
||||
expect(result.length).toEqual(24);
|
||||
expect(result.length).toEqual(27);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
|
|
|
@ -137,8 +137,8 @@
|
|||
</vn-check>
|
||||
<vn-check
|
||||
vn-one
|
||||
label="With route"
|
||||
ng-model="filter.route"
|
||||
label="Has route"
|
||||
ng-model="filter.hasRoute"
|
||||
triple-state="true">
|
||||
</vn-check>
|
||||
</vn-horizontal>
|
||||
|
|
|
@ -12,7 +12,7 @@ Order id: Id cesta
|
|||
Grouped States: Estado agrupado
|
||||
Days onward: Días adelante
|
||||
With problems: Con problemas
|
||||
With route: Con ruta
|
||||
Has route: Con ruta
|
||||
Pending: Pendiente
|
||||
FREE: Libre
|
||||
DELIVERED: Servido
|
||||
|
|
Loading…
Reference in New Issue