From ef072cef26fefae2e671f64cc047d2cecaed3249 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 3 Aug 2021 18:59:51 -0400 Subject: [PATCH] staff portal: start on admin page Signed-off-by: Galen Charlton --- .../admin/local/admin-local-splash.component.html | 2 + .../app/staff/admin/local/admin-local.module.ts | 4 +- .../src/app/staff/admin/local/routing.module.ts | 4 ++ .../staff-portal-page.component.html | 83 ++++++++++++++++++++++ .../staff-portal-page.component.ts | 57 +++++++++++++++ 5 files changed, 149 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.html create mode 100644 Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.ts diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/admin-local-splash.component.html b/Open-ILS/src/eg2/src/app/staff/admin/local/admin-local-splash.component.html index e460ca47e2..1257780298 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/admin-local-splash.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/admin-local-splash.component.html @@ -64,6 +64,8 @@ url="/eg/staff/admin/local/asset/copy_location_order"> + import('./survey/survey.module').then(m => m.SurveyModule) diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.html b/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.html new file mode 100644 index 0000000000..ecfd722223 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.html @@ -0,0 +1,83 @@ +{{idlClassDef.label}} Update Succeeded + + +Update of {{idlClassDef.label}} failed + + +Delete of {{idlClassDef.label}} failed or was not allowed + + +{{idlClassDef.label}} Successfully Deleted + + +{{idlClassDef.label}} Successfully Created + + +Failed to create new {{idlClassDef.label}} + + + +
+
+ + + + +
+
+
+ + Filters Applied: {{gridFilters | json}} + Clear Filters + +
+
+
+
+ + + + + + + + + + {{configLinkLabel(row, col)}} + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.ts new file mode 100644 index 0000000000..e312249b27 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.ts @@ -0,0 +1,57 @@ +import {Component, Input, ViewChild, OnInit} from '@angular/core'; +import {Location} from '@angular/common'; +import {FormatService} from '@eg/core/format.service'; +import {AdminPageComponent} from '@eg/staff/share/admin-page/admin-page.component'; +import {ActivatedRoute} from '@angular/router'; +import {IdlService, IdlObject} from '@eg/core/idl.service'; +import {ToastService} from '@eg/share/toast/toast.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 {NetService} from '@eg/core/net.service'; +import {GridCellTextGenerator} from '@eg/share/grid/grid'; +import {StringComponent} from '@eg/share/string/string.component'; +import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component'; + +@Component({ + templateUrl: './staff-portal-page.component.html' +}) + +export class AdminStaffPortalPageComponent extends AdminPageComponent implements OnInit { + + idlClass = 'cusppe'; + fieldOrder = 'label,entry_type,target_url,entry_text,image_url,page_col,col_pos,owner,id'; + classLabel: string; + + refreshSelected: (idlThings: IdlObject[]) => void; + createNew: () => void; + deleteSelected: (idlThings: IdlObject[]) => void; + cellTextGenerator: GridCellTextGenerator; + + @ViewChild('refreshString', { static: true }) refreshString: StringComponent; + @ViewChild('refreshErrString', { static: true }) refreshErrString: StringComponent; + + constructor( + route: ActivatedRoute, + ngLocation: Location, + format: FormatService, + idl: IdlService, + org: OrgService, + auth: AuthService, + pcrud: PcrudService, + perm: PermService, + toast: ToastService, + private net: NetService + ) { + super(route, ngLocation, format, idl, org, auth, pcrud, perm, toast); + } + + ngOnInit() { + super.ngOnInit(); + + this.defaultNewRecord = this.idl.create(this.idlClass); + this.defaultNewRecord.owner(this.auth.user().ws_ou()); + } + +} -- 2.11.0