"use strict";(self.webpackChunkroad_report=self.webpackChunkroad_report||[]).push([[348],{5348:(X,d,r)=>{r.r(d),r.d(d,{HomeModule:()=>V});var i=r(177),t=r(8699),f=r(2408);function _(n,s){1&n&&(t.j41(0,"p",4),t.nrm(1,"i",5),t.EFF(2," Belum ada data. "),t.k0s())}function F(n,s){if(1&n&&(t.j41(0,"div",6)(1,"div",7)(2,"div",8)(3,"div",9)(4,"h4",10),t.EFF(5,"Dalam Proses"),t.k0s(),t.j41(6,"h6",11),t.EFF(7),t.k0s()(),t.j41(8,"span",12),t.nrm(9,"i",13),t.k0s()()(),t.j41(10,"div",7)(11,"div",8)(12,"div",9)(13,"h4",10),t.EFF(14,"Ditindak Lanjuti"),t.k0s(),t.j41(15,"h6",11),t.EFF(16),t.k0s()(),t.j41(17,"span",14),t.nrm(18,"img",15),t.k0s()()(),t.j41(19,"div",7)(20,"div",8)(21,"div",9)(22,"h4",10),t.EFF(23,"Perbaikan"),t.k0s(),t.j41(24,"h6",11),t.EFF(25),t.k0s()(),t.j41(26,"span",16),t.nrm(27,"i",17),t.k0s()()(),t.j41(28,"div",7)(29,"div",8)(30,"div",9)(31,"h4",10),t.EFF(32,"Selesai"),t.k0s(),t.j41(33,"h6",11),t.EFF(34),t.k0s()(),t.j41(35,"span",18),t.nrm(36,"i",19),t.k0s()()(),t.j41(37,"div",7)(38,"div",8)(39,"div",9)(40,"h4",10),t.EFF(41,"Total Laporan"),t.k0s(),t.j41(42,"h6",11),t.EFF(43),t.k0s()(),t.j41(44,"span",20),t.nrm(45,"i",21),t.k0s()()()()),2&n){const e=t.XpG();t.R7$(7),t.SpI(" ",e.count["Dalam Proses"]?e.count["Dalam Proses"]:"-"," "),t.R7$(9),t.SpI(" ",e.count["Ditindak Lanjuti"]?e.count["Ditindak Lanjuti"]:"-"," "),t.R7$(9),t.SpI(" ",e.count.Perbaikan?e.count.Perbaikan:"-"," "),t.R7$(9),t.SpI(" ",e.count["Laporan Selesai & Sudah Divalidasi"]?e.count["Laporan Selesai & Sudah Divalidasi"]:"-"," "),t.R7$(9),t.SpI(" ",e.count["Semua Laporan"]?e.count["Semua Laporan"]:"-"," ")}}let p=(()=>{class n{constructor(e){this.api=e}ngOnInit(){this.api.getAll().subscribe({next:({data:e})=>{this.count=e}})}static{this.\u0275fac=function(a){return new(a||n)(t.rXU(f.a))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["ringkasan-total-laporan"]],standalone:!0,features:[t.aNF],decls:5,vars:2,consts:[[1,"bg-white","p-4","rounded-3"],[1,"fw-semibold","mb-3"],["class","text-body-tertiary",4,"ngIf"],["class","row g-3",4,"ngIf"],[1,"text-body-tertiary"],[1,"bi","bi-exclamation-circle"],[1,"row","g-3"],[1,"col-lg","col-md","col-sm-6"],[1,"d-flex","align-items-start","justify-content-between","column-gap-3","p-4","rounded-3","border","h-100"],[1,"d-flex","flex-column-reverse"],[1,"h6","text-body-tertiary","mb-0"],[1,"h4"],[1,"flex-shrink-0","bg-primary","px-2","py-1","text-white","rounded-2"],[1,"bi","bi-clipboard"],[1,"d-flex","flex-column","justify-content-center","align-items-center","bg-warning","px-2","py-2","rounded-2"],["src","assets/images/loader.svg","alt",""],[1,"flex-shrink-0","px-2","py-1","text-white","rounded-2",2,"background-color","#3697ff"],[1,"bi","bi-arrow-clockwise"],[1,"flex-shrink-0","bg-success","px-2","py-1","text-white","rounded-2"],[1,"bi","bi-check-lg"],[1,"flex-shrink-0","bg-info","px-2","py-1","text-white","rounded-2"],[1,"bi","bi-database"]],template:function(a,o){1&a&&(t.j41(0,"div",0)(1,"h5",1),t.EFF(2,"Ringkasan Total Laporan"),t.k0s(),t.DNE(3,_,3,0,"p",2),t.DNE(4,F,46,5,"div",3),t.k0s()),2&a&&(t.R7$(3),t.Y8G("ngIf",null==o.count),t.R7$(1),t.Y8G("ngIf",o.count))},dependencies:[i.MD,i.bT]})}}return n})();var b=r(2257);let l=(()=>{class n{static{this.\u0275fac=function(a){return new(a||n)}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["peta"]],standalone:!0,features:[t.aNF],decls:1,vars:0,template:function(a,o){1&a&&t.nrm(0,"app-map")},dependencies:[b.i]})}}return n})();var k=r(2665),u=r(8185),v=r(5471),y=r(6803),E=r(7110),x=r(5211),j=r(2423);function I(n,s){1&n&&(t.j41(0,"p",4),t.nrm(1,"i",5),t.EFF(2," Belum ada data. "),t.k0s())}function L(n,s){1&n&&(t.j41(0,"th"),t.EFF(1,"Status"),t.k0s())}function R(n,s){1&n&&(t.j41(0,"th"),t.EFF(1,"Aksi"),t.k0s())}function D(n,s){if(1&n&&(t.qex(0),t.j41(1,"td"),t.EFF(2),t.nI1(3,"date"),t.nI1(4,"date"),t.k0s(),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.Lme(" ",t.i5U(3,2,e.survey_start_date,"dd/MM/yyyy"),"",e.survey_end_date?"-"+t.i5U(4,5,e.survey_end_date,"dd/MM/yyyy"):""," ")}}function $(n,s){if(1&n&&(t.qex(0),t.EFF(1),t.nI1(2,"date"),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(1),t.SpI(" ",t.i5U(2,1,e.created_at,"dd/MM/yyyy")," ")}}const T=function(n,s,e,a,o,c){return{"bg-primary":n,"bg-warning":s,"bg-danger":e,"bg-info":a,"bg-success":o,"bg-secondary":c,"text-nowrap text-white text-center rounded-2 px-2 py-2":!0,"d-block":!0}};function S(n,s){if(1&n&&(t.j41(0,"td")(1,"small",10),t.EFF(2),t.k0s()()),2&n){const e=t.XpG().$implicit;t.R7$(1),t.Y8G("ngClass",t.l4e(2,T,"PROG"===e.status_report.id,"FOLUP"===e.status_report.id,"RJT"===e.status_report.id,"RPR"===e.status_report.id,"DONE"===e.status_report.id,"FIXED"===e.status_report.id)),t.R7$(1),t.SpI(" ","DONE"===e.status_report.id?"Selesai":e.status_report.name," ")}}function C(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",15),t.bIt("click",function(){t.eBV(e);const o=t.XpG(2).$implicit,c=t.XpG(2);return t.Njj(c.onDeleteData(o.id,o.user.fullname))}),t.EFF(1," Hapus "),t.k0s()}}function U(n,s){if(1&n){const e=t.RV6();t.j41(0,"td",11)(1,"div",12)(2,"button",13),t.bIt("click",function(){t.eBV(e);const o=t.XpG().$implicit,c=t.XpG(2);return t.Njj(c.goToDetail(o.id))}),t.EFF(3," Detail "),t.k0s(),t.DNE(4,C,2,0,"button",14),t.k0s()()}if(2&n){const e=t.XpG(3);t.R7$(4),t.Y8G("ngIf","SADM"===e.auth.getLoggedUser().role.code)}}function G(n,s){if(1&n&&(t.j41(0,"tr")(1,"td"),t.DNE(2,D,5,8,"ng-container",3),t.DNE(3,$,3,4,"ng-container",3),t.k0s(),t.j41(4,"td"),t.EFF(5,"13978383"),t.k0s(),t.j41(6,"td"),t.EFF(7),t.k0s(),t.DNE(8,S,3,9,"td",3),t.j41(9,"td"),t.EFF(10),t.k0s(),t.j41(11,"td"),t.EFF(12),t.k0s(),t.DNE(13,U,5,1,"td",9),t.k0s()),2&n){const e=s.$implicit,a=t.XpG(2);t.R7$(2),t.Y8G("ngIf","SVEI"===a.auth.getLoggedUser().role.code),t.R7$(1),t.Y8G("ngIf","SVEI"!==a.auth.getLoggedUser().role.code),t.R7$(4),t.JRh(e.user.fullname),t.R7$(1),t.Y8G("ngIf","SVEI"!==a.auth.getLoggedUser().role.code),t.R7$(2),t.JRh(e.user.phone),t.R7$(2),t.SpI(" ",e.segmens.length>0?e.segmens[e.segmens.length-1].segmen.name:"-"," "),t.R7$(1),t.Y8G("ngIf","SVEI"!==a.auth.getLoggedUser().role.code)}}function B(n,s){if(1&n&&(t.qex(0),t.j41(1,"div",6)(2,"table",7)(3,"thead")(4,"tr")(5,"th"),t.EFF(6,"Tanggal"),t.k0s(),t.j41(7,"th"),t.EFF(8,"No Tiket"),t.k0s(),t.j41(9,"th"),t.EFF(10,"Nama Pelapor"),t.k0s(),t.DNE(11,L,2,0,"th",3),t.j41(12,"th"),t.EFF(13,"No. HP"),t.k0s(),t.j41(14,"th"),t.EFF(15,"Lokasi"),t.k0s(),t.DNE(16,R,2,0,"th",3),t.k0s()(),t.j41(17,"tbody"),t.DNE(18,G,14,7,"tr",8),t.k0s()()(),t.bVm()),2&n){const e=t.XpG();t.R7$(11),t.Y8G("ngIf","SVEI"!==e.auth.getLoggedUser().role.code),t.R7$(5),t.Y8G("ngIf","SVEI"!==e.auth.getLoggedUser().role.code),t.R7$(2),t.Y8G("ngForOf",e.dataSource)}}let g=(()=>{class n extends k.v{constructor(e,a,o,c,m,h){super(c,h,m,o),this.router=e,this.auth=a,this.modal=o,this.helpers=c,this.api=m,this.loading=h,this.queries={page:1,limit:3,sort:"-created_at",embed:"status_report,user,segmens,segmens.segmen,segmens.photos"},"SADM"==this.auth.getLoggedUser().role.code||("PNGL"==this.auth.getLoggedUser().role.code?this.queries.filter={status_id:{ne:"PROG,RJT"}}:this.api.endpoint=`report-list/surveyor/${a.getLoggedUser().id}`)}goToDetail(e){"SVEI"===this.auth.getLoggedUser().role.code&&this.router.navigate(["dashboard","surveyor",this.auth.getLoggedUser().id]),this.router.navigate(["dashboard","data-laporan",e])}static{this.\u0275fac=function(a){return new(a||n)(t.rXU(u.Ix),t.rXU(v.u),t.rXU(y.Bq),t.rXU(E.V),t.rXU(x.Z),t.rXU(j.U))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["laporan-baru"]],standalone:!0,features:[t.Vt3,t.aNF],decls:5,vars:2,consts:[[1,"p-4","rounded-3","bg-white"],[1,"fw-semibold","mb-3"],["class","text-body-tertiary",4,"ngIf"],[4,"ngIf"],[1,"text-body-tertiary"],[1,"bi","bi-exclamation-circle"],[1,"table-responsive"],[1,"table"],[4,"ngFor","ngForOf"],["class","",4,"ngIf"],[3,"ngClass"],[1,""],[1,"d-flex"],["type","button",1,"btn","btn-outline-primary","me-2",3,"click"],["class","btn btn-outline-primary",3,"click",4,"ngIf"],[1,"btn","btn-outline-primary",3,"click"]],template:function(a,o){1&a&&(t.j41(0,"div",0)(1,"h5",1),t.EFF(2,"Data Laporan Terbaru"),t.k0s(),t.DNE(3,I,3,0,"p",2),t.DNE(4,B,19,3,"ng-container",3),t.k0s()),2&a&&(t.R7$(3),t.Y8G("ngIf",0==o.dataSourceTotal),t.R7$(1),t.Y8G("ngIf",o.dataSourceTotal>0))},dependencies:[i.MD,i.YU,i.Sq,i.bT,i.vh]})}}return n})();const N=[{path:"",component:(()=>{class n{static{this.\u0275fac=function(a){return new(a||n)}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-home"]],decls:6,vars:0,consts:[[1,"h4","fw-bold"],[1,"row","gy-4"]],template:function(a,o){1&a&&(t.j41(0,"h1",0),t.EFF(1,"Dasbor"),t.k0s(),t.j41(2,"div",1),t.nrm(3,"ringkasan-total-laporan")(4,"peta")(5,"laporan-baru"),t.k0s())},dependencies:[p,l,g]})}}return n})()}];let V=(()=>{class n{static{this.\u0275fac=function(a){return new(a||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({imports:[i.MD,u.iI.forChild(N),p,l,g]})}}return n})()}}]);