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