From a2d788c757a5feba6aec2509514b994ad0af1f03 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Wed, 7 Sep 2022 20:01:24 -0700 Subject: [PATCH] LP1842297: follow-up to use BasicAdminPageComponent for openathens screen Signed-off-by: Jane Sandberg --- .../app/staff/admin/local/admin-local.module.ts | 4 +- .../admin/local/openathens-identity.component.html | 61 ------------------- .../admin/local/openathens-identity.component.ts | 71 ---------------------- .../src/app/staff/admin/local/routing.module.ts | 16 ++++- 4 files changed, 15 insertions(+), 137 deletions(-) delete mode 100644 Open-ILS/src/eg2/src/app/staff/admin/local/openathens-identity.component.html delete mode 100644 Open-ILS/src/eg2/src/app/staff/admin/local/openathens-identity.component.ts diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/admin-local.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/admin-local.module.ts index cb134f1a25..2fff294dc9 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/admin-local.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/admin-local.module.ts @@ -6,7 +6,6 @@ import {AdminCommonModule} from '@eg/staff/admin/common.module'; import {AdminLocalSplashComponent} from './admin-local-splash.component'; import {AddressAlertComponent} from './address-alert.component'; import {AdminCarouselComponent} from './admin-carousel.component'; -import {OpenAthensIdentityComponent} from './openathens-identity.component'; import {ClonePortalEntriesDialogComponent} from './staff_portal_page/clone-portal-entries-dialog.component'; import {AdminStaffPortalPageComponent} from './staff_portal_page/staff-portal-page.component'; import {StandingPenaltyComponent} from './standing-penalty.component'; @@ -18,8 +17,7 @@ import {StandingPenaltyComponent} from './standing-penalty.component'; AdminCarouselComponent, StandingPenaltyComponent, ClonePortalEntriesDialogComponent, - AdminStaffPortalPageComponent, - OpenAthensIdentityComponent + AdminStaffPortalPageComponent ], imports: [ AdminCommonModule, diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/openathens-identity.component.html b/Open-ILS/src/eg2/src/app/staff/admin/local/openathens-identity.component.html deleted file mode 100644 index 974a386b54..0000000000 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/openathens-identity.component.html +++ /dev/null @@ -1,61 +0,0 @@ -{{idlClassDef.label}} Update Succeeded - - -Update of {{idlClassDef.label}} failed - - -Delete of {{idlClassDef.label}} failed or was not allowed - - -{{idlClassDef.label}} Successfully Deleted - - -{{idlClassDef.label}} Succeessfully Created - - -Failed to create new {{idlClassDef.label}} - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/openathens-identity.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/openathens-identity.component.ts deleted file mode 100644 index 6c075b9eff..0000000000 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/openathens-identity.component.ts +++ /dev/null @@ -1,71 +0,0 @@ -import {Component, OnInit} from '@angular/core'; -import {Location} from '@angular/common'; -import {ActivatedRoute} from '@angular/router'; -import {FormatService} from '@eg/core/format.service'; -import {AdminPageComponent} from '@eg/staff/share/admin-page/admin-page.component'; -import {IdlService, IdlObject} from '@eg/core/idl.service'; -import {PcrudService} from '@eg/core/pcrud.service'; -import {OrgService} from '@eg/core/org.service'; -import {PermService} from '@eg/core/perm.service'; -import {AuthService} from '@eg/core/auth.service'; -import {ToastService} from '@eg/share/toast/toast.service'; - -@Component({ - templateUrl: './openathens-identity.component.html' -}) -export class OpenAthensIdentityComponent extends AdminPageComponent implements OnInit { - - idlClass = 'coai'; - classLabel: string; - - constructor( - route: ActivatedRoute, - ngLocation: Location, - format: FormatService, - idl: IdlService, - org: OrgService, - auth: AuthService, - pcrud: PcrudService, - perm: PermService, - toast: ToastService, - ) { - super(route, ngLocation, format, idl, org, auth, pcrud, perm, toast); - } - - ngOnInit() { - super.ngOnInit(); - - this.classLabel = this.idlClassDef.label; - this.includeOrgDescendants = true; - } - - createNew = () => { - this.editDialog.recordId = null; - this.editDialog.record = null; - - const rec = this.idl.create('coai'); - rec.active(true); - rec.auto_signon_enabled(true); - rec.unique_identifier(1); - rec.display_name(1); - this.editDialog.record = rec; - - this.editDialog.open({size: this.dialogSize}).subscribe( - ok => { - this.createString.current() - .then(str => this.toast.success(str)); - this.grid.reload(); - }, - rejection => { - if (!rejection.dismissed) { - this.createErrString.current() - .then(str => this.toast.danger(str)); - } - } - ); - } - - deleteSelected = (entries: IdlObject[]) => { - super.deleteSelected(entries); - } -} 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 7b8550fa32..a2fef17104 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 @@ -4,7 +4,6 @@ import {AdminLocalSplashComponent} from './admin-local-splash.component'; import {BasicAdminPageComponent} from '@eg/staff/admin/basic-admin-page.component'; import {AddressAlertComponent} from './address-alert.component'; import {AdminCarouselComponent} from './admin-carousel.component'; -import {OpenAthensIdentityComponent} from './openathens-identity.component'; import {AdminStaffPortalPageComponent} from './staff_portal_page/staff-portal-page.component'; import {StandingPenaltyComponent} from './standing-penalty.component'; import {CourseTermMapComponent} from './course-reserves/course-term-map.component'; @@ -54,7 +53,20 @@ const routes: Routes = [{ import('./circ_limit_set/circ_limit_set.module').then(m => m.CircLimitSetModule) }, { path: 'config/openathens_identity', - component: OpenAthensIdentityComponent + component: BasicAdminPageComponent, + data: [{ + schema: 'config', + table: 'openathens_identity', + fieldOrder: 'id,org_unit,active,api_key,connection_id,connection_uri,auto_signon_enabled,auto_signout_enabled,' + + 'unique_identifier,display_name,release_prefix,release_first_given_name,release_second_given_name,' + + 'release_family_name,release_suffix,release_email,release_home_ou,release_barcode', + defaultNewRecord: { + active: true, + auto_signon_enabled: true, + unique_identifier: 1, + display_name: 1 + } + }] }, { path: 'config/standing_penalty', component: StandingPenaltyComponent -- 2.11.0