LP1926310 Record bucket batch edit destination
authorBill Erickson <berickxx@gmail.com>
Tue, 27 Apr 2021 15:23:02 +0000 (11:23 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 14 May 2021 21:12:43 +0000 (17:12 -0400)
Record Bucket => Batch Edit now opens the new Angular MARC Batch Edit
interface.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.html
Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts
Open-ILS/src/eg2/src/app/staff/cat/marcbatch/routing.module.ts
Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js

index bfa2952..a9e2b89 100644 (file)
       <ng-container *ngIf="source == 'b'">
         <div class="col-lg-3" i18n>Bucket named: </div>
         <div class="col-lg-6">
-          <eg-combobox [entries]="buckets" (onChange)="bucketChanged($event)">
+          <eg-combobox [selectedId]="bucket" 
+            [entries]="buckets" (onChange)="bucketChanged($event)">
           </eg-combobox>
         </div>
       </ng-container>
index 81e3913..67ab4b3 100644 (file)
@@ -56,6 +56,18 @@ export class MarcBatchComponent implements OnInit {
     ) {}
 
     ngOnInit() {
+
+        this.route.paramMap.subscribe((params: ParamMap) => {
+            this.bucket = +params.get('bucketId');
+            this.recordId = +params.get('recordId');
+
+            if (this.bucket) {
+                this.source = 'b';
+            } else if (this.recordId) {
+                this.source = 'r';
+            }
+        });
+
         this.load();
     }
 
index bb268e6..9eb287b 100644 (file)
@@ -5,6 +5,12 @@ import {MarcBatchComponent} from './marcbatch.component';
 const routes: Routes = [{
     path: '',
     component: MarcBatchComponent
+  }, {
+    path: 'bucket/:bucketId',
+    component: MarcBatchComponent
+  }, {
+    path: 'record/:recordId',
+    component: MarcBatchComponent
 }];
 
 @NgModule({
index 0474429..0a126b5 100644 (file)
@@ -763,8 +763,7 @@ function($scope,  $q , $routeParams,  bucketSvc,  egCore,  $window,
     }
 
     $scope.batchEdit = function() {
-        var url = egCore.env.basePath +
-                  'cat/catalog/batchEdit/bucket/' + $scope.bucketId;
+        var url = '/eg2/staff/cat/marcbatch/bucket/' + $scope.bucketId;
         $timeout(function() { $window.open(url, '_blank') });
     }