Ledger now working with response_model

get_edit_url workaround found with transform clientside
This commit is contained in:
tanshu committed 2020-05-12 23:21:12 +05:30
1 parent 9c9f0dfdd6
commit 708a60baf7
18 files changed
+206 -24

No files matched your search

+6 -2
View File
@@ -56,8 +56,12 @@ export class LedgerComponent implements OnInit, AfterViewInit {
}
ngOnInit() {
this.route.data
.subscribe((data: { info: Ledger }) => {
this.route.data.pipe(map(
(data: { info: Ledger }) => {
data.info.body = data.info.body.map(x => ({...x, url: x['type'].replace(/ /g, '-').toLowerCase()}));
return data;
}
)).subscribe((data: { info: Ledger }) => {
this.info = data.info;
this.calculateTotals();
this.form.setValue({