"use strict";(self.webpackChunkroad_report=self.webpackChunkroad_report||[]).push([[727],{6727:(ce,v,s)=>{s.r(v),s.d(v,{DetailModule:()=>ue});var u=s(177),j=s(6847),e=s(8699),r=s(6803);function G(n,a){if(1&n&&(e.j41(0,"div"),e.nrm(1,"img",9),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("src",t.abs_path,e.B4B)}}let C=(()=>{class n{constructor(t){this.activeModal=t}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(r.Lw))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-image-show-modal"]],inputs:{data:"data"},standalone:!0,features:[e.aNF],decls:12,vars:1,consts:[[1,"modal-header"],[1,"modal-title","text-dark"],[1,"modal-body"],[1,"row","fw-medium"],[1,"col-md-2","text-body-tertiary","mt-2"],[1,"d-flex","gap-2","mt-2"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-end","mt-2"],["type","button",1,"btn","btn-primary",3,"click"],["alt","",1,"rounded-2","overflow-hidden","object-fit-cover",2,"width","135px","height","90px",3,"src"]],template:function(i,l){1&i&&(e.j41(0,"div",0)(1,"h4",1),e.EFF(2,"Foto Terkini"),e.k0s()(),e.j41(3,"div",2)(4,"div",3)(5,"div",4),e.EFF(6,"Foto"),e.k0s(),e.j41(7,"div",5),e.DNE(8,G,2,1,"div",6),e.k0s()(),e.j41(9,"div",7)(10,"button",8),e.bIt("click",function(){return l.activeModal.close(!0)}),e.EFF(11," Oke "),e.k0s()()()),2&i&&(e.R7$(8),e.Y8G("ngForOf",l.data.photos))},dependencies:[u.MD,u.Sq]})}}return n})();var N=s(7468),F=s(5471),k=s(5211),h=s(8185),x=s(5731),U=s(1991),g=s(1626),b=s(7110);let I=(()=>{class n extends U.G{constructor(t,i){super(t,i),this.http=t,this.helpers=i,this.endpoint="maintenanced"}static{this.\u0275fac=function(i){return new(i||n)(e.KVO(g.Qq),e.KVO(b.V))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var y=s(2423),R=s(2257),p=s(8685),P=s(6354),w=s(9437),S=s(7673);class X extends p.MF{constructor(a){super(),this.http=a}uploadFile(a){const t=new FormData;t.append("file",a.file),t.append("category","image"),t.append("folder","image");const l=new g.Kd("POST","https://api-roadreport.pisdev.my.id/api/upload-dumps",t,{reportProgress:!0});return this.http.request(l).pipe((0,P.T)(o=>{if(o.type===g.hv.Response)return{body:o.body,status:p.A8.UPLOADED};if(o.type===g.hv.UploadProgress&&void 0!==o.total){const d=+Math.round(100*o.loaded/o.total);return{status:p.A8.IN_PROGRESS,progress:d}}return{status:p.A8.ERROR,body:void 0}}),(0,w.W)(o=>(0,S.of)({status:p.A8.ERROR,body:o})))}removeFile(){return this.http.post("https://api-roadreport.pisdev.my.id/api/upload-dumps",{})}}var E=s(1986),T=s(2665),$=s(7181),O=s(7645),_=s(9417);function L(n,a){1&n&&e.nrm(0,"i",7)}function A(n,a){1&n&&(e.j41(0,"span",12),e.EFF(1," Belum ada foto "),e.k0s())}function M(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",23),e.bIt("click",function(){e.eBV(t),e.XpG();const l=e.sdS(10),o=e.XpG();return e.Njj(o.open(l))}),e.EFF(1," Upload Gambar "),e.k0s()}}const B=function(){return["jpg","jpeg","png"]};function V(n,a){if(1&n){const t=e.RV6();e.j41(0,"ngx-awesome-uploader",24,25),e.bIt("validationError",function(l){e.eBV(t);const o=e.XpG(2);return e.Njj(o.onValidationError(l))})("uploadSuccess",function(l){e.eBV(t);const o=e.XpG(2);return e.Njj(o.uploadSuccess(l))})("removeSuccess",function(l){e.eBV(t);const o=e.XpG(2);return e.Njj(o.onRemoveSuccess(l))})("fileAdded",function(l){e.eBV(t);const o=e.XpG(2);return e.Njj(o.onFileAdded(l))}),e.k0s(),e.j41(2,"div",26)(3,"button",27),e.bIt("click",function(){e.eBV(t);const l=e.XpG(2);return e.Njj(l.closeModal())}),e.EFF(4," Oke "),e.k0s()()}if(2&n){const t=e.XpG(2);e.Y8G("id","fileInput"+t.index)("adapter",t.adapter)("fileMaxCount",3)("fileMaxSize",7)("uploadType","multi")("fileExtensions",e.lJ4(10,B))("accept",".jpg, .png .jpeg")("showPreviewContainer",!0)("customValidator",t.myCustomValidator),e.R7$(3),e.Y8G("disabled",!t.isUploadSuccessful)}}function Y(n,a){if(1&n&&(e.j41(0,"div",28),e.nrm(1,"img",29),e.j41(2,"div",30)(3,"p",31),e.EFF(4),e.k0s(),e.j41(5,"p",32),e.EFF(6),e.k0s()()()),2&n){const t=a.fileItem;e.R7$(1),e.FS9("src",null==t.uploadResponse.data?null:t.uploadResponse.data.abs_path,e.B4B),e.FS9("alt",t.fileName),e.R7$(3),e.SpI(" File Name: ",t.fileName," "),e.R7$(2),e.SpI(" File Size: ",t.file.size," ")}}function z(n,a){if(1&n){const t=e.RV6();e.j41(0,"span",36)(1,"i",37),e.bIt("click",function(){e.eBV(t);const l=e.XpG().index,o=e.XpG(2);return e.Njj(o.removeFile(l))}),e.k0s()()}}function J(n,a){if(1&n&&(e.j41(0,"div")(1,"div",33),e.nrm(2,"app-lightbox",34),e.DNE(3,z,2,0,"span",35),e.k0s()()),2&n){const t=a.$implicit,i=e.XpG(2);e.R7$(2),e.Y8G("data",t),e.R7$(1),e.Y8G("ngIf",!i.isPNGL()&&"FIXED"!==i.status_report.id&&"DONE"!==i.status_report.id)}}function K(n,a){if(1&n&&(e.qex(0),e.EFF(1),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.note?t.note:"-"," ")}}function Q(n,a){if(1&n&&(e.j41(0,"div",38),e.DNE(1,K,2,1,"ng-container",19),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.note)}}function W(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",38)(1,"textarea",39),e.bIt("ngModelChange",function(l){e.eBV(t);const o=e.XpG(2);return e.Njj(o.form.note=l)}),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("disabled","FOLUP"===t.status_report.id)("ngModel",t.form.note)("readonly",t.isPNGL()||"DONE"==t.status_report.id||"FIXED"==t.status_report.id)("placeholder",t.isPNGL()||"FIXED"!=t.status_report.id?"Masukan deskripsi keadaan sekarang..":"")}}function Z(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",40)(1,"button",41),e.bIt("click",function(){e.eBV(t);const l=e.XpG(2);return e.Njj(l.onSubmit())}),e.EFF(2," Submit "),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("disabled",0==t.imageFiles.length)}}function H(n,a){if(1&n&&(e.j41(0,"div",8)(1,"div",9)(2,"div",10),e.EFF(3,"Foto Sesudah"),e.k0s(),e.DNE(4,A,2,0,"span",11),e.j41(5,"div",12)(6,"div"),e.DNE(7,M,2,0,"button",13),e.j41(8,"div",14),e.DNE(9,V,5,11,"ng-template",15,16,e.C5r),e.k0s(),e.DNE(11,Y,7,4,"ng-template",null,17,e.C5r),e.k0s(),e.j41(13,"div",18),e.DNE(14,J,4,2,"div",19),e.k0s()()(),e.j41(15,"div",20)(16,"div",10),e.EFF(17,"Keterangan"),e.k0s(),e.DNE(18,Q,2,1,"div",21),e.DNE(19,W,2,4,"div",21),e.k0s(),e.DNE(20,Z,3,1,"div",22),e.k0s()),2&n){const t=e.XpG();e.R7$(4),e.Y8G("ngIf",t.isPNGL()&&0===t.imageFiles.length),e.R7$(3),e.Y8G("ngIf",!t.isPNGL()&&"FIXED"!==t.status_report.id&&"DONE"!==t.status_report.id),e.R7$(7),e.Y8G("ngForOf",t.imageFiles),e.R7$(4),e.Y8G("ngIf",t.isPNGL()||!t.isPNGL()||"FIXED"!==t.status_report.id),e.R7$(1),e.Y8G("ngIf",!t.isPNGL()&&"DONE"!==t.status_report.id&&"FIXED"!==t.status_report.id),e.R7$(1),e.Y8G("ngIf",!t.isPNGL()&&"FIXED"!==t.status_report.id&&"DONE"!==t.status_report.id)}}let D=(()=>{class n extends T.v{constructor(t,i,l,o,d,c,m,f){super(d,c,m,f),this.auth=t,this.laporan=i,this.http=l,this.activatedRoute=o,this.helpers=d,this.loading=c,this.api=m,this.modal=f,this.adapter=new X(this.http),this.imageFiles=[],this.id="",this.form={},this.isUploadSuccessful=!1,this.closeResult="",this.id=this.activatedRoute.snapshot.params.id}ngOnInit(){this.queries={filter:{report_schedule_id:{eq:`${this.id}`},segmen_id:{eq:`${this.detailedSegment?.segmen?.id}`}},limit:10},this.form.report_schedule_id=this.id,this.form.segmen_id=this.detailedSegment.segmen.id,this.form.date=new Date,this.form.note="",this.getAll(),this.checkFoto()}getAll(){this.loading.show(),this.api.getAll(this.queries).subscribe({next:({data:t})=>{this.loading.hide(),this.note=t,t?.[0]?.photo_after&&(this.imageFiles=t[0].photo_after)},error:()=>{this.loading.hide(),this.helpers.toast("error","Gagal mengambil data")}})}checkFoto(){for(const t of this.imageFiles)if(t.abs_path)return!0;return!1}onFileAdded(t){}onValidationError(t){"FILE_MAX_SIZE"===t.error&&this.helpers.toast("warning","File terlalu besar maksimal yang diizinkan adalah 5mb")}onFileInputChange(t){}uploadSuccess(t){this.loading.isLoading(),this.imageFiles.push({filename:t.uploadResponse.data.filename,abs_path:t.uploadResponse.data.abs_path,file_dump_id:t.uploadResponse.data.id}),this.isUploadSuccessful=!0}onSubmit(){this.form.photo_after=this.imageFiles,this.api.insert(this.form).pipe().subscribe({next:()=>{this.helpers.toast("success","Foto berhasil ditambahkan"),this.getAll(),this.laporan.getAll()}}),setTimeout(()=>{window.location.reload()},1500)}removeFile(t){this.imageFiles.splice(t,1)}onRemoveSuccess(t){alert("Data berhasil dihapus")}myCustomValidator(t){return t.name.includes("uploader")?(0,S.of)(!1).pipe((0,E.c)(2e3)):(0,S.of)(!0).pipe((0,E.c)(2e3))}open(t){if("FOLUP"==this.status_report.id){const i=this.modal.open(O.C,{backdropClass:"bg-info",size:"sm"});i.componentInstance.bgColor="#4b527e",i.componentInstance.textColor="#000000",i.componentInstance.message="Ubah status menjadi",i.componentInstance.statusMessage="Perbaikan"}else this.modal.open(t,{ariaLabelledBy:"modal-basic-title",centered:!0}).result.then(i=>{this.closeResult=`Closed with: ${i}`},i=>{this.closeResult=`Dismissed ${this.getDismissReason(i)}`})}closeModal(){this.modal.dismissAll()}getDismissReason(t){return t===r.PQ.ESC?"by pressing ESC":t===r.PQ.BACKDROP_CLICK?"by clicking on a backdrop":`with: ${t}`}isPNGL(){const t=this.auth.getLoggedUser();return!!t&&"SADM"===t.role.code}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(F.u),e.rXU(k.Z),e.rXU(g.Qq),e.rXU(h.nX),e.rXU(b.V),e.rXU(y.U),e.rXU(I),e.rXU(r.Bq))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-upload-image"]],inputs:{detailedSegment:"detailedSegment",index:"index",status_report:"status_report"},standalone:!0,features:[e.Vt3,e.aNF],decls:9,vars:3,consts:[["ngbAccordion","",1,"accordion","mb-3"],["ngbAccordionItem","",1,"accordion-item","border-0",2,"background","#eef0fd",3,"collapsed"],["ngbAccordionHeader","",1,"accordion-header"],["ngbAccordionButton","",1,"accordion-button","fw-bolder",2,"background","#eef0fd"],["class","bi bi-check2-circle","style","color: green",4,"ngIf"],["ngbAccordionCollapse","",1,"accordion-collapse","collapse","show"],["ngbAccordionBody","",1,"accordion-body"],[1,"bi","bi-check2-circle",2,"color","green"],[1,"upload-foto"],[1,"row","py-3","fw-medium","align-items-stretch"],[1,"col-md-2","text-body-tertiary"],["class","col-md-6",4,"ngIf"],[1,"col-md-6"],["class","btn btn-outline-primary px-5 py-2 mb-2","style","padding: 0.375rem 0.75rem; cursor: pointer",3,"click",4,"ngIf"],[1,"uploader-wrapper"],["style","margin: auto"],["content",""],["myItemTemplate",""],[1,"col-md-10","d-flex"],[4,"ngFor","ngForOf"],[1,"row","py-3","fw-medium","align-items-start"],["class","col-md-10",4,"ngIf"],["class","d-flex justify-content-end",4,"ngIf"],[1,"btn","btn-outline-primary","px-5","py-2","mb-2",2,"padding","0.375rem 0.75rem","cursor","pointer",3,"click"],["id","fileInput",3,"id","adapter","fileMaxCount","fileMaxSize","uploadType","fileExtensions","accept","showPreviewContainer","customValidator","validationError","uploadSuccess","removeSuccess","fileAdded"],["uploader",""],[1,"dropzoneTemplate","d-flex","flex-row-reverse"],["type","button",1,"btn","btn-primary","my-2","me-4","mt-2",3,"disabled","click"],[1,"d-flex","align-items-center"],[1,"rounded-2",2,"width","50px","height","50px",3,"src","alt"],[1,"ms-2"],[2,"font-size","15px","color","#74809d","margin","0","line-height","1.1","margin-bottom","2px"],[2,"font-size","14px","color","#74809d","margin","0"],[2,"display","flex","align-items","flex-start"],[1,"me-2",3,"data"],["style","\n cursor: pointer;\n width: 19px;\n height: 19px;\n margin-top: 0.1rem;\n margin-left: 0.1rem;\n background-color: #b4b4b3;\n ","class","d-flex align-items-center justify-content-center position-absolute rounded-circle ms-1 mt-1",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-center","position-absolute","rounded-circle","ms-1","mt-1",2,"cursor","pointer","width","19px","height","19px","margin-top","0.1rem","margin-left","0.1rem","background-color","#b4b4b3"],[1,"bi","bi-trash-fill","text-danger",2,"font-size","14px",3,"click"],[1,"col-md-10"],["id","textAreaExample1","rows","4","name","note",1,"form-control","w-full",2,"width","100%",3,"disabled","ngModel","readonly","placeholder","ngModelChange"],[1,"d-flex","justify-content-end"],["type","submit",1,"btn","btn-primary",3,"disabled","click"]],template:function(i,l){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"h2",2)(3,"button",3),e.EFF(4),e.DNE(5,L,1,0,"i",4),e.k0s()(),e.j41(6,"div",5)(7,"div",6),e.DNE(8,H,21,6,"ng-template"),e.k0s()()()()),2&i&&(e.R7$(1),e.Y8G("collapsed",!0),e.R7$(3),e.SpI(" Segmen Jalan ",l.index+1," "),e.R7$(1),e.Y8G("ngIf",l.checkFoto()))},dependencies:[u.MD,u.Sq,u.bT,r._f,r.WP,r.r6,r.tW,r.x7,r.UA,r.$R,p.Xx,p.mu,$.$,_.YN,_.me,_.BC,_.vS],styles:[".map-containet[_ngcontent-%COMP%]{position:relative}.collapse-content[_ngcontent-%COMP%]{transition:height .5s;overflow:hidden}img.uploaded-image[_ngcontent-%COMP%]:not(:first-child){margin-left:2px}ngx-awesome-uploader[_ngcontent-%COMP%]{margin:auto} .file-preview-actions{display:none} .ngx-close-icon-wrapper{display:none}ngx-awesome-uploader[_ngcontent-%COMP%]{background-color:red}"]})}}return n})();function q(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",33),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.onUpdateDonePerbaikan())}),e.EFF(1," Sudah Diperbaiki "),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("disabled","PROG"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||"FOLUP"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||"DONE"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||"FIXED"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||t.isButtonDisabled)}}function ee(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",34),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.onUpdatePerbaikan())}),e.EFF(1),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("disabled",t.isPNGL()&&"FOLUP"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||t.isPNGL()&&"RPR"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||t.isPNGL()&&"DONE"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||t.isPNGL()&&t.isButtonDisabled),e.R7$(1),e.SpI(" ",t.isPNGL()?"Perbaiki Lagi":"Perbaiki"," ")}}function te(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",35),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.reportCompleted())}),e.EFF(1," Selesai "),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("disabled","PROG"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||"FOLUP"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||"DONE"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||"RPR"===(null==t.detailSchedule||null==t.detailSchedule.report||null==t.detailSchedule.report.status_report?null:t.detailSchedule.report.status_report.id)||t.isButtonDisabled)}}function le(n,a){if(1&n&&(e.j41(0,"div")(1,"div",36)(2,"span"),e.nrm(3,"i",37),e.j41(4,"span",38),e.EFF(5,"Tanggal perbaikan"),e.k0s()(),e.j41(6,"div")(7,"span",39),e.EFF(8),e.nI1(9,"date"),e.nI1(10,"date"),e.k0s()()()()),2&n){const t=e.XpG();e.R7$(8),e.Lme(" ",e.i5U(9,2,null==t.detailSchedule?null:t.detailSchedule.date_start,"dd/MM/yyyy"),"",null!=t.detailSchedule&&t.detailSchedule.date_end?"-"+e.i5U(10,5,null==t.detailSchedule?null:t.detailSchedule.date_end,"dd/MM/yyyy"):""," ")}}function ne(n,a){1&n&&(e.j41(0,"div",40),e.nrm(1,"i",41),e.EFF(2,"Silahkan Upload foto selesai perbaikan sebagai bukti telah dilakukan perbaikan jalan.. "),e.k0s())}function ie(n,a){1&n&&(e.j41(0,"ngb-alert",42),e.nrm(1,"i",41),e.EFF(2," Data sedang divalidasi oleh admin "),e.k0s()),2&n&&e.Y8G("dismissible",!1)}function ae(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",43)(1,"button",44),e.bIt("click",function(){const o=e.eBV(t).$implicit,d=e.XpG();return e.Njj(d.onAction(o))}),e.EFF(2),e.k0s()()}if(2&n){const t=a.$implicit;e.R7$(2),e.SpI(" ",(null==t?null:t.segmen.name)||"-"," ")}}function oe(n,a){1&n&&(e.j41(0,"h5",25),e.EFF(1,"Data Laporan"),e.k0s())}function se(n,a){if(1&n&&(e.j41(0,"div",10),e.nrm(1,"app-upload-image",45),e.k0s()),2&n){const t=a.$implicit,i=a.index,l=e.XpG();e.R7$(1),e.Y8G("detailedSegment",t)("index",i)("status_report",l.detailSchedule.report.status_report)}}const re=function(n,a,t,i,l,o){return{"bg-primary":n,"bg-warning":a,"bg-danger":t,"bg-info":i,"bg-success":l,"bg-secondary":o,"text-nowrap text-white text-center rounded-2 px-2 py-2":!0}},de=[{path:"",component:(()=>{class n{updateStatus(t){this.modal.open(j.a).result.then(l=>{l&&this.laporan.update(this.detailSchedule.report_id,{status_id:t}).subscribe({next:()=>{this.helpers.toast("success","Data berhasil Diperbarui"),this.getAll()},error:()=>{this.helpers.toast("error","Data gagal ditambahkan")}})},()=>{})}onUpdatePerbaikan(){this.updateStatus("RPR")}onUpdateDonePerbaikan(){this.updateStatus("FIXED")}reportCompleted(){this.updateStatus("DONE")}getAll(){this.api.getById(this.id).pipe().subscribe({next:({data:t})=>{this.detailSchedule=t;const o=this.detailSchedule.report.segmens.map(d=>d.segmen.id).map(d=>this.maintenance.getAll({filter:{report_schedule_id:{eq:`${this.id}`},segmen_id:{eq:`${d}`}}}));(0,N.p)(o).subscribe({next:d=>{this.photo=d;const c=this.photo.some(m=>0===m.data.length);this.isButtonDisabled=c},error:()=>{this.helpers.toast("error","Gagal mengambil data")}})}})}constructor(t,i,l,o,d,c,m,f,pe){this.auth=t,this.laporan=i,this.activatedRoute=l,this.router=o,this.api=d,this.maintenance=c,this.modal=m,this.helpers=f,this.loading=pe,this.detailSchedule=null,this.detailSegmenPerbaikan=null,this.closeResult="",this.id=this.activatedRoute.snapshot.params.id,this.segmenId=null,this.isButtonDisabled=!1,this.getAll()}ngOnInit(){}onBack(){this.router.navigate(["../../"],{relativeTo:this.activatedRoute})}onAction(t){this.modal.open(C).componentInstance.data=t}isPNGL(){const t=this.auth.getLoggedUser();return!!t&&"SADM"===t.role.code}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(F.u),e.rXU(k.Z),e.rXU(h.nX),e.rXU(h.Ix),e.rXU(x.c),e.rXU(I),e.rXU(r.Bq),e.rXU(b.V),e.rXU(y.U))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-detail"]],decls:69,vars:30,consts:[[1,"d-lg-flex","d-md-flex","d-sm-flex","align-items-start","justify-content-between","gap-3","mb-3"],[1,"d-flex","align-items-center","gap-2","mb-2"],["type","button",1,"btn","btn-sm","bg-transparent",3,"click"],[1,"bi","bi-arrow-left"],[1,"mb-0","fw-bold"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item","small"],["routerLink","../../",1,"text-decoration-none"],["aria-current","page",1,"breadcrumb-item","active","small"],[1,""],[1,"text-right","d-flex","justify-content-end"],["style","max-width: fit-content","class","btn btn-success text-right me-2","type","button","ngbAutofocus","",3,"disabled","click",4,"ngIf"],["style","max-width: fit-content","class","btn btn-info text-right me-2","type","button","ngbAutofocus","",3,"disabled","click",4,"ngIf"],["style","max-width: fit-content","class","btn btn-success text-right","type","button",3,"disabled","click",4,"ngIf"],[4,"ngIf"],[1,"p-4","rounded-3","bg-white"],["class","alert text-white","role","alert","style","background: #ffab00",4,"ngIf"],["class","text-black my-auto d-flex align-items-center mb-3","type","dark","style","background: #dee1fd; height: 46px",3,"dismissible",4,"ngIf"],[3,"allowDragging","showOption","showStatus","perbaikanSegmen"],[1,"row","py-3","my-4","fw-medium"],[1,"col-md-2","text-body-tertiary"],[1,"col-lg-10","col-md-10","col-sm"],[1,"d-lg-flex","d-md-flex","d-sm-flex"],["class","py-1",4,"ngFor","ngForOf"],[1,"fw-semibold","mb-2"],[1,"row","py-3","fw-medium"],[1,"col-md-6"],[1,"col-md-6","d-flex","align-items-center"],[2,"max-width","fit-content",3,"ngClass"],[1,"mb-4","border-dark-subtle"],["class","fw-semibold mb-2",4,"ngIf"],["class","",4,"ngFor","ngForOf"],["type","button","ngbAutofocus","",1,"btn","btn-success","text-right","me-2",2,"max-width","fit-content",3,"disabled","click"],["type","button","ngbAutofocus","",1,"btn","btn-info","text-right","me-2",2,"max-width","fit-content",3,"disabled","click"],["type","button",1,"btn","btn-success","text-right",2,"max-width","fit-content",3,"disabled","click"],[1,"d-flex","justify-content-between","calendar","bg-white","p-2","rounded-2","mt-2"],[1,"bi","bi-calendar",2,"color","blue"],[1,"small","ms-2"],[1,"date","small","ms-xs-1","ms-md-4","ms-lg-4"],["role","alert",1,"alert","text-white",2,"background","#ffab00"],[1,"bi","bi-exclamation-circle","me-2"],["type","dark",1,"text-black","my-auto","d-flex","align-items-center","mb-3",2,"background","#dee1fd","height","46px",3,"dismissible"],[1,"py-1"],["placement","bottom","ngbTooltip","Lihat Detail","type","button",1,"btn","bg-primary","text-white","rounded-2","py-1","me-2",2,"cursor","pointer",3,"click"],[3,"detailedSegment","index","status_report"]],template:function(i,l){1&i&&(e.j41(0,"div",0)(1,"div")(2,"div",1)(3,"button",2),e.bIt("click",function(){return l.onBack()}),e.nrm(4,"i",3),e.k0s(),e.j41(5,"h5",4),e.EFF(6,"Lokasi Perbaikan"),e.k0s()(),e.j41(7,"nav",5)(8,"ol",6)(9,"li",7)(10,"a",8),e.EFF(11,"Data Perbaikan"),e.k0s()(),e.j41(12,"li",9),e.EFF(13,"Detail"),e.k0s()()()(),e.j41(14,"div",10)(15,"div",11),e.DNE(16,q,2,1,"button",12),e.DNE(17,ee,2,2,"button",13),e.DNE(18,te,2,1,"button",14),e.k0s(),e.DNE(19,le,11,8,"div",15),e.k0s()(),e.j41(20,"div",16),e.DNE(21,ne,3,0,"div",17),e.DNE(22,ie,3,1,"ngb-alert",18),e.nrm(23,"app-map",19),e.j41(24,"div")(25,"div",20)(26,"div",21),e.EFF(27,"Segment Jalan"),e.k0s(),e.j41(28,"div",22)(29,"div",23),e.DNE(30,ae,3,1,"div",24),e.k0s()()(),e.j41(31,"h5",25),e.EFF(32,"Data Pelapor"),e.k0s(),e.j41(33,"div",26)(34,"div",21),e.EFF(35,"No. Tiket"),e.k0s(),e.j41(36,"div",27),e.EFF(37),e.k0s()(),e.j41(38,"div",26)(39,"div",21),e.EFF(40,"Nama"),e.k0s(),e.j41(41,"div",27),e.EFF(42),e.k0s()(),e.j41(43,"div",26)(44,"div",21),e.EFF(45,"Email"),e.k0s(),e.j41(46,"div",27),e.EFF(47),e.k0s()(),e.j41(48,"div",26)(49,"div",21),e.EFF(50,"Lokasi"),e.k0s(),e.j41(51,"div",27),e.EFF(52),e.k0s()(),e.j41(53,"div",26)(54,"div",21),e.EFF(55,"Status Laporan"),e.k0s(),e.j41(56,"div",28)(57,"small",29),e.EFF(58),e.k0s()()(),e.j41(59,"div",26)(60,"div",21),e.EFF(61,"Tanggal Diperbaiki"),e.k0s(),e.j41(62,"div",27),e.EFF(63),e.nI1(64,"date"),e.k0s()()(),e.nrm(65,"hr",30),e.DNE(66,oe,2,0,"h5",31),e.j41(67,"div"),e.DNE(68,se,2,3,"div",32),e.k0s()()),2&i&&(e.R7$(16),e.Y8G("ngIf",!l.isPNGL()&&"DONE"!==(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id)),e.R7$(1),e.Y8G("ngIf",(l.isPNGL()||"FOLUP"===(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id))&&"DONE"!==(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id)),e.R7$(1),e.Y8G("ngIf",l.isPNGL()),e.R7$(1),e.Y8G("ngIf",l.isPNGL()),e.R7$(2),e.Y8G("ngIf",!l.isPNGL()&&"RPR"===(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id)),e.R7$(1),e.Y8G("ngIf",!l.isPNGL()&&"FIXED"===(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id)),e.R7$(1),e.Y8G("allowDragging",!0)("showOption",!1)("showStatus",!1)("perbaikanSegmen",l.id),e.R7$(7),e.Y8G("ngForOf",null==l.detailSchedule?null:l.detailSchedule.report.segmens),e.R7$(7),e.JRh(null==l.detailSchedule?null:l.detailSchedule.report.no_ticket),e.R7$(5),e.JRh(null==l.detailSchedule?null:l.detailSchedule.report.user.fullname),e.R7$(5),e.JRh(null==l.detailSchedule?null:l.detailSchedule.report.user.email),e.R7$(5),e.SpI(" ",(null==l.detailSchedule?null:l.detailSchedule.report.segmens.length)>0?null==l.detailSchedule?null:l.detailSchedule.report.segmens[(null==l.detailSchedule?null:l.detailSchedule.report.segmens.length)-1].segmen.name:"-"," "),e.R7$(5),e.Y8G("ngClass",e.l4e(23,re,"PROG"===(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id),"FOLUP"===(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id),"RJT"===(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id),"RPR"===(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id),"DONE"===(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id),"FIXED"===(null==l.detailSchedule||null==l.detailSchedule.report||null==l.detailSchedule.report.status_report?null:l.detailSchedule.report.status_report.id))),e.R7$(1),e.SpI(" ","DONE"===(null==l.detailSchedule||null==l.detailSchedule.report?null:l.detailSchedule.report.status_report.id)?"Selesai":null==l.detailSchedule||null==l.detailSchedule.report?null:l.detailSchedule.report.status_report.name," "),e.R7$(5),e.SpI(" ",e.i5U(64,20,null==l.detailSchedule?null:l.detailSchedule.created_at,"dd/MM/yyyy")," "),e.R7$(3),e.Y8G("ngIf",!l.isPNGL()),e.R7$(2),e.Y8G("ngForOf",null==l.detailSchedule||null==l.detailSchedule.report?null:l.detailSchedule.report.segmens))},dependencies:[u.YU,u.Sq,u.bT,h.Wk,R.i,D,r.Cv,r.md,u.vh],styles:["@media screen and (min-width: 0px) and (max-width: 550px){.date[_ngcontent-%COMP%]{margin-left:0}}"]})}}return n})()}];let ue=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({imports:[u.MD,h.iI.forChild(de),R.i,D,r.oi,r.n8]})}}return n})()}}]);