From: Bill Erickson Date: Thu, 12 Nov 2020 21:27:43 +0000 (-0500) Subject: LP1901930 SIP account admin UI WIP X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4ea0d2f4cf896beac7dd316a62cc615892f4c958;p=working%2FEvergreen.git LP1901930 SIP account admin UI WIP Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 78776fcd16..3157ae1197 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -13439,7 +13439,7 @@ SELECT usr, oils_obj:fieldmapper="sip::setting_group" oils_persist:tablename="sip.setting_group" reporter:label="SIP Settings Group"> - + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/sip/account-list.component.html b/Open-ILS/src/eg2/src/app/staff/admin/server/sip/account-list.component.html index ad1357a1e8..917d4e81dd 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/sip/account-list.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/sip/account-list.component.html @@ -1,7 +1,5 @@ -account list - + + +
- + +
+ + + +
+
+ +
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/sip/account.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/server/sip/account.component.ts index d372adcf71..c80693584c 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/sip/account.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/sip/account.component.ts @@ -24,7 +24,7 @@ export class SipAccountComponent implements OnInit { usrCboxEntries: ComboboxEntry[]; usrId: number; - //@ViewChild() usrCbox: ComboboxComponent; + @ViewChild('cloneDialog') cloneDialog: FmRecordEditorComponent; constructor( private route: ActivatedRoute, @@ -56,8 +56,11 @@ export class SipAccountComponent implements OnInit { loadAccount() { this.pcrud.retrieve('sipacc', this.accountId, { - flesh: 1, - flesh_fields: {sipacc: ['usr', 'setting_group', 'workstation']} + flesh: 2, + flesh_fields: { + sipacc: ['usr', 'setting_group', 'workstation'], + sipsetg: ['settings'] + } }).subscribe(acc => { this.account = acc; this.usrId = acc.usr().id(); @@ -66,6 +69,22 @@ export class SipAccountComponent implements OnInit { }); } + grpChanged(entry: ComboboxEntry) { + if (!entry) { return; } + + this.pcrud.retrieve('sipsetg', entry.id, + {flesh: 1, flesh_fields: {sipsetg: ['settings']}}) + .subscribe(grp => this.account.setting_group(grp)); + } + + openCloneDialog() { + this.cloneDialog.open().subscribe(resp => { + if (!resp) { return; } + + // create settings that match the currently selected group. + }); + } + accountSaved() { this.loadAccount(); }