"use strict";(self.webpackChunkwheelsmart_admin_react=self.webpackChunkwheelsmart_admin_react||[]).push([[4206],{18534(e,i,t){t.d(i,{A:()=>n});t(65043);const n=t.p+"static/media/empty-list.6fd5c5d1fceac81a14359bdcffbb13db.svg"},84206(e,i,t){t.r(i),t.d(i,{default:()=>g});var n=t(89379),o=t(65043),d=t(97508),l=t(26655),r=t(11645),a=t(39998),s=t(91037),c=t(75639),m=t(47419),u=t(97190),v=t(36683),h=t(91688),j=t(79797),b=(t(18534),t(86178),t(98604)),p=t(11225),w=t(70579);const g=(0,d.Ng)(function(e){let i=e.jobCard;return{loading:i.loading,jobCardView:i.jobCardView}},{getJobCardById:b.kx})(function(e){var i,t,d,b,g,x,C,V,A,y,_,f,I,k,E,S,N,T,D;let F=(0,h.useParams)().id;const B=v.A.Text;v.A.Title,v.A.Link,(0,o.useEffect)(()=>{e.getJobCardById(F)},[]);const J=[{title:"CODE",description:null==e.jobCardView.code?"none":e.jobCardView.code},{title:"Counter",description:null==(null===(i=e.jobCardView.counter)||void 0===i?void 0:i.name)?"none":null===(t=e.jobCardView.counter)||void 0===t?void 0:t.name},{title:"Vehicle",description:null==(null===(d=e.jobCardView.vehicle)||void 0===d?void 0:d.vehicleno)?"none":null===(b=e.jobCardView.vehicle)||void 0===b?void 0:b.vehicleno},{title:"Version",description:null==(null===(g=e.jobCardView.vehicle)||void 0===g||null===(x=g.version)||void 0===x?void 0:x.name)?"none":null===(C=e.jobCardView.vehicle)||void 0===C||null===(V=C.version)||void 0===V?void 0:V.name},{title:"Model",description:null==(null===(A=e.jobCardView.vehicle)||void 0===A||null===(y=A.version)||void 0===y||null===(_=y.model)||void 0===_?void 0:_.name)?"none":null===(f=e.jobCardView.vehicle)||void 0===f||null===(I=f.version)||void 0===I||null===(k=I.model)||void 0===k?void 0:k.name},{title:" Estimation Date",description:null==e.jobCardView.date?"none":e.jobCardView.date},{title:"Est Person Name",description:localStorage.getItem("username")},{title:"Estimation Type",description:null==e.jobCardView.estimation_type_name?"none":e.jobCardView.estimation_type_name},{title:"GoDown",description:null==e.jobCardView.godown?"none":e.jobCardView.godown},{title:"Total Estimation Amount",description:null==e.jobCardView.total_estimation?"none":e.jobCardView.total_estimation},{title:"Test Ride",description:e.jobCardView.testride?"YES":"NO"},{title:"Vehicle Front Image",description:(0,w.jsx)(s.A,{src:null==(null===(E=e.jobCardView)||void 0===E?void 0:E.vehicle_front_image)?p:null===(S=e.jobCardView)||void 0===S?void 0:S.vehicle_front_image,style:{height:"100px",objectFit:"contain"}})},{title:"Vehicle Back Image",description:(0,w.jsx)(s.A,{src:null==(null===(N=e.jobCardView)||void 0===N?void 0:N.vehicle_back_image)?p:null===(T=e.jobCardView)||void 0===T?void 0:T.vehicle_back_image,style:{height:"100px",objectFit:"contain"}})}];var P=[];J.forEach(e=>{null!==e.title&&P.push(e)});const M=[{title:"S.No",dataIndex:"index",width:70},{title:"Code",dataIndex:"code",width:120},{title:"Category",render:e=>{var i;return(0,w.jsx)(B,{children:null===(i=e.category)||void 0===i?void 0:i.name})},width:100},{title:"Sub Category",render:e=>{var i;return(0,w.jsx)(B,{children:null===(i=e.subcategory)||void 0===i?void 0:i.name})},width:100},{title:"Item",render:e=>{var i;return(0,w.jsx)(B,{children:null===(i=e.item)||void 0===i?void 0:i.name})},width:100},{title:"Item Image",render:e=>{var i,t;return(0,w.jsx)(s.A,{src:null==(null===(i=e.item)||void 0===i?void 0:i.image)?p:null===(t=e.item)||void 0===t?void 0:t.image,style:{height:"50px",objectFit:"contain"}})},width:100},{title:"Price",render:e=>(0,w.jsx)(B,{children:e.price}),width:100},{title:"Quantity",render:e=>(0,w.jsx)(B,{children:e.quantity}),width:100},{title:"Damage Estimation",render:e=>(0,w.jsx)(B,{children:e.damage_estimation}),width:100},{title:"Description",render:e=>(0,w.jsx)(B,{children:e.description}),width:100}],O=null===(D=e.jobCardView.jobcarditems)||void 0===D?void 0:D.map((e,i)=>(0,n.A)((0,n.A)({},e),{},{index:i+1}));return(0,w.jsxs)(o.Fragment,{children:[(0,w.jsx)(m.A,{gutter:[12,12],children:(0,w.jsx)(r.A,{span:24,children:(0,w.jsx)(j.A,{pageTitle:"Job Card Summary",goBack:!0})})}),(0,w.jsx)(m.A,{gutter:[12,0],children:(0,w.jsx)(r.A,{span:24,sm:24,xs:24,md:24,children:(0,w.jsxs)(l.A,{className:"hp-border-color-black-40 hp-mb-10 ",children:[(0,w.jsx)(c.Ay,{grid:{gutter:16,xs:1,sm:2,md:6,lg:6,xl:6,xxl:5},dataSource:P,renderItem:e=>(0,w.jsx)(c.Ay.Item,{children:(0,w.jsx)(c.Ay.Item.Meta,{title:(0,w.jsx)("span",{children:e.title}),description:(0,w.jsx)("span",{children:e.description})})})}),(0,w.jsx)(a.A,{className:"hp-mt-6 hp-mb-6"}),(0,w.jsx)(u.A,{columns:M,dataSource:O,pagination:!1,size:"middle",loading:e.loading})]})})})]})})},11225(e,i,t){e.exports=t.p+"static/media/noimg.b2f3d4d2db9e6455a9f4.png"}}]);
//# sourceMappingURL=4206.2bca21de.chunk.js.map