From d55e552a8a5ab5651d5b5277e0c780ff6031b28c Mon Sep 17 00:00:00 2001 From: Aisha <161703197+Mzava-aisha@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:28:44 +0300 Subject: [PATCH] Update patient-list.component.ts I inspect the structure of params. Visits and compare it with what the app-patients-tabular-list component expects. The app-patients-tabular-list component might expect data in a specific format. If the params.visits array is not in the expected structure, it could result in the tabular list not displaying data. --- .../components/patient-list/patient-list.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/src/app/shared/components/patient-list/patient-list.component.ts b/ui/src/app/shared/components/patient-list/patient-list.component.ts index ad42228f6..9c568461f 100644 --- a/ui/src/app/shared/components/patient-list/patient-list.component.ts +++ b/ui/src/app/shared/components/patient-list/patient-list.component.ts @@ -80,7 +80,9 @@ export class PatientListComponent implements OnInit, OnChanges { private googleAnalyticsService: GoogleAnalyticsService ) {} - ngOnChanges() {} + ngOnChanges() { + console.log('change.detected.in.component!'); + } ngOnInit() { if (this.isDischarge === undefined) { @@ -110,6 +112,7 @@ export class PatientListComponent implements OnInit, OnChanges { private getVisits(visits: Visit[]) { + console.log('Response:', .Response); this.loadingPatients = true; // this.service = "LABS"; @@ -273,6 +276,8 @@ export class PatientListComponent implements OnInit, OnChanges { const currentUrl = this.router.url.split("?")[0]; const params = this.router.url.split("?")[1]; this.isTabularList = type === "tabular" ? true : false; + console.log('Toggling.Patient.List.to:', .type); + console.log('Updated isTabularList:', .this.isTabularList); this.store.dispatch( go({ path: [currentUrl], query: { queryParams: { list: type } } }) );