From: Jane Sandberg Date: Thu, 25 Jun 2020 22:55:26 +0000 (+0000) Subject: LP 1857351: set basic admin interface field order using route X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7f2354411a17dd064e398c21c3045bc09fd53b46;p=working%2FEvergreen.git LP 1857351: set basic admin interface field order using route Signed-off-by: Jane Sandberg Signed-off-by: Ruth Frasur Signed-off-by: Michele Morgan --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/routing.module.ts index c07dd5df56..013fb824f0 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/routing.module.ts @@ -7,6 +7,15 @@ const routes: Routes = [{ path: 'splash', component: AdminAcqSplashComponent }, { + path: 'edi_account', + component: BasicAdminPageComponent, + data: [{ + schema: 'acq', + table: 'edi_account', + fieldOrder: 'id,label,provider,owner,account,vendacct,vendcode,last_activity,host,username,password,path,in_dir,use_attrs,attr_set', + readonlyFields: 'last_activity' + }] +}, { path: ':table', component: BasicAdminPageComponent, // All ACQ admin pages cover data in the acq.* schema. No need to diff --git a/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts index a983a7272d..91b2040a34 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts @@ -17,6 +17,7 @@ import {tap, switchMap} from 'rxjs/operators'; @@ -28,6 +29,7 @@ export class BasicAdminPageComponent implements OnInit { idlClass: string; classLabel: string; persistKeyPfx: string; + fieldOrder = ''; readonlyFields = ''; configLinkBasePath = '/staff/admin'; @@ -68,6 +70,7 @@ export class BasicAdminPageComponent implements OnInit { this.table = data['table']; } this.disableOrgFilter = data['disableOrgFilter']; + this.fieldOrder = data['fieldOrder']; this.readonlyFields = data['readonlyFields']; } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/routing.module.ts index 8ce6dce3cc..8f4777918a 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/routing.module.ts @@ -18,6 +18,13 @@ const routes: Routes = [{ path: 'actor/address_alert', component: AddressAlertComponent }, { + path: 'asset/copy_location', + component: BasicAdminPageComponent, + data: [{ + schema: 'asset', + table: 'copy_location', + fieldOrder: 'owning_lib,name,opac_visible,circulate,holdable,hold_verify,checkin_alert,deleted,label_prefix,label_suffix,url,id'}] +}, { path: 'container/carousel', component: AdminCarouselComponent }, { diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts index 194a979052..9644354c52 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts @@ -17,9 +17,25 @@ const routes: Routes = [{ loadChildren: () => import('./floating-group/floating-group.module').then(m => m.FloatingGroupModule) }, { + path: 'config/hard_due_date', + component: BasicAdminPageComponent, + data: [{ + schema: 'config', + table: 'hard_due_date', + fieldOrder: 'name,owner,ceiling_date,forceto' + }] +}, { path: 'config/print_template', component: PrintTemplateComponent }, { + path: 'config/z3950_source', + component: BasicAdminPageComponent, + data: [{ + schema: 'config', + table: 'z3950_source', + fieldOrder: 'name,label,host,port,db,record_format,transmission_format,auth,use_perm' + }] +}, { path: 'permission/grp_tree', component: PermGroupTreeComponent }, { diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/merge-profiles.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/merge-profiles.component.ts index 2059b618cb..a1cc38466e 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/merge-profiles.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/merge-profiles.component.ts @@ -1,7 +1,9 @@ import {Component} from '@angular/core'; @Component({ - template: `` + template: ` + ` }) export class MergeProfilesComponent { constructor() {} diff --git a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.html b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.html index dbc350d6b1..a7d71230de 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.html @@ -72,8 +72,11 @@ + [fieldOptions]="fieldOptions" + [fieldOrder]="fieldOrder" + [defaultNewRecord]="defaultNewRecord" + [preloadLinkedValues]="true" + [readonlyFields]="readonlyFields"> diff --git a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts index dfcd549036..3438b479d2 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts @@ -44,6 +44,10 @@ export class AdminPageComponent implements OnInit { // Size of create/edito dialog. Uses large by default. @Input() dialogSize: 'sm' | 'lg' = 'lg'; + // Optional comma-separated list of field names defining the order in which + // fields should be rendered in the fm-editor and grid. + @Input() fieldOrder: string; + // comma-separated list of fields to hide. // This does not imply all other fields should be visible, only that // the selected fields will be hidden.