From 8ef9161c4a2c626cbafe659fe18f261f1a2c41c4 Mon Sep 17 00:00:00 2001 From: Tiffany Little Date: Fri, 16 Dec 2022 15:09:34 -0500 Subject: [PATCH] LP1999544_funddropdown Add owners limiter to fund dropdown Adds a limiter of owners to the acqf idlquery for fund dropdown in line items Signed-off-by: Tiffany Little Signed-off-by: John Amundson Signed-off-by: Jason Stephenson --- Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.html | 2 +- Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.html b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.html index 758c965e3b..294855afd6 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.html @@ -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'}">
diff --git a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.ts index f07bc3a23d..72c254452f 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.ts @@ -29,6 +29,7 @@ export class LineitemCopyAttrsComponent implements OnInit { _fundBalanceCache: string[] = []; _inflight: Promise[] = []; 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; -- 2.11.0