fix order of treatments sections
This commit is contained in:
@@ -18,7 +18,7 @@ export class TreatmentDetailsModalComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.details = this.treatmentsService.getTreatmentDetails(this.treatmentCode);
|
||||
this.details.sections = this.details.sections.sort((s1: Section, s2: Section) => (s1.type === "free") ? 1 : -1);
|
||||
this.details.sections = this.details.sections.sort((s1: Section, s2: Section) => (s1.type === "free") ? 1 : 0);
|
||||
}
|
||||
|
||||
@HostListener('document:keydown.escape', ['$event']) onKeydownHandler(event: KeyboardEvent) {
|
||||
|
||||
@@ -118,6 +118,8 @@ export class TreatmentsService {
|
||||
if(currentTreatmentDetails){
|
||||
this.TREATMENT_DETAILS.push(currentTreatmentDetails);
|
||||
}
|
||||
|
||||
console.log(this.TREATMENT_DETAILS)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user