reporter:label="SIP Settings">
<fields oils_persist:primary="id" oils_persist:sequence="sip.setting_id_seq">
<field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
- <field name="setting_group" reporter:datatype="link" reporter:label="Settings Group" oils_obj:required="true"/>
+ <field name="setting_group" reporter:datatype="link" reporter:label="Settings Group" oils_obj:required="true" config_field="true"/>
<field name="name" reporter:datatype="text" reporter:label="Name" oils_obj:required="true"/>
<field name="description" reporter:datatype="text" reporter:label="Description" oils_obj:required="true"/>
<field name="value" reporter:datatype="text" reporter:label="Value" oils_obj:required="true"/>
data: [{schema: 'asset',
table: 'call_number_suffix', readonlyFields: 'label_sortkey'}]
}, {
+ path: 'sip/account',
+ loadChildren: () =>
+ import('./sip/account.module').then(m => m.SipAccountModule)
+}, {
path: ':schema/:table',
component: BasicAdminPageComponent
}];
--- /dev/null
+<eg-staff-banner bannerText="SIP Accounts" i18n-bannerText></eg-staff-banner>
+
+<b>account list</b>
+
+<eg-grid #grid idlClass="sipacc" [dataSource]="gridSource"
+ [stickyHeader]="true" [sortable]="true" (onRowActivate)="openAccount($event)">
+ <eg-grid-toolbar-action label="Delete Selected" i18n-label (onClick)="deleteSelected">
+ </eg-grid-toolbar-action>
+ <!--
+ <eg-grid-column name="test" [cellTemplate]="cellTmpl"
+ [cellContext]="btGridTestContext" [sortable]="false">
+ </eg-grid-column>
+ <eg-grid-column [sortable]="false" path="owner.name"></eg-grid-column>
+ <eg-grid-column [sortable]="false" path="datetime_test"
+ datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
+ -->
+</eg-grid>
+
--- /dev/null
+import {Component, Input, ViewChild, OnInit} from '@angular/core';
+import {Router} from '@angular/router';
+import {Observable, of} from 'rxjs';
+import {IdlService, IdlObject} from '@eg/core/idl.service';
+import {OrgService} from '@eg/core/org.service';
+import {AuthService} from '@eg/core/auth.service';
+import {PcrudService} from '@eg/core/pcrud.service';
+import {ToastService} from '@eg/share/toast/toast.service';
+import {StringComponent} from '@eg/share/string/string.component';
+import {StringService} from '@eg/share/string/string.service';
+import {ConfirmDialogComponent} from '@eg/share/dialog/confirm.component';
+import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
+import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
+import {GridDataSource} from '@eg/share/grid/grid';
+import {Pager} from '@eg/share/util/pager';
+
+@Component({
+ templateUrl: './account-list.component.html'
+})
+export class SipAccountListComponent implements OnInit {
+
+ gridSource: GridDataSource = new GridDataSource();
+
+ constructor(
+ private router: Router,
+ private pcrud: PcrudService
+ ) {}
+
+ ngOnInit() {
+
+ this.gridSource.getRows = (pager: Pager, sort: any[]) => {
+ return this.fetchAccounts(pager, sort);
+ }
+ }
+
+ fetchAccounts(pager: Pager, sort: any[]): Observable<any> {
+
+ const orderBy: any = {sisacc: 'sip_username'};
+ if (sort.length) {
+ orderBy.sisacc = sort[0].name + ' ' + sort[0].dir;
+ }
+
+ return this.pcrud.retrieveAll('sipacc', {
+ offset: pager.offset,
+ limit: pager.limit,
+ order_by: orderBy,
+ flesh: 1,
+ flesh_fields: {sipacc: ['usr', 'setting_group', 'workstation']}
+ });
+ }
+
+ openAccount(row: any) {
+ this.router.navigate([`/staff/admin/server/sip/account/${row.id()}`]);
+ }
+}
+
--- /dev/null
+
+<b>account</b>
--- /dev/null
+import {Component, Input, ViewChild, OnInit} from '@angular/core';
+import {IdlService, IdlObject} from '@eg/core/idl.service';
+import {OrgService} from '@eg/core/org.service';
+import {AuthService} from '@eg/core/auth.service';
+import {PcrudService} from '@eg/core/pcrud.service';
+import {ToastService} from '@eg/share/toast/toast.service';
+import {StringComponent} from '@eg/share/string/string.component';
+import {StringService} from '@eg/share/string/string.service';
+import {ConfirmDialogComponent} from '@eg/share/dialog/confirm.component';
+import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
+import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
+
+@Component({
+ templateUrl: './account.component.html'
+})
+export class SipAccountComponent implements OnInit {
+
+ ngOnInit() {
+ }
+}
+
--- /dev/null
+import {NgModule} from '@angular/core';
+import {AdminCommonModule} from '@eg/staff/admin/common.module';
+import {SipAccountRoutingModule} from './routing.module';
+import {SipAccountListComponent} from './account-list.component';
+import {SipAccountComponent} from './account.component';
+
+@NgModule({
+ declarations: [
+ SipAccountComponent,
+ SipAccountListComponent
+ ],
+ imports: [
+ AdminCommonModule,
+ SipAccountRoutingModule
+ ],
+ exports: [
+ ],
+ providers: [
+ ]
+})
+
+export class SipAccountModule {
+}
+
+
--- /dev/null
+import {NgModule} from '@angular/core';
+import {RouterModule, Routes} from '@angular/router';
+import {SipAccountListComponent} from './account-list.component';
+import {SipAccountComponent} from './account.component';
+
+const routes: Routes = [{
+ path: '',
+ component: SipAccountListComponent
+}, {
+ path: ':id',
+ component: SipAccountComponent
+}];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+
+export class SipAccountRoutingModule {}
+