34 lines
763 B
JavaScript
34 lines
763 B
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
class Controller extends Section {
|
|
onDialogAccept(id) {
|
|
return this.$http.delete(`Expeditions/${id}`)
|
|
.then(() => this.$.model.refresh());
|
|
}
|
|
|
|
showLog(expedition) {
|
|
this.expedition = expedition;
|
|
this.$.statusLog.show();
|
|
}
|
|
|
|
get checked() {
|
|
const rows = this.$.model.data || [];
|
|
const checkedRows = [];
|
|
for (let row of rows) {
|
|
if (row.checked)
|
|
checkedRows.push(row);
|
|
}
|
|
|
|
return checkedRows;
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnTicketExpedition', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
ticket: '<',
|
|
},
|
|
});
|