diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index f6bdcf1b7..5a076c6c4 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -487,7 +487,7 @@ export default { priceInput: 'vn-ticket-request-create [ng-model="$ctrl.ticketRequest.price"]', firstRemoveRequestButton: 'vn-ticket-request-index vn-icon[icon="delete"]:nth-child(1)', saveButton: 'vn-ticket-request-create button[type=submit]', - firstDescription: 'vn-ticket-request-index vn-table vn-tr:nth-child(1) > vn-td:nth-child(2)', + firstDescription: 'vn-ticket-request-index vn-table vn-tr:nth-child(1) > vn-td:nth-child(2) vn-textfield', }, ticketLog: { diff --git a/e2e/paths/05-ticket-module/10_request.spec.js b/e2e/paths/05-ticket-module/10_request.spec.js index d1ed7a977..f4fea9c2b 100644 --- a/e2e/paths/05-ticket-module/10_request.spec.js +++ b/e2e/paths/05-ticket-module/10_request.spec.js @@ -38,7 +38,7 @@ describe('Ticket purchase request path', () => { it(`should confirm the new request was added`, async() => { await page.reloadSection('ticket.card.request.index'); - const result = await page.waitToGetProperty(selectors.ticketRequests.firstDescription, 'innerText'); + const result = await page.waitToGetProperty(`${selectors.ticketRequests.firstDescription} input`, 'value'); expect(result).toEqual('New stuff'); }); diff --git a/modules/ticket/front/package/index.html b/modules/ticket/front/package/index.html index 87c424ff1..12ac13862 100644 --- a/modules/ticket/front/package/index.html +++ b/modules/ticket/front/package/index.html @@ -3,7 +3,7 @@ url="TicketPackagings" fields="['id', 'ticketFk', 'packagingFk', 'quantity', 'created']" link="{ticketFk: $ctrl.$stateParams.id}" - data="packages" on-data-change="$ctrl.onDataChange()" + data="packages" auto-load="true"> {{::request.id}} - {{::request.description}} - {{::request.created | date: 'dd/MM/yyyy'}} + + + + {{::request.created | date: 'dd/MM/yyyy'}} + {{::request.requester.user.nickname | dashIfEmpty}} - + {{::request.atender.user.nickname | dashIfEmpty}} - {{::request.quantity}} - {{::request.price | currency: 'EUR': 2}} + + + + + + + + - {{request.saleFk | zeroFill:6}} + {{::request.saleFk | zeroFill:6}} diff --git a/modules/ticket/front/request/index/index.js b/modules/ticket/front/request/index/index.js index 2c8996760..38d800aeb 100644 --- a/modules/ticket/front/request/index/index.js +++ b/modules/ticket/front/request/index/index.js @@ -78,6 +78,18 @@ class Controller { return 'Acepted'; } } + + updateData() { + this.$.model.save().then(() => { + this.$.watcher.notifySaved(); + this.$.watcher.updateOriginalData(); + }); + } + + isEditable(isOk) { + if (isOk != null) + return true; + } } Controller.$inject = ['$scope', '$stateParams'];