This commit is contained in:
Carlos Jimenez 2019-01-07 16:12:55 +01:00
commit 6f2d5e3cdb
5 changed files with 26 additions and 2 deletions

View File

@ -75,6 +75,9 @@ export default class Controller extends Component {
this.$panel.scope().$destroy();
this.$panel.remove();
this.$panel = null;
let element = this.element.querySelector('vn-textfield[label=Search] input');
element.select();
element.focus();
}
onPanelSubmit(filter) {

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

View File

@ -1,7 +1,7 @@
<vn-crud-model
vn-id="model"
url="/order/api/ItemCategories"
data="categories">
data="categories" auto-load="true">
</vn-crud-model>
<vn-horizontal>
<vn-vertical vn-one>