diff --git a/modules/ticket/front/descriptor/index.html b/modules/ticket/front/descriptor/index.html index ede553b72..2f0400f6b 100644 --- a/modules/ticket/front/descriptor/index.html +++ b/modules/ticket/front/descriptor/index.html @@ -5,6 +5,7 @@ @@ -60,7 +61,7 @@ { + this.isEditable = res.data; + }); + } + showChangeShipped() { this.newShipped = this.ticket.shipped; this.$.changeShippedDialog.show(); diff --git a/modules/ticket/front/descriptor/index.spec.js b/modules/ticket/front/descriptor/index.spec.js index 41a2cceea..ef032d775 100644 --- a/modules/ticket/front/descriptor/index.spec.js +++ b/modules/ticket/front/descriptor/index.spec.js @@ -28,8 +28,10 @@ describe('Ticket Component vnTicketDescriptor', () => { beforeEach(angular.mock.inject(($componentController, _$httpBackend_, _$state_) => { $httpBackend = _$httpBackend_; $httpBackend.whenGET(`Tickets/${ticket.id}/canHaveStowaway`).respond(true); + $httpBackend.whenGET(`Tickets/1/isEditable`).respond(true); $state = _$state_; + $state.params.id = 1; $state.getCurrentPath = () => [null, {state: {name: 'ticket'}}]; controller = $componentController('vnTicketDescriptor', {$element: null}, {ticket});