26 lines
582 B
JavaScript
26 lines
582 B
JavaScript
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
|
|
});
|