LP1999544_funddropdown Add owners limiter to fund dropdown
authorTiffany Little <tlittle@georgialibraries.org>
Fri, 16 Dec 2022 20:09:34 +0000 (15:09 -0500)
committerJason Stephenson <jason@sigio.com>
Tue, 14 Feb 2023 15:24:16 +0000 (10:24 -0500)
Adds a limiter of owners to the acqf idlquery for fund dropdown in line items

Signed-off-by: Tiffany Little <tlittle@georgialibraries.org>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.html
Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.ts

index 758c965..294855a 100644 (file)
@@ -42,7 +42,7 @@
       [displayTemplate]="fundTmpl"
       [selectedId]="copy.fund()" (onChange)="valueChange('fund', $event)"
       [idlQuerySort]="{acqf: 'year DESC, code'}"
-      [idlQueryAnd]="{active: 't'}">
+      [idlQueryAnd]="{org: owners, active: 't'}">
     </eg-combobox>
   </div>
   <div class="flex-1 p-1">
index f07bc3a..72c2544 100644 (file)
@@ -29,6 +29,7 @@ export class LineitemCopyAttrsComponent implements OnInit {
     _fundBalanceCache: string[] = [];
     _inflight: Promise<string>[] = [];
     circModEntries: ComboboxEntry[];
+    owners: number[];
 
     private _copy: IdlObject;
     @Input() set copy(c: IdlObject) { // acqlid
@@ -80,6 +81,8 @@ export class LineitemCopyAttrsComponent implements OnInit {
 
     ngOnInit() {
 
+        this.owners = this.org.ancestors(this.auth.user().ws_ou(), true);
+
         if (this.gatherParamsOnly) {
             this.batchMode = false;
             this.batchAdd = false;