48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
class SoeFeedbackHistoryDialog extends EICDialogContent {
|
|
|
|
actions = [
|
|
{
|
|
label: 'Cancel',
|
|
onclick: this.cancel.bind(this),
|
|
severity: 'secondary',
|
|
role: 'cancel'
|
|
}
|
|
]
|
|
|
|
|
|
constructor(options) { super(options); }
|
|
|
|
DOMContentLoaded(options) {
|
|
|
|
this.id = options.id;
|
|
|
|
for(let model in options.models) this[model] = options.models[model];
|
|
|
|
this.components = ui.eicfy(this.el);
|
|
|
|
console.log('', this.soe.getFeedback(this.id))
|
|
let list = new DataGrid(this.find('[eicdatagrid]'), {
|
|
headers: [
|
|
{ label:'Date', type: 'dateTime'},
|
|
{ label:'Action'},
|
|
{ label:'User'},
|
|
]
|
|
})
|
|
|
|
for(let item of this.soe.getFeedback(this.id).statusHistory) {
|
|
list.addRow(0, [
|
|
item.dateTime,
|
|
item.value,
|
|
item.author
|
|
]);
|
|
}
|
|
|
|
}
|
|
|
|
fill() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
app.registerClass('SoeFeedbackHistoryDialog', SoeFeedbackHistoryDialog); |