From: Jason Etheridge Date: Thu, 7 Apr 2022 16:06:17 +0000 (-0400) Subject: LP1857910 add org family selector to field doc UI X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d0713fac29e96dc7eb5643a13ad796b5bba92a1d;p=Evergreen.git LP1857910 add org family selector to field doc UI If we want this to default to workstation org or something, we can do that, though I was having trouble getting that to work. Right now it'll include all orgs in its default unselected state. I'm also not sure about i18n-labelText and whether that works with eg-org-family-select. Signed-off-by: Jason Etheridge Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.html b/Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.html index 25474a7e70..2227625ffc 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.html @@ -14,7 +14,13 @@ - +
+ + +
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.ts index 664f99080b..62539dcc0a 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.ts @@ -11,6 +11,7 @@ import {IdlObject, IdlService} from '@eg/core/idl.service'; import {PcrudService} from '@eg/core/pcrud.service'; import {StringComponent} from '@eg/share/string/string.component'; import {ToastService} from '@eg/share/toast/toast.service'; +import {OrgFamily} from '@eg/share/org-family-select/org-family-select.component'; @Component({ templateUrl: './field-documentation.component.html' @@ -20,6 +21,7 @@ export class FieldDocumentationComponent implements OnInit { idlEntries: any[] = []; fieldOptions: any = {}; + owning_libs: any[] = []; @Input() selectedClass: any; @Input() fields: [] = []; gridDataSource: GridDataSource; @@ -120,14 +122,20 @@ export class FieldDocumentationComponent implements OnInit { // Sort specified from grid orderBy['fdoc'] = sort[0].name + ' ' + sort[0].dir; } + const search: any = new Array(); + const orgFilter: any = {}; + orgFilter['owner'] = this.owning_libs['orgIds']; + if (orgFilter['owner'] && orgFilter['owner'][0]) { + search.push(orgFilter); + } + search.push({fm_class: this.selectedClass.id}); const searchOps = { - fm_class: this.selectedClass.id, offset: pager.offset, limit: pager.limit, order_by: orderBy }; - return this.pcrud.retrieveAll('fdoc', searchOps, {fleshSelectors: true}); + return this.pcrud.search('fdoc', search, searchOps, {fleshSelectors: true}); }; this.fieldDocGrid.reload(); }