From 42126ce81df432915c7208ea491a2584105e0746 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 3 Aug 2021 11:03:44 -0400 Subject: [PATCH] staff portal: fix card header and body styling Signed-off-by: Galen Charlton --- .../src/eg2/src/app/staff/splash.component.html | 70 ++++++++++++---------- Open-ILS/src/eg2/src/app/staff/splash.component.ts | 33 +++++++--- 2 files changed, 63 insertions(+), 40 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/splash.component.html b/Open-ILS/src/eg2/src/app/staff/splash.component.html index 620876b409..99392aae04 100644 --- a/Open-ILS/src/eg2/src/app/staff/splash.component.html +++ b/Open-ILS/src/eg2/src/app/staff/splash.component.html @@ -30,42 +30,46 @@
-
+
- -
-

{{entry.label()}}

-
- -
-
- - - - -
-
- +
+
+ + + + +
+
+ +
- +
diff --git a/Open-ILS/src/eg2/src/app/staff/splash.component.ts b/Open-ILS/src/eg2/src/app/staff/splash.component.ts index 78c05ca794..eace52b600 100644 --- a/Open-ILS/src/eg2/src/app/staff/splash.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/splash.component.ts @@ -10,6 +10,7 @@ export class StaffSplashComponent implements OnInit { catSearchQuery: string; portalEntries: any[][] = []; + portalHeaders: any[] = []; constructor( private renderer: Renderer2, @@ -18,14 +19,32 @@ export class StaffSplashComponent implements OnInit { ) {} ngOnInit() { - - this.pcrud.search('cusppe', {owner: 1}).subscribe(item => { - const page_col = item.page_col() - 1; - if (this.portalEntries[page_col] === undefined) { - this.portalEntries[page_col] = []; + const tmpPortalEntries: any[][] = []; + this.pcrud.search('cusppe', {owner: 1}).subscribe( + item => { + const page_col = item.page_col(); + if (tmpPortalEntries[page_col] === undefined) { + tmpPortalEntries[page_col] = []; + } + tmpPortalEntries[page_col][item.col_pos()] = item; + }, + err => {}, + () => { + // munge the results so that we don't need to + // care if there are gaps in the page_col or col_pos + // sequences + tmpPortalEntries.forEach((col) => { + if (col !== undefined) { + this.portalEntries.push(col); + col.forEach((entry) => { + if (entry.entry_type() === 'header') { + this.portalHeaders[this.portalEntries.length - 1] = entry; + } + }); + } + }); } - this.portalEntries[page_col][item.col_pos()] = item; - }); + ); } searchCatalog(): void { -- 2.11.0