LP1779158 Always clear import selection
authorBill Erickson <berickxx@gmail.com>
Mon, 7 Jan 2019 21:35:15 +0000 (16:35 -0500)
committerDan Wells <dbw2@calvin.edu>
Tue, 19 Feb 2019 22:57:04 +0000 (17:57 -0500)
Clear the import selection (e.g. Queue => Import All Items) from the
import UI when the user navigates away, regardless of whether the import
succeeded.  Otherwise, the import UI gets stuck in selection mode
requiring the user to manually clear it.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>

Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts

index e3c2d3d..9732e5a 100644 (file)
@@ -180,11 +180,9 @@ export class ImportComponent implements OnInit, AfterViewInit, OnDestroy {
     }
 
     ngOnDestroy() {
-        // If we successfully completed the most recent 
-        // upload/import assume the importSelection can be cleared.
-        if (this.uploadComplete) {
-            this.clearSelection();
-        }
+        // Always clear the import selection when navigating away from
+        // the import page.
+        this.clearSelection();
     }
 
     importSelection(): VandelayImportSelection {