1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6981],{23456:(j,v,c)=>{c.d(v,{D:()=>y});var m=c(73308),s=c(23279),l=c(77897),_=c(56610);function h(u,U){if(1&u&&s.nrm(0,"ion-icon",3),2&u){const r=s.XpG().$implicit;s.FS9("name",r.icon)}}function p(u,U){if(1&u){const r=s.RV6();s.j41(0,"ion-item",1),s.bIt("click",function(){const g=s.eBV(r).$implicit,F=s.XpG();return s.Njj(F.action(g.action))}),s.DNE(1,h,1,1,"ion-icon",2),s.j41(2,"ion-label"),s.EFF(3),s.k0s()()}if(2&u){const r=U.$implicit;s.Y8G("detail",r.show_detail),s.R7$(),s.Y8G("ngIf",r.icon),s.R7$(2),s.SpI(" ",r.name," ")}}let y=(()=>{class u{popoverController;params;options=[];constructor(r){this.popoverController=r}ngOnInit(){for(let r=0;r<this.params.options.length;r++)null==this.params.options[r].show_detail&&(this.params.options[r].show_detail=!0);this.options=this.params.options}ngOnDestroy(){}action(r){var t=this;return(0,m.A)(function*(){yield t.popoverController.dismiss({action:r})})()}dismissPopup(){var r=this;return(0,m.A)(function*(){yield r.popoverController.dismiss()})()}static \u0275fac=function(t){return new(t||u)(s.rXU(l.IE))};static \u0275cmp=s.VBU({type:u,selectors:[["generic-options"]],inputs:{params:"params"},decls:2,vars:1,consts:[["button","","lines","none",3,"detail","click",4,"ngFor","ngForOf"],["button","","lines","none",3,"click","detail"],["slot","start",3,"name",4,"ngIf"],["slot","start",3,"name"]],template:function(t,g){1&t&&(s.j41(0,"ion-list"),s.DNE(1,p,4,3,"ion-item",0),s.k0s()),2&t&&(s.R7$(),s.Y8G("ngForOf",g.options))},dependencies:[_.Sq,_.bT,l.iq,l.uz,l.he,l.nf],styles:["ion-icon[_ngcontent-%COMP%]{font-size:16px;margin-inline-end:10px}"]})}return u})()},26981:(j,v,c)=>{c.r(v),c.d(v,{UsersPageModule:()=>k});var m=c(56610),s=c(88832),l=c(77897),_=c(37058),h=c(60564),p=c(73308),y=c(5060),u=c(3871),U=c(23456),r=c(52484),t=c(23279),g=c(23700);function F(a,E){if(1&a){const n=t.RV6();t.j41(0,"ion-button",9),t.bIt("click",function(){t.eBV(n);const o=t.XpG();return t.Njj(o.addEditUser())}),t.EFF(1,"Add New User to Account"),t.k0s()}}function O(a,E){if(1&a){const n=t.RV6();t.j41(0,"ion-button",9),t.bIt("click",function(){t.eBV(n);const o=t.XpG();return t.Njj(o.addEditUser())}),t.EFF(1,"Invite New User"),t.k0s()}}function T(a,E){if(1&a){const n=t.RV6();t.j41(0,"tr")(1,"td"),t.EFF(2),t.k0s(),t.j41(3,"td"),t.EFF(4),t.k0s(),t.j41(5,"td",10),t.EFF(6),t.nI1(7,"date"),t.k0s(),t.j41(8,"td"),t.EFF(9),t.k0s(),t.j41(10,"td")(11,"ion-button",11),t.bIt("click",function(o){const d=t.eBV(n).$implicit,i=t.XpG();return t.Njj(i.showUserOptions(o,d))}),t.EFF(12,"Options"),t.nrm(13,"ion-icon",12),t.k0s()()()}if(2&a){const n=E.$implicit;t.R7$(2),t.JRh(n.nickname),t.R7$(2),t.JRh(n.username),t.R7$(2),t.JRh(t.i5U(7,4,1e3*n.date,"d MMM yyyy @ h:mm a")),t.R7$(3),t.JRh(n.status)}}const D=[{path:"",component:(()=>{class a{api;session;common;popoverController;modalController;alertController;router;dtElement;dtOptions={};account_user=!1;event_id;current_user_id;account_id;users=[];constructor(n,e,o,d,i,f,G){this.api=n,this.session=e,this.common=o,this.popoverController=d,this.modalController=i,this.alertController=f,this.router=G,this.current_user_id=this.session.getCurrentUser().user_id;let C=this.router.parseUrl(this.router.url).root.children.primary.segments[1].path;typeof C>"u"||"users"===C?this.account_user=!0:this.event_id=C}ngOnInit(){var n=this;return(0,p.A)(function*(){var e;n.dtOptions={pagingType:"full_numbers",pageLength:100,lengthChange:!1,ordering:!1,orderMulti:!1,searching:!1,serverSide:!0,processing:!0,ajax:(e=(0,p.A)(function*(o,d){let i={};i=n.account_user?yield n.api.getAccountUsers():yield n.api.getEventUsers(n.event_id),n.users=i.users,typeof i.recordsTotal>"u"&&(i.recordsTotal=n.users.length),typeof i.recordsFiltered>"u"&&(i.recordsFiltered=n.users.length),d({recordsTotal:i.recordsTotal,recordsFiltered:i.recordsFiltered,data:[]})}),function(d,i){return e.apply(this,arguments)}),order:[[1,"desc"]]}})()}loadUserList(){var n=this;return(0,p.A)(function*(){n.dtElement.dtInstance.then(e=>{e.ajax.reload()})})()}showUserOptions(n,e){var o=this;return(0,p.A)(function*(){let d=[];d.options=[{name:"Edit User Details",action:"edit"}],e.user_id!=o.current_user_id&&d.options.push({name:"Delete User",action:"delete"});const i=yield o.popoverController.create({component:U.D,componentProps:{params:d},cssClass:"popover",translucent:!0,event:n});yield i.present();const{data:f}=yield i.onDidDismiss();typeof f<"u"&&""!=f.action&&("edit"==f.action?o.addEditUser(e):"delete"==f.action&&o.deleteUser(e))})()}deleteUser(n){var e=this;return(0,p.A)(function*(){const o=yield e.alertController.create({header:"Delete User",message:'Are you sure you want to remove the user "'+n.nickname+'"?',buttons:[{text:"Cancel",role:"cancel"},{text:"Yes, Continue",role:"continue"}]});yield o.present();const{role:d}=yield o.onDidDismiss();if("continue"==d){let i={};
1i=e.account_user?yield e.api.deleteUser(n.user_id):yield e.api.deleteEventUser(e.event_id,n.event_user_id),"success"==i.status?e.loadUserList():e.common.showNotice(i.reason,"warning","top")}})()}addEditUser(n){var e=this;return(0,p.A)(function*(){const o={};o.user=n,o.account_user=e.account_user,o.require_password_set=!0,e.account_user||(o.event_id=e.event_id);const d=yield e.modalController.create({component:r.i,componentProps:{params:o}});yield d.present(),d.onDidDismiss().then(i=>{typeof i.data<"u"&&!0===i.data&&e.loadUserList()})})()}static \u0275fac=function(e){return new(e||a)(t.rXU(y.G),t.rXU(g.Q),t.rXU(u.h),t.rXU(l.IE),t.rXU(l.W3),t.rXU(l.hG),t.rXU(h.Ix))};static \u0275cmp=t.VBU({type:a,selectors:[["app-users"]],viewQuery:function(e,o){if(1&e&&t.GBs(_._,5),2&e){let d;t.mGM(d=t.lsd())&&(o.dtElement=d.first)}},decls:27,vars:4,consts:[[1,"content-page"],[1,"ion-no-border","subheader"],["slot","start"],["slot","end",1,"end-buttons"],["fill","solid","color","primary",3,"click",4,"ngIf"],[1,"panel"],[1,"panel-content"],["datatable","",1,"hover","stripe",3,"dtOptions"],[4,"ngFor","ngForOf"],["fill","solid","color","primary",3,"click"],[2,"white-space","nowrap"],["size","xsmall","color","light",3,"click"],["slot","end","name","chevron-down-sharp"]],template:function(e,o){1&e&&(t.j41(0,"ion-content",0)(1,"ion-header",1)(2,"ion-toolbar")(3,"ion-buttons",2),t.nrm(4,"ion-menu-button"),t.k0s(),t.j41(5,"ion-title"),t.EFF(6,"Users"),t.k0s(),t.j41(7,"ion-buttons",3),t.DNE(8,F,2,0,"ion-button",4)(9,O,2,0,"ion-button",4),t.k0s()()(),t.j41(10,"div",5)(11,"div",6)(12,"table",7)(13,"thead")(14,"tr")(15,"th"),t.EFF(16,"Nickname"),t.k0s(),t.j41(17,"th"),t.EFF(18,"Username"),t.k0s(),t.j41(19,"th"),t.EFF(20,"Date"),t.k0s(),t.j41(21,"th"),t.EFF(22,"Status"),t.k0s(),t.j41(23,"th"),t.EFF(24,"Action"),t.k0s()()(),t.j41(25,"tbody"),t.DNE(26,T,14,7,"tr",8),t.k0s()()()()()),2&e&&(t.R7$(8),t.Y8G("ngIf",o.account_user),t.R7$(),t.Y8G("ngIf",!o.account_user),t.R7$(3),t.Y8G("dtOptions",o.dtOptions),t.R7$(14),t.Y8G("ngForOf",o.users))},dependencies:[m.Sq,m.bT,l.Jm,l.QW,l.W9,l.eU,l.iq,l.MC,l.BC,l.ai,_._,m.vh]})}return a})()}];let P=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=t.$C({type:a});static \u0275inj=t.G2t({imports:[h.iI.forChild(D),h.iI]})}return a})(),k=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=t.$C({type:a});static \u0275inj=t.G2t({imports:[m.MD,s.YN,l.bv,_.H,P]})}return a})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.