From: Bill Erickson Date: Wed, 19 Jan 2022 16:46:27 +0000 (-0500) Subject: LP1958258 Angular login form shows pending offline xacts X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b510a0912674009cda679c0785891eaf15473e75;p=Evergreen.git LP1958258 Angular login form shows pending offline xacts Signed-off-by: Bill Erickson Signed-off-by: Terran McCanna Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/login.component.html b/Open-ILS/src/eg2/src/app/staff/login.component.html index 63c8b82f9d..e6c2644bb5 100644 --- a/Open-ILS/src/eg2/src/app/staff/login.component.html +++ b/Open-ILS/src/eg2/src/app/staff/login.component.html @@ -55,6 +55,13 @@
Login Failed
+ +
+
+ Unprocessed offline transactions waiting for upload. + Last transaction added at {{pendingXactsDate | date:'short'}}. +
+
diff --git a/Open-ILS/src/eg2/src/app/staff/login.component.ts b/Open-ILS/src/eg2/src/app/staff/login.component.ts index 956b18c13c..50ec9c6068 100644 --- a/Open-ILS/src/eg2/src/app/staff/login.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/login.component.ts @@ -14,6 +14,7 @@ export class StaffLoginComponent implements OnInit { workstations: any[]; loginFailed: boolean; routeTo: string; + pendingXactsDate: Date; args = { username : '', @@ -58,6 +59,8 @@ export class StaffLoginComponent implements OnInit { this.args.workstation = def; this.applyWorkstation(); }); + + this.offline.pendingXactsDate().then(d => this.pendingXactsDate = d); } applyWorkstation() { diff --git a/Open-ILS/src/eg2/src/app/staff/share/offline.service.ts b/Open-ILS/src/eg2/src/app/staff/share/offline.service.ts index 4130d24fe8..e9607a7ba4 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/offline.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/offline.service.ts @@ -124,4 +124,15 @@ export class OfflineService { rows: rows }); } + + // Return promise of cache date when pending transactions exit. + pendingXactsDate(): Promise { + return this.db.request({ + schema: 'cache', + table: 'CacheDate', + action: 'selectWhereEqual', + field: 'type', + value: '_offlineXact' + }).then(results => results[0] ? results[0].cachedate : null); + } }