Ticket client list button on descriptor #407
This commit is contained in:
parent
9dd817c384
commit
469bc4c0eb
|
@ -26,7 +26,7 @@
|
|||
value="{{$ctrl.client.salesPerson.firstName}} {{$ctrl.client.salesPerson.name}}">
|
||||
</vn-label-value>
|
||||
</div>
|
||||
<vn-horizontal pad-medium-bottom class="footer">
|
||||
<vn-horizontal pad-medium class="footer">
|
||||
<vn-icon
|
||||
vn-tooltip="Client inactive"
|
||||
icon="icon-disabled"
|
||||
|
@ -53,4 +53,11 @@
|
|||
ng-class="{bright: $ctrl.client.isTaxDataChecked == false}">
|
||||
</vn-icon>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal pad-medium class="buttons">
|
||||
<vn-button
|
||||
vn-tooltip="Client ticket list"
|
||||
icon="icon-ticket"
|
||||
ng-click="$ctrl.goToClientTickets()">
|
||||
</vn-button>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
|
@ -1,7 +1,8 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
class Controller {
|
||||
constructor($http) {
|
||||
constructor($http, $state) {
|
||||
this.$state = $state;
|
||||
this.$http = $http;
|
||||
}
|
||||
_getClientDebt(clientFk) {
|
||||
|
@ -18,6 +19,10 @@ class Controller {
|
|||
});
|
||||
}
|
||||
|
||||
goToClientTickets() {
|
||||
this.$state.go('ticket.index', {q: `{"clientFk": ${this.client.id}}`});
|
||||
}
|
||||
|
||||
$onChanges(changes) {
|
||||
if (changes.client && this.client) {
|
||||
this._getClient(this.client.id);
|
||||
|
@ -26,7 +31,7 @@ class Controller {
|
|||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$http'];
|
||||
Controller.$inject = ['$http', '$state'];
|
||||
|
||||
ngModule.component('vnClientDescriptor', {
|
||||
template: require('./index.html'),
|
||||
|
|
|
@ -26,3 +26,4 @@ Credit contracts: Contratos de crédito
|
|||
Verified data: Datos comprobados
|
||||
Mandate: Mandato
|
||||
Remove contact: Eliminar
|
||||
Client ticket list: Listado de tickets del cliente
|
|
@ -184,6 +184,25 @@ vn-main-block {
|
|||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
& > a {
|
||||
background-color: $main-01;
|
||||
@extend %clickable;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: .5em;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
|
||||
& > vn-icon {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vn-list {
|
||||
|
|
Loading…
Reference in New Issue