3377-modifyStyles #798
|
@ -3,7 +3,7 @@
|
||||||
url="Tickets"
|
url="Tickets"
|
||||||
link="{clientFk: $ctrl.client.id}"
|
link="{clientFk: $ctrl.client.id}"
|
||||||
filter="::$ctrl.ticketFilter"
|
filter="::$ctrl.ticketFilter"
|
||||||
limit="5"
|
limit="10"
|
||||||
data="tickets"
|
data="tickets"
|
||||||
order="shipped DESC, id">
|
order="shipped DESC, id">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
|
@ -287,7 +287,7 @@
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<h4 translate>Latest tickets</h4>
|
<h4 translate>Latest tickets</h4>
|
||||||
<vn-table model="ticketsModel" class="scrollable sm">
|
<vn-table model="ticketsModel">
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-th field="id" number>Id</vn-th>
|
<vn-th field="id" number>Id</vn-th>
|
||||||
|
|
|
@ -121,11 +121,17 @@
|
||||||
data="$ctrl.possibleTickets">
|
data="$ctrl.possibleTickets">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<vn-dialog
|
<vn-dialog
|
||||||
vn-id="possibleTicketsDialog"
|
vn-id="possibleTicketsDialog">
|
||||||
on-accept="$ctrl.setTicketsRoute()"
|
<tpl-title>
|
||||||
message="Tickets to add">
|
<vn-horizontal>
|
||||||
|
<span translate>Tickets to add</span>
|
||||||
|
<div class="button-right">
|
||||||
vicent marked this conversation as resolved
Outdated
|
|||||||
|
<vn-button label="Add" ng-click="$ctrl.setTicketsRoute()"></vn-button>
|
||||||
|
</div>
|
||||||
|
</vn-horizontal>
|
||||||
|
</tpl-title>
|
||||||
<tpl-body>
|
<tpl-body>
|
||||||
<vn-data-viewer class="vn-pa-md" model="possibleTicketsModel">
|
<vn-data-viewer model="possibleTicketsModel">
|
||||||
<vn-table model="possibleTicketsModel" auto-load="false">
|
<vn-table model="possibleTicketsModel" auto-load="false">
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
|
@ -154,7 +160,7 @@
|
||||||
{{::ticket.id}}
|
{{::ticket.id}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td number>
|
<vn-td expand>
|
||||||
<span class="link" ng-click="clientDescriptor.show($event, ticket.clientFk)">
|
<span class="link" ng-click="clientDescriptor.show($event, ticket.clientFk)">
|
||||||
{{::ticket.nickname}}
|
{{::ticket.nickname}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -168,10 +174,6 @@
|
||||||
</vn-table>
|
</vn-table>
|
||||||
</vn-data-viewer>
|
</vn-data-viewer>
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
<tpl-buttons>
|
|
||||||
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
||||||
<button response="accept" translate>Add</button>
|
|
||||||
</tpl-buttons>
|
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
<vn-float-button
|
<vn-float-button
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
|
@ -132,6 +132,7 @@ class Controller extends Section {
|
||||||
this.$.model.data = this.$.model.data.concat(tickets);
|
this.$.model.data = this.$.model.data.concat(tickets);
|
||||||
this.vnApp.showSuccess(this.$t('Data saved!'));
|
this.vnApp.showSuccess(this.$t('Data saved!'));
|
||||||
this.updateVolume();
|
this.updateVolume();
|
||||||
|
this.$.possibleTicketsDialog.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,6 +197,9 @@ describe('Route', () => {
|
||||||
|
|
||||||
describe('setTicketsRoute()', () => {
|
describe('setTicketsRoute()', () => {
|
||||||
it('should perform a POST query to add tickets to the route', () => {
|
it('should perform a POST query to add tickets to the route', () => {
|
||||||
|
controller.$.possibleTicketsDialog = {hide: () => {}};
|
||||||
|
jest.spyOn(controller.$.possibleTicketsDialog, 'hide');
|
||||||
|
|
||||||
controller.$params = {id: 1101};
|
controller.$params = {id: 1101};
|
||||||
controller.$.model.data = [{id: 1, checked: false}];
|
controller.$.model.data = [{id: 1, checked: false}];
|
||||||
|
|
||||||
|
@ -223,6 +226,7 @@ describe('Route', () => {
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
expect(controller.$.model.data).toEqual(expectedResult);
|
expect(controller.$.model.data).toEqual(expectedResult);
|
||||||
|
expect(controller.$.possibleTicketsDialog.hide).toHaveBeenCalledWith();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,3 +8,9 @@ vn-route-tickets form{
|
||||||
max-width: 30px;
|
max-width: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button-right{
|
||||||
|
display: block;
|
||||||
|
padding-right: 50px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
Loading…
Reference in New Issue
styles are better placed in a style.scss file