text: "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8071],{58071:(e,t,a)=>{a.r(t),a.d(t,{default:()=>v});var r=a(70821),o={class:"grid"},n={class:"col-12"},i={class:"card"},s=(0,r.createElementVNode)("h4",null,"ICT Request (Detail) ",-1),l={style:{width:"140px"}},c={class:"table-header text-right"},d={class:"p-input-icon-left"},u=(0,r.createElementVNode)("i",{class:"pi pi-search"},null,-1),p=(0,r.createTextVNode)(" Not Found "),h=(0,r.createTextVNode)(" Loading data. Please wait. "),m={class:"p-grid p-dir-col"},k={class:"p-col"},f={class:"box"};var g=a(6358);const N={data:function(){return{loading:!0,detail:[],kode:[],filters:{global:{value:null,matchMode:g.a6.CONTAINS}},code:this.$route.params.code,token:localStorage.getItem("token"),checkname:[],checkto:[],id:localStorage.getItem("id"),status:""}},mounted:function(){this.cekUser()},methods:{cekUser:function(){var e=this;this.id?this.axios.get("/api/cek-user/"+this.id,{headers:{Authorization:"Bearer "+this.token}}).then((function(t){e.checkto=t.data.map((function(e){return e.to})),e.checkname=t.data.map((function(e){return e.name})),e.checkname.includes("Reviewer")||e.checkto.includes("/ict-request-reviewer")?(e.getIctDetail(),e.getNoreq()):e.$router.push("/access")})):this.$router.push("/login")},getIctDetail:function(){var e=this;this.axios.get("/api/ict-detail-penugasan/"+this.$route.params.code,{headers:{Authorization:"Bearer "+this.token}}).then((function(t){e.detail=t.data,e.loading=!1})).catch((function(t){401==t.response.status&&(e.$toast.add({severity:"error",summary:"Error",detail:"Sesi Login Expired"}),localStorage.clear(),localStorage.setItem("Expired","true"),setTimeout((function(){return e.$router.push("/login")}),2e3))}))},getNoreq:function(){var e=this;this.axios.get("/api/get-noreq/"+this.$route.params.code,{headers:{Authorization:"Bearer "+this.token}}).then((function(t){e.kode=t.data,e.status=t.data.cekstatus}))},CetakPdfSedangDikerjakan:function(){window.open("/api/report-ict-detail-pdf-tab-sedang-dikerjakan/"+this.$route.params.code)},CetakExcelSedangDikerjakan:function(){window.open("/api/report-ict-detail-excel-tab-sedang-dikerjakan/"+this.$route.params.code)}},render:function(e,t,a,g,N,v){var C=this,w=(0,r.resolveComponent)("Toast"),b=(0,r.resolveComponent)("ConfirmDialog"),V=(0,r.resolveComponent)("Toolbar"),x=(0,r.resolveComponent)("InputText"),y=(0,r.resolveComponent)("Column"),P=(0,r.resolveComponent)("Button"),q=(0,r.resolveComponent)("DataTable");return(0,r.openBlock)(),(0,r.createElementBlock)("div",o,[(0,r.createElementVNode)("div",n,[(0,r.createElementVNode)("div",i,[(0,r.createVNode)(w),(0,r.createVNode)(b),(0,r.createVNode)(V,{class:"mb-4"},{start:(0,r.withCtx)((function(){return[s]})),end:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("label",l,"No. Request: "+(0,r.toDisplayString)(N.kode.noreq),1)]})),_:1}),(0,r.createVNode)(q,{value:N.detail,paginator:!0,rows:25,loading:N.loading,filters:N.filters,rowHover:!0,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",rowsPerPageOptions:[5,10,15,20,25,30,35,40,45,50],currentPageReportTemplate:"Showing {first} to {last} of {totalRecords} ICT Request (Detail)",responsiveLayout:"scroll"},{header:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",c,[(0,r.createElementVNode)("span",d,[u,(0,r.createVNode)(x,{modelValue:N.filters.global.value,"onUpdate:modelValue":t[0]||(t[0]=function(e){return N.filters.global.value=e}),placeholder:"Search. . ."},null,8,["modelValue"])])])]})),empty:(0,r.withCtx)((function(){return[p]})),loading:(0,r.withCtx)((function(){return[h]})),footer:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",m,[(0,r.createElementVNode)("div",k,[(0,r.createElementVNode)("div",f,[(0,r.createVNode)(P,{label:"Kembali",class:"p-button-raised p-button mr-2",icon:"pi pi-chevron-left",onClick:t[1]||(t[1]=function(t){return e.$router.push({name:"Ict Request Reviewer"})})}),"T"==C.status?((0,r.openBlock)(),(0,r.createBlock)(P,{key:0,label:"Pdf",class:"p-button-raised p-button-danger mr-2",icon:"pi pi-file-pdf",onClick:t[2]||(t[2]=function(e){return v.CetakPdfSedangDikerjakan()})})):(0,r.createCommentVNode)("",!0),"T"==C.status?((0,r.openBlock)(),(0,r.createBlock)(P,{key:1,label:"Excel",class:"p-button-raised p-button-success mt-2",icon:"pi pi-print",onClick:t[3]||(t[3]=function(e){return v.CetakExcelSedangDikerjakan()})})):(0,r.createCommentVNode)("",!0)])])])]})),default:(0,r.withCtx)((function(){return[(0,r.createVNode)(y,{field:"ireq_type",header:"Tipe Request",sortable:!0,style:{"min-width":"12rem"}}),(0,r.createVNode)(y,{field:"name",header:"Nama Peripheral",sortable:!0,style:{"min-width":"4rem"}}),(0,r.createVNode)(y,{field:"ireq_desc",header:"Deskripsi",sortable:!0,style:{"min-width":"4rem"}}),(0,r.createVNode)(y,{field:"ireq_qty",header:"Qty",sortable:!0,style:{"min-width":"6rem"}}),(0,r.createVNode)(y,{field:"ireq_remark",header:"Keterangan",sortable:!0,style:{"min-width":"12rem"}}),(0,r.createVNode)(y,{field:"ireq_assigned_to",header:"Petugas(ICT)",sortable:!0,style:{"min-width":"4rem"}}),(0,r.createVNode)(y,{field:"ireq_status",header:"Status",sortable:!0,style:{"min-width":"4rem"}})]})),_:1},8,["value","loading","filters"])])])])}},v=N}}]);