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