#932 client.descriptor

This commit is contained in:
Gerard 2019-01-07 08:49:01 +01:00
parent 78d07a1e4f
commit db95eea71d
3 changed files with 22 additions and 1 deletions

View File

@ -3,10 +3,19 @@
<a translate-attr="{title: 'Return to module index'}" ui-sref="client.index">
<vn-icon icon="chevron_left"></vn-icon>
</a>
<vn-icon icon="person"></vn-icon>
<a translate-attr="{title: 'Preview'}" ui-sref="client.card.summary({id: $ctrl.client.id})">
<vn-icon icon="desktop_windows"></vn-icon>
</a>
<vn-icon-menu
vn-id="more-button"
icon="more_vert"
show-filter="false"
value-field="callback"
translate-fields="['name']"
data="$ctrl.moreOptions"
on-change="$ctrl.onMoreChange(value)"
on-open="$ctrl.onMoreOpen()">
</vn-icon-menu>
</vn-horizontal>
<div pad-medium>
<h5>{{$ctrl.client.name}}</h5>

View File

@ -4,6 +4,13 @@ class Controller {
constructor($http, $state) {
this.$state = $state;
this.$http = $http;
this.moreOptions = [
{callback: this.newTicket, name: 'Simple ticket'}
];
}
onMoreChange(callback) {
callback.call(this);
}
set client(value) {
@ -36,6 +43,10 @@ class Controller {
get quicklinks() {
return this._quicklinks;
}
newTicket() {
this.$state.go('ticket.create', {clientFk: this.client.id});
}
}
Controller.$inject = ['$http', '$state'];

View File

@ -0,0 +1 @@
Simple ticket: Ticket simple