From 7370269e4de6f795f0bc4debe3ae6bee68f5faf3 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Wed, 16 Jun 2021 17:06:11 +0200 Subject: [PATCH 1/2] ticket.sale now shows Packing type --- modules/item/back/models/item.json | 3 +++ modules/ticket/back/methods/ticket/getSales.js | 3 ++- modules/ticket/front/sale/index.html | 4 ++++ modules/ticket/front/sale/locale/es.yml | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/item/back/models/item.json b/modules/item/back/models/item.json index ee1f46e64..ce03ba1ea 100644 --- a/modules/item/back/models/item.json +++ b/modules/item/back/models/item.json @@ -117,6 +117,9 @@ "value10": { "type": "string" }, + "itemPackingTypeFk": { + "type": "string" + }, "compression": { "type": "number" }, diff --git a/modules/ticket/back/methods/ticket/getSales.js b/modules/ticket/back/methods/ticket/getSales.js index 7520e7270..7bd2eabbe 100644 --- a/modules/ticket/back/methods/ticket/getSales.js +++ b/modules/ticket/back/methods/ticket/getSales.js @@ -11,7 +11,7 @@ module.exports = Self => { http: {source: 'path'} }], returns: { - type: ['Object'], + type: ['object'], root: true }, http: { @@ -35,6 +35,7 @@ module.exports = Self => { fields: [ 'id', 'name', + 'itemPackingTypeFk', 'tag5', 'value5', 'tag6', diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 276bcfe66..a66d8a4de 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -63,6 +63,7 @@ Id Quantity Item + Packing type Price Disc Amount @@ -168,6 +169,9 @@ + + {{::sale.item.itemPackingTypeFk == 'H' ? 'Horizontal' : (sale.item.itemPackingTypeFk == 'V' ? 'Vertical' : '-')}} + Date: Wed, 16 Jun 2021 17:58:47 +0200 Subject: [PATCH 2/2] e2e fix --- e2e/helpers/selectors.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 850a8c3fb..a31f11b56 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -572,11 +572,11 @@ export default { firstSaleZoomedImage: 'body > div > div > img', firstSaleQuantity: 'vn-ticket-sale [ng-model="sale.quantity"]', firstSaleQuantityCell: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td-editable:nth-child(6)', - firstSalePrice: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(8) > span', + firstSalePrice: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(9) > span', firstSalePriceInput: '.vn-popover.shown input[ng-model="$ctrl.field"]', - firstSaleDiscount: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(9) > span', + firstSaleDiscount: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(10) > span', firstSaleDiscountInput: '.vn-popover.shown [ng-model="$ctrl.field"]', - firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(10)', + firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(11)', firstSaleReservedIcon: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td:nth-child(2) > vn-icon:nth-child(3)', firstSaleColour: 'vn-ticket-sale vn-tr:nth-child(1) vn-fetched-tags section', firstSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(1) vn-check[ng-model="sale.checked"]',