1"use strict";(self.webpackChunkma_control_panel=self.webpackChunkma_control_panel||[]).push([["src_app_home_clients_clients_module_ts"],{45583:(V,D,s)=>{s.r(D),s.d(D,{ClientsModule:()=>O});var m=s(67522),d=s(96445),A=s(51448),C=s(74339),o=s(24006),c=s(78372),_=s(63900),g=s(99403),h=s(80710),t=s(41571),b=s(55084),w=s(45067),I=s(24644),Z=s(2176),f=s(36895),E=s(10805),q=s(77604),M=s(51740),T=s(60099),L=s(35593),y=s(91795),S=s(21493),F=s(82210),N=s(63054);const k=["dv"];function K(i,n){if(1&i&&(t.TgZ(0,"div",16)(1,"span",17),t._UZ(2,"i",18),t.TgZ(3,"form",19),t._UZ(4,"input",20),t.qZA()(),t._UZ(5,"p-dataViewLayoutOptions"),t.qZA()),2&i){const e=t.oxw();t.xp6(3),t.Q6J("formGroup",e.searchForm)}}function j(i,n){if(1&i&&t._UZ(0,"img",30),2&i){const e=t.oxw().$implicit;t.Q6J("src",null==e?null:e.logoUrl,t.LSH)}}function ct(i,n){1&i&&t._UZ(0,"img",31)}function ut(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"div",21),t.NdJ("click",function(){const r=t.CHM(e).$implicit,p=t.oxw();return t.KtG(p.navigateToClient(r))}),t.TgZ(1,"div",22),t.YNc(2,j,1,1,"img",23),t.YNc(3,ct,1,0,"img",24),t.TgZ(4,"div",25)(5,"div",26),t._uU(6),t.qZA(),t.TgZ(7,"div",27)(8,"div"),t._uU(9),t.qZA(),t.TgZ(10,"div"),t._uU(11),t.qZA()()(),t.TgZ(12,"div",28)(13,"span",29),t._uU(14),t.qZA()()()()}if(2&i){const e=n.$implicit,a=t.oxw();t.xp6(2),t.Q6J("ngIf",null==e?null:e.logoUrl),t.xp6(1),t.Q6J("ngIf",!(null!=e&&e.logoUrl)),t.xp6(3),t.Oqu(null==e?null:e.name),t.xp6(3),t.AsE("",null==e?null:e.street,", ",null==e?null:e.city,""),t.xp6(2),t.lnq(" ",null==e||null==e.state?null:e.state.name,", ",null==e||null==e.country?null:e.country.name," - ",null==e?null:e.zipcode," "),t.xp6(2),t.ekj("status-green",e.status===a.statuses.ACTIVE)("status-red",e.status===a.statuses.INACTIVE),t.xp6(1),t.hij(" ",e.status,"")}}function dt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"div",40)(1,"button",41),t.NdJ("click",function(){t.CHM(e);const l=t.oxw().$implicit,r=t.oxw();return t.KtG(r.toggleLockList(l))}),t.qZA()()}}function gt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"div",32)(1,"div",33),t.YNc(2,dt,2,0,"div",34),t.TgZ(3,"div",35),t.NdJ("click",function(){const r=t.CHM(e).$implicit,p=t.oxw();return t.KtG(p.navigateToClient(r))}),t.TgZ(4,"div",36),t._UZ(5,"img",37),t.qZA(),t.TgZ(6,"div",38),t._uU(7),t.qZA(),t.TgZ(8,"div",39)(9,"div"),t._uU(10),t.qZA(),t.TgZ(11,"div"),t._uU(12),t.qZA()()()()()}if(2&i){const e=n.$implicit,a=t.oxw();t.Q6J("title",null==e?null:e.name),t.xp6(2),t.Q6J("ngIf",a.isSuperAdmin),t.xp6(3),t.Q6J("src",e.logoUrl?e.logoUrl:"../../../assets/layout/images/ma-images/clientLogoDefault.svg",t.LSH),t.xp6(2),t.Oqu(null==e?null:e.name),t.xp6(3),t.AsE("",null==e?null:e.street,", ",null==e?null:e.city,""),t.xp6(2),t.lnq(" ",null==e||null==e.state?null:e.state.name,", ",null==e||null==e.country?null:e.country.name," - ",null==e?null:e.zipcode," ")}}function _t(i,n){1&i&&(t.TgZ(0,"tr")(1,"td",42),t._uU(2,"Please wait, data is being loaded..."),t.qZA()())}function mt(i,n){1&i&&(t.TgZ(0,"tr")(1,"td",42),t._uU(2,"No records found."),t.qZA()())}function ft(i,n){if(1&i&&(t.YNc(0,_t,3,0,"tr",15),t.YNc(1,mt,3,0,"tr",15)),2&i){const e=t.oxw();t.Q6J("ngIf",e.dataLoader),t.xp6(1),t.Q6J("ngIf",0===e.totalElements)}}function ht(i,n){1&i&&(t.TgZ(0,"tr")(1,"th",53)(2,"div",54),t._uU(3,"App Type"),t.qZA()(),t.TgZ(4,"th",55)(5,"div",54),t._uU(6,"Lock Level"),t.qZA()(),t.TgZ(7,"th",56)(8,"div",54),t._uU(9,"Remarks"),t.qZA()(),t.TgZ(10,"th",55)(11,"div",54),t._uU(12,"Created"),t.qZA()(),t.TgZ(13,"th",57)(14,"div",54),t._uU(15,"Status"),t.qZA()(),t.TgZ(16,"th",58),t._UZ(17,"div"),t.qZA()())}function Ct(i,n){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",null==e||null==e.audit||null==e.audit.createdBy?null:e.audit.createdBy.name," ")}}function Tt(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"System"),t.qZA())}function At(i,n){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit,a=t.oxw(2);t.xp6(1),t.hij(" at ",a.dateUtil.utcToDateFormatted(null==e||null==e.audit?null:e.audit.createdDate)," ")}}function vt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",69),t.NdJ("click",function(){t.CHM(e);const l=t.oxw().$implicit,r=t.oxw(2);return t.KtG(r.openUnlockAppClient(l))}),t.qZA()}if(2&i){const e=t.oxw(3);t.Q6J("ngClass",e.isDesktopView?"pi pi-lock-open":"")("label",e.isDesktopView?"":"Unlock")}}const Zt=function(){return{marginLeft:"36%"}},xt=function(){return{}};
1function Dt(i,n){if(1&i&&(t.TgZ(0,"tr")(1,"td",59)(2,"span",60),t._uU(3,"App Type"),t.qZA(),t.TgZ(4,"div",61),t._uU(5),t.qZA()(),t.TgZ(6,"td",62)(7,"span",60),t._uU(8,"Lock Level"),t.qZA(),t.TgZ(9,"div",63),t._uU(10),t.qZA()(),t.TgZ(11,"td",64)(12,"span",60),t._uU(13,"Remarks"),t.qZA(),t.TgZ(14,"div",61),t._uU(15),t.qZA()(),t.TgZ(16,"td",65)(17,"span",60),t._uU(18,"Created Date"),t.qZA(),t.TgZ(19,"div",61),t._uU(20," By "),t.YNc(21,Ct,2,1,"span",15),t.YNc(22,Tt,2,0,"span",15),t.YNc(23,At,2,1,"span",15),t.qZA()(),t.TgZ(24,"td",66)(25,"span",60),t._uU(26,"Status"),t.qZA(),t.TgZ(27,"span",29),t._uU(28),t.qZA()(),t.TgZ(29,"td",58)(30,"div",67),t.YNc(31,vt,1,2,"button",68),t.qZA()()()),2&i){const e=n.$implicit,a=t.oxw(2);t.xp6(5),t.Oqu(a.appType[null==e?null:e.appType]),t.xp6(4),t.ekj("status-yellow","WARNING"==e.lockLevel)("status-red","ERROR"==e.lockLevel),t.xp6(1),t.hij(" ",null==e?null:e.lockLevel," "),t.xp6(5),t.Oqu(null==e?null:e.lockRemarks),t.xp6(6),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.createdBy),t.xp6(1),t.Q6J("ngIf",!(null!=e&&null!=e.audit&&e.audit.createdBy)),t.xp6(1),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.createdDate),t.xp6(4),t.ekj("status-green",e.isActive)("status-red",!e.isActive),t.xp6(1),t.hij(" ",e.isActive?a.statuses.ACTIVE:a.statuses.INACTIVE,""),t.xp6(2),t.Q6J("ngStyle",a.isDesktopView?t.DdM(18,xt):t.DdM(17,Zt)),t.xp6(1),t.Q6J("ngIf",null==e?null:e.isActive)}}function bt(i,n){1&i&&(t.TgZ(0,"tr")(1,"td",70),t._uU(2,"No records found."),t.qZA()())}function wt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"header")(1,"div",43)(2,"h5",44),t._uU(3,"App Locks"),t.qZA(),t.TgZ(4,"div",45)(5,"div",46)(6,"button",47),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.addClientAppLock())}),t.qZA()()()()(),t.TgZ(7,"td",48)(8,"div",49)(9,"p-table",50),t.NdJ("onLazyLoad",function(l){t.CHM(e);const r=t.oxw();return t.KtG(r.loadAppLockData(l))}),t.YNc(10,ht,18,0,"ng-template",4),t.YNc(11,Dt,32,19,"ng-template",51),t.YNc(12,bt,3,0,"ng-template",52),t.qZA()()()}if(2&i){const e=t.oxw();
1t.xp6(9),t.Q6J("value",e.appLock)("paginator",!0)("rows",e.clientAppLockPageSize)("rowHover",!0)("lazy",!0)("totalRecords",e.clientAppLockTotalElements)("alwaysShowPaginator",e.clientAppLockAlwaysShowPaginator)("showCurrentPageReport",!0)("rowsPerPageOptions",e.constants.PAGE_SIZES)("loading",e.clientAppLockDataLoader)}}function yt(i,n){1&i&&(t.TgZ(0,"small",72),t._uU(1," App Type is required."),t.qZA())}function Lt(i,n){1&i&&(t.TgZ(0,"small",72),t._uU(1," Lock Level is required."),t.qZA())}function Mt(i,n){if(1&i&&(t.TgZ(0,"form",19)(1,"div",71)(2,"label"),t._uU(3,"App Type"),t.TgZ(4,"span",72),t._uU(5,"*"),t.qZA()(),t._UZ(6,"p-dropdown",73),t.YNc(7,yt,2,0,"small",74),t.qZA(),t.TgZ(8,"div",71)(9,"label"),t._uU(10,"Lock Level"),t.TgZ(11,"span",72),t._uU(12,"*"),t.qZA()(),t._UZ(13,"p-dropdown",75),t.YNc(14,Lt,2,0,"small",74),t.qZA(),t.TgZ(15,"div",71)(16,"label"),t._uU(17,"Remarks"),t.qZA(),t.TgZ(18,"textarea",76),t._uU(19," "),t.qZA()()()),2&i){const e=t.oxw();let a,l,r,p;t.Q6J("formGroup",e.appLockClientForm),t.xp6(6),t.ekj("ng-dirty",e.appLockClientForm.get("appType").invalid&&(null==(a=e.appLockClientForm.get("appType"))?null:a.touched)),t.Q6J("options",e.appTypeDetails)("autoDisplayFirst",!1)("appendTo","body"),t.xp6(1),t.Q6J("ngIf",e.appLockClientForm.get("appType").hasError("required")&&(null==(l=e.appLockClientForm.get("appType"))?null:l.touched)),t.xp6(6),t.ekj("ng-dirty",e.appLockClientForm.get("lockLevel").invalid&&(null==(r=e.appLockClientForm.get("lockLevel"))?null:r.touched)),t.Q6J("options",e.lockLevelDetails)("autoDisplayFirst",!1)("appendTo","body"),t.xp6(1),t.Q6J("ngIf",e.appLockClientForm.get("lockLevel").hasError("required")&&(null==(p=e.appLockClientForm.get("lockLevel"))?null:p.touched))}}function kt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",77),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.hideAppLockDialog())}),t.qZA(),t.TgZ(1,"button",78),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.saveAppLockClientDetails())}),t.qZA()}if(2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("loading",e.showBtnLoader)("disabled",e.appLockClientForm.invalid)}}function Ut(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"Are you sure you want to unlock this app?"),t.qZA())}function It(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",79),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.closeAppClientUnlockDialog())}),t.qZA(),t.TgZ(1,"button",80),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.unlockAppClient())}),t.qZA()}}class P{constructor(n,e,a,l,r,p){this.clientsService=n,this.router=e,this.appHome=a,this.authorizationService=l,this.formBuilder=r,this.appAlertService=p,this.statuses=d.V,this.page=0,this.pageSize=20,this.searchTerm="",this.constants=A.g,this.dataLoader=!1,this.ShowLocks=!1,this.clientAppLockPage=0,this.clientAppLockPageSize=20,this.clientAppLockDataLoader=!1,this.appType=g.t1,this.lockLevel=g.DD,this.dateUtil=h.E,this.isDesktopView=!0,this.addClientAppLockDialog=!1,this.appTypeDetails=g.zz,this.lockLevelDetails=g.JK,this.showBtnLoader=!1}ngOnInit(){this.isSuperAdmin=this.authorizationService.hasGlobalRole(C.P.SUPER_ADMIN),this.checkScreenSize(),window.addEventListener("resize",()=>{this.checkScreenSize()}),this.clientsService.changeClientIdSub(null),this.clientsService.changeClientSub(null),this.searchForm=this.formBuilder.group({searchInput:new o.p4("")}),this.handleSearch(),this.appLockClientForm=this.formBuilder.group({appType:new o.p4("",[o.kI.required]),lockLevel:new o.p4("",[o.kI.required]),lockRemarks:new o.p4("")})}checkScreenSize(){this.isDesktopView=window.innerWidth>=768}getPaginatedData(n,e,a){this.dataLoader=!0,this.clientsService.getClients("",n,e,a,"","ACTIVE",[],"","","createdDate,DESC").subscribe(l=>{this.handleResponse(l)},()=>{this.dataLoader=!1})}handleResponse(n){this.clients=n.list,this.totalElements=n.totalElements,this.alwaysShowPaginator=!!this.totalElements,this.dataLoader=!1}handleSearch(){this.searchForm.get("searchInput").valueChanges.pipe((0,c.b)(300),(0,_.w)(n=>(this.dataLoader=!0,this.page=0,this.dataView.first=0,this.clientsService.getClients("",this.page,this.pageSize,n,"","ACTIVE",[],"","","createdDate,DESC")))).subscribe(n=>{this.handleResponse(n)},()=>{this.dataLoader=!1})}loadData(n){this.page=(n.first+n.rows)/n.rows-1,this.pageSize=n.rows,this.getPaginatedData(this.page,this.pageSize,this.searchTerm)}navigateToClient(n){this.appHome.onNavigateToClient(11),this.router.navigateByUrl(`${n.clientId}`)}toggleLockList(n){this.clientId=n.clientId,this.ShowLocks=!0}hideLockDialog(){this.ShowLocks=!1}loadAppLockData(n){this.clientAppLockPage=(n.first+n.rows)/n.rows-1,this.clientAppLockPageSize=n.rows,this.getPaginatedAppLockData()}getPaginatedAppLockData(){this.appLock=[],this.clientAppLockDataLoader=!0,this.clientsService.getClientAppLock("",this.clientAppLockPage,this.clientAppLockPageSize,"isActive,DESC",this.clientId).subscribe(n=>{this.appLock=n.list,this.clientAppLockTotalElements=n.totalElements,this.clientAppLockAlwaysShowPaginator=!!this.clientAppLockTotalElements,this.clientAppLockDataLoader=!1},()=>{this.clientAppLockDataLoader=!1})}addClientAppLock(){this.addClientAppLockDialog=!0}hideAppLockDialog(){this.appLockClientForm.reset(),this.addClientAppLockDialog=!1}saveAppLockClientDetails(){this.clientAppLockDataLoader=!0,this.clientsService.saveClientAppLockDetails(this.appLockClientForm.value,this.clientId).subscribe(()=>{this.clientAppLockDataLoader=!1,this.clientId&&this.appAlertService.showSuccessViaToast("Client is Added."),this.getPaginatedAppLockData(),this.hideAppLockDialog()},()=>{this.clientAppLockDataLoader=!1})}openUnlockAppClient(n){this.unlockClientAppLockDialog=!0,this.appLockDetails=n}closeAppClientUnlockDialog(){this.appLockDetails=null,this.unlockClientAppLockDialog=!1}unlockAppClient(){this.clientsService.unlockClient(this.clientId,this.appLockDetails?.clientAppLockId).subscribe(()=>{this.appAlertService.showSuccessViaToast("Client is unlocked"),this.unlockClientAppLockDialog=!1,this.getPaginatedAppLockData()})}}P.\u0275fac=function(n){return new(n||P)(t.Y36(b.a),t.Y36(m.F0),t.Y36(w.O),t.Y36(I.Z),t.Y36(o.QS),t.Y36(Z.T))},P.\u0275cmp=t.Xpm({type:P,selectors:[["app-clients"]],viewQuery:function(n,e){if(1&n&&t.Gf(k,5),2&n){let a;t.iGM(a=t.CRH())&&(e.dataView=a.first)}},decls:18,vars:20,consts:[[1,"col-12"],[1,"card"],["filterBy","name","layout","grid","currentPageReportTemplate","Showing {first} to {last} of {totalRecords} entries",3,"value","paginator","rows","lazy","totalRecords","rowsPerPageOptions","alwaysShowPaginator","showCurrentPageReport","loading","onLazyLoad"],["dv",""],["pTemplate","header"],["pTemplate","listItem"],["pTemplate","gridItem"],["pTemplate","empty"],[1,"p-fluid",3,"visible","styleClass","modal","visibleChange","onHide"],["pTemplate","content"],[1,"p-fluid",3,"visible","styleClass","header","modal","visibleChange","onHide"],["pTemplate","footer"],["header","Unlock Client App",3,"visible","modal","styleClass","visibleChange","onHide"],[1,"flex","align-items-center","justify-content-center"],[1,"pi","pi-exclamation-triangle","mr-3",2,"font-size","2rem"],[4,"ngIf"],[1,"grid","grid-nogutter","flex-row","justify-content-between"],[1,"p-input-icon-left","mb-2","md:mb-0"],[1,"pi","pi-search"],[3,"formGroup"],["type","search","pInputText","","placeholder","Search by Name","formControlName","searchInput",1,"pl-5"],[1,"col-12","cursor-pointer",3,"click"],[1,"flex","flex-column","md:flex-row","align-items-center","p-3","w-full"],["onerror","this.src='../../../assets/layout/images/ma-images/clientLogoDefault.svg'","class","my-4 md:my-0 w-9 md:w-6rem mr-5 client-img-list",3,"src",4,"ngIf"],["src","../../../assets/layout/images/ma-images/clientLogoDefault.svg","class","my-4 md:my-0 w-9 md:w-6rem mr-5 client-img-list",4,"ngIf"],[1,"flex-1","text-center","md:text-left"],[1,"font-bold","text-2xl"],[1,"mb-3"],[1,"flex","flex-row","md:flex-column","justify-content-between","w-full","md:w-auto","align-items-center","md:align-items-end","mt-5","md:mt-0"],[1,"product-badge"],["onerror","this.src='../../../assets/layout/images/ma-images/clientLogoDefault.svg'",1,"my-4","md:my-0","w-9","md:w-6rem","mr-5","client-img-list",3,"src"],["src","../../../assets/layout/images/ma-images/clientLogoDefault.svg",1,"my-4","md:my-0","w-9","md:w-6rem","mr-5","client-img-list"],[1,"col-12","md:col-3","cursor-pointer","elem",3,"title"],[1,"card","p-0","m-3","border-1","surface-border"],["class","ml-3 relative data-view-action flex justify-content-end gap-2",4,"ngIf"],[1,"text-center","p-4",3,"click"],[1,"img-box","my-3","mx-0"],["onerror","this.src='../../../assets/layout/images/ma-images/clientLogoDefault.svg'",3,"src"],[1,"text-2xl","font-bold","client-address-list"],[1,"my-3","client-address-list"],[1,"ml-3","relative","data-view-action","flex","justify-content-end","gap-2"],["type","button","pButton","","icon","pi pi-lock",3,"click"],[1,"text-center"],[1,"flex","flex-row","pb-3","justify-content-between","align-items-center"],[1,"m-0","sm:align-self-center"],[1,"md:my-2","sm:m-0","flex","align-items-baseline","flex-wrap"],[1,"new-button"],["pButton","","pRipple","","label","New","icon","pi pi-plus",1,"p-button-primary",3,"click"],["colspan","10"],[1,"col-12","lock-table","p-0"],["currentPageReportTemplate","Showing {first} to {last} of {totalRecords} entries","styleClass","p-datatable-gridlines","responsiveLayout","stack",3,"value","paginator","rows","rowHover","lazy","totalRecords","alwaysShowPaginator","showCurrentPageReport","rowsPerPageOptions","loading","onLazyLoad"],["pTemplate","body"],["pTemplate","emptymessage"],[2,"width","250px"],[1,"flex","justify-content-between","align-items-center"],[2,"width","300px"],[2,"width","800px"],[2,"width","80px"],[2,"width","40px"],[1,"locks-body",2,"width","250px"],[1,"p-column-title"],[1,"word-break"],[1,"locks-body",2,"width","300px"],[1,"word-break","product-badge","text-center"],[1,"locks-body",2,"width","800px"],[1,"locks-body",2,"width","400px"],[1,"locks-body",2,"width","80px"],[1,"flex","justify-content-center","align-items-center","relative",3,"ngStyle"],["type","button","pButton","",3,"ngClass","label","click",4,"ngIf"],["type","button","pButton","",3,"ngClass","label","click"],["colspan","6",1,"text-center"],[1,"field"],[1,"p-error"],["optionLabel","label","optionValue","value","formControlName","appType",3,"options","autoDisplayFirst","appendTo"],["class","p-error",4,"ngIf"],["o
1ptionLabel","label","optionValue","value","formControlName","lockLevel",3,"options","autoDisplayFirst","appendTo"],["rows","5","cols","1","pInputTextarea","","formControlName","lockRemarks",1,"w-full","text-field"],["pButton","","pRipple","","label","Cancel","icon","pi pi-times",1,"p-button-danger",3,"click"],["pButton","","pRipple","","label","Save","icon","pi pi-check",1,"p-button-success",3,"loading","disabled","click"],["pButton","","pRipple","","icon","pi pi-times","label","No",1,"p-button-text",3,"click"],["pButton","","pRipple","","icon","pi pi-check","label","Yes",1,"p-button-text",3,"click"]],template:function(n,e){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"p-dataView",2,3),t.NdJ("onLazyLoad",function(l){return e.loadData(l)}),t.YNc(4,K,6,1,"ng-template",4),t.YNc(5,ut,15,13,"ng-template",5),t.YNc(6,gt,13,9,"ng-template",6),t.YNc(7,ft,2,2,"ng-template",7),t.qZA()()(),t.TgZ(8,"p-dialog",8),t.NdJ("visibleChange",function(l){return e.ShowLocks=l})("onHide",function(){return e.hideLockDialog()}),t.YNc(9,wt,13,10,"ng-template",9),t.qZA(),t.TgZ(10,"p-dialog",10),t.NdJ("visibleChange",function(l){return e.addClientAppLockDialog=l})("onHide",function(){return e.hideAppLockDialog()}),t.YNc(11,Mt,20,13,"ng-template",9),t.YNc(12,kt,2,2,"ng-template",11),t.qZA(),t.TgZ(13,"p-dialog",12),t.NdJ("visibleChange",function(l){return e.unlockClientAppLockDialog=l})("onHide",function(){return e.closeAppClientUnlockDialog()}),t.TgZ(14,"div",13),t._UZ(15,"i",14),t.YNc(16,Ut,2,0,"span",15),t.qZA(),t.YNc(17,It,2,0,"ng-template",11),t.qZA()),2&n&&(t.xp6(2),t.Q6J("value",e.clients)("paginator",!0)("rows",e.pageSize)("lazy",!0)("totalRecords",e.totalElements)("rowsPerPageOptions",e.constants.PAGE_SIZES)("alwaysShowPaginator",e.alwaysShowPaginator)("showCurrentPageReport",!0)("loading",e.dataLoader),t.xp6(6),t.Q6J("visible",e.ShowLocks)("styleClass","mac-dialog-sm show-locks-dialog")("modal",!0),t.xp6(2),t.Q6J("visible",e.addClientAppLockDialog)("styleClass","mac-dialog-sm")("header","Add App Lock")("modal",!0),t.xp6(3),t.Q6J("visible",e.unlockClientAppLockDialog)("modal",!0)("styleClass","mac-dialog-sm"),t.xp6(3),t.Q6J("ngIf",e.clients))},dependencies:[f.mk,f.O5,f.PC,o._Y,o.Fj,o.JJ,o.JL,E.jx,q.VO,q.uE,M.o,T.iA,L.Hq,y.H,S.V,o.sg,o.u,F.Lt,N.g],styles:[".elem[_ngcontent-%COMP%]{max-width:323px}.img-box[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:150px}.img-box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:80%;max-height:100%}.client-address-list[_ngcontent-%COMP%]{word-break:break-word;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@media screen and (max-width: 960px){.locks-body[_ngcontent-%COMP%] .p-column-title[_ngcontent-%COMP%]{min-width:35%!important;margin-right:5px}.locks-body[_ngcontent-%COMP%]{padding-bottom:0!important}}"]});var W=s(56957),Et=s(83602),qt=s(38433),Y=s(31158),X=s(39646),nt=s(11863),U=s(17489),Nt=s(89748),St=s(48817),it=s(13388),Ft=s(78235),lt=s(65722),$=s(70585),tt=s(78676),et=s(21327);const Ot=["dt"],Pt=["dt1"],Rt=["fileUpload"],Jt=["columnfilter"],Bt=["timezoneFilter"],Vt=["statusFilter"];function Yt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"div",17)(1,"h5",18),t._uU(2,"Manage Clients"),t.qZA(),t.TgZ(3,"div",19)(4,"button",20),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.addNewClient())}),t.qZA()()()}}function Qt(i,n){if(1&i&&(t.TgZ(0,"div",48)(1,"span",49),t._uU(2),t.qZA()()),2&i){const e=n.$implicit;t.xp6(2),t.Oqu(e.name)}}function Ht(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"p-multiSelect",46),t.NdJ("onChange",function(l){const p=t.CHM(e).filterCallback;return t.KtG(p(l.value))}),t.YNc(1,Qt,3,1,"ng-template",47),t.qZA()}if(2&i){const e=n.$implicit,a=t.oxw(2);t.Q6J("ngModel",e)("options",a.distinctTimezones)("optionLabel","name")}}function Gt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"label",50),t._uU(1,"Select Date Range (From Date - To Date)"),t.qZA(),t.TgZ(2,"p-calendar",51),t.NdJ("ngModelChange",function(l){t.CHM(e);const r=t.oxw(2);return t.KtG(r.rangeDates=l)})("onSelect",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.selectedDates(l.rangeDates))}),t.qZA(),t.TgZ(3,"div",52)(4,"button",53),t.NdJ("click",function(){const r=t.CHM(e).filterCallback;return t.oxw(2).clearCreatedTimeFilter(),t.KtG(r())}
1),t.qZA(),t.TgZ(5,"button",54),t.NdJ("click",function(l){const p=t.CHM(e).filterCallback,v=t.oxw(2);return p(l),t.KtG(v.hideColumnFilterOverlay())}),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(2),t.Q6J("inline",!0)("ngModel",e.rangeDates)("readonlyInput",!0)("appendTo","body"),t.xp6(2),t.Q6J("label","Clear"),t.xp6(1),t.Q6J("label","Apply")("disabled",!e.isDateRange)}}function zt(i,n){if(1&i&&(t.TgZ(0,"span",56),t._uU(1),t.qZA()),2&i){const e=n.$implicit,a=t.oxw(3);t.ekj("status-green",e.value===a.statuses.ACTIVE)("status-red",e.value===a.statuses.INACTIVE),t.xp6(1),t.Oqu(e.label)}}function Kt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"p-dropdown",55),t.NdJ("onChange",function(l){const p=t.CHM(e).filterCallback;return t.KtG(p(l.value))}),t.YNc(1,zt,2,5,"ng-template",47),t.qZA()}if(2&i){const e=n.$implicit,a=t.oxw(2);t.Q6J("ngModel",e)("options",a.filterStatuses)}}function jt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"tr"),t._UZ(1,"th",21),t.TgZ(2,"th",22)(3,"div",23),t._uU(4,"Logo"),t.qZA()(),t.TgZ(5,"th",24)(6,"div",23)(7,"div"),t._uU(8," Name "),t._UZ(9,"p-sortIcon",25),t.qZA(),t._UZ(10,"p-columnFilter",26),t.qZA()(),t.TgZ(11,"th",27)(12,"div",23)(13,"div"),t._uU(14," Alias "),t._UZ(15,"p-sortIcon",28),t.qZA()()(),t.TgZ(16,"th",22)(17,"div",23),t._uU(18,"Address"),t.qZA()(),t.TgZ(19,"th",29)(20,"div",23)(21,"div",30),t._uU(22," Timezone "),t._UZ(23,"p-sortIcon",31),t.qZA(),t.TgZ(24,"p-columnFilter",32,33),t.YNc(26,Ht,2,3,"ng-template",34),t.qZA()()(),t.TgZ(27,"th",35)(28,"div",23)(29,"div",36),t._uU(30," Created "),t._UZ(31,"p-sortIcon",37),t.qZA(),t.TgZ(32,"p-columnFilter",38,39),t.YNc(34,Gt,6,7,"ng-template",34),t.qZA()()(),t.TgZ(35,"th",22)(36,"div",23),t._uU(37,"Last Modified"),t.qZA()(),t.TgZ(38,"th",40)(39,"div",23)(40,"div"),t._uU(41," Status "),t._UZ(42,"p-sortIcon",41),t.qZA(),t.TgZ(43,"p-columnFilter",42,43),t.YNc(45,Kt,2,2,"ng-template",34),t.qZA()()(),t.TgZ(46,"th",44)(47,"div",23)(48,"button",45),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(),r=t.MAs(4);return t.KtG(l.clear(r))}),t.qZA()()()()}2&i&&(t.xp6(10),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1),t.xp6(14),t.Q6J("showMatchModes",!1)("showOperator",!1)("showAddButton",!1),t.xp6(8),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1)("showClearButton",!1)("showApplyButton",!1)("showButtons",!1),t.xp6(11),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1))}function Wt(i,n){if(1&i&&t._UZ(0,"img",70),2&i){const e=t.oxw().$implicit;t.Q6J("src",null==e?null:e.logoUrl,t.LSH)}}function Xt(i,n){1&i&&t._UZ(0,"img",71)}function $t(i,n){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",null==e||null==e.audit||null==e.audit.createdBy?null:e.audit.createdBy.name," ")}}function te(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"System"),t.qZA())}function ee(i,n){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",null==e||null==e.audit||null==e.audit.lastModifiedBy?null:e.audit.lastModifiedBy.name," ")}}function ne(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"System"),t.qZA())}function ie(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"tr",57)(1,"td",21)(2,"div",58),t._UZ(3,"button",59),t.qZA()(),t.TgZ(4,"td",22)(5,"span",60),t._uU(6,"Image"),t.qZA(),t.TgZ(7,"div"),t.YNc(8,Wt,1,1,"img",61),t.YNc(9,Xt,1,0,"img",62),t.qZA()(),t.TgZ(10,"td",22)(11,"span",60),t._uU(12,"Name"),t.qZA(),t.TgZ(13,"div",63),t._uU(14),t.qZA()(),t.TgZ(15,"td",22)(16,"span",60),t._uU(17,"Alias"),t.qZA(),t.TgZ(18,"div",63),t._uU(19),t.qZA()(),t.TgZ(20,"td",22)(21,"span",60),t._uU(22,"Address"),t.qZA(),t.TgZ(23,"div",63),t._uU(24),t.qZA()(),t.TgZ(25,"td",22)(26,"span",60),t._uU(27,"Time Zone"),t.qZA(),t.TgZ(28,"div",63),t._uU(29),t.qZA()(),t.TgZ(30,"td",22)(31,"span",60),t._uU(32,"Created"),t.qZA(),t.TgZ(33,"div"),t._uU(34," By "),t.YNc(35,$t,2,1,"span",15),t.YNc(36,te,2,0,"span",15),t.TgZ(37,"div"),t._uU(38),t.qZA()()(),t.TgZ(39,"td",22)(40,"span",60),t._uU(41,"Last Modified"),t.qZA(),t.TgZ(42,"div"),t._uU(43," By "),t.YNc(44,ee,2,1,"span",15),t.YNc(45,ne,2,0,"span",15),t.TgZ(46,"div"),t._uU(47),t.qZA()()(),t.TgZ(48,"td",22)(49,"span",60),t._uU(50,"Status"),t.qZA(),t.TgZ(51,"span",64),t._uU(52),t.qZA()(),t.TgZ(53,"td",65)(54,"div",66)(55,"button",67),t.NdJ("click",function(l){const p=t.CHM(e).$implicit,v=t.MAs(57),x=t.oxw();return v.toggle(l),t.KtG(x.toggleMenu(p))}),t.qZA(),t._UZ(56,"p-menu",68,69),t.qZA()()()}if(2&i){const e=n.$implicit,a=n.expanded,l=n.rowIndex,r=t.oxw();t.Q6J("pReorderableRow",l),t.xp6(3),t.Q6J("pRowToggler",e)("icon",a?"pi pi-chevron-down":"pi pi-chevron-right"),t.xp6(5),t.Q6J("ngIf",e.logoUrl),t.xp6(1),t.Q6J("ngIf",!(null!=e&&e.logoUrl)),t.xp6(5),t.Oqu(null==e?null:e.name),t.xp6(5),t.Oqu(null==e?null:e.alias),t.xp6(5),t.xDo(" ",null==e?null:e.street,", ",null==e?null:e.city,", ",null==e||null==e.state?null:e.state.name,", ",null==e||null==e.country?null:e.country.name,". ",null==e?null:e.zipcode," "),t.xp6(5),t.Oqu(null==e?null:e.timeZone),t.xp6(6),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.createdBy),t.xp6(1),t.Q6J("ngIf",!(null!=e&&null!=e.audit&&e.audit.createdBy)),t.xp6(2),t.hij("at ",r.dateUtil.utcToDateFormatted(null==e||null==e.audit?null:e.audit.createdDate),""),t.xp6(6),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.lastModifiedBy),t.xp6(1),t.Q6J("ngIf",!(null!=e&&null!=e.audit&&e.audit.lastModifiedBy)),t.xp6(2),t.hij("at ",r.dateUtil.utcToDateFormatted(null==e||null==e.audit?null:e.audit.lastModifiedDate),""),t.xp6(4),t.ekj("status-green",e.status===r.statuses.ACTIVE)("status-red",e.status===r.statuses.INACTIVE)("status-yellow",e.status===r.statuses.PENDING_APPROVAL),t.xp6(1),t.hij(" ",e.status===r.statuses.PENDING_APPROVAL?r.PENDING_APPROVAL:e.status,""),t.xp6(4),t.Q6J("appendTo","body")("popup",!0)("model",r.menuItems)}}
1function le(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"div",76)(1,"h5",77),t._uU(2,"Locks"),t.qZA(),t.TgZ(3,"div",78)(4,"div",79)(5,"button",80),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.addClientAppLock())}),t.qZA()()()()}}function ae(i,n){1&i&&(t.TgZ(0,"tr")(1,"th",22)(2,"div",23),t._uU(3,"App Type"),t.qZA()(),t.TgZ(4,"th",81)(5,"div",23),t._uU(6,"Lock Level"),t.qZA()(),t.TgZ(7,"th",82)(8,"div",23),t._uU(9,"Remarks"),t.qZA()(),t.TgZ(10,"th",83)(11,"div",23),t._uU(12,"Created"),t.qZA()(),t.TgZ(13,"th",84)(14,"div",23),t._uU(15,"Status"),t.qZA()(),t.TgZ(16,"th",85),t._UZ(17,"div"),t.qZA()())}function oe(i,n){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",null==e||null==e.audit||null==e.audit.createdBy?null:e.audit.createdBy.name," ")}}function se(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"System"),t.qZA())}function re(i,n){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit,a=t.oxw(2);t.xp6(1),t.hij(" at ",a.dateUtil.utcToDateFormatted(null==e||null==e.audit?null:e.audit.createdDate)," ")}}function pe(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",94),t.NdJ("click",function(){t.CHM(e);const l=t.oxw().$implicit,r=t.oxw(2);return t.KtG(r.openUnlockAppClient(l))}),t.qZA()}if(2&i){const e=t.oxw(3);t.Q6J("ngClass",e.isDesktopView?"pi pi-lock-open":"")("label",e.isDesktopView?"":"Unlock")}}const ce=function(){return{margin:"auto"}},ue=function(){return{}};function de(i,n){if(1&i&&(t.TgZ(0,"tr")(1,"td",86)(2,"span",60),t._uU(3,"App Type"),t.qZA(),t.TgZ(4,"div",63),t._uU(5),t.qZA()(),t.TgZ(6,"td",87)(7,"span",60),t._uU(8,"Lock Level"),t.qZA(),t.TgZ(9,"div",88),t._uU(10),t.qZA()(),t.TgZ(11,"td",89)(12,"span",60),t._uU(13,"Remarks"),t.qZA(),t.TgZ(14,"div",63),t._uU(15),t.qZA()(),t.TgZ(16,"td",90)(17,"span",60),t._uU(18,"Created Date"),t.qZA(),t.TgZ(19,"div",63),t._uU(20," By "),t.YNc(21,oe,2,1,"span",15),t.YNc(22,se,2,0,"span",15),t.YNc(23,re,2,1,"span",15),t.qZA()(),t.TgZ(24,"td",91)(25,"span",60),t._uU(26,"Status"),t.qZA(),t.TgZ(27,"span",56),t._uU(28),t.qZA()(),t.TgZ(29,"td",85)(30,"div",92),t.YNc(31,pe,1,2,"button",93),t.qZA()()()),2&i){const e=n.$implicit,a=t.oxw(2);t.xp6(5),t.Oqu(a.appType[null==e?null:e.appType]),t.xp6(4),t.ekj("status-yellow","WARNING"==e.lockLevel)("status-red","ERROR"==e.lockLevel),t.xp6(1),t.hij(" ",null==e?null:e.lockLevel," "),t.xp6(5),t.Oqu(null==e?null:e.lockRemarks),t.xp6(6),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.createdBy),t.xp6(1),t.Q6J("ngIf",!(null!=e&&null!=e.audit&&e.audit.createdBy)),t.xp6(1),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.createdDate),t.xp6(4),t.ekj("status-green",e.isActive)("status-red",!e.isActive),t.xp6(1),t.hij(" ",e.isActive?a.statuses.ACTIVE:a.statuses.INACTIVE,""),t.xp6(2),t.Q6J("ngStyle",a.isDesktopView?t.DdM(18,ue):t.DdM(17,ce)),t.xp6(1),t.Q6J("ngIf",null==e?null:e.isActive)}}function ge(i,n){1&i&&(t.TgZ(0,"tr")(1,"td",95),t._uU(2,"No records found."),t.qZA()())}function _e(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"td",72)(1,"div",73)(2,"div",2)(3,"p-table",74),t.NdJ("onLazyLoad",function(l){t.CHM(e);const r=t.oxw();return t.KtG(r.loadAppLockData(l))}),t.YNc(4,le,6,0,"ng-template",5),t.YNc(5,ae,18,0,"ng-template",6),t.YNc(6,de,32,19,"ng-template",7),t.YNc(7,ge,3,0,"ng-template",75),t.qZA()()()()}if(2&i){const e=t.oxw();
1t.xp6(3),t.Q6J("value",e.appLock)("paginator",!0)("rows",e.clientAppLockPageSize)("rowHover",!0)("lazy",!0)("totalRecords",e.clientAppLockTotalElements)("alwaysShowPaginator",e.clientAppLockAlwaysShowPaginator)("showCurrentPageReport",!0)("rowsPerPageOptions",e.constants.PAGE_SIZES)("loading",e.clientAppLockDataLoader)}}function me(i,n){if(1&i&&t._UZ(0,"img",118),2&i){const e=t.oxw(2);t.Q6J("src",e.clientDetails.logoUrl,t.LSH)}}function fe(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1,"Name is required."),t.qZA())}function he(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," Name can be maximum of 100 characters long. "),t.qZA())}function Ce(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1,"Alias is required."),t.qZA())}function Te(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," Alias can be maximum of 25 characters long. "),t.qZA())}const Ae=function(){return{height:"5px"}};function ve(i,n){1&i&&t._UZ(0,"p-progressBar",119),2&i&&t.Akn(t.DdM(2,Ae))}function Ze(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1,"Street is required."),t.qZA())}function xe(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," Street can be maximum of 512 characters long. "),t.qZA())}function De(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1,"Country is required"),t.qZA())}function be(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1,"State is required"),t.qZA())}function we(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," City is required"),t.qZA())}function ye(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," City can be maximum of 50 characters long. "),t.qZA())}function Le(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1,"Zipcode is required"),t.qZA())}function Me(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1,"Zipcode is invalid"),t.qZA())}function ke(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," Zipcode can be maximum of 15 characters long. "),t.qZA())}function Ue(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1,"Timezone is required"),t.qZA())}function Ie(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1,"Enter valid Website"),t.qZA())}function Ee(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," Website can be maximum of 200 characters long. "),t.qZA())}function qe(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," Remark can be maximum of 1000 characters long. "),t.qZA())}function Ne(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"form",96),t.YNc(1,me,1,1,"img",97),t.TgZ(2,"div",98)(3,"label"),t._uU(4,"Name"),t.TgZ(5,"span",99),t._uU(6,"*"),t.qZA()(),t._UZ(7,"input",100),t.YNc(8,fe,2,0,"small",101),t.YNc(9,he,2,0,"small",101),t.qZA(),t.TgZ(10,"div",98)(11,"label"),t._uU(12,"Alias"),t.TgZ(13,"span",99),t._uU(14,"*"),t.qZA()(),t._UZ(15,"input",102),t.YNc(16,Ce,2,0,"small",101),t.YNc(17,Te,2,0,"small",101),t.qZA(),t.TgZ(18,"div",103)(19,"label"),t._uU(20,"Image/Logo"),t.qZA(),t.TgZ(21,"p-fileUpload",104,105),t.NdJ("uploadHandler",function(l){t.CHM(e);const r=t.oxw();return t.KtG(r.onUpload(l))})("onClear",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.onImageUploadCancel())})("onSelect",function(l){t.CHM(e);const r=t.oxw();return t.KtG(r.onImageSelected(l))}),t.qZA(),t.YNc(23,ve,1,3,"p-progressBar",106),t.qZA(),t.TgZ(24,"div",98)(25,"label"),t._uU(26,"Street"),t.TgZ(27,"span",99),t._uU(28,"*"),t.qZA()(),t._UZ(29,"input",107),t.YNc(30,Ze,2,0,"small",101),t.YNc(31,xe,2,0,"small",101),t.qZA(),t.TgZ(32,"div",108)(33,"div",109)(34,"label"),t._uU(35," Country "),t.TgZ(36,"span",99),t._uU(37,"*"),t.qZA()(),t._UZ(38,"p-dropdown",110),t.YNc(39,De,2,0,"small",101),t.qZA(),t.TgZ(40,"div",109)(41,"label"),t._uU(42," State "),t.TgZ(43,"span",99),t._uU(44,"*"),t.qZA()(),t._UZ(45,"p-dropdown",111),t.YNc(46,be,2,0,"small",101),t.qZA()(),t.TgZ(47,"div",108)(48,"div",109)(49,"label"),t._uU(50," City "),t.TgZ(51,"span",99),t._uU(52,"*"),t.qZA()(),t._UZ(53,"input",112),t.YNc(54,we,2,0,"small",101),t.YNc(55,ye,2,0,"small",101),t.qZA(),t.TgZ(56,"div",113)(57,"label"),t._uU(58,"Zipcode"),t.TgZ(59,"span",99),t._uU(60,"*"),t.qZA()(),t._UZ(61,"input",114),t.YNc(62,Le,2,0,"small",101),t.YNc(63,Me,2,0,"small",101),t.YNc(64,ke,2,0,"small",101),t.qZA()(),t.TgZ(65,"div",108)(66,"div",109)(67,"label"),t._uU(68," Timezone "),t.TgZ(69,"span",99),t._uU(70,"*"),t.qZA()(),t._UZ(71,"p-dropdown",115),t.YNc(72,Ue,2,0,"small",101),t.qZA(),t.TgZ(73,"div",109)(74,"label"),t._uU(75,"Website (
1optional)"),t.qZA(),t._UZ(76,"input",116),t.YNc(77,Ie,2,0,"small",101),t.YNc(78,Ee,2,0,"small",101),t.qZA()(),t.TgZ(79,"div",98)(80,"label"),t._uU(81,"Remark"),t.qZA(),t._UZ(82,"input",117),t.YNc(83,qe,2,0,"small",101),t.qZA()()}if(2&i){const e=t.oxw();let a,l,r,p,v,x;t.Q6J("formGroup",e.clientDetailForm),t.xp6(1),t.Q6J("ngIf",null==e.clientDetails?null:e.clientDetails.logoUrl),t.xp6(6),t.ekj("ng-dirty",(null==(a=e.clientDetailForm.get("name"))?null:a.touched)&&e.clientDetailForm.get("name").invalid),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("name").hasError("required")&&(null==(l=e.clientDetailForm.get("name"))?null:l.touched)),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("name").hasError("maxlength")),t.xp6(6),t.ekj("ng-dirty",(null==(r=e.clientDetailForm.get("alias"))?null:r.touched)&&e.clientDetailForm.get("alias").invalid),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("alias").hasError("required")&&(null==(p=e.clientDetailForm.get("alias"))?null:p.touched)),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("alias").hasError("maxlength")),t.xp6(4),t.Q6J("customUpload",!0)("disabled",e.uploadInProgress)("showUploadButton",e.isFilSelectedAndNotUploaded&&e.clientDetails),t.xp6(2),t.Q6J("ngIf",e.uploadInProgress),t.xp6(6),t.ekj("ng-dirty",(null==(v=e.clientDetailForm.get("street"))?null:v.touched)&&e.clientDetailForm.get("street").invalid),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("street").hasError("required")&&(null==(x=e.clientDetailForm.get("street"))?null:x.touched)),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("street").hasError("maxlength")),t.xp6(7),t.ekj("ng-dirty",e.clientDetailForm.get("country").touched&&e.clientDetailForm.get("country").invalid),t.Q6J("options",e.countries),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("country").touched&&e.clientDetailForm.get("country").invalid),t.xp6(6),t.ekj("ng-dirty",e.clientDetailForm.get("state").touched&&e.clientDetailForm.get("state").invalid),t.Q6J("options",e.states),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("state").touched&&e.clientDetailForm.get("state").invalid),t.xp6(7),t.ekj("ng-dirty",e.clientDetailForm.get("city").touched&&e.clientDetailForm.get("city").invalid),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("city").touched&&e.clientDetailForm.get("city").invalid),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("city").hasError("maxlength")),t.xp6(6),t.ekj("ng-dirty",e.clientDetailForm.get("zipcode").touched&&e.clientDetailForm.get("zipcode").invalid||e.clientDetailForm.get("zipcode").touched&&!e.clientDetailForm.get("zipcode").hasError("required")&&e.clientDetailForm.get("zipcode").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("zipcode").hasError("required")&&e.clientDetailForm.get("zipcode").touched),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("zipcode").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("zipcode").hasError("maxlength")),t.xp6(7),t.ekj("ng-dirty",e.clientDetailForm.get("timeZone").touched&&e.clientDetailForm.get("timeZone").invalid),t.Q6J("options",e.timezones),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("timeZone").touched&&e.clientDetailForm.get("timeZone").invalid),t.xp6(4),t.ekj("ng-dirty",e.clientDetailForm.get("website").touched&&e.clientDetailForm.get("website").invalid),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("website").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("website").hasError("maxlength")),t.xp6(4),t.ekj("ng-dirty",e.clientDetailForm.get("remark").invalid),t.xp6(1),t.Q6J("ngIf",e.clientDetailForm.get("remark").hasError("maxlength"))}}function Se(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",120),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.hideDialog())}),t.qZA(),t.TgZ(1,"button",121),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.saveClientDetails())}),t.qZA()}if(2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("loading",e.showBtnLoader)("disabled",e.clientDetailForm.invalid||e.isFilSelectedAndNotUploaded)}}function Fe(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"Are you sure you want to deactivate this client?"),t.qZA())}function Oe(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",122),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.closeActivateDeactivateDialog())}),t.qZA(),t.TgZ(1,"button",123),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.deactivateClient())}),t.qZA()}}function Pe(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"Are you sure you want to activate this client?"),t.qZA())}function Re(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",122),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.closeActivateDeactivateDialog())}),t.qZA(),t.TgZ(1,"button",123),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.activateClient())}),t.qZA()}}function Je(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"Are you sure you want to unlock this app?"),t.qZA())}function Be(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",122),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.closeAppClientUnlockDialog())}),t.qZA(),t.TgZ(1,"button",123),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.unlockAppClient())}),t.qZA()}}function Ve(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," App Type is required."),t.qZA())}function Ye(i,n){1&i&&(t.TgZ(0,"small",99),t._uU(1," Lock Level is required."),t.qZA())}function Qe(i,n){if(1&i&&(t.TgZ(0,"form",96)(1,"div",98)(2,"label"),t._uU(3,"App Type"),t.TgZ(4,"span",99),t._uU(5,"*"),t.qZA()(),t._UZ(6,"p-dropdown",124),t.YNc(7,Ve,2,0,"small",101),t.qZA(),t.TgZ(8,"div",98)(9,"label"),t._uU(10,"Lock Level"),t.TgZ(11,"span",99),t._uU(12,"*"),t.qZA()(),t._UZ(13,"p-dropdown",125),t.YNc(14,Ye,2,0,"small",101),t.qZA(),t.TgZ(15,"div",98)(16,"label"),t._uU(17,"Remarks"),t.qZA(),t.TgZ(18,"textarea",126),t._uU(19," "),t.qZA()()()),2&i){const e=t.oxw();let a,l,r,p;t.Q6J("formGroup",e.appLockClientForm),t.xp6(6),t.ekj("ng-dirty",e.appLockClientForm.get("appType").invalid&&(null==(a=e.appLockClientForm.get("appType"))?null:a.touched)),t.Q6J("options",e.appTypeDetails)("autoDisplayFirst",!1)("appendTo","body"),t.xp6(1),t.Q6J("ngIf",e.appLockClientForm.get("appType").hasError("required")&&(null==(l=e.appLockClientForm.get("appType"))?null:l.touched)),t.xp6(6),t.ekj("ng-dirty",e.appLockClientForm.get("lockLevel").invalid&&(null==(r=e.appLockClientForm.get("lockLevel"))?null:r.touched)),t.Q6J("options",e.lockLevelDetails)("autoDisplayFirst",!1)("appendTo","body"),t.xp6(1),t.Q6J("ngIf",e.appLockClientForm.get("lockLevel").hasError("required")&&(null==(p=e.appLockClientForm.get("lockLevel"))?null:p.touched))}}function He(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",120),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.hideAppLockDialog())}),t.qZA(),t.TgZ(1,"button",121),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.saveAppLockClientDetails())}),t.qZA()}if(2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("loading",e.showBtnLoader)("disabled",e.appLockClientForm.invalid)}}class R{constructor(n,e,a,l,r,p,v,x){this.clientsService=n,this.router=e,this.formBuilder=a,this.generalService=l,this.appAlertService=r,this.imageUploadService=p,this.app=v,this.route=x,this.statuses=d.V,this.page=0,this.pageSize=20,this.searchTerm="",this.showModal=!1,this.showBtnLoader=!1,this.PENDING_APPROVAL="PENDING APPROVAL",this.isDateRange=!1,this.filterStatuses=[{label:"Active",value:"ACTIVE"},{label:"Inactive",value:"INACTIVE"}],this.breadcrumbRoutes=nt.v,this.dataLoader=!1,this.addClientAppLockDialog=!1,this.filters={name:"",timeZone:[],fromCreatedDate:"",toCreatedDate:"",status:""},this.timeZoneArray=[],this.sortField="",this.sortOrder="",this.sort="",this.dateUtil=h.E,this.clientAppLockPage=0,this.clientAppLockPageSize=20,this.clientAppLockDataLoader=!1,this.appTypeDetails=g.zz,this.appType=g.t1,this.lockLevelDetails=g.JK,this.lockLevel=g.DD,this.isDesktopView=!0,this.constants=A.g}ngOnInit(){this.checkScreenSize(),window.addEventListener("resize",()=>{this.checkScreenSize()}),this.generalService.getCountry().subscribe(n=>{this.countries=n}),this.generalService.getTimezones().subscribe(n=>{this.timezones=n}),this.generalService.getDistinctTimezones().subscribe(n=>{this.distinctTimezones=n.map(e=>({name:e}))}),this.clientsService.changeClientIdSub(null),this.clientsService.changeClientSub(null),this.clientDetailForm=this.formBuilder.group({alias:new o.p4("",[o.kI.maxLength(25)]),city:new o.p4("",[o.kI.required,o.kI.maxLength(50)]),country:new o.p4("",[o.kI.required]),logo:new o.p4(""),logoUrl:new o.p4(""),name:new o.p4("",[o.kI.required,o.kI.maxLength(100)]),remark:new o.p4("",[o.kI.maxLength(1e3)]),state:new o.p4("",[o.kI.required]),street:new o.p4("",[o.kI.required,o.kI.maxLength(512)]),timeZone:new o.p4("",[o.kI.required]),website:new o.p4("",[o.kI.pattern(A.g.WEBSITE_URL_VALIDATOR_REGEX),o.kI.maxLength(200)]),zipcode:new o.p4("",[o.kI.required,o.kI.maxLength(15)])}),this.clientDetailForm.get("country").valueChanges.subscribe(n=>{this.onCountryChange(n,this.clientDetails?.state)}),this.appLockClientForm=this.formBuilder.group({appType:new o.p4("",[o.kI.required]),lockLevel:new o.p4("",[o.kI.required]),lockRemarks:new o.p4("")})}checkScreenSize(){this.isDesktopView=window.innerWidth>=768}getPaginatedData(n){this.dataLoader=!0,this.clientsService.getClients("",this.page,this.pageSize,n||this.searchTerm,this.filters.name,this.filters.status,this.filters.timeZone,this.filters.fromCreatedDate,this.filters.toCreatedDate,this.sort).subscribe(e=>{this.clients=e.list,this.totalElements=e.totalElements,this.alwaysShowPaginator=!!this.totalElements,this.dataLoader=!1},()=>{this.dataLoader=!1})}loadData(n){U.isEmpty(n.filters)||(n.filters.name&&(this.filters.name=n.filters.name[0].value?n.filters.name[0].value:""),n.filters.status&&(this.filters.status=n.filters.status[0].value?n.filters.status[0].value===d.V.ACTIVE?d.V.ACTIVE:d.V.INACTIVE:""),n.filters.timeZone&&(n.filters.timeZone[0].value?(this.timeZoneArray=n.filters.timeZone[0].value.map(e=>e.name),this.filters.timeZone=this.timeZoneArray):this.filters.timeZone=""),this.rangeDates&&(this.filters.fromCreatedDate=Y(this.rangeDates[0]).format("YYYY-MM-DD"),this.filters.toCreatedDate=Y(this.rangeDates[1]).format("YYYY-MM-DD")),this.page=((this.filters.name||this.filters.status||this.filters.timeZone||this.filters.fromCreatedDate||this.filters.toCreatedDate)&&this.totalElements>this.pageSize||U.every(this.filters,e=>""===e||U.isNull(e)),(n.first+n.rows)/n.rows-1)),n.sortField&&(this.sortField=n.sortField,this.sortOrder=-1===n.sortOrder?"DESC":"ASC",this.sort=`${this.sortField},${this.sortOrder}`),this.pageSize=n.rows,this.getPaginatedData()}editClientDetails(n){this.clientDetails=n,this.clientDetailForm.patchValue({alias:this.clientDetails.alias,city:this.clientDetails.city,country:this.clientDetails.country.code,name:this.clientDetails.name,remark:this.clientDetails.remark,state:this.clientDetails.state.code,street:this.clientDetails.street,timeZone:this.clientDetails.timeZone,website:this.clientDetails.website,zipcode:this.clientDetails.zipcode}),this.showModal=!0}onImageSelected(n){const e=n.files[0];n.files.length>0&&(this.isFilSelectedAndNotUploaded=n.files.length>0),this.clientDetails||this.imageUploadService.imageToBase64(e).pi
1pe((0,_.w)(a=>(0,X.of)(a))).subscribe(a=>{this.isFilSelectedAndNotUploaded=!1,this.clientDetailForm.get("logoUrl").patchValue({base64Data:a,contentType:e.type,fileName:e.name})})}onUpload(n){n.files.length>0&&(this.isFilSelectedAndNotUploaded=n.files.length>0,this.imageUploadService.imageToBase64(n.files[0]).pipe((0,_.w)(e=>(0,X.of)(e)),(0,_.w)(e=>{this.uploadInProgress=!0;let a={};return a={base64Data:e,fileAccess:"PUBLIC",fileName:n.files[0].name,fileType:"IMAGE",itemCategory:"LOGO"},(0,X.of)(a)})).subscribe(e=>{this.uploadInProgress=!1,this.isFilSelectedAndNotUploaded=!1,this.clientDetailForm.get("logo").patchValue(e)},()=>{this.uploadInProgress=!1}))}onImageUploadCancel(){this.clientDetailForm.get("logoUrl").reset(),this.isFilSelectedAndNotUploaded=!1,this.uploadInProgress=!1}hideDialog(){this.clientDetailForm.reset(),this.showModal=!1,this.clientDetails=null}addNewClient(){this.clientDetailForm.reset(),this.showModal=!0}saveClientDetails(){this.showBtnLoader=!0;const n={...this.clientDetailForm.value,status:this.clientDetails?.status?this.clientDetails.status:d.V.ACTIVE};this.clientDetails||(n.logo=n.logoUrl,delete n.logoUrl),this.clientDetails&&!n.logo&&(this.clientDetails?.logoUrl?(n.logoUrl=this.clientDetails?.logoUrl,delete n.logo):(delete n.logo,delete n.logoUrl)),this.clientsService.saveClientDetails(n,this.clientDetails?.clientId).subscribe(()=>{this.showBtnLoader=!1,this.appAlertService.showSuccessViaToast(this.clientDetails?.clientId?"Client details are updated.":"Client created successfully."),this.getPaginatedData(),this.hideDialog()},()=>{this.showBtnLoader=!1})}onCountryChange(n,e){this.clientDetailForm.get("state").reset(),this.states=[],this.generalService.getStateByCode(n).subscribe(a=>{this.states=a,e&&this.clientDetailForm.get("state").patchValue(e.code)})}clear(n){this.filters.fromCreatedDate="",this.filters.toCreatedDate="",this.filters.name="",this.filters.status="",this.filters.timeZone="",this.rangeDates=null,n.filters.name[0].value="",n.filters.status[0].value="",n.filters.timeZone[0].value="",n.filters.createdDate[0].value="",this.columnFilter.overlayVisible=!1,this.timezoneFilter.overlayVisible=!1,this.statusFilter.overlayVisible=!1,this.sort="",n.clear(),this.getPaginatedData()}clearCreatedTimeFilter(){this.filters.fromCreatedDate="",this.filters.toCreatedDate="",this.rangeDates=null,this.columnFilter.overlayVisible=!1,this.isDateRange=!1,this.getPaginatedData()}hideColumnFilterOverlay(){this.columnFilter.overlayVisible=!1}selectedDates(n){n[1]&&(this.isDateRange=!0)}activeDeactivateClient(n){this.clientDetails=n,n.status===d.V.ACTIVE?this.activeClientDialog=!0:this.deactivateClientDialog=!0}activateClient(){this.clientsService.activateClient(this.clientDetails?.clientId).subscribe(()=>{this.deactivateClientDialog=!1,this.appAlertService.showSuccessViaToast("Client Activated"),this.clientDetails={},this.getPaginatedData()})}deactivateClient(){this.clientsService.deactivateClient(this.clientDetails?.clientId).subscribe(()=>{this.activeClientDialog=!1,this.appAlertService.showSuccessViaToast("Client Deactivated"),this.clientDetails={},this.getPaginatedData()})}closeActivateDeactivateDialog(){this.deactivateClientDialog=!1,this.activeClientDialog=!1,this.clientDetails=null}ngOnDestroy(){this.showBtnLoader=!1}toggleMenu(n){this.menuItems=[],n.status===d.V.ACTIVE&&this.menuItems.push({label:"Edit",icon:"pi pi-fw pi-pencil",command:()=>this.editClientDetails(n)}),this.menuItems.push({label:n.status===d.V.ACTIVE?"Deactivate":"Activate",icon:n.status===d.V.ACTIVE?"pi pi-fw pi-times":"pi pi-fw pi-check",command:()=>this.activeDeactivateClient(n)})}onItemClick(n){"Clients"===n.item.label&&this.app.onBreadCrumbClick(0)}loadAppLockData(n){this.clientAppLockPage=(n.first+n.rows)/n.rows-1,this.clientAppLockPageSize=n.rows,this.getPaginatedAppLockData()}getPaginatedAppLockData(){this.clientAppLockDataLoader=!0,this.clientsService.getClientAppLock("",this.clientAppLockPage,this.clientAppLockPageSize,"isActive,DESC",this.clientId).subscribe(n=>{this.appLock=n.list,this.clientAppLockTotalElements=n.totalElements,this.clientAppLockAlwaysShowPaginator=!!this.clientAppLockTotalElements,this.clientAppLockDataLoader=!1},()=>{this.clientAppLockDataLoader=!1})}addClientAppLock(){this.addClientAppLockDialog=!0}
1closeAppClientUnlockDialog(){this.appLockDetails=null,this.unlockClientAppLockDialog=!1}unlockAppClient(){this.clientsService.unlockClient(this.clientId,this.appLockDetails?.clientAppLockId).subscribe(()=>{this.appAlertService.showSuccessViaToast("Client is unlocked"),this.unlockClientAppLockDialog=!1,this.getPaginatedAppLockData()})}hideAppLockDialog(){this.appLockClientForm.reset(),this.addClientAppLockDialog=!1}saveAppLockClientDetails(){this.clientAppLockDataLoader=!0,this.clientsService.saveClientAppLockDetails(this.appLockClientForm.value,this.clientId).subscribe(()=>{this.clientAppLockDataLoader=!1,this.clientId&&this.appAlertService.showSuccessViaToast("Client is Added."),this.getPaginatedAppLockData(),this.hideAppLockDialog()},()=>{this.clientAppLockDataLoader=!1})}getClientId(n){this.clientId="",n&&(this.clientId=n.data.clientId)}openUnlockAppClient(n){this.unlockClientAppLockDialog=!0,this.appLockDetails=n}}R.\u0275fac=function(n){return new(n||R)(t.Y36(b.a),t.Y36(m.F0),t.Y36(o.QS),t.Y36(Nt.m),t.Y36(Z.T),t.Y36(St.K),t.Y36(w.O),t.Y36(m.gz))},R.\u0275cmp=t.Xpm({type:R,selectors:[["app-manage-clients"]],viewQuery:function(n,e){if(1&n&&(t.Gf(Ot,5),t.Gf(Pt,5),t.Gf(Rt,5),t.Gf(Jt,5),t.Gf(Bt,5),t.Gf(Vt,5)),2&n){let a;t.iGM(a=t.CRH())&&(e.table=a.first),t.iGM(a=t.CRH())&&(e.table1=a.first),t.iGM(a=t.CRH())&&(e.fileUpload=a.first),t.iGM(a=t.CRH())&&(e.columnFilter=a.first),t.iGM(a=t.CRH())&&(e.timezoneFilter=a.first),t.iGM(a=t.CRH())&&(e.statusFilter=a.first)}},decls:30,vars:34,consts:[["styleClass","w-full",3,"model","home","onItemClick"],[1,"col-12"],[1,"card"],["currentPageReportTemplate","Showing {first} to {last} of {totalRecords} entries","styleClass","p-datatable-gridlines","responsiveLayout","stack",3,"dataKey","value","rows","paginator","rowHover","lazy","totalRecords","alwaysShowPaginator","showCurrentPageReport","rowsPerPageOptions","loading","rowExpandMode","onLazyLoad","onRowExpand"],["dt",""],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","rowexpansion"],[1,"p-fluid",3,"visible","styleClass","header","modal","visibleChange","onHide"],["pTemplate","content"],["pTemplate","footer"],["header","Confirm",3,"visible","modal","styleClass","visibleChange","onHide"],[1,"flex","align-items-center","justify-content-center"],[1,"pi","pi-exclamation-triangle","mr-3",2,"font-size","2rem"],[4,"ngIf"],["header","Unlock Client App",3,"visible","modal","styleClass","visibleChange","onHide"],[1,"flex","flex-column","md:flex-row","md:justify-content-between","md:align-items-center"],[1,"m-0"],[1,"my-2","flex","flex-wrap","md:flex-nowrap"],["pButton","","pRipple","","label","New","icon","pi pi-plus",1,"p-button-primary","mt-2","md:mt-0",3,"click"],[2,"width","5%"],[2,"width","180px"],[1,"flex","justify-content-between","align-items-center"],["pSortableColumn","name",2,"width","180px"],["field","name"],["type","text","field","name","display","menu","placeholder","Search by Name",3,"showOperator","showMatchModes","showAddButton"],["pSortableColumn","alias",2,"width","180px"],["field","alias"],["pSortableColumn","timeZone",2,"width","180px"],[1,"flex"],["field","timeZone"],["field","timeZone","matchMode","in","display","menu",3,"showMatchModes","showOperator","showAddButton"],["timezoneFilter",""],["pTemplate","filter"],["pSortableColumn","createdDate",2,"width","180px"],[1,"flex","align-items-center"],["field","createdDate"],["type","date","field","createdDate","display","menu",3,"showOperator","showMatchModes","showAddButton","showClearButton","showApplyButton","showButtons"],["columnfilter",""],["pSortableColumn","status",2,"width","180px"],["field","status"],["field","status","display","menu",3,"showOperator","showMatchModes","showAddButton"],["statusFilter",""],[1,"action-col-header",2,"width","30px"],["pButton","","label","Clear","icon","pi pi-filter-slash",1,"p-button-outlined","mb-1",3,"click"],["placeholder","Select Timezone",3,"ngModel","options","optionLabel","onChange"],["pTemplate","item"],[1,"p-multiselect-representative-option"],[1,"ml-2"],[1,"date-filter-label"],["selectionMode","range","inputId","range",3,"inline","ngModel","readonlyInput","appendTo","ngModelChange","onSelect"],[1,"flex","pt-2","pb-0","px-0"],["type","button","pButton","","pRipple","",1,"p-button-outlined","p-button-sm","mr-2",3,"label","click"],["type","button","pButton","","pRipple","",1,"p-button-sm",3,"label","disabled","click"],["placeholder","Select Status",3,"ngModel","options","onChange"],[1,"product-badge"],[3,"pReorderableRow"],[1,"flex","justify-content-center","align-items-center"],["type","button","pButton","","pRipple","",1,"p-button-text","p-button-rounded","p-button-plain","ml-2",3,"pRowToggler","icon"],[1,"p-column-title"],["width","100","class","shadow-4 client-img-list",3,"src",4,"ngIf"],["src","../../../../assets/layout/images/ma-images/clientLogoDefault.svg","width","100","class","shadow-4 client-img-list",4,"ngIf"],[1,"word-break"],[1,"product-badge","inline-flex"],[2,"width","30px"],[1,"flex","justify-content-center","align-items-center","relative"],["type","button","pButton","","icon","pi pi-ellipsis-h",3,"click"],[3,"appendTo","popup","model"],["menu",""],["width","100",1,"shadow-4","client-img-list",3,"src"],["src","../../../../assets/layout/images/ma-images/clientLogoDefault.svg","width","100",1,"shadow-4","client-img-list"],["colspan","10"],[1,"col-12","lock-table"],["currentPageReportTemplate","Showing {first} to {last} of {totalRecords} entries","styleClass","p-datatable-gridlines","responsiveLayout","stack",3,"value","paginator","rows","rowHover","lazy","totalRecords","alwaysShowPaginator","showCurrentPageReport","rowsPerPageOptions","loading","onLazyLoad"],["pTemplate","emptymessage"],[1,"flex","flex-row","justify-content-between","align-items-center"],[1,"m-0","sm:align-self-center"],[1,"md:my-2","sm:m-0","flex","align-items-baseline","flex-wrap"],[1,"md:mr-3","new-button"],["pButton","","pRipple","","label","New","icon","pi pi-plus",1,"p-button-primary","md:mt-2",3,"click"],[2,"width","150px"],[2,"width","800px"],[2,"width","300px"],[2,"width","120px"],[2,"width","40px"],[1,"locks-body",2,"width","180px"],[1,"locks-body",2,"width","150px"],[1,"word-break","product-badge","text-center"],[1,"locks-body",2,"width","800px"],[1,"locks-body",2,"width","300px"],[1,"locks-body",2,"width","120px"],[1,"flex","justify-content-center","align-items-center","relative",3,"ngStyle"],["type","button","pButton","",3,"ngClass","label","click",4,"ngIf"],["type","button","pButton","",3,"ngClass","label","click"],["colspan","6",1,"text-center"],[3,"formGroup"],["width","150","class","mt-0 mx-auto mb-5 block shadow-2 client-img-list",3,"src",4,"ngIf"],[1,"field"],[1,"p-error"],["type","text","pInputText","","formControlName","name","required",""],["class","p-error",4,"ngIf"],["type","text","pInputText","","formControlName","alias","placeholder","Enter Alias","required",""],[1,"field","fileupload-field"],["accept","image/*","name","demo[]","maxFileSize","10000000","placeholder","Enter Image/Logo","mode","advanced",3,"customUpload","disabled","showUploadButton","uploadHandler","onClear","onSelect"],["fileUpload",""],["mode","indeterminate",3,"style",4,"ngIf"],["type","text","pInputText","","formControlName","street","placeholder","Enter Street","required",""],[1,"formgrid","grid"],[1,"col-12","md:col-6","field"],["optionLabel","name","optionValue","code","placeholder","Enter Country","formControlName","country",3,"options"],["optionLabel","name","optionValue","code","placeholder","Enter State","formControlName","state",3,"options"],["type","text","autocomplete","off","placeholder","Enter City","pInputText","","formControlName","city"],[1,"field","col"],["type","text","pInputText","","placeholder","Enter Zipcode","formControlName","zipcode","required",""],["formControlName","timeZone","placeholder","Enter Timezone",3,"options"],["type","text","pInputText","","formControlName","website","placeholder","Enter Website"],["type","text","pInputText","","formControlName","remark"],["width","150",1,"mt-0","mx-auto","mb-5","block","shadow-2","client-img-list",3,"src"],["mode","indeterminate"],["pButton","","pRipple","","label","Cancel","icon","pi pi-times",1,"p-button-danger",3,"click"],["pButton","","pRipple","","label","Save","icon","pi pi-check",1,"p-button-success",3,"loading","disabled","click"],["pButton","","pRipple","","icon","pi pi-times","label","No",1,"p-button-text",3,"click"],["pButton","","pRipple","","icon","pi pi-check","label","Yes",1,"p-button-text",3,"click"],["optionLabel","label","optionValue","value","formControlName","appType",3,"options","autoDisplayFirst","appendTo"],["optionLabel","label","optionValue","value","formControlName","lockLevel",3,"options","autoDisplayFirst","appendTo"],["rows","5","cols","1","pInputTextarea","","formControlName","lockRemarks",1,"w-full","text-field"]],template:function(n,e){1&n&&(t.TgZ(0,"p-breadcrumb",0),t.NdJ("onItemClick",function(l){return e.onItemClick(l)}),t.qZA(),t.TgZ(1,"div",1)(2,"div",2)(3,"p-table",3,4),t.NdJ("onLazyLoad",function(l){return e.loadData(l)})("onRowExpand",function(l){return e.getClientId(l)}),t.YNc(5,Yt,5,0,"ng-template",5),t.YNc(6,jt,49,15,"ng-template",6),t.YNc(7,ie,58,29,"ng-template",7),t.YNc(8,_e,8,10,"ng-template",8),t.qZA()()(),t.TgZ(9,"p-dialog",9),t.NdJ("visibleChange",function(l){return e.showModal=l})("onHide",function(){return e.hideDialog()}),t.YNc(10,Ne,84,46,"ng-template",10),t.YNc(11,Se,2,2,"ng-template",11),t.qZA(),t.TgZ(12,"p-dialog",12),t.
1NdJ("visibleChange",function(l){return e.activeClientDialog=l})("onHide",function(){return e.closeActivateDeactivateDialog()}),t.TgZ(13,"div",13),t._UZ(14,"i",14),t.YNc(15,Fe,2,0,"span",15),t.qZA(),t.YNc(16,Oe,2,0,"ng-template",11),t.qZA(),t.TgZ(17,"p-dialog",12),t.NdJ("visibleChange",function(l){return e.deactivateClientDialog=l})("onHide",function(){return e.closeActivateDeactivateDialog()}),t.TgZ(18,"div",13),t._UZ(19,"i",14),t.YNc(20,Pe,2,0,"span",15),t.qZA(),t.YNc(21,Re,2,0,"ng-template",11),t.qZA(),t.TgZ(22,"p-dialog",16),t.NdJ("visibleChange",function(l){return e.unlockClientAppLockDialog=l})("onHide",function(){return e.closeAppClientUnlockDialog()}),t.TgZ(23,"div",13),t._UZ(24,"i",14),t.YNc(25,Je,2,0,"span",15),t.qZA(),t.YNc(26,Be,2,0,"ng-template",11),t.qZA(),t.TgZ(27,"p-dialog",9),t.NdJ("visibleChange",function(l){return e.addClientAppLockDialog=l})("onHide",function(){return e.hideAppLockDialog()}),t.YNc(28,Qe,20,13,"ng-template",10),t.YNc(29,He,2,2,"ng-template",11),t.qZA()),2&n&&(t.Q6J("model",e.breadcrumbRoutes.MANAGE_CLIENTS_ROUTES)("home",e.breadcrumbRoutes.HOME),t.xp6(3),t.Q6J("dataKey","clientId")("value",e.clients)("rows",e.pageSize)("paginator",!0)("rowHover",!0)("lazy",!0)("totalRecords",e.totalElements)("alwaysShowPaginator",e.alwaysShowPaginator)("showCurrentPageReport",!0)("rowsPerPageOptions",e.constants.PAGE_SIZES)("loading",e.dataLoader)("rowExpandMode","single"),t.xp6(6),t.Q6J("visible",e.showModal)("styleClass","mac-dialog-md")("header",e.clientDetails?"Edit Client":"Add Client Detail")("modal",!0),t.xp6(3),t.Q6J("visible",e.activeClientDialog)("modal",!0)("styleClass","mac-dialog-sm"),t.xp6(3),t.Q6J("ngIf",e.clients),t.xp6(2),t.Q6J("visible",e.deactivateClientDialog)("modal",!0)("styleClass","mac-dialog-sm"),t.xp6(3),t.Q6J("ngIf",e.clients),t.xp6(2),t.Q6J("visible",e.unlockClientAppLockDialog)("modal",!0)("styleClass","mac-dialog-sm"),t.xp6(3),t.Q6J("ngIf",e.clients),t.xp6(2),t.Q6J("visible",e.addClientAppLockDialog)("styleClass","mac-dialog-sm")("header","Add App Lock")("modal",!0))},dependencies:[f.mk,f.O5,f.PC,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.On,E.jx,M.o,T.iA,T.lQ,T.jB,T.fz,T.qO,T.xl,L.Hq,y.H,it.p,Ft.k,S.V,o.sg,o.u,F.Lt,lt.NU,$.f,tt.a,et.v2,N.g],styles:[".client-img[_ngcontent-%COMP%]{border-radius:80px}.client-img-list[_ngcontent-%COMP%]{border-radius:20px}.client-search-box[_ngcontent-%COMP%]{min-width:150px}.p-calendar[_ngcontent-%COMP%]{margin-top:10px!important}.lock-table[_ngcontent-%COMP%]{padding:0!important}.lock-table[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{padding:10px!important}@media (max-width: 728px){.lock-table[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{max-height:370px;overflow-y:auto}.locks-body[_ngcontent-%COMP%]{padding-bottom:0!important}}"]});var We=s(1383),Xe=s(12453),$e=s(29766),at=s(61989);const tn=[{label:"Private",value:"PRIVATE"},{label:"Public",value:"PUBLIC"}];var u=(()=>{return(i=u||(u={})).APP_ICON="APP_ICON",i.APP_SCREEN="APP_SCREEN",i.AUDIO="AUDIO",i.BOOLEAN="BOOLEAN",i.COLOR="COLOR",i.DROPDOWN="DROPDOWN",i.DATE_TIME="DATE_TIME",i.DATE="DATE",i.FILE="FILE",i.IMAGE="IMAGE",i.LONG_TEXT="LONG_TEXT",i.MULTI_SELECT="MULTI_SELECT",i.MONTH="MONTH",i.NUMBER="NUMBER",i.RICH_TEXT="RICH_TEXT",i.SLIDESHOW="SLIDESHOW",i.TAGS="TAGS",i.TEXT="TEXT",i.TIME="TIME",i.VIDEO="VIDEO",i.YEAR="YEAR",u;var i})();const en={APP_ICON:"App Icon",APP_SCREEN:"App Screen",AUDIO:"Audio",BOOLEAN:"Boolean",COLOR:"Color",DROPDOWN:"Dropdown",DATE_TIME:"Date Time",DATE:"Date",FILE:"File",IMAGE:"Image",LONG_TEXT:"Long Text",MULTI_SELECT:"Multi Select",MONTH:"Month",NUMBER:"Number",RICH_TEXT:"Rich Text",SLIDESHOW:"Slideshow",TAGS:"Tags",TEXT:"Text",TIME:"Time",VIDEO:"Video",YEAR:"Year"},nn={ABOUT_US:"About Us",ANNOUNCEMENT_CHANNELS:"Announcement Channels",APP_THEME:"App Theme",APP_HEADER:"App Header",APP_FOOTER:"App Footer",APP_CONFIG:"App Config",COUNT_DOWN_DISPLAY:"Count Down Display",DEVICE:"Device",EMAIL:"Email",FLAG:"Flag",GENERAL_PAYMENT:"General Payment",KIOSK_DISPLAY:"Kiosk Display",PRAYER_TIME:"Prayer Time",PRAYER_LABEL:"Prayer Label",PRAYER_ICON:"Prayer Icon",PORTAl_THEME:"Portal Theme",PAYMENT_EMAIL_RECEIPT_TEMPLATE:"Payment Email Receipt Template",SOCIAL_MEDIA:"Social Media",YEAR_END_TAX_RECEIPT:"Year End Tax Receipt"},ln=[{label:"App Icon",value:u.APP_ICON},{label:"App Screen",value:u.APP_SCREEN},{label:"Audio",value:u.AUDIO},{label:"Boolean",value:u.BOOLEAN},{label:"Color",value:u.COLOR},{label:"Date",value:u.DATE},{label:"Date Time",value:u.DATE_TIME},{label:"Dropdown",value:u.DROPDOWN},{label:"File",value:u.FILE},{label:"Image",value:u.IMAGE},{label:"Long Text",value:u.LONG_TEXT},{label:"Month",value:u.MONTH},{label:"Multi Select",value:u.MULTI_SELECT},{label:"Number",value:u.NUMBER},{label:"Rich Text",value:u.RICH_TEXT},{label:"SlideShow",value:u.SLIDESHOW},{label:"Text",value:u.TEXT},{label:"Time",value:u.TIME},{label:"Tags",value:u.TAGS},{label:"Video",value:u.VIDEO},{label:"Year",value:u.YEAR}];var Q=(()=>
1{return(i=Q||(Q={})).ACTIVE="ACTIVE",i.INACTIVE="INACTIVE",Q;var i})(),H=(()=>{return(i=H||(H={})).PRIVATE="Private",i.PUBLIC="Public",H;var i})(),G=(()=>{return(i=G||(G={})).YES="Yes",i.NO="No",G;var i})(),z=(()=>{return(i=z||(z={})).YES="Yes",i.NO="No",z;var i})(),ot=s(60332),st=s(10212);class J{transform(n){return n}}J.\u0275fac=function(n){return new(n||J)},J.\u0275pipe=t.Yjl({name:"formControl",type:J,pure:!0});const an=["dt"],on=["columnFilter"],sn=["categoryFilter"],rn=["superAdminFilter"],pn=["accessLevelFilter"];function cn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"div",18)(1,"h5",19),t._uU(2,"Configurations"),t.qZA(),t.TgZ(3,"div",20)(4,"div",21)(5,"button",22),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.toggleItemStatus())}),t.qZA()(),t.TgZ(6,"div")(7,"button",23),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.showAddDialog())}),t.qZA()()()()}if(2&i){const e=t.oxw();t.xp6(5),t.Q6J("label",e.isActive?"Show Inactive":"Show Active")}}function un(i,n){1&i&&t._UZ(0,"th",25)}function dn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"p-dropdown",43),t.NdJ("onChange",function(l){const p=t.CHM(e).filterCallback;return t.KtG(p(l.value))}),t.qZA()}if(2&i){const e=n.$implicit,a=t.oxw(2);t.Q6J("options",a.categories)("optionLabel","displayName")("optionValue","key")("autoDisplayFirst",!1)("ngModel",e)}}function gn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"p-dropdown",44),t.NdJ("onChange",function(l){const p=t.CHM(e).filterCallback;return t.KtG(p(l.value))}),t.qZA()}if(2&i){const e=n.$implicit,a=t.oxw(2);t.Q6J("ngModel",e)("options",a.filterSuperAdmin)("optionLabel","label")("optionValue","value")}}function _n(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"p-dropdown",45),t.NdJ("onChange",function(l){const p=t.CHM(e).filterCallback;return t.KtG(p(l.value))}),t.qZA()}if(2&i){const e=n.$implicit,a=t.oxw(2);t.Q6J("options",a.dataTypeOptions)("optionLabel","label")("optionValue","value")("autoDisplayFirst",!1)("ngModel",e)}}function mn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"p-dropdown",46),t.NdJ("onChange",function(l){const p=t.CHM(e).filterCallback;return t.KtG(p(l.value))}),t.qZA()}if(2&i){const e=n.$implicit,a=t.oxw(2);t.Q6J("ngModel",e)("options",a.filterAccessLevel)("optionLabel","label")("optionValue","value")}}function fn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"label",47),t._uU(1,"Select Date Range (From Date - To Date)"),t.qZA(),t.TgZ(2,"p-calendar",48),t.NdJ("ngModelChange",function(l){t.CHM(e);const r=t.oxw(2);return t.KtG(r.rangeDates=l)})("onSelect",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.selectedDates(l.rangeDates))}),t.qZA(),t.TgZ(3,"div",49)(4,"button",50),t.NdJ("click",function(){const r=t.CHM(e).filterCallback;return t.oxw(2).clearCreatedTimeFilter(),t.KtG(r())}),t.qZA(),t.TgZ(5,"button",51),t.NdJ("click",function(l){const p=t.CHM(e).filterCallback,v=t.oxw(2);return p(l),t.KtG(v.hideColumnFilterOverlay())}),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(2),t.Q6J("inline",!0)("ngModel",e.rangeDates)("readonlyInput",!0)("appendTo","body"),t.xp6(2),t.Q6J("label","Clear"),t.xp6(1),t.Q6J("label","Apply")("disabled",!e.isDateRange)}}function hn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"tr"),t.YNc(1,un,1,0,"th",24),t.TgZ(2,"th",25)(3,"div",26)(4,"div"),t._uU(5,"Label"),t.qZA(),t._UZ(6,"p-columnFilter",27),t.qZA()(),t.TgZ(7,"th",25)(8,"div",26)(9,"div"),t._uU(10,"Code"),t.qZA(),t._UZ(11,"p-columnFilter",28),t.qZA()(),t.TgZ(12,"th",25)(13,"div",26),t._uU(14," Category "),t.TgZ(15,"p-columnFilter",29,30),t.YNc(17,dn,1,5,"ng-template",31),t.qZA()()(),t.TgZ(18,"th",25)(19,"div",26)(20,"div"),t._uU(21,"Section"),t.qZA()()(),t.TgZ(22,"th",25)(23,"div",26)(24,"div"),t._uU(25,"Default Value"),t.qZA(),t._UZ(26,"p-columnFilter",32),t.qZA()(),t.TgZ(27,"th",25)(28,"div",26)(29,"div"),t._uU(30,"Managed By Super Admin"),t.qZA(),t.TgZ(31,"p-columnFilter",33,34),t.YNc(33,gn,1,4,"ng-template",31),t.qZA()()(),t.TgZ(34,"th",25)(35,"div",26)(36,"div"),t._uU(37,"Is Required"),t.qZA()()(),t.TgZ(38,"th",25)(39,"div",26)(40,"div"),t._uU(41,"Option Values"),t.qZA()()(),t.TgZ(42,"th",25)(43,"div",26),t._uU(44," Data Type "),t.TgZ(45,"p-columnFilter",35),t.YNc(46,_n,1,5,"ng-template",31),t.qZA()()(),t.TgZ(47,"th",25)(48,"div",26)(49,"div"),t._uU(50,"Access Level"),t.qZA(),t.TgZ(51,"p-columnFilter",36,37),t.YNc(53,mn,1,4,"ng-template",31),t.qZA()()(),t.TgZ(54,"th",25)(55,"div",26)(56,"div",38),t._uU(57,"Created"),t.qZA(),t.TgZ(58,"p-columnFilter",39,40),t.YNc(60,fn,6,7,"ng-template",31),t.qZA()()(),t.TgZ(61,"th",25)(62,"div",26),t._uU(63,"Last Modified"),t.qZA()(),t.TgZ(64,"th",25)(65,"div",26),t._uU(66,"Status"),t.qZA()(),t.TgZ(67,"th",41)(68,"div",26)(69,"button",42),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(),r=t.MAs(4);return t.KtG(l.clear(r))}),t.qZA()()()()}if(2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.isActive),t.xp6(5),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1),t.xp6(5),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1),t.xp6(4),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1),t.xp6(11),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1),t.xp6(5),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1),t.xp6(14),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1),t.xp6(6),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1),t.xp6(7),t.Q6J("showOperator",!1)("showMatchModes",!1)("showAddButton",!1)("showClearButton",!1)("showApplyButton",!1)("showButtons",!1)}}function Cn(i,n){1&i&&(t.TgZ(0,"td",25),t._UZ(1,"span",64),t.qZA())}function Tn(i,n){if(1&i&&(t.TgZ(0,"div",65)(1,"span"),t._uU(2),t.qZA()()),2&i){const e=n.$implicit;t.xp6(2),t.hij(" ",e.label,"")}}function An(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"div",66),t.NdJ("click",function(){t.CHM(e);const l=t.oxw().$implicit,r=t.oxw();return t.KtG(r.openOptionValues(l))}),t._uU(1," ...more "),t.qZA()}}function vn(i,n){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",null==e||null==e.audit||null==e.audit.createdBy?null:e.audit.createdBy.name," ")}}function Zn(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"System"),t.qZA())}function xn(i,n){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit,a=t.oxw();t.xp6(1),t.hij(" at ",a.dateUtil.utcToDateFormatted(null==e||null==e.audit?null:e.audit.createdDate)," ")}}function Dn(i,n){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",null==e||null==e.audit||null==e.audit.lastModifiedBy?null:e.audit.lastModifiedBy.name," ")}}function bn(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1,"System"),t.qZA())}function wn(i,n){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit,a=t.oxw();t.xp6(1),t.hij(" at ",a.dateUtil.utcToDateFormatted(null==e||null==e.audit?null:e.audit.lastModifiedDate)," ")}}function yn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"tr",52),t.YNc(1,Cn,2,0,"td",24),t.TgZ(2,"td",53)(3,"span",54),t._uU(4,"Label"),t.qZA(),t.TgZ(5,"div",55),t._uU(6),t.qZA()(),t.TgZ(7,"td",25)(8,"span",54),t._uU(9,"Code"),t.qZA(),t.TgZ(10,"div",55),t._uU(11),t.qZA()(),t.TgZ(12,"td",56)(13,"span",54),t._uU(14,"Category"),t.qZA(),t.TgZ(15,"div")(16,"span"),t._uU(17),t.qZA()()(),t.TgZ(18,"td",56)(19,"span",54),t._uU(20,"Section"),t.qZA(),t.TgZ(21,"div")(22,"span"),t._uU(23),t.ALo(24,"titlecase"),t.qZA()()(),t.TgZ(25,"td",56)(26,"span",54),t._uU(27,"DefaultValue"),t.qZA(),t.TgZ(28,"div"),t._uU(29),t.qZA()(),t.TgZ(30,"td",25)(31,"span",54),t._uU(32,"Managed By Super Admin"),t.qZA(),t.TgZ(33,"div"),t._uU(34),t.qZA()(),t.TgZ(35,"td",56)(36,"span",54),t._uU(37,"Is Required"),t.qZA(),t.TgZ(38,"div")(39,"span"),t._uU(40),t.qZA()()(),t.TgZ(41,"td",56)(42,"span",54),t._uU(43,"Option Values"),t.qZA(),t.TgZ(44,"div"),t.YNc(45,Tn,3,1,"div",17),t.ALo(46,"slice"),t.YNc(47,An,2,0,"div",57),t.qZA()(),t.TgZ(48,"td",25)(49,"span",54),t._uU(50,"Data Type"),t.qZA(),t.TgZ(51,"div"),t._uU(52),t.qZA()(),t.TgZ(53,"td",56)(54,"span",54),t._uU(55,"Access Level"),t.qZA(),t._uU(56),t.qZA(),t.TgZ(57,"td",25)(58,"span",54),t._uU(59,"Created"),t.qZA(),t.TgZ(60,"div"),t._uU(61," By "),t.YNc(62,vn,2,1,"span",58),t.YNc(63,Zn,2,0,"span",58),t.YNc(64,xn,2,1,"div",58),t.qZA()(),t.TgZ(65,"td",25)(66,"span",54),t._uU(67,"Last Modified"),t.qZA(),t.TgZ(68,"div"),t._uU(69," By "),t.YNc(70,Dn,2,1,"span",58),t.YNc(71,bn,2,0,"span",58),t.YNc(72,wn,2,1,"div",58),t.qZA()(),t.TgZ(73,"td",25)(74,"span",54),t._uU(75,"Status"),t.qZA(),t.TgZ(76,"span",59),t._uU(77),t.qZA()(),t.TgZ(78,"td",25)(79,"div",60)(80,"button",61),t.NdJ("click",function(l){const p=t.CHM(e).$implicit,v=t.MAs(82),x=t.oxw();return v.toggle(l),t.KtG(x.toggleMenu(p))}),t.qZA(),t._UZ(81,"p-menu",62,63),t.qZA()()()}if(2&i){const e=n.$implicit,a=n.rowIndex,l=t.oxw();t.Q6J("pReorderableRow",a),t.xp6(1),t.Q6J("ngIf",l.isActive),t.xp6(5),t.hij(" ",null==e?null:e.label," "),t.xp6(5),t.hij(" ",null==e?null:e.code," "),t.xp6(6),t.Oqu(l.categoryLabel[null==e?null:e.category]),t.xp6(6),t.Oqu(t.lcZ(24,27,null==e?null:e.section)),t.xp6(6),t.hij(" ",null==e?null:e.defaultValue," "),t.xp6(5),t.hij(" ",e.isSuperAdminManaged?l.superAdmin.YES:l.superAdmin.NO," "),t.xp6(6),t.Oqu(null!=e&&e.isRequired?l.isRequired.YES:l.isRequired.NO),t.xp6(5),t.Q6J("ngForOf",t.Dn7(46,29,e.options,0,4)),t.xp6(2),t.Q6J("ngIf",e.options&&e.options.length>4),t.xp6(5),t.hij(" ",l.dataTypelabel[null==e?null:e.dataType]," "),t.xp6(4),t.hij(" ","PRIVATE"===e.accessLevel?l.accessLevel.PRIVATE:l.accessLevel.PUBLIC," "),t.xp6(6),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.createdBy),t.xp6(1),t.Q6J("ngIf",!(null!=e&&null!=e.audit&&e.audit.createdBy)),t.xp6(1),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.createdDate),t.xp6(6),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.lastModifiedBy),t.xp6(1),t.Q6J("ngIf",!(null!=e&&null!=e.audit&&e.audit.lastModifiedBy)),t.xp6(1),t.Q6J("ngIf",null==e||null==e.audit?null:e.audit.lastModifiedDate),t.xp6(4),t.ekj("status-green",e.isActive)("status-red",!e.isActive),t.xp6(1),t.hij(" ",e.isActive?l.statuses.ACTIVE:l.statuses.INACTIVE,""),t.xp6(4),t.Q6J("appendTo","body")("popup",!0)("model",l.menuItems)}}function Ln(i,n){1&i&&(t.TgZ(0,"tr")(1,"td",67),t._uU(2,"No records foun
1d."),t.qZA()())}function Mn(i,n){1&i&&(t.TgZ(0,"small",71),t._uU(1," Label is required."),t.qZA())}function kn(i,n){1&i&&(t.TgZ(0,"small",71),t._uU(1," Label can be maximum of 255 characters long. "),t.qZA())}function Un(i,n){1&i&&(t.TgZ(0,"small",71),t._uU(1," Code is required."),t.qZA())}function In(i,n){1&i&&(t.TgZ(0,"small",71),t._uU(1," Code can be maximum of 255 characters long. "),t.qZA())}function En(i,n){1&i&&(t.TgZ(0,"small",71),t._uU(1," Placeholder can be maximum of 255 characters long. "),t.qZA())}function qn(i,n){1&i&&(t.TgZ(0,"small",71),t._uU(1,"Access level is required."),t.qZA())}function Nn(i,n){1&i&&(t.TgZ(0,"small",71),t._uU(1,"Category is required."),t.qZA())}function Sn(i,n){1&i&&(t.TgZ(0,"small",71),t._uU(1,"Datatype is required."),t.qZA())}function Fn(i,n){1&i&&(t.TgZ(0,"small",71),t._uU(1," Default value can be maximum of 255 characters long. "),t.qZA())}function On(i,n){1&i&&(t.TgZ(0,"tr")(1,"th")(2,"div",26),t._uU(3,"Label"),t.qZA()(),t.TgZ(4,"th")(5,"div",26),t._uU(6,"Value"),t.qZA()(),t._UZ(7,"th"),t.qZA())}const rt=function(){return{standalone:!0}};function Pn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"tr")(1,"td")(2,"input",91),t.NdJ("ngModelChange",function(l){const p=t.CHM(e).$implicit;return t.KtG(p.label=l)})("input",function(){const r=t.CHM(e).$implicit,p=t.oxw(3);return t.KtG(p.convertLabelToValue(r))})("ngModelChange",function(){t.CHM(e);const l=t.oxw(3);return t.KtG(l.updateOptions())}),t.qZA()(),t.TgZ(3,"td")(4,"input",92),t.NdJ("ngModelChange",function(l){const p=t.CHM(e).$implicit;return t.KtG(p.value=l)})("ngModelChange",function(){t.CHM(e);const l=t.oxw(3);return t.KtG(l.updateOptions())}),t.qZA()(),t.TgZ(5,"td")(6,"button",93),t.NdJ("click",function(){const r=t.CHM(e).rowIndex,p=t.oxw(3);return t.KtG(p.deleteOption(r))}),t.qZA()()()}if(2&i){const e=n.$implicit;t.xp6(2),t.Q6J("ngModel",e.label)("ngModelOptions",t.DdM(4,rt)),t.xp6(2),t.Q6J("ngModel",e.value)("ngModelOptions",t.DdM(5,rt))}}function Rn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"div",94)(1,"div",95)(2,"button",96),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(3);return t.KtG(l.addOption())}),t.qZA()()()}}function Jn(i,n){if(1&i&&(t.TgZ(0,"div",82)(1,"label"),t._uU(2,"Option Values"),t.qZA(),t.TgZ(3,"p-table",89),t.YNc(4,On,8,0,"ng-template",6),t.YNc(5,Pn,7,6,"ng-template",7),t.YNc(6,Rn,3,0,"ng-template",90),t.qZA()()),2&i){const e=t.oxw(2);t.xp6(3),t.Q6J("value",e.options)}}function Bn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"form",68)(1,"div",69)(2,"div",70)(3,"label"),t._uU(4,"Label"),t.TgZ(5,"span",71),t._uU(6,"*"),t.qZA()(),t.TgZ(7,"input",72),t.NdJ("input",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.convertLabelToCode())}),t.qZA(),t.YNc(8,Mn,2,0,"small",73),t.YNc(9,kn,2,0,"small",73),t.qZA(),t.TgZ(10,"div",70)(11,"label"),t._uU(12,"Code"),t.TgZ(13,"span",71),t._uU(14,"*"),t.qZA()(),t._UZ(15,"input",74),t.YNc(16,Un,2,0,"small",73),t.YNc(17,In,2,0,"small",73),t.qZA()(),t.TgZ(18,"div",69)(19,"div",70)(20,"label"),t._uU(21,"Placeholder"),t.qZA(),t._UZ(22,"input",75),t.YNc(23,En,2,0,"small",73),t.qZA(),t.TgZ(24,"div",70)(25,"label"),t._uU(26,"Access Level"),t.TgZ(27,"span",71),t._uU(28,"*"),t.qZA()(),t._UZ(29,"p-dropdown",76),t.YNc(30,qn,2,0,"small",73),t.qZA()(),t.TgZ(31,"div",69)(32,"div",77)(33,"label"),t._uU(34,"Category"),t.TgZ(35,"span",71),t._uU(36,"*"),t.qZA()(),t._UZ(37,"p-dropdown",78),t.YNc(38,Nn,2,0,"small",73),t.qZA(),t.TgZ(39,"div",77)(40,"label"),t._uU(41,"Datatype"),t.TgZ(42,"span",71),t._uU(43,"*"),t.qZA()(),t._UZ(44,"p-dropdown",79),t.YNc(45,Sn,2,0,"small",73),t.qZA(),t.TgZ(46,"div",80)(47,"label"),t._uU(48,"Section"),t.qZA(),t._UZ(49,"input",81),t.qZA()(),t.TgZ(50,"div",82)(51,"label"),t._uU(52,"Default Value"),t.qZA(),t._UZ(53,"input",83),t.YNc(54,Fn,2,0,"small",73),t.qZA(),t.YNc(55,Jn,7,1,"div",84),t.TgZ(56,"div",82)(57,"label"),t._uU(58,"Description"),t.qZA(),t._UZ(59,"textarea",85),t.qZA(),t.TgZ(60,"div",86)(61,"div",87)(62,"label",38)(63,"span",21),t._uU(64,"Is Super Admin Managed"),t.qZA(),t._UZ(65,"p-checkbox",88),t.ALo(66,"formControl"),t.qZA()(),t.TgZ(67,"div",82)(68,"label",38)(69,"span",21),t._uU(70,"Is Required"),t.qZA(),t._UZ(71,"p-checkbox",88),t.ALo(72,"formControl"),t.qZA()()()()}if(2&i){const e=t.oxw();let a,l,r,p,v,x,pt;t.Q6J("formGroup",e.configurationsForm),t.xp6(7),t.ekj("ng-dirty",(null==(a=e.configurationsForm.get("label"))?null:a.touched)&&e.configurationsForm.get("label").invalid),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("label").hasError("required")&&(null==(l=e.configurationsForm.get("label"))?null:l.touched)),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("label").hasError("maxlength")),t.xp6(6),t.ekj("ng-dirty",(null==(r=e.configurationsForm.get("code"))?null:r.touched)&&e.configurationsForm.get("code").invalid),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("code").hasError("required")&&(null==(p=e.configurationsForm.get("code"))?null:p.touched)),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("code").hasError("maxlength")),t.xp6(5),t.ekj("ng-dirty",e.configurationsForm.get("placeholder").invalid),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("placeholder").hasError("maxlength")),t.xp6(6),t.ekj("ng-dirty",e.configurationsForm.get("accessLevel").touched&&e.configurationsForm.get("accessLevel").invalid),t.Q6J("options",e.accessLevels)("autoDisplayFirst",!1),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("accessLevel").hasError("required")&&(null==(v=e.configurationsForm.get("accessLevel"))?null:v.touched)),t.xp6(7),t.ekj("ng-dirty",e.configurationsForm.get("category").touched&&e.configurationsForm.get("category").invalid),t.Q6J("options",e.categories)("autoDisplayFirst",!1),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("category").hasError("required")&&(null==(x=e.configurationsForm.get("category"))?null:x.touched)),t.xp6(6),t.ekj("ng-dirty",e.configurationsForm.get("dataType").touched&&e.configurationsForm.get("dataType").invalid),t.Q6J("options",e.dataTypeOptions)("autoDisplayFirst",!1),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("dataType").hasError("required")&&(null==(pt=e.configurationsForm.get("dataType"))?null:pt.touched)),t.xp6(8),t.ekj("ng-dirty",e.configurationsForm.get("defaultValue").invalid),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("defaultValue").hasError("maxlength")),t.xp6(1),t.Q6J("ngIf",e.configurationsForm.get("dataType").value===e.dataTypes.DROPDOWN||e.configurationsForm.get("dataType").value===e.dataTypes.MULTI_SELECT),t.xp6(10),t.Q6J("formControl",t.lcZ(66,35,e.configurationsForm.controls.isSuperAdminManaged))("binary",!0),t.xp6(6),t.Q6J("formControl",t.lcZ(72,37,e.configurationsForm.controls.isRequired))("binary",!0)}}function Vn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",97),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.closeAddEditDialog())}),t.qZA(),t.TgZ(1,"button",98),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.saveItem())}),t.qZA()}if(2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("loading",e.showBtnLoader)("disabled",e.configurationsForm.invalid)}}function Yn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",99),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.closeDeleteDialog())}),t.qZA(),t.TgZ(1,"button",100),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.deleteItem())}),t.qZA()}}function Qn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",99),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.closeActivateDeactivateDialog())}),t.qZA(),t.TgZ(1,"button",100),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.deactivateItem())}),t.qZA()}}function Hn(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",99),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.closeActivateDeactivateDialog())}),t.qZA(),t.TgZ(1,"button",100),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.activateItem())}),t.qZA()}}function Gn(i,n){if(1&i&&(t.TgZ(0,"div",65)(1,"span"),t._uU(2),t.qZA()()),2&i){const e=n.$implicit;t.xp6(2),t.Oqu(e.label)}}class B{constructor(n,e,a,l){this.configurationService=n,this.formBuilder=e,this.appAlertService=a,this.app=l,this.page=0,this.pageSize=20,this.breadcrumbRoutes=nt.v,this.isActive=!0,this.accessLevels=tn,this.dataTypeOptions=ln,this.dataTypes=u,this.dateUtil=h.E,this.statuses=Q,this.superAdmin=G,this.isRequired=z,this.accessLevel=H,this.showAddEditDialog=!1,this.showBtnLoader=!1,this.showDeleteDialog=!1,this.isDateRange=!1,this.options=[],this.constants=A.g,this.dataTypelabel=en,this.categoryLabel=nn,this.dataLoader=!1,this.filters={label:"",code:"",category:"",defaultValue:"",isSuperAdminManaged:"",fromCreatedDate:"",toCreatedDate:"",options:"",accessLevel:"",status:"",dataType:""},this.filterSuperAdmin=[{label:"Yes",value:!0},{label:"No",value:!1}],this.filterAccessLevel=[{label:"Private",value:"PRIVATE"},{label:"Public",value:"PUBLIC"}]}ngOnInit(){this.configurationsForm=this.formBuilder.group({label:new o.p4("",[o.kI.required,o.kI.maxLength(255)]),code:new o.p4("",[o.kI.required,o.kI.maxLength(255)]),placeholder:new o.p4("",o.kI.maxLength(255)),accessLevel:new o.p4("",[o.kI.required]),category:new o.p4("",[o.kI.required]),dataType:new o.p4("",[o.kI.required]),defaultValue:new o.p4("",o.kI.maxLength(255)),options:new o.p4(""),description:new o.p4(""),isSuperAdminManaged:new o.p4(""),isRequired:new o.p4(""),section:new o.p4("")}),this.configurationsForm.get("dataType").valueChanges.subscribe(n=>{(n!==u.DROPDOWN||n!==u.MULTI_SELECT)&&(this.configurationsForm.get("options").patchValue([]),this.options=[],this.addOption())}),this.getCategoriesDropdown()}getPaginatedData(){this.dataLoader=!0,this.configurationService.getConfigurations(this.isActive,this.page,this.pageSize,this.filters.label,this.filters.code,this.filters.category,this.filters.defaultValue,this.filters.isSuperAdminManaged,this.filters.fromCreatedDate,this.filters.toCreatedDate,this.filters.options,this.filters.accessLevel,this.filters.dataType,"displayOrder,ASC").subscribe(n=>{this.configurations=n.list,this.totalElements=n.totalElements,this.tempConfigurations=U.cloneDeep(n.list),this.alwaysShowPaginator=!!this.totalElements,this.dataLoader=!1},()=>{this.dataLoader=!1})}loadData(n){U.isEmpty(n.filters)||(n.filters.label&&(this.filters.label=n.filters.label[0].value?n.filters.label[0].value:""),n.filters.code&&(this.filters.code=n.filters.code[0].value?n.filters.code[0].value:""),n.filters.category&&(this.filters.category=n.filters.category[0].value?n.filters.category[0].value:""),n.filters.defaultValue&&(this.filters.defaultValue=n.filters.defaultValue[0].value?n.filters.defaultValue[0].value:""),n.filters.isSuperAdminManaged&&(this.filters.isSuperAdminManaged=""!==n.filters.isSuperAdminManaged[0].value&&null!==n.filters.isSuperAdminManaged[0].value?n.filters.isSuperAdminManaged[0].value:""),n.filters.accessLevel&&(this.filters.accessLevel=n.filters.accessLevel[0].value?n.filters.accessLevel[0].value:""),n.filters.dataType&&(this.filters.dataType=n.filters.dataType[0].value?n.filters.dataType[0].value:""),this.rangeDates&&(this.filters.fromCreatedDate=Y(this.rangeDates[0]).format("YYYY-MM-DD"),this.filters.toCreatedDate=Y(this.rangeDates[1]).format("YYYY-MM-DD")),this.page=((this.filters.code||this.filters.label||this.filters.category||this.filters.defaultValue||this.filters.isSuperAdminManaged||this.filters.fromCreatedDate||this.filters.toCreatedDate||this.filters.options||this.filters.accessLevel||this.filters.dataType)&&this.totalElements>this.pageSize||U.every(this.filters,e=>""===e||U.isNull(e)),(n.first+n.rows)/n.rows-1)),this.pageSize=n.rows,this.getPaginatedData()}selectedDates(n){n[1]&&(this.isDateRange=!0)}clear(n){this.filters.fromCreatedDate="",this.filters.toCreatedDate="",this.filters.label="",this.filters.code="",this.filters.category="",this.filters.defaultValue="",this.filters.isSuperAdminManaged="",this.filters.options="",this.filters.accessLevel="",this.filters.dataType="",this.rangeDates=null,this.columnFilter.overlayVisible=!1,this.categoryFilter.overlayVisible=!1,this.superAdminFilter.overlayVisible=!1,this.accessLevelFilter.overlayVisible=!1,n.filters.code[0].value="",n.filters.label[0].value="",n.filters.accessLevel[0].value="",n.filters.category[0].value="",n.filters.createdDate[0].value="",n.filters.dataType[0].value="",n.filters.defaultValue[0].value="",n.filters.isSuperAdminManaged[0].value="",n.reset(),this.getPaginatedData()}clearCreatedTimeFilter(){this.filters.fromCreatedDate="",this.filters.toCreatedDate="",this.rangeDates=null,this.isDateRange=!1,this.getPaginatedData()}hideColumnFilterOverlay(){this.columnFilter.overlayVisible=!1}getCategoriesDropdown(){this.configurationService.getCategories().subscribe(n=>{this.categories=n})}openOptionValues(n){this.showOptionValuesDialog=!0,this.configurationsDetails=n}closeOptionValuesDialog(){this.showOptionValuesDialog=!1,this.configurationsDetails=null}saveItem(){const n=this.configurationsForm.value;n.isSuperAdminManaged=!!n.isSuperAdminManaged&&n.isSuperAdminManaged,n.isRequired=!!n.isRequired&&n.isRequired,n.section=n.section?n.section.toUpperCase():"",this.showBtnLoader=!0,this.configurationService.saveConfigurations(n,this.configurationsDetails?.configurationId).subscribe(()=>{this.appAlertService.showSuccessViaToast(this.configurationsDetails?.configurationId?"Configurations is updated successfully":"Configurations is created successfully"),this.getPaginatedData(),this.closeAddEditDialog()},()=>{this.showBtnLoader=!1})}deleteItem(){this.showBtnLoader=!0,this.configurationService.deleteConfigurations(this.configurationsDetails.configurationId).subscribe(()=>{this.appAlertService.showSuccessViaToast("Configuration is deleted"),this.getPaginatedData(),this.closeDeleteDialog()},()=>{this.closeDeleteDialog()})}activateItem(){this.configurationService.activateConfigurations(this.configurationsDetails?.configurationId).subscribe(()=>{this.appAlertService.showSuccessViaToast("Configuration is activated"),this.getPaginatedData(),this.closeActivateDeactivateDialog()},()=>{this.closeActivateDeactivateDialog()})}deactivateItem(){this.configurationService.deactivateConfigurations(this.configurationsDetails?.configurationId).subscribe(()=>{this.appAlertService.showSuccessViaToast("Configuration is deactivated"),this.getPaginatedData(),this.closeActivateDeactivateDialog()},()=>{this.closeActivateDeactivateDialog()})}editConfiguration(n){this.configurationsDetails=U.cloneDeep(n),this.configurationsForm.patchValue({label:this.configurationsDetails.label,code:this.configurationsDetails.code,placeholder:this.configurationsDetails.placeholder,category:this.configurationsDetails.category,dataType:this.configurationsDetails.dataType,defaultValue:this.configurationsDetails.defaultValue,options:this.configurationsDetails.options,description:this.configurationsDetails.description,isSuperAdminManaged:this.configurationsDetails.isSuperAdminManaged,accessLevel:this.configurationsDetails.accessLevel,isRequired:this.configurationsDetails?.isRequired,section:this.configurationsDetails.section}),this.options=this.configurationsDetails.options,this.showAddEditDialog=!0}closeDeleteDialog(){this.showDeleteDialog=!1,this.configurationsDetails=null,this.showBtnLoader=!1}onShowDeleteDialog(n){this.showDeleteDialog=!0,this.configurationsDetails=n}closeActivateDeactivateDialog(){this.showDeactivateDialog=!1,this.showActivateDialog=!1,this.configurationsDetails=null}showAddDialog(){this.configurationsForm.reset(),this.showAddEditDialog=!0,this.configurationsDetails=null}closeAddEditDialog(){this.configurationsForm.reset(),this.showAddEditDialog=!1,this.configurationsDetails=null,this.showBtnLoader=!1}showActivateDeactivateDialog(n){this.configurationsDetails=n,n.isActive?this.showActivateDialog=!0:this.showDeactivateDialog=!0}toggleItemStatus(){this.isActive=!this.isActive,this.page=0,this.table.first=0,this.getPaginatedData()}toggleMenu(n){this.menuItems=[],n.isActive&&this.menuItems.push({label:"Edit",icon:"pi pi-fw pi-pencil",command:()=>this.editConfiguration(n)},{label:"Delete",icon:"pi pi-fw pi-trash",command:()=>this.onShowDeleteDialog(n)}),this.menuItems.push({label:n.isActive?"Deactivate":"Activate",icon:n.isActive?"pi pi-fw pi-times":"pi pi-fw pi-check",command:()=>this.showActivateDeactivateDialog(n)})}convertLabelToCode(){this.configurationsForm.get("code").patchValue(st.m.labelToId(this.configurationsForm.get("label").value))}convertLabelToValue(n){n.value=st.m.labelToId(n.label)}addOption(){this.options||(this.options=[]),this.options.push({label:"",value:""})}updateOptions(){this.configurationsForm.get("options").patchValue(this.options)}deleteOption(n){this.options.splice(n,1)}onConfigurationsReorder(n){let e=n.dragIndex,a=n.dropIndex;if(this.pageSize>10){const p=this.pageSize*this.page;e=n.dragIndex-p,a=n.dropIndex-p}else e=n.dragIndex.toString().substr(n.dragIndex.toString().length-1,n.dragIndex.toString().length),a=n.dropIndex.toString().substr(n.dropIndex.toString().length-1,n.dropIndex.toString().length);this.configurationService.sortConfigurations(this.tempConfigurations[e].configurationId,this.tempConfigurations[a].configurationId).subscribe(()=>{this.getPaginatedData()})}onItemClick(n){"Clients"===n.item.label&&this.app.onBreadCrumbClick(0)}}B.\u0275fac=function(n){return new(n||B)(t.Y36(ot.x),t.Y36(o.QS),t.Y36(Z.T),t.Y36(w.O))},B.\u0275cmp=t.Xpm({type:B,selectors:[["app-configurations"]],viewQuery:function(n,e){if(1&n&&(t.Gf(an,5),t.Gf(on,5),t.Gf(sn,5),t.Gf(rn,5),t.Gf(pn,5)),2&n){let a;t.iGM(a=t.CRH())&&(e.table=a.first),t.iGM(a=t.CRH())&&(e.columnFilter=a.first),t.iGM(a=t.CRH())&&(e.categoryFilter=a.first),t.iGM(a=t.CRH())&&(e.superAdminFilter=a.first),t.iGM(a=t.CRH())&&(e.accessLevelFilter=a.first)}}
1,features:[t._Bn([ot.x])],decls:33,vars:34,consts:[["styleClass","w-full",3,"model","home","onItemClick"],[1,"col-12"],[1,"card"],["currentPageReportTemplate","Showing {first} to {last} of {totalRecords} entries","styleClass","p-datatable-gridlines","responsiveLayout","stack",3,"value","rows","paginator","rowHover","lazy","totalRecords","alwaysShowPaginator","showCurrentPageReport","rowsPerPageOptions","loading","onLazyLoad","onRowReorder"],["dt",""],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[1,"p-fluid",3,"visible","styleClass","header","modal","draggable","visibleChange","onHide"],["pTemplate","content"],["pTemplate","footer"],["header","Confirm",3,"visible","modal","styleClass","draggable","visibleChange","onHide"],[1,"flex","align-items-center","justify-content-center"],[1,"pi","pi-exclamation-triangle","mr-3",2,"font-size","2rem"],["header","Option Values",3,"visible","modal","styleClass","draggable","visibleChange","onHide"],[1,"options-grid"],["class","product-badge status-blue mb-1 inline-block mr-2",4,"ngFor","ngForOf"],[1,"flex","flex-column","md:flex-row","md:justify-content-between","md:align-items-center"],[1,"m-0"],[1,"my-2","flex","align-items-baseline"],[1,"mr-3"],["type","button","pButton","",3,"label","click"],["pButton","","pRipple","","label","New","icon","pi pi-plus",1,"p-button-primary","mt-2","md:ml-2","md:mt-0",3,"click"],["style","width: 60px",4,"ngIf"],[2,"width","60px"],[1,"flex","justify-content-between","align-items-center"],["type","text","field","label","display","menu","placeholder","Search by Label",3,"showOperator","showMatchModes","showAddButton"],["type","text","field","code","display","menu","placeholder","Search by Code",3,"showOperator","showMatchModes","showAddButton"],["type","text","field","category","display","menu",3,"showOperator","showMatchModes","showAddButton"],["categoryFilter",""],["pTemplate","filter"],["type","text","field","defaultValue","display","menu","placeholder","Search by Default Value",3,"showOperator","showMatchModes","showAddButton"],["field","isSuperAdminManaged","display","menu",3,"showOperator","showMatchModes","showAddButton"],["superAdminFilter",""],["type","text","field","dataType","display","menu",3,"showOperator","showMatchModes","showAddButton"],["field","accessLevel","display","menu",3,"showOperator","showMatchModes","showAddButton"],["accessLevelFilter",""],[1,"flex","align-items-center"],["type","date","field","createdDate","display","menu",3,"showOperator","showMatchModes","showAddButton","showClearButton","showApplyButton","showButtons"],["columnFilter",""],[1,"action-col-header"],["pButton","","label","Clear","icon","pi pi-filter-slash",1,"p-button-outlined","mb-1",3,"click"],["placeholder","Search Category",3,"options","optionLabel","optionValue","autoDisplayFirst","ngModel","onChange"],["placeholder","Select Managed By Super Admin",3,"ngModel","options","optionLabel","optionValue","onChange"],["placeholder","Search Data Type",3,"options","optionLabel","optionValue","autoDisplayFirst","ngModel","onChange"],["placeholder","Select Access Level",3,"ngModel","options","optionLabel","optionValue","onChange"],[1,"date-filter-label"],["selectionMode","range","inputId","range",3,"inline","ngModel","readonlyInput","appendTo","ngModelChange","onSelect"],[1,"flex","pt-2","pb-0","px-0"],["type","button","pButton","","pRipple","",1,"p-button-outlined","p-button-sm","mr-2",3,"label","click"],["type","button","pButton","","pRipple","",1,"p-button-sm",3,"label","disabled","click"],[3,"pReorderableRow"],[1,"text-overflow-ellipsis",2,"width","60px"],[1,"p-column-title"],[1,"word-break"],[1,"word-break",2,"width","60px"],["class","cursor-pointer text-right p-link",3,"click",4,"ngIf"],[4,"ngIf"],[1,"product-badge"],[1,"flex","justify-content-center","align-items-center","relative"],["type","button","pButton","","icon","pi pi-ellipsis-h",3,"click"],[3,"appendTo","popup","model"],["menu",""],["pReorderableRowHandle","",1,"pi","pi-bars"],[1,"product-badge","status-blue","mb-1","inline-block","mr-2"],[1,"cursor-pointer","text-right","p-link",3,"click"],["colspan","15",1,"text-center"],[3,"formGroup"],[1,"formgrid","grid"],[1,"col-12","md:col-6","field"],[1,"p-error"],["type","text","pInputText","","formControlName","label",3,"input"],["class","p-error",4,"ngIf"],["type","text","pInputText","","formControlName","code"],["type","text","pInputText","","formControlName","placeholder"],["optionLabel","label","optionValue","value","formControlName","accessLevel",3,"options","autoDisplayFirst"],[1,"col-12","md:col-4","field","input-field-style"],["optionLabel","displayName","optionValue","key","formControlName","category",3,"options","autoDisplayFirst"],["optionLabel","label","optionValue","value","formControlName","dataType",3,"options","autoDisplayFirst"],[1,"col-12","md:col-4","field","section-input-style"],["type","text","pInputText","","formControlName","section"],[1,"field"],["type","text","pInputText","","formControlName","defaultValue"],["class","field",4,"ngIf"],["rows","5","pInputTextarea","","formControlName","description",1,"w-full"],[1,"flex"],[1,"field","mr-4"],[3,"formControl","binary"],["responsiveLayout","scroll","styleClass","p-datatable-gridlines",3,"value"],["pTemplate","summary"],["type","text","pInputText","",3,"ngModel","ngModelOptions","ngModelChange","input"],["type","text","pInputText","",3,"ngModel","ngModelOptions","ngModelChange"],["pButton","","pRipple","","icon","pi pi-fw pi-trash",1,"p-button-primary",3,"click"],[1,"flex","md:justify-content-end"],[1,"flex","align-items-end"],["pButton","","pRipple","","label","Add","icon","pi pi-plus",1,"p-button-primary",3,"click"],["pButton","","pRipple","","label","Cancel","icon","pi pi-times",1,"p-button-danger",3,"click"],["pButton","","pRipple","","label","Save","icon","pi pi-check",1,"p-button-success",3,"loading","disabled","click"],["pButton","","pRipple","","icon","pi pi-times","label","No",1,"p-button-text",3,"click"],["pButton","","pRipple","","icon","pi pi-check","label","Yes",1,"p-button-text",3,"click"]],template:function(n,e){1&n&&(t.TgZ(0,"p-breadcrumb",0),t.NdJ("onItemClick",function(l){return e.onItemClick(l)}),t.qZA(),t.TgZ(1,"div",1)(2,"div",2)(3,"p-table",3,4),t.NdJ("onLazyLoad",function(l){return e.loadData(l)})("onRowReorder",function(l){return e.onConfigurationsReorder(l)}),t.YNc(5,cn,8,1,"ng-template",5),t.YNc(6,hn,70,28,"ng-template",6),t.YNc(7,yn,83,33,"ng-template",7),t.YNc(8,Ln,3,0,"ng-template",8),t.qZA()()(),t.TgZ(9,"p-dialog",9),t.NdJ("visibleChange",function(l){return e.showAddEditDialog=l})("onHide",function(){return e.closeAddEditDialog()}),t.YNc(10,Bn,73,39,"ng-template",10),t.YNc(11,Vn,2,2,"ng-template",11),t.qZA(),t.TgZ(12,"p-dialog",12),t.
1NdJ("visibleChange",function(l){return e.showDeleteDialog=l})("onHide",function(){return e.closeDeleteDialog()}),t.TgZ(13,"div",13),t._UZ(14,"i",14),t.TgZ(15,"span"),t._uU(16,"Are you sure you want to delete?"),t.qZA()(),t.YNc(17,Yn,2,0,"ng-template",11),t.qZA(),t.TgZ(18,"p-dialog",12),t.NdJ("visibleChange",function(l){return e.showActivateDialog=l})("onHide",function(){return e.closeActivateDeactivateDialog()}),t.TgZ(19,"div",13),t._UZ(20,"i",14),t.TgZ(21,"span"),t._uU(22,"Are you sure you want to deactivate?"),t.qZA()(),t.YNc(23,Qn,2,0,"ng-template",11),t.qZA(),t.TgZ(24,"p-dialog",12),t.NdJ("visibleChange",function(l){return e.showDeactivateDialog=l})("onHide",function(){return e.closeActivateDeactivateDialog()}),t.TgZ(25,"div",13),t._UZ(26,"i",14),t.TgZ(27,"span"),t._uU(28,"Are you sure you want to activate?"),t.qZA()(),t.YNc(29,Hn,2,0,"ng-template",11),t.qZA(),t.TgZ(30,"p-dialog",15),t.NdJ("visibleChange",function(l){return e.showOptionValuesDialog=l})("onHide",function(){return e.closeOptionValuesDialog()}),t.TgZ(31,"div",16),t.YNc(32,Gn,3,1,"div",17),t.qZA()()),2&n&&(t.Q6J("model",e.breadcrumbRoutes.CONFIGURATIONS_ROUTES)("home",e.breadcrumbRoutes.HOME),t.xp6(3),t.Q6J("value",e.configurations)("rows",e.pageSize)("paginator",!0)("rowHover",!0)("lazy",!0)("totalRecords",e.totalElements)("alwaysShowPaginator",e.alwaysShowPaginator)("showCurrentPageReport",!0)("rowsPerPageOptions",e.constants.PAGE_SIZES)("loading",e.dataLoader),t.xp6(6),t.Q6J("visible",e.showAddEditDialog)("styleClass","mac-dialog-md")("header",e.configurationsDetails?"Edit Configuration":"Add Configuration")("modal",!0)("draggable",!1),t.xp6(3),t.Q6J("visible",e.showDeleteDialog)("modal",!0)("styleClass","mac-dialog-sm")("draggable",!1),t.xp6(6),t.Q6J("visible",e.showActivateDialog)("modal",!0)("styleClass","mac-dialog-sm")("draggable",!1),t.xp6(6),t.Q6J("visible",e.showDeactivateDialog)("modal",!0)("styleClass","mac-dialog-sm")("draggable",!1),t.xp6(6),t.Q6J("visible",e.showOptionValuesDialog)("modal",!0)("styleClass","mac-dialog-sm")("draggable",!1),t.xp6(2),t.Q6J("ngForOf",null==e.configurationsDetails?null:e.configurationsDetails.options))},dependencies:[f.sg,f.O5,o._Y,o.Fj,o.JJ,o.JL,o.On,E.jx,M.o,T.iA,T.Mv,T.qO,T.xl,L.Hq,y.H,S.V,o.oH,o.sg,o.u,F.Lt,$.f,tt.a,et.v2,at.XZ,N.g,f.OU,f.rS,J],styles:[".p-calendar[_ngcontent-%COMP%]{margin-top:10px!important}.options-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;column-gap:20px;row-gap:20px}@media (max-width: 860px) and (min-width: 700px){.input-field-style[_ngcontent-%COMP%]{width:50%}}@media (max-width: 860px){.section-input-style[_ngcontent-%COMP%]{width:100%}}"]});const zn=[{path:"",component:P,canActivate:[W.a]},{path:"manage-clients",component:R,canActivate:[W.a],data:{roles:[C.P.SUPER_ADMIN]}},{path:"client-configurations",component:B,canActivate:[W.a],data:{roles:[C.P.SUPER_ADMIN]}}];class O{}O.\u0275fac=function(n){return new(n||O)},O.\u0275mod=t.oAB({type:O}),O.\u0275inj=t.cJS({imports:[f.ez,m.Bz.forChild(zn),Et.q,o.u5,qt.ON,q.FI,M.j,We.V,Xe.EV,T.U$,L.hJ,y.T,it.O,S.S,o.UX,F.kW,lt.q4,$._8,tt.w,et.$9,$e.Gg,at.nD,N.A,m.Bz]})},60332:(V,D,s)=>{s.d(D,{x:()=>C});var m=s(80529),d=s(51448),A=s(41571);class C{constructor(c){this.http=c}getConfigurations(c,_,g,h,t,b,w,I,Z,f,E,q,M,T,L){let y=(new m.LE).set("isActive",c).set("page",_).set("size",g).set("label",h).set("code",t).set("category",b||"").set("defaultValue",w).set("isSuperAdminManaged",I).set("fromCreatedDate",Z).set("toCreatedDate",f).set("options",E).set("accessLevel",q).set("dataType",M).set("sort",T);return L&&(y=y.append("appTypeCode",L)),this.http.get(`${d.g.BASE_API_URL}configurations`,{params:y})}getCategories(){return this.http.get(`${d.g.BASE_API_URL}configurations/categories`)}saveConfigurations(c,_){return _?this.http.put(`${d.g.BASE_API_URL}configurations/${_}`,c,{headers:{"Content-Type":"application/json"}}):this.http.post(`${d.g.BASE_API_URL}configurations`,c,{headers:{"Content-Type":"application/json"}})}deleteConfigurations(c){return this.http.delete(`${d.g.BASE_API_URL}configurations/${c}`)}activateConfigurations(c){return this.http.patch(`${d.g.BASE_API_URL}configurations/${c}/activate`,{headers:{"Content-Type":"application/json"}})}deactivateConfigurations(c){return this.http.patch(`${d.g.BASE_API_URL}configurations/${c}/deactivate`,{headers:{"Content-Type":"application/json"}})}sortConfigurations(c,_){return this.http.patch(`${d.g.BASE_API_URL}configurations/sort`,{fromId:c,toId:_},{headers:{"Content-Type":"application/json"}})}}C.\u0275fac=function(c){return new(c||C)(A.LFG(m.eN))}
1,C.\u0275prov=A.Yz7({token:C,factory:C.\u0275fac})},83602:(V,D,s)=>{s.d(D,{q:()=>k});var m=s(36895),d=s(67522),A=s(24006),C=s(35593),o=s(25047),c=s(51740),_=s(78676),g=s(15108),h=s(32435),t=s(21327),b=s(60099),w=s(65722),I=s(82210),Z=s(70585),f=s(21493),E=s(50613),q=s(91795),M=s(63054),T=s(97932),L=s(25054),y=s(13388),S=s(58783),F=s(77604),N=s(41571);class k{}k.\u0275fac=function(j){return new(j||k)},k.\u0275mod=N.oAB({type:k}),k.\u0275inj=N.cJS({imports:[m.ez,d.Bz,A.UX,C.hJ,o.L$,c.j,_.w,g.x,h.y,t.$9,b.U$,w.q4,A.u5,I.kW,Z._8,f.S,E.cc,q.T,M.A,T.L,L.$,y.O,S.LU,F.FI]})},80710:(V,D,s)=>{s.d(D,{E:()=>C});var m=s(15439),A=s(51448);class C{static dateToUtc(c){return m.utc(c)}static utcToDateFormatted(c){return c?m.utc(c,A.g.DATE_FORMAT_FOR_DATAVIEW).local().format(A.g.DATE_FORMAT_FOR_DATAVIEW):null}static utcToDate(c){return m.utc(c).local()}static convertTimeFormat(c,_,g){return"-----"===c?"":c&&m(c,_).format(g)}static convertDateTimeFormat(c,_){return c&&m(c).format(_)}}},78372:(V,D,s)=>{s.d(D,{b:()=>C});var m=s(34986),d=s(54482),A=s(25403);function C(o,c=m.z){return(0,d.e)((_,g)=>{let h=null,t=null,b=null;const w=()=>{if(h){h.unsubscribe(),h=null;const Z=t;t=null,g.next(Z)}};function I(){const Z=b+o,f=c.now();if(f<Z)return h=this.schedule(void 0,Z-f),void g.add(h);w()}_.subscribe((0,A.x)(g,Z=>{t=Z,b=c.now(),h||(h=c.schedule(I,o),g.add(h))},()=>{w(),g.complete()},void 0,()=>{t=h=null}))})}}}]);
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.