frontend-roadreport-main/frontend-roadreport-deploy/dist/road-report/984.b27a37fd248eb18c.js
2024-12-31 10:28:36 +07:00

1 line
24 KiB
JavaScript

"use strict";(self.webpackChunkroad_report=self.webpackChunkroad_report||[]).push([[984],{6655:(x,f,o)=>{o.d(f,{D:()=>m});var l=o(1991),r=o(8699),t=o(1626),h=o(7110);let m=(()=>{class g extends l.G{constructor(c,u){super(c,u),this.http=c,this.helpers=u,this.endpoint="users"}static{this.\u0275fac=function(u){return new(u||g)(r.KVO(t.Qq),r.KVO(h.V))}}static{this.\u0275prov=r.jDH({token:g,factory:g.\u0275fac,providedIn:"root"})}}return g})()},9519:(x,f,o)=>{o.d(f,{M:()=>l});class l{static noWhiteSpace(t){return t?.value&&t.value.trim().length!==t.value.length?{noWhiteSpace:!0}:null}}},1991:(x,f,o)=>{o.d(f,{G:()=>h});var l=o(8699),r=o(1626),t=o(7110);let h=(()=>{class m{constructor(d,c){this.http=d,this.helpers=c,this.baseApiUrl="/api",this.endpoint="",this.query={}}url(){return`${this.baseApiUrl}/${this.endpoint}`}urlWithId(d){return`${this.baseApiUrl}/${this.endpoint}/${d}`}urlCustom(d){return`${this.baseApiUrl}/${this.endpoint}/${d}`}urlArray(d){return`${this.baseApiUrl}/${this.endpoint}/${d.join("/")}`}insert(d){const c=this.url();return this.http.post(c,d)}getAll(d){const c=this.url(),u=d?this.helpers.generateParams(d):{};return this.http.get(c,{params:u})}getById(d,c){const u=this.urlWithId(d),v=c?this.helpers.generateParams(c):{};return this.http.get(u,{params:v})}update(d,c){const u=this.urlWithId(d);return this.http.put(u,c)}delete(d){const c=this.urlWithId(d);return this.http.delete(c)}static{this.\u0275fac=function(c){return new(c||m)(l.KVO(r.Qq),l.KVO(t.V))}}static{this.\u0275prov=l.jDH({token:m,factory:m.\u0275fac,providedIn:"root"})}}return m})()},2423:(x,f,o)=>{o.d(f,{U:()=>t});var l=o(4412),r=o(8699);let t=(()=>{class h{constructor(){this.loading$=new l.t(!1)}isLoading(){return this.loading$.asObservable()}show(){this.loading$.next(!0)}hide(){this.loading$.next(!1)}static{this.\u0275fac=function(d){return new(d||h)}}static{this.\u0275prov=r.jDH({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})()},8001:(x,f,o)=>{o.d(f,{M:()=>h});var l=o(177),r=o(8699),t=o(6803);let h=(()=>{class m{constructor(d){this.activeModal=d,this.modalType=1,this.message="Yakin ingin logout?"}static{this.\u0275fac=function(c){return new(c||m)(r.rXU(t.Lw))}}static{this.\u0275cmp=r.VBU({type:m,selectors:[["app-confirmation-modal"]],inputs:{modalType:"modalType",message:"message"},standalone:!0,features:[r.aNF],decls:12,vars:3,consts:[[1,"modal-header"],[1,"modal-title","text-dark"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[1,"d-block","text-center","fs-3","bi",3,"ngClass"],[1,"text-center","mx-auto",2,"max-width","40ch",3,"innerHTML"],[1,"modal-footer"],["type","button",1,"btn","btn-light",3,"click"],["type","button",1,"btn",3,"ngClass","click"]],template:function(c,u){1&c&&(r.j41(0,"div",0)(1,"h4",1),r.EFF(2,"Konfirmasi"),r.k0s(),r.j41(3,"button",2),r.bIt("click",function(){return u.activeModal.dismiss()}),r.k0s()(),r.j41(4,"div",3),r.nrm(5,"i",4)(6,"div",5),r.k0s(),r.j41(7,"div",6)(8,"button",7),r.bIt("click",function(){return u.activeModal.close(!1)}),r.EFF(9," Tidak "),r.k0s(),r.j41(10,"button",8),r.bIt("click",function(){return u.activeModal.close(!0)}),r.EFF(11," Ya "),r.k0s()()),2&c&&(r.R7$(5),r.Y8G("ngClass",1===u.modalType?"bi-box-arrow-right":2===u.modalType?"bi-trash":"bi-question-circle"),r.R7$(1),r.Y8G("innerHTML",u.message,r.npT),r.R7$(4),r.Y8G("ngClass",3===u.modalType?"btn-primary":"btn-danger"))},dependencies:[l.MD,l.YU]})}}return m})()},5984:(x,f,o)=>{o.r(f),o.d(f,{DashboardModule:()=>Rt});var l=o(177),r=o(1985),t=o(8699);function d(e){return Array.isArray(e)?e:[e]}var I=o(1413),A=o(4572),L=o(8793),C=o(6697),P=o(5245),J=o(152),$=o(6354),z=o(9172),B=o(6977);let N;try{N=typeof Intl<"u"&&Intl.v8BreakIterator}catch{N=!1}let Z=(()=>{class e{constructor(n){this._platformId=n,this.isBrowser=this._platformId?(0,l.UE)(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!N)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static{this.\u0275fac=function(i){return new(i||e)(t.KVO(t.Agw))}}static{this.\u0275prov=t.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const _=new Set;let D,et=(()=>{class e{constructor(n,i){this._platform=n,this._nonce=i,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):it}matchMedia(n){return(this._platform.WEBKIT||this._platform.BLINK)&&function nt(e,a){if(!_.has(e))try{D||(D=document.createElement("style"),a&&(D.nonce=a),D.setAttribute("type","text/css"),document.head.appendChild(D)),D.sheet&&(D.sheet.insertRule(`@media ${e} {body{ }}`,0),_.add(e))}catch(n){console.error(n)}}(n,this._nonce),this._matchMedia(n)}static{this.\u0275fac=function(i){return new(i||e)(t.KVO(Z),t.KVO(t.BIS,8))}}static{this.\u0275prov=t.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function it(e){return{matches:"all"===e||""===e,media:e,addListener:()=>{},removeListener:()=>{}}}let ot=(()=>{class e{constructor(n,i){this._mediaMatcher=n,this._zone=i,this._queries=new Map,this._destroySubject=new I.B}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(n){return W(d(n)).some(s=>this._registerQuery(s).mql.matches)}observe(n){const s=W(d(n)).map(b=>this._registerQuery(b).observable);let p=(0,A.z)(s);return p=(0,L.x)(p.pipe((0,C.s)(1)),p.pipe((0,P.i)(1),(0,J.B)(0))),p.pipe((0,$.T)(b=>{const M={matches:!1,breakpoints:{}};return b.forEach(({matches:F,query:Ft})=>{M.matches=M.matches||F,M.breakpoints[Ft]=F}),M}))}_registerQuery(n){if(this._queries.has(n))return this._queries.get(n);const i=this._mediaMatcher.matchMedia(n),p={observable:new r.c(b=>{const M=F=>this._zone.run(()=>b.next(F));return i.addListener(M),()=>{i.removeListener(M)}}).pipe((0,z.Z)(i),(0,$.T)(({matches:b})=>({query:n,matches:b})),(0,B.Q)(this._destroySubject)),mql:i};return this._queries.set(n,p),p}static{this.\u0275fac=function(i){return new(i||e)(t.KVO(et),t.KVO(t.SKi))}}static{this.\u0275prov=t.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function W(e){return e.map(a=>a.split(",")).reduce((a,n)=>a.concat(n)).map(a=>a.trim())}var st=o(2423),w=o(8185);const at=[{name:"Dasbor",link:"/dashboard/home",icon:"bi bi-house",access:["SADM","PNGL","SVEI"]},{name:"Data Laporan",link:"/dashboard/data-laporan",icon:"bi bi-clipboard",access:["SADM","PNGL"]},{name:"Data Gudang",link:"/dashboard/data-gudang",icon:"bi bi-archive",access:["SADM"]},{name:"Jadwal Perbaikan",link:"/dashboard/jadwal-perbaikan",icon:"bi bi-calendar4",access:["SADM","PNGL"]},{name:"Rekapitulasi",link:"/dashboard/rekapitulasi",icon:"bi bi-list-ul",access:["SADM"]},{name:"Kelola Data",link:"/dashboard/setting",icon:"bi bi-gear",access:["SADM"]},{name:"Jadwal Survey",link:"/dashboard/surveyor",icon:"bi bi-calendar4",access:["SVEI"]}];var E=o(6803),rt=o(8359);let X=(()=>{class e{constructor(){this.triggerSource=new I.B}triggerSideMenu(){this.triggerSource.next()}getTriggerObservable(){return this.triggerSource.asObservable()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=t.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var G=o(5471);const lt=["sidemenuContent"];function dt(e,a){1&e&&(t.j41(0,"div")(1,"h1",9),t.EFF(2,"Road Report"),t.k0s(),t.j41(3,"small",10),t.EFF(4,"Sistem Pelaporan Jalan Rusak"),t.k0s()())}function ct(e,a){if(1&e&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&e){const n=t.XpG(2).$implicit;t.R7$(1),t.JRh(n.name)}}function ut(e,a){if(1&e&&(t.j41(0,"a",12,13),t.nrm(2,"i"),t.DNE(3,ct,2,1,"span",4),t.k0s()),2&e){const n=t.sdS(1),i=t.XpG().$implicit,s=t.XpG(2);t.AVh("justify-content-center",s.isSidenavCollapsed),t.Y8G("ngClass",n.isActive?"bg-primary text-white":"text-muted")("routerLink",i.link)("title",i.name),t.R7$(2),t.HbH(i.icon),t.R7$(1),t.Y8G("ngIf",!s.isSidenavCollapsed)}}function pt(e,a){if(1&e&&(t.qex(0),t.DNE(1,ut,4,8,"a",11),t.bVm()),2&e){const n=a.$implicit,i=t.XpG(2);t.R7$(1),t.Y8G("ngIf",i.isAllowedNameMenu(n))}}const mt=function(){return{width:"104px"}},ht=function(){return{width:"340px"}};function ft(e,a){if(1&e){const n=t.RV6();t.j41(0,"aside",2)(1,"div",3),t.DNE(2,dt,5,0,"div",4),t.j41(3,"button",5),t.bIt("click",function(){t.eBV(n);const s=t.XpG();return t.Njj(s.onToggleSidebar())}),t.nrm(4,"i",6),t.k0s()(),t.j41(5,"nav",7),t.DNE(6,pt,2,1,"ng-container",8),t.k0s()()}if(2&e){const n=t.XpG();t.Y8G("ngStyle",n.isSidenavCollapsed?t.lJ4(5,mt):t.lJ4(6,ht)),t.R7$(1),t.Y8G("ngClass",n.isSidenavCollapsed?"justify-content-center":"justify-content-between"),t.R7$(1),t.Y8G("ngIf",!n.isSidenavCollapsed),t.R7$(2),t.Y8G("ngClass",n.isSidenavCollapsed?"bi-chevron-right":"bi-chevron-left"),t.R7$(2),t.Y8G("ngForOf",n.menu)}}function gt(e,a){if(1&e){const n=t.RV6();t.j41(0,"a",18,19),t.bIt("click",function(){t.eBV(n);const s=t.sdS(1),p=t.XpG(2).$implicit;return t.Njj(s.isActive?null:p.dismiss("Menu click"))}),t.nrm(2,"i"),t.j41(3,"span"),t.EFF(4),t.k0s()()}if(2&e){const n=t.sdS(1),i=t.XpG().$implicit;t.Y8G("ngClass",n.isActive?"bg-primary text-white":"text-muted")("routerLink",i.link),t.R7$(2),t.HbH(i.icon),t.R7$(2),t.JRh(i.name)}}function bt(e,a){if(1&e&&(t.qex(0),t.DNE(1,gt,5,5,"a",17),t.bVm()),2&e){const n=a.$implicit,i=t.XpG(2);t.R7$(1),t.Y8G("ngIf",i.isAllowedNameMenu(n))}}function vt(e,a){if(1&e){const n=t.RV6();t.j41(0,"div",14)(1,"div")(2,"h1",9),t.EFF(3,"Road Report"),t.k0s(),t.j41(4,"small",10),t.EFF(5,"Sistem Pelaporan Jalan Rusak"),t.k0s()(),t.j41(6,"button",15),t.bIt("click",function(){const p=t.eBV(n).$implicit;return t.Njj(p.dismiss("Cross click"))}),t.k0s()(),t.j41(7,"div",16)(8,"nav",7),t.DNE(9,bt,2,1,"ng-container",8),t.k0s()()}if(2&e){const n=t.XpG();t.R7$(9),t.Y8G("ngForOf",n.menu)}}let K=(()=>{class e{constructor(n,i,s){this.sidenav=n,this.offcanvas=i,this.auth=s,this.isMobile=!1,this.toggleSidebar=new t.bkB,this.menu=at,this.isSidenavCollapsed=!1,this._isPNGL=null,this.offcanvasSubscription=new rt.yU}ngOnInit(){this.offcanvasSubscription=this.sidenav.getTriggerObservable().subscribe(()=>{this.offcanvas.open(this.offcanvasContent,{ariaLabelledBy:"offcanvas-sidemenu"})})}ngOnDestroy(){this.offcanvasSubscription.unsubscribe()}onToggleSidebar(){this.isSidenavCollapsed=!this.isSidenavCollapsed,this.toggleSidebar.emit(this.isSidenavCollapsed)}isPNGL(){if(null!==this._isPNGL)return this._isPNGL;const n=this.auth.getLoggedUser();return n?(this._isPNGL="SADM"===n.role.code,this._isPNGL):(this._isPNGL=!1,!1)}isAllowedNameMenu(n){const i=this.auth.getLoggedUser().role.code;return n.access.includes(i)}static{this.\u0275fac=function(i){return new(i||e)(t.rXU(X),t.rXU(E.RS),t.rXU(G.u))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["dashboard-sidenav"]],viewQuery:function(i,s){if(1&i&&t.GBs(lt,5),2&i){let p;t.mGM(p=t.lsd())&&(s.offcanvasContent=p.first)}},inputs:{isMobile:"isMobile"},outputs:{toggleSidebar:"toggleSidebar"},standalone:!0,features:[t.aNF],decls:3,vars:1,consts:[["class","position-fixed h-100 bg-white p-4",3,"ngStyle",4,"ngIf"],["sidemenuContent",""],[1,"position-fixed","h-100","bg-white","p-4",3,"ngStyle"],[1,"d-flex","align-items-center","column-gap-3","mb-5",3,"ngClass"],[4,"ngIf"],["type","button",1,"btn","btn-sm","btn-light",3,"click"],[1,"bi",3,"ngClass"],[1,"d-flex","flex-column","row-gap-3"],[4,"ngFor","ngForOf"],[1,"h5","text-uppercase","fw-semibold","mb-0"],[1,"text-body-tertiary"],["class","d-flex align-items-center column-gap-2 p-3 rounded-2 text-decoration-none fw-medium","routerLinkActive","",3,"justify-content-center","ngClass","routerLink","title",4,"ngIf"],["routerLinkActive","",1,"d-flex","align-items-center","column-gap-2","p-3","rounded-2","text-decoration-none","fw-medium",3,"ngClass","routerLink","title"],["rla","routerLinkActive"],[1,"offcanvas-header","align-items-start"],["type","button","aria-label","Close",1,"btn-close","mr-0","my-0",3,"click"],[1,"offcanvas-body"],["class","d-flex align-items-center column-gap-2 p-3 rounded-2 text-decoration-none fw-medium","routerLinkActive","",3,"ngClass","routerLink","click",4,"ngIf"],["routerLinkActive","",1,"d-flex","align-items-center","column-gap-2","p-3","rounded-2","text-decoration-none","fw-medium",3,"ngClass","routerLink","click"],["rlaCanvass","routerLinkActive"]],template:function(i,s){1&i&&(t.DNE(0,ft,7,7,"aside",0),t.DNE(1,vt,10,1,"ng-template",null,1,t.C5r)),2&i&&t.Y8G("ngIf",!s.isMobile)},dependencies:[l.MD,l.YU,l.Sq,l.bT,l.B3,w.iI,w.Wk,w.wQ,E.J0]})}}return e})();var yt=o(8001),y=o(9417),Y=o(9519),Mt=o(6655),U=o(7110);function Ct(e,a){1&e&&(t.j41(0,"div",18),t.EFF(1," Harus diisi "),t.k0s())}function Et(e,a){1&e&&(t.j41(0,"div",18),t.EFF(1," Awalan dan akhiran tidak boleh ada spasi "),t.k0s())}function St(e,a){1&e&&(t.j41(0,"div",18),t.EFF(1," Harus diisi "),t.k0s())}function Dt(e,a){1&e&&(t.j41(0,"div",18),t.EFF(1," Awalan dan akhiran tidak boleh ada spasi "),t.k0s())}const H=function(e){return{"is-invalid":e}};let wt=(()=>{class e{constructor(n,i,s,p){this.api=n,this.activeModal=i,this.helpers=s,this.formBuilder=p,this.action="update",this.data={},this.form={}}ngOnInit(){this.initForm()}initForm(){this.form=this.formBuilder.group({old_password:[null,[y.k0.required,Y.M.noWhiteSpace]],new_password:[null,[y.k0.required,Y.M.noWhiteSpace]]}),"update"===this.action&&this.data&&this.form.patchValue(this.data)}onSubmit(){this.form.valid&&this.activeModal.close(this.form.value)}static{this.\u0275fac=function(i){return new(i||e)(t.rXU(Mt.D),t.rXU(E.Lw),t.rXU(U.V),t.rXU(y.ok))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["app-action"]],inputs:{action:"action",data:"data"},standalone:!0,features:[t.aNF],decls:31,vars:12,consts:[[1,"modal-header"],[1,"modal-title"],[1,"d-flex","align-items-center"],[1,"rounded-icon","d-inline-flex","align-items-center","justify-content-center","rounded-circle","w-25%","h-25%",2,"width","40px","height","40px","background-color","#eef0fd"],[1,"bi","bi-pencil-square",2,"color","#3f4ec4"],[1,"ms-2","my-auto","fw-bolder"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[3,"formGroup"],[1,"mb-3"],["for","password",1,"form-label"],[1,"text-danger","ms-2"],["type","password","id","old_password","placeholder","Masukkan Password..","formControlName","old_password",1,"form-control",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],["type","password","id","new_password","placeholder","Masukkan Password..","formControlName","new_password",1,"form-control",3,"ngClass"],[1,"d-flex","justify-content-end","mt-4"],["type","button",1,"btn","me-2",2,"background-color","#fdf1ed","color","#f35625",3,"click"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[1,"invalid-feedback"]],template:function(i,s){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.nrm(4,"i",4),t.k0s(),t.j41(5,"h5",5),t.EFF(6,"Ganti Data"),t.k0s()()(),t.j41(7,"button",6),t.bIt("click",function(){return s.activeModal.dismiss("Cross click")}),t.k0s()(),t.j41(8,"div",7)(9,"form",8)(10,"div",9)(11,"label",10),t.EFF(12,"Password Lama"),t.j41(13,"span",11),t.EFF(14,"*"),t.k0s()(),t.nrm(15,"input",12),t.DNE(16,Ct,2,0,"div",13),t.DNE(17,Et,2,0,"div",13),t.k0s(),t.j41(18,"div",9)(19,"label",10),t.EFF(20,"Password Baru"),t.j41(21,"span",11),t.EFF(22,"*"),t.k0s()(),t.nrm(23,"input",14),t.DNE(24,St,2,0,"div",13),t.DNE(25,Dt,2,0,"div",13),t.k0s()(),t.j41(26,"div",15)(27,"button",16),t.bIt("click",function(){return s.activeModal.close("Cancel")}),t.EFF(28," Batal "),t.k0s(),t.j41(29,"button",17),t.bIt("click",function(){return s.onSubmit()}),t.EFF(30," Simpan "),t.k0s()()()),2&i&&(t.R7$(9),t.Y8G("formGroup",s.form),t.R7$(6),t.Y8G("ngClass",t.eq3(8,H,s.helpers.isInvalid(s.form,"old_password"))),t.R7$(1),t.Y8G("ngIf",s.helpers.hasError(s.form,"old_password","required")),t.R7$(1),t.Y8G("ngIf",s.helpers.hasError(s.form,"old_password","noWhiteSpace")),t.R7$(6),t.Y8G("ngClass",t.eq3(10,H,s.helpers.isInvalid(s.form,"new_password"))),t.R7$(1),t.Y8G("ngIf",s.helpers.hasError(s.form,"new_password","required")),t.R7$(1),t.Y8G("ngIf",s.helpers.hasError(s.form,"new_password","noWhiteSpace")),t.R7$(4),t.Y8G("disabled",s.form.invalid))},dependencies:[l.MD,l.YU,l.bT,y.X1,y.qT,y.me,y.BC,y.cb,y.j4,y.JD]})}}return e})();var Tt=o(1991),xt=o(1626);let It=(()=>{class e extends Tt.G{constructor(n,i){super(n,i),this.http=n,this.helpers=i,this.endpoint="users/change-password"}static{this.\u0275fac=function(i){return new(i||e)(t.KVO(xt.Qq),t.KVO(U.V))}}static{this.\u0275prov=t.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function kt(e,a){if(1&e){const n=t.RV6();t.j41(0,"button",16),t.bIt("click",function(){t.eBV(n);const s=t.XpG();return t.Njj(s.onTriggerMenu())}),t.nrm(1,"i",17),t.k0s()}}let Q=(()=>{class e{constructor(n,i,s,p,b,M){this.api=n,this.modal=i,this.helpers=s,this.activatedRoute=p,this.sidenav=b,this.auth=M,this.dataUpdateSubs$=new I.B,this.isMobile=!1,this.fullName="",this.email="",this.id=this.activatedRoute.snapshot.params.id,this.loggedUser=this.auth.getLoggedUser()}ngOnInit(){this.loggedUser&&(this.fullName=this.loggedUser.fullname,this.email=this.loggedUser.email)}onTriggerMenu(){this.sidenav.triggerSideMenu()}changePassword(){const n=this.modal.open(wt);n.componentInstance.action="update",n.result.then(i=>{i&&this.api.update(this.loggedUser.id,i).pipe((0,B.Q)(this.dataUpdateSubs$)).subscribe({next:()=>{this.helpers.toast("success","Data berhasil diubah")},error:s=>{this.helpers.toast("error",s.error.message)}})},()=>{})}get2letters(n){return n.toUpperCase().split(" ").map(s=>s.charAt(0)).join("")}onLogout(){this.modal.open(yt.M,{size:"sm"}).result.then(i=>{i&&this.auth.logout()})}static{this.\u0275fac=function(i){return new(i||e)(t.rXU(It),t.rXU(E.Bq),t.rXU(U.V),t.rXU(w.nX),t.rXU(X),t.rXU(G.u))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["dashboard-topbar"]],inputs:{isMobile:"isMobile"},standalone:!0,features:[t.aNF],decls:24,vars:7,consts:[[1,"sticky-top","d-flex","align-items-center","bg-white","px-4","py-3",2,"height","76px",3,"ngClass"],["class","btn btn-sm btn-light","type","button",3,"click",4,"ngIf"],[1,"dropdownHeader","d-flex","align-items-center"],[1,"me-2"],["ngbDropdown",""],["type","button","id","userDropdown","ngbDropdownToggle","",1,"btn","btn-sm","btn-primary","no-caret","text-capitalize"],["ngbDropdownMenu","","display","dynamic","placement","bottom-end","aria-labelledby","userDropdown",1,"customDropdown","p-4"],[1,"d-flex","mb-4"],[1,"me-3","text-capitalize","rounded","bg-info","d-flex","align-items-center","justify-content-center","text-white",2,"width","44px","height","44px"],[1,"my-auto"],[1,"mb-3"],["for","email",1,"form-label"],["disabled","","type","email","id","email","autocomplete","email",1,"form-control",3,"value"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","text-white","bg-primary","me-2",3,"click"],["type","button",1,"btn","text-white","bg-danger",3,"click"],["type","button",1,"btn","btn-sm","btn-light",3,"click"],[1,"bi","bi-list"]],template:function(i,s){1&i&&(t.j41(0,"header",0),t.DNE(1,kt,2,0,"button",1),t.j41(2,"div",2)(3,"span",3),t.EFF(4),t.k0s(),t.j41(5,"div",4)(6,"button",5),t.EFF(7),t.k0s(),t.j41(8,"div",6)(9,"div",7)(10,"div",8),t.EFF(11),t.k0s(),t.j41(12,"p",9),t.EFF(13),t.k0s()(),t.j41(14,"form")(15,"div",10)(16,"label",11),t.EFF(17,"Email "),t.k0s(),t.nrm(18,"input",12),t.k0s()(),t.j41(19,"div",13)(20,"button",14),t.bIt("click",function(){return s.changePassword()}),t.EFF(21," Ganti Password "),t.k0s(),t.j41(22,"button",15),t.bIt("click",function(){return s.onLogout()}),t.EFF(23," Logout "),t.k0s()()()()()()),2&i&&(t.Y8G("ngClass",s.isMobile?"justify-content-between":"justify-content-end"),t.R7$(1),t.Y8G("ngIf",s.isMobile),t.R7$(3),t.SpI("",s.fullName," "),t.R7$(3),t.SpI(" ",s.get2letters(s.fullName)," "),t.R7$(4),t.SpI(" ",s.get2letters(s.fullName)," "),t.R7$(2),t.JRh(s.fullName),t.R7$(5),t.FS9("value",s.email))},dependencies:[l.MD,l.YU,l.bT,E.zH,E.tg,E.do,E.U0],styles:[".customDropdown[_ngcontent-%COMP%]{width:512px}@media screen and (min-width: 0px) and (max-width: 550px){.customDropdown[_ngcontent-%COMP%]{width:300px;min-height:280px}}"]})}}return e})();function jt(e,a){1&e&&(t.j41(0,"div",4),t.nrm(1,"div",5),t.k0s())}const T=(e,a)=>{const n=(0,t.WQX)(G.u),i=(0,t.WQX)(w.Ix),s=n.getLoggedUser().role.code;return!!e.data.access_role.includes(s)||(i.navigate(["**"]),!1)},Pt=[{path:"",component:(()=>{class e{constructor(n,i,s){this.breakpointObserver=n,this.loading=i,this.cdr=s,this.isSidenavCollapsed=!1,this.isMobile=!1,this.isLoading$=new r.c}ngOnInit(){this.breakpointSubscription=this.breakpointObserver.observe("(max-width: 1199.98px)").subscribe(n=>{this.isMobile=n.matches}),this.isLoading$=this.loading.isLoading()}ngAfterViewChecked(){this.cdr.detectChanges()}ngOnDestroy(){this.breakpointSubscription.unsubscribe()}onToggleSidebar(n){this.isSidenavCollapsed=n}static{this.\u0275fac=function(i){return new(i||e)(t.rXU(ot),t.rXU(st.U),t.rXU(t.gRc))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["app-dashboard"]],hostAttrs:[1,"flex-fill","bg-secondary","bg-opacity-10"],decls:7,vars:7,consts:[["class","fixed-top progress","style","--rr-progress-height: 0.325rem; --rr-progress-border-radius: 0",4,"ngIf"],[3,"isMobile","toggleSidebar"],[3,"isMobile"],[1,"container-xxl","p-4"],[1,"fixed-top","progress",2,"--rr-progress-height","0.325rem","--rr-progress-border-radius","0"],[1,"progress-bar","w-100"]],template:function(i,s){1&i&&(t.DNE(0,jt,2,0,"div",0),t.nI1(1,"async"),t.j41(2,"dashboard-sidenav",1),t.bIt("toggleSidebar",function(b){return s.onToggleSidebar(b)}),t.k0s(),t.j41(3,"main"),t.nrm(4,"dashboard-topbar",2),t.j41(5,"div",3),t.nrm(6,"router-outlet"),t.k0s()()),2&i&&(t.Y8G("ngIf",t.bMT(1,5,s.isLoading$)),t.R7$(2),t.Y8G("isMobile",s.isMobile),t.R7$(1),t.xc7("margin-left",s.isMobile?"0":s.isSidenavCollapsed?"104px":"340px"),t.R7$(1),t.Y8G("isMobile",s.isMobile))},dependencies:[l.bT,w.n3,K,Q,l.Jj],styles:[".progress-bar[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_indeterminate 1s infinite linear;transform-origin:0% 50%}@keyframes _ngcontent-%COMP%_indeterminate{0%{transform:translate(0) scaleX(0)}40%{transform:translate(0) scaleX(.4)}to{transform:translate(100%) scaleX(.5)}}"]})}}return e})(),children:[{path:"",redirectTo:"home",pathMatch:"full"},{canActivate:[T],data:{access_role:["SADM","PNGL","SVEI"]},path:"home",loadChildren:()=>Promise.all([o.e(257),o.e(76),o.e(348)]).then(o.bind(o,5348)).then(e=>e.HomeModule)},{canActivate:[T],data:{access_role:["SADM","PNGL"]},path:"data-laporan",loadChildren:()=>Promise.all([o.e(76),o.e(186)]).then(o.bind(o,2186)).then(e=>e.LaporanModule)},{path:"data-gudang",canActivate:[T],data:{access_role:["SADM"]},loadChildren:()=>Promise.all([o.e(76),o.e(773)]).then(o.bind(o,7773)).then(e=>e.GudangModule)},{path:"jadwal-perbaikan",canActivate:[T],data:{access_role:["SADM","PNGL"]},loadChildren:()=>Promise.all([o.e(76),o.e(323)]).then(o.bind(o,7323)).then(e=>e.PerbaikanModule)},{path:"setting",canActivate:[T],data:{access_role:["SADM"]},loadChildren:()=>Promise.all([o.e(76),o.e(989)]).then(o.bind(o,6989)).then(e=>e.SettingModule)},{path:"rekapitulasi",canActivate:[T],data:{access_role:["SADM"]},loadChildren:()=>Promise.all([o.e(257),o.e(76),o.e(919)]).then(o.bind(o,6919)).then(e=>e.RekapitulasiModule)},{path:"surveyor",canActivate:[T],data:{access_role:["SVEI","SADM"]},loadChildren:()=>Promise.all([o.e(76),o.e(965)]).then(o.bind(o,965)).then(e=>e.SurveyorModule)},{path:"**",loadChildren:()=>o.e(42).then(o.bind(o,8042)).then(e=>e.ErrorNotFoundModule)}]}];let Rt=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=t.$C({type:e})}static{this.\u0275inj=t.G2t({imports:[l.MD,w.iI.forChild(Pt),K,Q]})}}return e})()},152:(x,f,o)=>{o.d(f,{B:()=>h});var l=o(3236),r=o(9974),t=o(4360);function h(m,g=l.E){return(0,r.N)((d,c)=>{let u=null,v=null,I=null;const A=()=>{if(u){u.unsubscribe(),u=null;const C=v;v=null,c.next(C)}};function L(){const C=I+m,P=g.now();if(P<C)return u=this.schedule(void 0,C-P),void c.add(u);A()}d.subscribe((0,t._)(c,C=>{v=C,I=g.now(),u||(u=g.schedule(L,m),c.add(u))},()=>{A(),c.complete()},void 0,()=>{v=u=null}))})}}}]);