diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 052d8a480..b8f0813ed 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -679,7 +679,10 @@ export default { moveToTicketButton: '.vn-popover.shown vn-icon[icon="arrow_forward_ios"]', moveToNewTicketButton: '.vn-popover.shown vn-button[label="New ticket"]', stateMenuButton: 'vn-ticket-sale vn-tool-bar > vn-button-menu[label="State"]', - moreMenuState: 'body > div > div > div.content > div.filter.ng-scope > vn-textfield' + moreMenuState: 'body > div > div > div.content > div.filter.ng-scope > vn-textfield', + firstSaleHistoryButton: 'vn-ticket-sale vn-tr:nth-child(1) vn-icon-button[icon="history"]', + firstSaleHistory: 'form vn-table div > vn-tbody > vn-tr', + closeHistory: 'div.window vn-button[icon="clear"]' }, ticketTracking: { createStateButton: 'vn-float-button' diff --git a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js index 67dfd83bf..9d6fddbe6 100644 --- a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js +++ b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js @@ -196,6 +196,15 @@ describe('Ticket Edit sale path', () => { expect(result).toContain('22.50'); }); + it('should check in the history that logs has been added', async() => { + await page.waitToClick(selectors.ticketSales.firstSaleHistoryButton); + await page.waitForSelector(selectors.ticketSales.firstSaleHistory); + const result = await page.countElement(selectors.ticketSales.firstSaleHistory); + + expect(result).toBeGreaterThan(0); + await page.waitToClick(selectors.ticketSales.closeHistory); + }); + it('should recalculate price of sales', async() => { await page.waitToClick(selectors.ticketSales.firstSaleCheckbox); await page.waitToClick(selectors.ticketSales.secondSaleCheckbox); diff --git a/front/salix/components/index.js b/front/salix/components/index.js index f6727fadf..8f5724862 100644 --- a/front/salix/components/index.js +++ b/front/salix/components/index.js @@ -19,4 +19,5 @@ import './user-popover'; import './upload-photo'; import './bank-entity'; import './log'; +import './instance-log'; import './sendSms'; diff --git a/front/salix/components/instance-log/index.html b/front/salix/components/instance-log/index.html new file mode 100644 index 000000000..354e81080 --- /dev/null +++ b/front/salix/components/instance-log/index.html @@ -0,0 +1,12 @@ + + + + + + + diff --git a/front/salix/components/instance-log/index.js b/front/salix/components/instance-log/index.js new file mode 100644 index 000000000..6d8497c2d --- /dev/null +++ b/front/salix/components/instance-log/index.js @@ -0,0 +1,21 @@ +import ngModule from '../../module'; +import Section from '../section'; +import './style.scss'; + +export default class Controller extends Section { + open() { + this.$.instanceLog.show(); + } +} + +ngModule.vnComponent('vnInstanceLog', { + controller: Controller, + template: require('./index.html'), + bindings: { + model: '<', + originId: '<', + changedModelId: '<', + changedModel: '@', + url: '@' + } +}); diff --git a/front/salix/components/instance-log/style.scss b/front/salix/components/instance-log/style.scss new file mode 100644 index 000000000..70cbc52dd --- /dev/null +++ b/front/salix/components/instance-log/style.scss @@ -0,0 +1,13 @@ +.vn-dialog { + & > .window:not(:has(.empty-rows)) { + width:60%; + vn-log { + vn-card { + visibility: hidden; + & > * { + visibility: visible; + } + } + } + } +} diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index d65a83c58..97f6a2a81 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -30,7 +30,7 @@ ng-click="moreOptions.show($event)" ng-show="$ctrl.hasSelectedSales()"> - - @@ -68,6 +68,7 @@ Disc Amount Packaging + @@ -84,13 +85,13 @@ vn-tooltip="{{::$ctrl.$t('Claim')}}: {{::sale.claim.claimFk}}"> - - @@ -108,21 +109,21 @@ - - {{::sale.visible}} - {{::sale.available}} @@ -195,7 +196,7 @@ translate-attr="{title: !$ctrl.isLocked ? 'Edit discount' : ''}" ng-click="$ctrl.showEditDiscountPopover($event, sale)" ng-if="sale.id"> - {{(sale.discount / 100) | percentage}} + {{(sale.discount / 100) | percentage}} @@ -204,6 +205,22 @@ {{::sale.item.itemPackingTypeFk | dashIfEmpty}} + + + + + + + @@ -383,8 +400,8 @@ - {{::ticket.id}} @@ -392,22 +409,22 @@ {{::ticket.agencyName}} {{::ticket.address}} - {{::ticket.nickname}} - {{::ticket.name}} - {{::ticket.street}} - {{::ticket.postalCode}} + {{::ticket.nickname}} + {{::ticket.name}} + {{::ticket.street}} + {{::ticket.postalCode}} {{::ticket.city}} @@ -503,4 +520,4 @@ vn-acl-action="remove"> Refund - \ No newline at end of file + diff --git a/modules/ticket/front/sale/locale/es.yml b/modules/ticket/front/sale/locale/es.yml index 072e57534..2668b7811 100644 --- a/modules/ticket/front/sale/locale/es.yml +++ b/modules/ticket/front/sale/locale/es.yml @@ -13,9 +13,9 @@ New ticket: Nuevo ticket Edit price: Editar precio You are going to delete lines of the ticket: Vas a eliminar lineas del ticket This ticket will be removed from current route! Continue anyway?: ¡Se eliminará el ticket de la ruta actual! ¿Continuar de todas formas? -You have to allow pop-ups in your web browser to use this functionality: +You have to allow pop-ups in your web browser to use this functionality: Debes permitir los pop-pups en tu navegador para que esta herramienta funcione correctamente -Disc: Dto +Disc: Dto Available: Disponible What is the day of receipt of the ticket?: ¿Cual es el día de preparación del pedido? Add claim: Crear reclamación @@ -39,3 +39,4 @@ Packaging: Encajado Refund: Abono Promotion mana: Maná promoción Claim mana: Maná reclamación +History: Historial