"use strict";(self.webpackChunkmikrowizard=self.webpackChunkmikrowizard||[]).push([[391],{8391:(V,_,m)=>{m.r(_),m.d(_,{AccModule:()=>G});var b=m(177),c=m(8921),g=m(7062),p=m(7390),v=m(9130),t=m(4438),j=m(9492),M=m(1170),h=m(9417),f=m(6467),x=m(9631),u=m(5084),C=m(4869),y=m(6600);function k(i,s){if(1&i&&(t.j41(0,"mat-option",25),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e),t.R7$(),t.SpI(" ",e," ")}}function F(i,s){if(1&i&&(t.j41(0,"mat-option",25),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e),t.R7$(),t.SpI(" ",e," ")}}function w(i,s){1&i&&t.EFF(0),2&i&&t.SpI(" ",s.item.index," ")}function E(i,s){1&i&&t.EFF(0),2&i&&t.SpI(" ",s.item.name," ")}function A(i,s){1&i&&t.EFF(0),2&i&&t.SpI(" ",s.item.devip," ")}function D(i,s){1&i&&t.EFF(0),2&i&&t.SpI(" ",s.item.username," ")}function I(i,s){if(1&i&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&i){const e=s.item.action;t.R7$(),t.JRh(e)}}function R(i,s){1&i&&t.EFF(0),2&i&&t.SpI(" ",s.item.section," ")}function T(i,s){1&i&&t.EFF(0),2&i&&t.SpI(" ",s.item.created," ")}function N(i,s){1&i&&t.EFF(0),2&i&&t.SpI(" ",s.item.message," ")}const S=[{path:"",component:(()=>{class i{constructor(e,r,n,o){this.data_provider=e,this.router=r,this.route=n,this.login_checker=o,this.filters={devid:!1,ip:"",command:"",user:!1,state:"all",with:"all",start_time:!1,end_time:!1},this.filters_visible=!1,this.event_action=[],this.event_section=[],this.source=[],this.columns=[],this.loading=!0,this.rows=[],this.devid=0,this.sorting={enabled:!0,multiSorting:!0},this.rowDetail={enabled:!0,template:d=>`\n\t\t\t
\n\t\t\t\t
${d.name}
\n\t\t\t\t
${d.devip}\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tUser Address | \n\t\t\t\t\t${d.address} | \n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tUser Name | \n\t\t\t\t\t${d.username} | \n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tConnection Type | \n\t\t\t\t\t${d.ctype} | \n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tSection | \n\t\t\t\t\t${d.section} | \n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tExec time | \n\t\t\t\t\t${d.created} | \n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
Executed Config
\n\t\t\t\t
\n\t\t\t\t\t${d.config}\n\t\t\t\t
\n\t\t\t
`},this.paging={enabled:!0,page:1,pageSize:10,pageSizes:[5,10,25,50],display:p.sE.ADVANCED},this.columnMenu={enabled:!0,sort:!0,columnsManager:!0},this.infoPanel={enabled:!0,infoDialog:!1,columnsManager:!0,schemaManager:!0},this.rowSelection={enabled:!0,type:p.AU.CHECKBOX,mode:p.fL.MULTIPLE};var l=this;this.login_checker.isLoggedIn()||setTimeout(function(){l.router.navigate(["login"])},100),this.data_provider.getSessionInfo().then(d=>{l.uid=d.uid,l.uname=d.name,l.tz=d.tz,"admin"!=d.role&&setTimeout(function(){l.router.navigate(["/user/dashboard"])},100)})}reinitgrid(e,r){"start"==e?this.filters.start_time=r.target.value:"end"==e?this.filters.end_time=r.target.value:"ip"==e?this.filters.ip=r:"section"==e?this.filters.section=r:"config"==e?this.filters.config=r:"action"==e&&(this.filters.action=r),this.initGridTable()}ngOnInit(){this.devid=Number(this.route.snapshot.paramMap.get("devid")),this.devid>0&&(this.filters.devid=this.devid),this.initGridTable()}OnDestroy(){}onSelectedRows(e){this.rows=e,this.Selectedrows=e.map(r=>r.source.id)}removefilter(e){delete this.filters[e],this.initGridTable()}toggleCollapse(){this.filters_visible=!this.filters_visible}logger(e){console.dir(e)}initGridTable(){var e=this;this.data_provider.get_account_logs(this.filters).then(r=>{let n=1;this.source=r.map(o=>(o.index=n,e.event_section.includes(o.section)||e.event_section.push(o.section),e.event_action.includes(o.action)||e.event_action.push(o.action),o.created=(0,v.qD)(o.created.split(".")[0]+".000Z",e.tz,"yyyy-MM-dd HH:mm:ss XXX"),n+=1,o)),this.loading=!1})}static#t=this.\u0275fac=function(r){return new(r||i)(t.rXU(j.C),t.rXU(g.Ix),t.rXU(g.nX),t.rXU(M.T))};static#e=this.\u0275cmp=t.VBU({type:i,selectors:[["ng-component"]],decls:70,vars:24,consts:[["picker1",""],["picker2",""],["multiSelect",""],["xs",""],[1,"mb-4"],["xs","",3,"lg"],["cButton","","color","primary",1,"me-1",3,"click"],[1,"fa-solid","fa-filter","mr-1"],["cCollapse","",3,"visible"],["xs","",1,"example-form",3,"lg"],["matInput","",3,"dateChange","ngModelChange","matDatepicker","ngModel"],["matIconSuffix","",3,"for"],["placeholder","Event Section",3,"ngModelChange","ngModel"],["value","All"],[3,"value",4,"ngFor","ngForOf"],["matInput","",3,"ngModelChange","ngModel"],[3,"rowDetail","source","columnMenu","paging","sorting","infoPanel","autoResizeWidth"],["header","#No","type","NUMBER","field","index","width","25","align","CENTER"],["header","Device Name","field","name"],["header","Device IP","field","devip"],["header","Username","field","username"],["header","Action","field","action"],["header","Section","field","section"],["header","Date","field","created"],["header","Message","field","message",3,"enabled"],[3,"value"]],template:function(r,n){if(1&r){const o=t.RV6();t.j41(0,"c-row")(1,"c-col",3)(2,"c-card",4)(3,"c-card-header")(4,"c-row")(5,"c-col",5),t.EFF(6," Accunting Logs "),t.k0s(),t.j41(7,"c-col",5)(8,"button",6),t.bIt("click",function(){return t.eBV(o),t.Njj(n.toggleCollapse())}),t.nrm(9,"i",7),t.EFF(10,"Filter"),t.k0s()()()(),t.j41(11,"c-card-body")(12,"c-row")(13,"div",8)(14,"c-col",9)(15,"mat-form-field")(16,"mat-label"),t.EFF(17,"Start date"),t.k0s(),t.j41(18,"input",10),t.bIt("dateChange",function(a){return t.eBV(o),t.Njj(n.reinitgrid("start",a))}),t.mxI("ngModelChange",function(a){return t.eBV(o),t.DH7(n.filters.start_time,a)||(n.filters.start_time=a),t.Njj(a)}),t.k0s(),t.nrm(19,"mat-datepicker-toggle",11)(20,"mat-datepicker",null,0),t.k0s(),t.j41(22,"mat-form-field")(23,"mat-label"),t.EFF(24,"End date"),t.k0s(),t.j41(25,"input",10),t.bIt("dateChange",function(a){return t.eBV(o),t.Njj(n.reinitgrid("end",a))}),t.mxI("ngModelChange",function(a){return t.eBV(o),t.DH7(n.filters.end_time,a)||(n.filters.end_time=a),t.Njj(a)}),t.k0s(),t.nrm(26,"mat-datepicker-toggle",11)(27,"mat-datepicker",null,1),t.k0s(),t.j41(29,"mat-form-field")(30,"mat-label"),t.EFF(31,"Select section"),t.k0s(),t.j41(32,"mat-select",12,2),t.bIt("ngModelChange",function(a){return t.eBV(o),t.Njj(n.reinitgrid("section",a))}),t.mxI("ngModelChange",function(a){return t.eBV(o),t.DH7(n.filters.section,a)||(n.filters.section=a),t.Njj(a)}),t.j41(34,"mat-option",13),t.EFF(35,"All"),t.k0s(),t.DNE(36,k,2,2,"mat-option",14),t.k0s()(),t.j41(37,"mat-form-field")(38,"mat-label"),t.EFF(39,"Select action"),t.k0s(),t.j41(40,"mat-select",12,2),t.bIt("ngModelChange",function(a){return t.eBV(o),t.Njj(n.reinitgrid("action",a))}),t.mxI("ngModelChange",function(a){return t.eBV(o),t.DH7(n.filters.action,a)||(n.filters.action=a),t.Njj(a)}),t.j41(42,"mat-option",13),t.EFF(43,"All"),t.k0s(),t.DNE(44,F,2,2,"mat-option",14),t.k0s()(),t.j41(45,"mat-form-field")(46,"mat-label"),t.EFF(47,"Config"),t.k0s(),t.j41(48,"input",15),t.bIt("ngModelChange",function(a){return t.eBV(o),t.Njj(n.reinitgrid("config",a))}),t.mxI("ngModelChange",function(a){return t.eBV(o),t.DH7(n.filters.config,a)||(n.filters.config=a),t.Njj(a)}),t.k0s()(),t.j41(49,"mat-form-field")(50,"mat-label"),t.EFF(51,"IP"),t.k0s(),t.j41(52,"input",15),t.bIt("ngModelChange",function(a){return t.eBV(o),t.Njj(n.reinitgrid("ip",a))}),t.mxI("ngModelChange",function(a){return t.eBV(o),t.DH7(n.filters.ip,a)||(n.filters.ip=a),t.Njj(a)}),t.k0s()()()()(),t.j41(53,"gui-grid",16)(54,"gui-grid-column",17),t.DNE(55,w,1,1,"ng-template"),t.k0s(),t.j41(56,"gui-grid-column",18),t.DNE(57,E,1,1,"ng-template"),t.k0s(),t.j41(58,"gui-grid-column",19),t.DNE(59,A,1,1,"ng-template"),t.k0s(),t.j41(60,"gui-grid-column",20),t.DNE(61,D,1,1,"ng-template"),t.k0s(),t.j41(62,"gui-grid-column",21),t.DNE(63,I,2,1,"ng-template"),t.k0s(),t.j41(64,"gui-grid-column",22),t.DNE(65,R,1,1,"ng-template"),t.k0s(),t.j41(66,"gui-grid-column",23),t.DNE(67,T,1,1,"ng-template"),t.k0s(),t.j41(68,"gui-grid-column",24),t.DNE(69,N,1,1,"ng-template"),t.k0s()()()()()()}if(2&r){const o=t.sdS(21),l=t.sdS(28);t.R7$(5),t.Y8G("lg",11),t.R7$(2),t.Y8G("lg",1),t.R7$(6),t.Y8G("visible",n.filters_visible),t.R7$(),t.Y8G("lg",12),t.R7$(4),t.Y8G("matDatepicker",o),t.R50("ngModel",n.filters.start_time),t.R7$(),t.Y8G("for",o),t.R7$(6),t.Y8G("matDatepicker",l),t.R50("ngModel",n.filters.end_time),t.R7$(),t.Y8G("for",l),t.R7$(6),t.R50("ngModel",n.filters.section),t.R7$(4),t.Y8G("ngForOf",n.event_section),t.R7$(4),t.R50("ngModel",n.filters.action),t.R7$(4),t.Y8G("ngForOf",n.event_action),t.R7$(4),t.R50("ngModel",n.filters.config),t.R7$(4),t.R50("ngModel",n.filters.ip),t.R7$(),t.Y8G("rowDetail",n.rowDetail)("source",n.source)("columnMenu",n.columnMenu)("paging",n.paging)("sorting",n.sorting)("infoPanel",n.infoPanel)("autoResizeWidth",!0),t.R7$(15),t.Y8G("enabled",!1)}},dependencies:[c.iby,c.qHy,c.lMi,b.Sq,c.gLf,c.oMR,h.me,h.BC,h.vS,c._fv,p.V1,p.fz,c.DcD,f.rl,f.nJ,f.yw,x.fg,u.Vh,u.bZ,u.bU,C.VO,y.wT],styles:[":host .legend small{font-size:x-small}.gui-drawer-content{background-color:#efefef!important}.log-detail{padding:30px 10px;box-sizing:border-box}.log-detail h1{font-size:2em;font-weight:700;margin:0;padding:0}.log-detail small{position:relative;top:-7px;padding:0;font-weight:700;font-size:1.1em}.log-detail table{width:100%;border-collapse:collapse!important;margin:0;padding:0;background-color:#fff!important}.log-detail th{text-align:left}.log-detail th,.log-detail td{border:1px solid #dfdfdf!important;padding:1rem!important}.gui-row-detail>div{height:100%}.gui-row-detail .log-detail{height:100%}.gui-structure{min-height:550px}.log-detail code{padding:5px!important;display:block;background:#1d1f21;color:#c5c8c6;border-bottom-left-radius:3px;border-bottom-right-radius:3px;width:100%}.log-detail .code-title{background-color:#393e42!important;width:100%;padding:2px 15px;display:inline-block;margin-top:10px;color:#d2d2d2;border-top-left-radius:3px;border-top-right-radius:3px;font-weight:700}.example-form{--mat-form-field-container-height: 36px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 6px;--mat-form-field-filled-with-label-container-padding-top: 6px;--mat-form-field-filled-with-label-container-padding-bottom: 6px;--mat-select-arrow-transform: none;--mdc-checkbox-state-layer-size: 28px;--mat-checkbox-touch-target-display: none;--mdc-switch-state-layer-size: 28px;--mdc-radio-state-layer-size: 28px;--mat-radio-touch-target-display: none;--mdc-list-list-item-one-line-container-height: 24px;--mdc-list-list-item-two-line-container-height: 48px;--mdc-list-list-item-three-line-container-height: 56px;--mat-list-list-item-leading-icon-start-space: 16px;--mat-list-list-item-leading-icon-end-space: 32px;--mat-paginator-container-size: 40px;--mat-paginator-form-field-container-height: 36px;--mat-paginator-form-field-container-vertical-padding: 6px;--mdc-text-button-container-height: 24px;--mdc-filled-button-container-height: 24px;--mdc-outlined-button-container-height: 24px;--mdc-protected-button-container-height: 24px;--mat-text-button-touch-target-display: none;--mat-filled-button-touch-target-display: none;--mat-protected-button-touch-target-display: none;--mat-outlined-button-touch-target-display: none;--mat-fab-touch-target-display: none;--mat-fab-small-touch-target-display: none;--mat-table-header-container-height: 40px;--mat-table-footer-container-height: 36px;--mat-table-row-item-container-height: 36px;--mat-expansion-header-collapsed-state-height: 36px;--mat-expansion-header-expanded-state-height: 48px;--mat-stepper-header-height: 42px;--mat-toolbar-standard-height: 52px;--mat-toolbar-mobile-height: 44px;--mat-tree-node-min-height: 28px;--mat-standard-button-toggle-height: 24px;--mat-icon-button-touch-target-display: none}.example-form .mat-calendar-controls{--mat-icon-button-touch-target-display: none}.example-form .mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}.example-form .mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 24px}.example-form .mdc-list-item__start,.example-form .mdc-list-item__end{--mdc-radio-state-layer-size: 28px}.example-form .mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.example-form .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.example-form .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:40px}.example-form .mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.example-form .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.example-form .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:56px}.example-form .mat-mdc-tab-header{--mdc-secondary-navigation-tab-container-height: 32px}.example-form .mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 28px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:2px}.example-form .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-floating-label{display:inline}.example-form mat-form-field *{font-size:13px!important}.example-form .mat-mdc-form-field-infix{width:150px}\n"],encapsulation:2})}return i})(),data:{title:$localize`Accounting Logs`}}];let z=(()=>{class i{static#t=this.\u0275fac=function(r){return new(r||i)};static#e=this.\u0275mod=t.$C({type:i});static#i=this.\u0275inj=t.G2t({imports:[g.iI.forChild(S),g.iI]})}return i})(),G=(()=>{class i{static#t=this.\u0275fac=function(r){return new(r||i)};static#e=this.\u0275mod=t.$C({type:i});static#i=this.\u0275inj=t.G2t({imports:[z,c.Dw2,b.MD,c.pc9,h.YN,c.tmq,c.tHK,c.tmq,p.uM,c.G95,f.RG,x.fS,u.X6,C.Ve]})}return i})()}}]);