LP1901930 SIP account admin UI WIP
authorBill Erickson <berickxx@gmail.com>
Thu, 12 Nov 2020 16:20:16 +0000 (11:20 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 12 Nov 2020 16:20:16 +0000 (11:20 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/admin/server/sip/account-list.component.ts
Open-ILS/src/eg2/src/app/staff/admin/server/sip/account.component.ts

index adea861..3141158 100644 (file)
@@ -27,7 +27,6 @@ export class SipAccountListComponent implements OnInit {
     ) {}
 
     ngOnInit() {
-
         this.gridSource.getRows = (pager: Pager, sort: any[]) => {
             return this.fetchAccounts(pager, sort);
         }
index 32584d4..d372adc 100644 (file)
@@ -38,13 +38,16 @@ export class SipAccountComponent implements OnInit {
         });
 
         this.usrCboxSource = term => {
-            return this.pcrud.search('au',
-                {   '-or': [
-                        {id: this.account.usr().id()},
-                        {usrname: {'ilike': `%${term}%`}}
-                    ],
-                },
-                {order_by: {au: 'usrname'}}
+            return this.pcrud.search('au', {
+                deleted: 'f', active: 't',
+                '-or': [
+                    {id: this.account.usr().id()},
+                    {usrname: {'ilike': `%${term}%`}}
+                ],
+            }, {
+                order_by: {au: 'usrname'},
+                limit: 50 // Avoid huge lists
+            }
             ).pipe(map(user => {
                 return {id: user.id(), label: user.usrname()};
             }));