File manager - Edit - /home/autoph/.trash/assets/index-3694a28c.js
Back
import{B as lt}from"./index-96330d52.js";import{w as ct,y as dt,F as ut,C as ht,l as mt}from"./lodash-13c155b8.js";import{F as pt}from"./index-32a2958d.js";import"./index-01a5d831.js";import{a as T,_ as gt,r as M,o,c as L,g as U,f as l,d as i,b as w,I as v,G as p,J as d,H as y,h as ft,e as F,K as _t,L as vt}from"./index-dd9315d4.js";import"./vue-cleave.min-534c4756.js";import{T as yt}from"./index-ef77feb5.js";import{I as xt}from"./index-4f9236cd.js";import{L as kt}from"./Loading-bd986b6e.js";import{A as Ct}from"./ApprovalMatrixService-a7ff573b.js";import{A as wt}from"./ApprovalService-4c45422c.js";import{C as O}from"./CanvassService-9a6c37ff.js";import{F as N}from"./FileService-f351f8c5.js";import{P as bt}from"./PurchaseRequestItemService-dacb0714.js";import{M as It}from"./Multiselect-7bde707c.js";import{E as St}from"./jspdf.es.min-1ae35c58.js";import"./_commonjsHelpers-de833af9.js";import"./xhebrhsj-3af7a1af.js";const D="https://ahg-prf-api.autohub.ph/api/v1/canvass-sheet",Rt={fetchRecords(t={}){return T.get(`${D}`,{params:t})},fetchRecord(t){return T.get(`${D}/${t}`)},saveRating(t){return T.post(`${D}/userRating`,t)},async update(t,e){return T.put(`${D}/${t}`,e)},async remove(t){return T.delete(`${D}/${t}`)}};const At={mixins:[ct],components:{MenuItem:dt,InputGroup:xt,Button:lt,Loading:kt,FormGroup:ut,Multiselect:It,Card:ht,load:mt,TextArea:yt,FormModal:pt},props:{},data(){return{title:"",breadcrumbs:[{text:"Home",href:"/"},{text:"Canvass Sheet",active:!0}],IsRatingStatuses:[3,4,5],userCollectedRankArray:[],prf_id:null,reference_no:null,item_details:[],form:{remarks:""},imageCache:{},item_photo_preview:null,canvassInfo:[],suppliersInCanvass:[],rankCanvasses:[],errors:{},images:[],state:{isLoading:!1,isLoadingPDF:!1,isMounted:!1,showModal:!1,isDeleting:!1,rateCanvass:!1,saveCanvass:!1,mancomApproval:!1},columns:[{label:"#",field:"#"},{label:"Item",field:"1"},{label:"Material Description",field:"item_description"},{label:"Vendor/Supplier",field:"supplier_name"},{label:"Qty",field:"quantity"},{label:"Unit",field:"unit_cost"},{label:"Total",field:"total_cost"},{label:"UOM",field:"uom"},{label:"Photo",field:"item_photo"},{label:"Action",field:"action"}],items:[],RankOption:[],form:{RankNo:{}},itemImages:[],searchQuery:"",serverOptions:{page:1,rowsPerPage:10,sortBy:"id",sortType:"desc"},approvalMatrix:null,totalMancomApproved:0}},watch:{suppliers:"loadAttachments"},computed:{suppliers:function(){let t=[];if(this.items.length>0){t=this.items.map(r=>({id:r.supplier_id,name:r.supplier_name}));const e=new Set;t=t.filter(r=>e.has(r.id)?!1:(e.add(r.id),!0))}return t},RankOptions:function(){return console.log("rank options...."),this.generateRankOptions(this.items.length)},recommendationHTML(){let t="";return this.suppliers.forEach(e=>{this.getItems(e.id).forEach(r=>{t+=this.isCanvassRecommendation(r)})}),t},totalColumns(){let t=0;return this.suppliers.forEach(e=>{t+=this.getItems(e.id).length}),t*2},rowspanValue(){return 4},rateCanvass(){return!!this.IsRatingStatuses.includes(this.prfStatus)},activeUser(){return this.$store.userSettings.getActiveUser??null},maxTotalCost(){let t=0;return this.items&&this.items.length>0&&(t=Math.max(...this.items.map(e=>e.total_cost))),console.log("maxTotal"),console.log(t),t},totalMancomApprovers(){let t=1,e=null;return this.approvalMatrix&&(e=this.approvalMatrix.find(r=>this.maxTotalCost>=parseFloat(r.min_amount)&&this.maxTotalCost<=parseFloat(r.max_amount)),e&&(t=e.no_required_execom)),console.log("mancomApprovers"),console.log(t),console.log(e),t},requiredApprover(){let t=0;if(this.approvalMatrix){let e=this.approvalMatrix.find(r=>this.maxTotalCost>=parseFloat(r.min_amount)&&this.maxTotalCost<=parseFloat(r.max_amount));e&&(t=e.required_approver_id)}return console.log("requiredApprover"),console.log(t),t},completeMancomApproval(){return this.totalMancomApproved>0&&this.totalMancomApprovers==this.totalMancomApproved}},methods:{getItems(t){let e=[];return this.items.length>0&&(e=this.items.filter(r=>r.supplier_id==t)),e},async fetchRecords(){this.state.isLoading=!0,console.log("fetching record of canvass item in this prf"),await O.canvassItemByprf(this.prf_id,this.item_details.prf_dtl_id,{keyword:this.searchQuery,page:this.serverOptions.page,per_page:this.serverOptions.rowsPerPage,sortBy:this.serverOptions.sortBy,sortType:this.serverOptions.sortType}).then(t=>{console.log("response.."),console.log(t);const g=t.data.data.map(u=>({...u,total_cost_value:u.total_cost})).sort((u,a)=>u.total_cost_value-a.total_cost_value).map((u,a)=>({...u,rank:a+1}));this.rankCanvasses=g,this.items=g}).finally(()=>{this.state.isLoading=!1})},async fetchCanvassRecord(){console.log("item details"),console.log(this.item_details),await O.CanvassbyRequestdtl(this.item_details.prf_dtl_id).then(t=>{let e=t.data.data;this.canvassInfo=e,this.suppliersInCanvass=this.canvassInfo.map(r=>r.supplier.id)}).finally(()=>{})},async fetchItemImage(t){try{await O.itemImage(t).then(e=>e.data)}catch(e){throw console.error("Error fetching image:",e),e}},async getImagePreview(t){if(this.imageCache[t])return this.imageCache[t];let e=await N.Reader("canvass",t);return this.imageCache[t]=e,e},async getPdfPreview(t){if(this.imageCache[t])return this.imageCache[t];let r=`data:application/pdf;base64,${await N.Reader2("canvass",t)}`;return this.imageCache[t]=r,r},async loadAttachments(){for(const t of this.suppliers){const e=this.getItems(t.id);for(const r of e)r.fileAttachmentBase64=await this.getPdfPreview(r.file_attachment)}},formatNumber(t){return typeof t!="number"?t:t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},generateRankOptions(t){const e=[];for(let r=1;r<=t;r++)e.push({label:`${r} Priority`,value:r.toString()});return e},handleOnRatingUser(t,e,r){console.log("firs..."),r.length>0?(this.form.RankNo={...this.form.RankNo,[e]:r},console.log(`Rank selected for item ${e} ${t}`,this.form.RankNo[e])):this.$delete(this.form.RankNo,e)},getSelectedRanks(){return this.form.RankNo},submitRatings(){const t=this.getSelectedRanks();console.log("Selected Ranks:",t)},InitialRating(t){return this.rankedCanvassList.canvass_id==t?this.rankedCanvassList.rank:null},saveCanvassSheet(){console.log("canvass sheet...");const e=this.items.map(r=>({canvass_id:r.id,supplier_id:r.supplier_id,prf_id:r.prf_id,reference_no:this.reference_no,prf_dtl_id:r.prf_dtl_id,asset_item_id:r.item_id,qty:r.quantity,unit_cost_value:r.unit_cost,total_cost_value:r.total_cost})).sort((r,g)=>r.total_cost_value-g.total_cost_value).map((r,g)=>({...r,rank:g+1}));this.$swal.fire({title:"Are you sure you want to save this record?",text:"",icon:"question",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes",cancelButtonText:"No"}).then(r=>{r.value&&(this.state.isSaving=!0,O.setInitialRating(e).then(g=>{console.log("saving...."),g.status==201&&(this.form.remarks="",this.updateStatus(this.form.status))}).catch(g=>{console.log(g),this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",type:"error",icon:"error",timer:2e3})}).finally(()=>this.state.isSaving=!1))})},async updateStatus(t){let e={remarks:"",status:t,updated_by:this.activeUser.id,proposal_id:this.form.proposal_id??null};const r=this.items[0].prf_dtl_id;await bt.updateStatus(r,e).then(g=>{g.status==201?(this.$swal.fire({title:"Great!",text:"Record successfully updated.",type:"success",icon:"success",timer:2e3}),this.state.showModal=!1):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",type:"error",icon:"error",timer:2e3})}).catch(g=>{console.log(g),g.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:g.response.data.message,type:"error",icon:"error"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",type:"error",icon:"error",timer:2e3})}).finally(()=>{this.state.isSaving=!1,this.reload()})},async mancomApproval(t){console.log(this.item_details);let e={record_id:this.item_details.prf_dtl_id,transaction_type:"purchase-request-item",approver_role:"execom",approved_by:this.activeUser.employee_id??null};await wt.create(e).then(r=>{r.status==201?(this.totalMancomApproved++,this.completeMancomApproval?this.updateStatus(t):(this.$swal.fire({title:"Great!",text:"Record successfully updated.",type:"success",icon:"success",timer:2e3}),this.state.showModal=!1)):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",type:"error",icon:"error",timer:2e3})}).catch(r=>{console.log(r),r.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:r.response.data.message,type:"error",icon:"error"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",type:"error",icon:"error",timer:2e3})}).finally(()=>{this.state.isSaving=!1,this.reload()})},handleUserRating(){this.$swal.fire({title:"Are you sure you want to submit your rating?",text:"",icon:"question",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes",cancelButtonText:"No"}).then(t=>{t.value&&this.UserRating()})},UserRating(){let t=[];this.suppliers.forEach(e=>{let r=this.getItems(e.id),g="Default";this.state.rateCanvass&&(g="User"),this.state.mancomApproval&&(g="Execom"),r.forEach(u=>{t.push({prf_dtl_id:u.prf_dtl_id,canvass_id:u.id,asset_item_id:u.item_id,rank:u.rank,remarks:this.form.remarks,rated_by:g})})}),this.userCollectedRankArray=t,console.log("collected ranks "),console.log(this.userCollectedRankArray),this.state.isSaving=!0,Rt.saveRating(this.userCollectedRankArray).then(e=>{e.status==201&&(this.state.mancomApproval?(console.log("ThisIsMancomApproval"),this.mancomApproval(this.form.status)):console.log("NotMancomApproval"),this.reload())}).catch(e=>{console.log(e),this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",type:"error",icon:"error",timer:2e3})}),this.state.isSaving=!1},ItemBackgroundColor(t){return t.rank==1?"bg-pink-200":""},isCanvassRecommendation(t){return t.rank==1?"<div class='bg-pink-200'> Recommended to award to <strong>"+t.supplier_name+"</strong> as Best Value Procurement (BVP) in terms of price and payment terms.</div>":""},CanvassRecommendtion(t){return t.rating==1?"Recommended to award to "+t.supplier_name+" as Best Value Procurement (BVP) in terms of price and payment terms.</div>":""},async generatePDF(){this.state.isLoadingPDF=!0;try{let S=0;this.canvassInfo.length>2&&(S=(this.canvassInfo.length-2)*75);const R=297+S,s=new St({orientation:"landscape",unit:"mm",format:[R,210+30]}),h=10,b=s.internal.pageSize.getWidth(),V=s.getTextWidth("Canvass Sheet"),c=297,n=(b-V)/2,I=42,B=60,C=65,G=10;s.setFontSize(20);const W=10,ve=5,x=b-h*2+2,E=h-1,q=22.5,j=122;s.setFillColor(200,200,200),s.rect(E,q,x,W,"F"),s.setDrawColor(255,255,255),s.rect(E,q,x,W),s.text("Canvass Sheet",n,30),s.setDrawColor(0,0,0),s.setTextColor(0,0,0),s.setFontSize(9),s.text("Project: ",h,I),s.text(this.item_details.purpose??"",h+13,I),s.rect(h-1,I+2,x,0);let k=53,f=207,ye=s.internal.pageSize.getWidth()-260;const Q=55;s.text("VENDORS ",b/2,I);let X=[];s.text("PRF#: ",h,k),s.text(this.reference_no.toString(),25,k),s.rect(h-1,B+1,x,0),s.rect(103,119,R-112,0),s.rect(103,125,297+S-112,0),console.log("PAGE WIHTD "+R+" "+s.internal.pageSize.getWidth()+"base width297ADDITIONAL WIDTH"+S);let Z=0;const xe=this.canvassInfo.length;var t="";async function J(m,Ce){console.log("info...."),console.log(m),m.rating==1&&(t=this.CanvassRecommendtion(m));const z=this.suppliersInCanvass.filter(P=>P===m.supplier_id).length;if(z>1){if(!X.includes(m.supplier.id)){s.text(m.supplier.name.toString(),f/2+40,k);let P=f;for(let H=0;H<z;H++)P+=50,s.text("Option "+(H+1).toString(),P/2,k+5),P+=100}}else s.text(m.supplier.name.toString(),f/2,k);X.push(m.supplier.id);let Y=await N.Reader("canvass",m.item_photo);this.images.push(Y),s.addImage(Y,"JPEG",f/2,k+15,55,50),s.text("Unit Cost",f/2,C),s.text("Total Cost",(f+80)/2,C),s.rect(f/2+35,C-4,0,7),s.rect(f/2-1,C-4,0,30+j),s.text(parseFloat(m.unit_cost).toString(),f/2,k+70),s.text(parseFloat(m.total_cost).toString(),(f+80)/2+10,k+70),s.rect(f/2+35,k+66,0,6),s.text("Vat included",f/2,170),s.text(m.delivery_lead_time==null?"":m.delivery_lead_time.toString(),f/2+10,180),s.text(m.warranty==null?"":m.warranty.toString(),f/2+10,190),s.text(m.notation==null?"":m.notation.toString(),f/2+10,199);const st=m.description?m.description.toString():"",at=s.splitTextToSize(st,Q);s.text(at,f/2,k+80);const ot=10,rt=10,nt=80,it=10;Z=G+ot+rt+nt+it;const we=k+110;s.setFontSize(11),s.text(parseFloat(m.total_cost).toFixed(2).toString(),(f+60)/2,162),s.setFontSize(9),f+=160}const K=J.bind(this);for(let m=0;m<this.canvassInfo.length;m++)await K(this.canvassInfo[m],m);s.text("ITEM",h,C),s.text("MATERIAL DESCRIPTION ",h+15,C),s.text("QTY",h+60,C),s.text("UOM",h+70,C),s.text("1",h,75),s.text(this.item_details.asset_item_name.toString(),h+15,75),s.text(this.item_details.quantity.toString(),h+60,75),s.text(this.item_details.uom.toString(),h+70,75),s.rect(h-1,C+3,x,0),s.rect(h-1,157,x,0),s.text("Total Amount",70,162),s.rect(h-1,165,x,0),s.text("VAT:",70,170),s.rect(h-1,172,x,0),s.text("Delivery Lead Time",70,180),s.rect(h-1,185,x,0),s.text("Warranty",70,190),s.rect(h-1,192,x,0),s.text("Notation",70,199),s.rect(h-1,202,x,0),s.text("Recommendation",70-10,210),t&&s.text(t,70+30,210),s.text("Processed by :",h,220);const $=b-2*h,ke=120;s.rect(h-1,30+2,$+2,210+30-59);const tt=s.output("blob"),et="canvass_sheet.pdf";var e=s.output("datauristring");const A=document.createElement("a");A.href=URL.createObjectURL(tt),A.download=et,A.style.display="none",document.body.appendChild(A),A.click(),document.body.removeChild(A),this.state.isLoadingPDF=!1;return}catch(r){console.error("Error generating PDF: ",r)}},reload(){this.$emit("reload")},closeModal(){this.state.showModal=!1},loadRecord(t){console.log("load data.....");const e=Object.assign({},t);this.prf_id=e.prf_id,this.reference_no=e.reference_no,this.item_details=e.item_details,this.totalMancomApproved=e.totalMancomApproved,console.log("loading this.item_details"),console.log(this.item_details)},async init(){await this.fetchRecords(),await this.fetchCanvassRecord(),this.loadAttachments(),console.log("setting initial rating");for(let t of this.suppliers)for(let e of this.getItems(t.id))await this.getImagePreview(e.item_photo);console.log("end init")},async fetchApprovalMatrix(){console.log("fetching approval matrix"),await Ct.fetchRecords().then(t=>{t.status==200&&(this.approvalMatrix=t.data.data,console.log("approval matrixx"),console.log(this.approvalMatrix))}).catch(t=>{console.error(t)})}},async mounted(){this.init(),this.fetchApprovalMatrix()}},_=t=>(_t("data-v-4e9f6184"),t=t(),vt(),t),Mt={class:"relative"},Bt={class:"w-full flex gap-2 justify-end mb-4"},Pt={class:"min-w-full text-center text-sm font-light text-surface dark:text-white text-center"},Tt={class:"border-b border-neutral-200 font-medium dark:border-white/10"},Ft={colspan:"4"},Dt=["colspan"],Lt={colspan:"4"},Ot=["colspan"],Vt=_(()=>l("th",null,"Item",-1)),Ht=_(()=>l("th",null,"Material Description",-1)),Ut=_(()=>l("th",null,"Qty",-1)),Nt=_(()=>l("th",null,"Uom",-1)),Wt={key:0},Et=["rowspan"],qt=["rowspan"],Xt=["rowspan"],zt=["rowspan"],Yt=["src"],Gt={key:1},jt=_(()=>l("div",{role:"status",class:"space-y-4 animate-pulse md:space-y-0 md:space-x-4 rtl:space-x-reverse md:flex md:items-center"},[l("div",{class:"flex items-center justify-center w-64 h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700"},[l("svg",{class:"w-10 h-10 text-gray-200 dark:text-gray-600","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 18"},[l("path",{d:"M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z"})])])],-1)),Qt=_(()=>l("span",null,"Loading...",-1)),Zt=[jt,Qt],Jt={key:2},Kt=["href","title"],$t={class:"font-bold"},te=_(()=>l("td",{colspan:"4"},"Total Amount",-1)),ee=_(()=>l("td",{colspan:"4"},"VAT",-1)),se=_(()=>l("td",{colspan:"4"},"Delivery lead time",-1)),ae=_(()=>l("td",{colspan:"4"},"Warranty",-1)),oe=_(()=>l("td",{colspan:"4"},"Notation",-1)),re=_(()=>l("td",{colspan:"4"},"Recommendation",-1)),ne=["colspan","innerHTML"],ie=_(()=>l("td",{colspan:"4"},"Processed by",-1)),le={class:"bg-gray-100"},ce=_(()=>l("td",{colspan:"4"},"Rating",-1)),de={class:"pb-20"},ue=_(()=>l("span",{class:"icon-[material-symbols-light--star-rate-outline]"},null,-1)),he={key:1,class:"bg-gray-100"},me=_(()=>l("td",{colspan:"4"},null,-1)),pe=["colspan"],ge=_(()=>l("label",{class:"text-white"},"Submit canvass rating",-1)),fe=[ge];function _e(t,e,r,g,u,a){const S=M("Multiselect"),R=M("FormGroup"),s=M("TextArea"),h=M("Form"),b=M("Loading"),V=M("FormModal");return o(),L(V,{title:"Canvass Sheet",active:u.state.showModal,onSubmit:t.confirmSubmit,onClose:e[5]||(e[5]=c=>a.closeModal()),themeClass:"bg-primary-800",sizeClass:"lg:w-full"},{default:U(()=>[l("div",null,[l("div",Mt,[l("div",Bt,[l("button",{class:"btn btn-sm btn-secondary",onClick:e[0]||(e[0]=(...c)=>a.generatePDF&&a.generatePDF(...c))}," Print pdf canvass "),u.state.saveCanvass?(o(),i("button",{key:0,class:"btn btn-sm bg-primary-800 text-white",onClick:e[1]||(e[1]=(...c)=>a.saveCanvassSheet&&a.saveCanvassSheet(...c)),icon:"ic:outline-save"}," Save canvass sheet ")):w("",!0)]),l("div",null,[l("table",Pt,[l("thead",Tt,[l("tr",null,[l("th",Ft,"Project : "+v(u.item_details.purpose),1),l("th",{colspan:`${u.items.length*2}`},"VENDORS",8,Dt)]),l("tr",null,[l("th",Lt,"PRF# "+v(u.reference_no),1),(o(!0),i(d,null,p(a.suppliers,c=>(o(),i("th",{key:c.id,colspan:`${2*a.getItems(c.id).length}`},v(c.name),9,Ot))),128))]),l("tr",null,[Vt,Ht,Ut,Nt,(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i(d,{key:n.id},[l("th",{class:y(a.ItemBackgroundColor(n))},"Unit Cost",2),l("th",{class:y(a.ItemBackgroundColor(n))},"Total Cost",2)],64))),128))],64))),128))])]),l("tbody",null,[u.items.length>0?(o(),i("tr",Wt,[l("td",{rowspan:a.rowspanValue},"1",8,Et),l("td",{rowspan:a.rowspanValue},v(u.item_details.asset_item_name),9,qt),l("td",{rowspan:a.rowspanValue},v(u.items[0].quantity),9,Xt),l("td",{rowspan:a.rowspanValue},v(u.items[0].uom),9,zt),(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i("td",{key:n.id,class:y(a.ItemBackgroundColor(n)),colspan:"2"},[u.imageCache[n.item_photo]?(o(),i("img",{key:0,style:{width:"250px",height:"200px","object-fit":"cover"},src:u.imageCache[n.item_photo]},null,8,Yt)):(o(),i("div",Gt,Zt)),n.rank>0?(o(),i("div",Jt,v("Rank "+n.rank),1)):w("",!0)],2))),128))],64))),128))])):w("",!0),l("tr",null,[(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i(d,{key:n.id},[l("td",{class:y(a.ItemBackgroundColor(n))},v(a.formatNumber(n.unit_cost)),3),l("td",{class:y(a.ItemBackgroundColor(n))},v(a.formatNumber(n.total_cost)),3)],64))),128))],64))),128))]),l("tr",null,[(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i("td",{key:n.id,class:y(a.ItemBackgroundColor(n)),colspan:"2"},v(n.description),3))),128))],64))),128))]),l("tr",null,[(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i("td",{key:n.id,class:y(a.ItemBackgroundColor(n)),colspan:"2"},[l("small",null,[ft(" Attachment : "),n.file_attachment&&n.fileAttachmentBase64?(o(),i("a",{key:0,href:n.fileAttachmentBase64,class:"text-cyan-600 font-medium",title:"View attachment: "+n.file_attachment,target:"_blank"},v(n.file_attachment.length>50?n.file_attachment.slice(0,50)+"...":n.file_attachment),9,Kt)):w("",!0)])],2))),128))],64))),128))]),l("tr",$t,[te,(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i("td",{key:n.id,class:y(a.ItemBackgroundColor(n)),colspan:"2"},v(a.formatNumber(n.total_cost)),3))),128))],64))),128))]),l("tr",null,[ee,(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i("td",{key:n.id,class:y(a.ItemBackgroundColor(n)),colspan:"2"}," Vat(Included) ",2))),128))],64))),128))]),l("tr",null,[se,(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i("td",{key:n.id,class:y(a.ItemBackgroundColor(n)),colspan:"2"},v(n.delivery_lead_time),3))),128))],64))),128))]),l("tr",null,[ae,(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i("td",{key:n.id,class:y(a.ItemBackgroundColor(n)),colspan:"2"},v(n.warranty),3))),128))],64))),128))]),l("tr",null,[oe,(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i("td",{key:n.id,class:y(a.ItemBackgroundColor(n)),colspan:"2"},v(n.notation),3))),128))],64))),128))]),l("tr",null,[re,l("td",{colspan:`${2*u.items.length}`,innerHTML:a.recommendationHTML},null,8,ne)]),l("tr",null,[ie,(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),n=>(o(),i("td",{key:n.id,colspan:"2"}))),128))],64))),128))]),l("tr",le,[ce,(o(!0),i(d,null,p(a.suppliers,c=>(o(),i(d,{key:c.id},[(o(!0),i(d,null,p(a.getItems(c.id),(n,I)=>(o(),i("td",{key:n.id,colspan:"2"},[l("div",de,[F(R,{label:""},{default:U(()=>[ue,F(S,{modelValue:n.rank,"onUpdate:modelValue":B=>n.rank=B,id:`rank_no_${I}`,name:`rank_no_${I}`,"close-on-select":!0,searchable:!0,options:a.RankOptions,onChange:B=>a.handleOnRatingUser(I,n.id,B),disabled:!u.state.rateCanvass},null,8,["modelValue","onUpdate:modelValue","id","name","options","onChange","disabled"])]),_:2},1024)])]))),128))],64))),128))]),u.state.rateCanvass?(o(),i("tr",he,[me,l("td",{colspan:a.totalColumns},[F(R,{label:"Remarks",class:"text-white mt-8"},{default:U(()=>[F(s,{placeholder:"Input Canvass rating remarks",id:"remarks",modelValue:u.form.remarks,"onUpdate:modelValue":e[2]||(e[2]=c=>u.form.remarks=c),error:u.errors.remarks,class:"classinput input-control block w-full pt-3 border-none",rows:"5"},null,8,["modelValue","error"])]),_:1}),u.state.rateCanvass?(o(),i("button",{key:0,class:"btn bg-primary-800 float-right mr-5",onClick:e[3]||(e[3]=(...c)=>a.UserRating&&a.UserRating(...c))},fe)):w("",!0)],8,pe)])):w("",!0)])])]),F(h,{onCloseModal:e[4]||(e[4]=c=>u.state.showModal=!1),ref:"form",onReload:a.reload},null,8,["onReload"])]),u.state.isLoading?(o(),L(b,{key:0,text:"Fetching Canvass",class:"text-xs"})):w("",!0),u.state.isLoadingPDF?(o(),L(b,{key:1,text:"Preparing pdf canvass sheet"})):w("",!0),u.state.isSaving?(o(),L(b,{key:2,text:"Saving record"})):w("",!0)])]),_:1},8,["active","onSubmit"])}const Ee=gt(At,[["render",_e],["__scopeId","data-v-4e9f6184"]]);export{Ee as default};
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings