LPXXX Angular Volcopy
authorBill Erickson <berickxx@gmail.com>
Tue, 16 Jun 2020 21:05:22 +0000 (17:05 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 16 Jun 2020 21:05:22 +0000 (17:05 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.module.ts

diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html
new file mode 100644 (file)
index 0000000..139597f
--- /dev/null
@@ -0,0 +1,2 @@
+
+
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts
new file mode 100644 (file)
index 0000000..f32b4d3
--- /dev/null
@@ -0,0 +1,43 @@
+import {Component, OnInit, AfterViewInit, ViewChild, Renderer2} from '@angular/core';
+import {Router, ActivatedRoute, ParamMap} from '@angular/router';
+import {tap} from 'rxjs/operators';
+import {IdlObject, IdlService} from '@eg/core/idl.service';
+import {EventService} from '@eg/core/event.service';
+import {OrgService} from '@eg/core/org.service';
+import {NetService} from '@eg/core/net.service';
+import {AuthService} from '@eg/core/auth.service';
+import {PcrudService} from '@eg/core/pcrud.service';
+import {HoldingsService} from '@eg/staff/share/holdings/holdings.service';
+import {VolCopyContext} from './volcopy';
+import {VolCopyService} from './volcopy.service';
+
+
+
+@Component({
+  templateUrl: 'copy-attrs.component.html'
+})
+export class CopyAttrsComponent implements OnInit {
+
+
+    constructor(
+        private router: Router,
+        private route: ActivatedRoute,
+        private renderer: Renderer2,
+        private evt: EventService,
+        private idl: IdlService,
+        private org: OrgService,
+        private net: NetService,
+        private auth: AuthService,
+        private pcrud: PcrudService,
+        private holdings: HoldingsService,
+        private volcopy: VolCopyService
+    ) { }
+
+
+    ngOnInit() {
+    }
+
+}
+
+
+
index 1357c7f..6b24704 100644 (file)
@@ -25,6 +25,9 @@ interface EditSession {
     // Unset if editing in multi-record mode
     record_id: number;
 
+    // list of copy IDs
+    copies: number[];
+
     // Adding to or creating new call numbers
     raw: CallNumData[];
 
@@ -138,6 +141,10 @@ export class VolCopyComponent implements OnInit {
             this.context.hideVols = editSession.hide_vols === true;
             this.context.hideCopies = editSession.hide_copies === true;
 
+            if (editSession.copies && editSession.copies.length > 0) {
+                return this.fetchCopies(editSession.copies);
+            }
+
             const volsToFetch = [];
             const volsToCreate = [];
             editSession.raw.forEach((volData: CallNumData) => {
index af55152..7a267fe 100644 (file)
@@ -6,11 +6,13 @@ import {VolCopyRoutingModule} from './routing.module';
 import {VolCopyComponent} from './volcopy.component';
 import {VolEditComponent} from './vol-edit.component';
 import {VolCopyService} from './volcopy.service';
+import {CopyAttrsComponent} from './copy-attrs.component';
 
 @NgModule({
   declarations: [
     VolCopyComponent,
-    VolEditComponent
+    VolEditComponent,
+    CopyAttrsComponent
   ],
   imports: [
     StaffCommonModule,