salix/modules/client/front/index/index.js

28 lines
722 B
JavaScript

import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
openSummary(client, event) {
if (event.defaultPrevented) return;
event.preventDefault();
event.stopPropagation();
this.clientSelected = client;
this.$.dialogSummaryClient.show();
}
filterTickets(client, event) {
if (event.defaultPrevented) return;
event.preventDefault();
event.stopPropagation();
this.$state.go(`ticket.index`,
{q: JSON.stringify({clientFk: client.id})});
}
}
ngModule.component('vnClientIndex', {
template: require('./index.html'),
controller: Controller
});