3862-feat(ticket): change isAvailable to itemShortage #941
|
@ -304,7 +304,7 @@ module.exports = Self => {
|
||||||
{'tp.hasTicketRequest': true},
|
{'tp.hasTicketRequest': true},
|
||||||
{'tp.hasComponentLack': true},
|
{'tp.hasComponentLack': true},
|
||||||
{'tp.isTaxDataChecked': false},
|
{'tp.isTaxDataChecked': false},
|
||||||
{'tp.isAvailable': false}
|
{'tp.itemShortage': {neq: null}}
|
||||||
]};
|
]};
|
||||||
} else if (hasProblems === false) {
|
} else if (hasProblems === false) {
|
||||||
whereProblems = {and: [
|
whereProblems = {and: [
|
||||||
|
@ -313,7 +313,7 @@ module.exports = Self => {
|
||||||
{'tp.hasTicketRequest': false},
|
{'tp.hasTicketRequest': false},
|
||||||
{'tp.hasComponentLack': false},
|
{'tp.hasComponentLack': false},
|
||||||
{'tp.isTaxDataChecked': true},
|
{'tp.isTaxDataChecked': true},
|
||||||
{'tp.isAvailable': true}
|
{'tp.itemShortage': null}
|
||||||
]};
|
]};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,8 +98,8 @@
|
||||||
icon="icon-buyrequest">
|
icon="icon-buyrequest">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
<vn-icon
|
<vn-icon
|
||||||
ng-show="::ticket.isAvailable === 0"
|
ng-show="::ticket.itemShortage"
|
||||||
translate-attr="{title: 'Not available'}"
|
translate-attr="{title: 'Not visible'}"
|
||||||
class="bright"
|
class="bright"
|
||||||
icon="icon-unavailable">
|
icon="icon-unavailable">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
|
|
|
@ -324,7 +324,7 @@ module.exports = Self => {
|
||||||
case true:
|
case true:
|
||||||
condition = `or`;
|
condition = `or`;
|
||||||
hasProblem = true;
|
hasProblem = true;
|
||||||
range = 0;
|
range = {neq: null};
|
||||||
hasWhere = true;
|
hasWhere = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ module.exports = Self => {
|
||||||
{'tp.isFreezed': hasProblem},
|
{'tp.isFreezed': hasProblem},
|
||||||
{'tp.risk': hasProblem},
|
{'tp.risk': hasProblem},
|
||||||
{'tp.hasTicketRequest': hasProblem},
|
{'tp.hasTicketRequest': hasProblem},
|
||||||
{'tp.isAvailable': range}
|
{'tp.itemShortage': range}
|
||||||
]};
|
]};
|
||||||
|
|
||||||
if (hasWhere)
|
if (hasWhere)
|
||||||
|
|
|
@ -94,7 +94,7 @@ module.exports = Self => {
|
||||||
sale.visible = itemStock.visible;
|
sale.visible = itemStock.visible;
|
||||||
sale.claim = claimedSales.get(sale.id);
|
sale.claim = claimedSales.get(sale.id);
|
||||||
if (problems) {
|
if (problems) {
|
||||||
sale.isAvailable = problems.isAvailable;
|
sale.itemShortage = problems.itemShortage;
|
||||||
sale.hasTicketRequest = problems.hasTicketRequest;
|
sale.hasTicketRequest = problems.hasTicketRequest;
|
||||||
sale.hasComponentLack = problems.hasComponentLack;
|
sale.hasComponentLack = problems.hasComponentLack;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ describe('ticket filter()', () => {
|
||||||
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(4);
|
expect(result.length).toEqual(6);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -52,8 +52,8 @@
|
||||||
icon="icon-buyrequest">
|
icon="icon-buyrequest">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
<vn-icon
|
<vn-icon
|
||||||
ng-show="::ticket.isAvailable === 0"
|
ng-show="::ticket.itemShortage"
|
||||||
translate-attr="{title: 'Not available'}"
|
translate-attr="{title: 'Not visible'}"
|
||||||
class="bright"
|
class="bright"
|
||||||
icon="icon-unavailable">
|
icon="icon-unavailable">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
Weekly tickets: Tickets programados
|
Weekly tickets: Tickets programados
|
||||||
Go to lines: Ir a lineas
|
Go to lines: Ir a lineas
|
||||||
Not available: No disponible
|
Not available: No disponible
|
||||||
|
Not visible: No visible
|
||||||
Payment on account...: Pago a cuenta...
|
Payment on account...: Pago a cuenta...
|
||||||
Set as delivered and open delivery note(s): Marcar como servido/s y abrir albarán/es
|
Set as delivered and open delivery note(s): Marcar como servido/s y abrir albarán/es
|
||||||
Closure: Cierre
|
Closure: Cierre
|
||||||
|
|
|
@ -95,8 +95,8 @@
|
||||||
translate-attr="{title: 'Reserved'}">
|
translate-attr="{title: 'Reserved'}">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
<vn-icon
|
<vn-icon
|
||||||
ng-show="::sale.isAvailable === 0"
|
ng-show="::sale.itemShortage"
|
||||||
translate-attr="{title: 'Not available'}"
|
translate-attr="{title: 'Not visible'}"
|
||||||
class="bright"
|
class="bright"
|
||||||
icon="icon-unavailable">
|
icon="icon-unavailable">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
|
|
|
@ -157,8 +157,8 @@
|
||||||
translate-attr="{title: 'Reserved'}">
|
translate-attr="{title: 'Reserved'}">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
<vn-icon
|
<vn-icon
|
||||||
ng-show="::sale.isAvailable === 0"
|
ng-show="::sale.itemShortage"
|
||||||
translate-attr="{title: 'Not available'}"
|
translate-attr="{title: 'Not visible'}"
|
||||||
class="bright"
|
class="bright"
|
||||||
icon="icon-unavailable">
|
icon="icon-unavailable">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
|
|
Loading…
Reference in New Issue