Merge add ans modify functions in Operation List Component.
This commit is contained in:
parent
73485ac1af
commit
25fcc34b68
@ -92,7 +92,15 @@ export class OperationListComponent implements OnInit {
|
|||||||
var operation = new Operation();
|
var operation = new Operation();
|
||||||
operation.account_id = this.accountIdService.get();
|
operation.account_id = this.accountIdService.get();
|
||||||
|
|
||||||
return this.modify(operation);
|
// FIXME Alexis Lahouze 2017-06-15 i18n
|
||||||
|
const modal = this.ngbModal.open(OperationEditModalComponent);
|
||||||
|
|
||||||
|
modal.componentInstance.operation = operation;
|
||||||
|
|
||||||
|
modal.result.then((operation: Operation) => {
|
||||||
|
this.save(operation);
|
||||||
|
}, (reason) => {
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -138,20 +146,6 @@ export class OperationListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
modify(operation) {
|
|
||||||
// FIXME Alexis Lahouze 2017-06-15 i18n
|
|
||||||
const modal = this.ngbModal.open(OperationEditModalComponent, {
|
|
||||||
windowClass: 'in'
|
|
||||||
});
|
|
||||||
|
|
||||||
modal.componentInstance.operation = operation;
|
|
||||||
|
|
||||||
modal.result.then((operation: Operation) => {
|
|
||||||
this.save(operation);
|
|
||||||
}, (reason) => {
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
onUpdate(dateRange) {
|
onUpdate(dateRange) {
|
||||||
this.load(dateRange.minDate, dateRange.maxDate);
|
this.load(dateRange.minDate, dateRange.maxDate);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user