import ngModule from '../module'; import Section from 'salix/components/section'; export default class Controller extends Section { stateColor(claim) { switch (claim.description) { case 'Pendiente': return 'warning'; case 'Gestionado': return 'notice'; case 'Resuelto': return 'success'; } } preview(claim) { this.claimSelected = claim; this.$.summary.show(); } } ngModule.component('vnClaimIndex', { template: require('./index.html'), controller: Controller });