"use strict";(self.webpackChunkwheelsmart_admin_react=self.webpackChunkwheelsmart_admin_react||[]).push([[9642],{59642:(e,r,a)=>{a.r(r),a.d(r,{default:()=>v});var t=a(65043),s=a(68493),n=a(5835),i=a(47419),l=a(11645),c=a(26655),d=a(5397),o=a(83003),h=a(60273),u=a(20541),p=a(16876),g=a(17971),m=a(48123),f=a(70579);const v=function(){const e=(0,o.wA)(),r=(0,h.MD)("masters","truckSheet").truckSheetlist,a=((0,o.d4)((e=>e.masters.truckSheet.noofpages)),(0,o.d4)((e=>e.masters.truckSheet.listCount))),v=(0,o.d4)((e=>e.masters.truckSheet.truckSheetParams)),x=(0,o.d4)((e=>e.masters.truckSheet.loading)),[S]=((0,o.d4)((e=>e.system.userAccessList)),s.A.useForm());(0,t.useEffect)((()=>{e((0,g.Z)({page:1,search:"",page_size:10}))}),[]);const j=[{title:"S.No",dataIndex:"index",width:"5%"},{title:"Company",render:e=>{var r;return(0,f.jsx)("span",{children:null===(r=e.company)||void 0===r?void 0:r.name})},filterMode:"tree",filterSearch:!0},{title:"Code",render:e=>(0,f.jsx)("span",{children:null===e||void 0===e?void 0:e.code}),filterMode:"tree",filterSearch:!0},{title:"Location",render:e=>{var r;return(0,f.jsx)("span",{children:null===(r=e.location)||void 0===r?void 0:r.name})},filterMode:"tree",filterSearch:!0},{title:"Warehouse",render:e=>{var r;return(0,f.jsx)("span",{children:null===(r=e.warehouse)||void 0===r?void 0:r.name})},filterMode:"tree",filterSearch:!0},{title:"Party",render:e=>{var r;return(0,f.jsx)("span",{children:null===(r=e.party)||void 0===r?void 0:r.name})},filterMode:"tree",filterSearch:!0},{title:"Vehicle",render:e=>{var r;return(0,f.jsx)("span",{children:null===(r=e.vehicle)||void 0===r?void 0:r.number})},filterMode:"tree",filterSearch:!0}],k=null===r||void 0===r?void 0:r.map(((e,r)=>({...e,index:(v.page-1)*v.page_size+r+1}))),{Search:A}=n.A;return(0,f.jsxs)(i.A,{gutter:[12,12],className:"hp-mt-32",children:[(0,f.jsx)(p.A,{prefix:"Masters",postfix:"truckSheet",pageTitle:"Truck Sheet",goBack:!0}),(0,f.jsx)(l.A,{span:24,children:(0,f.jsx)(c.A,{children:(0,f.jsxs)(i.A,{children:[(0,f.jsx)(l.A,{span:12,xs:24,sm:24,md:12,className:"hp-mb-12",children:(0,f.jsx)(A,{placeholder:"Search...",allowClear:!0,onChange:r=>{""==r.target.value&&(e((0,g.Z)({...v,page:1,search:""})),e((0,m.Vz)({...v,page:1,search:""})))},onSearch:r=>{var a;a=r,e((0,m.Vz)({...v,page:1,search:a})),e((0,g.Z)({...v,page:1,search:a}))}})}),(0,f.jsx)(l.A,{span:24,children:(0,f.jsx)(d.A,{tip:"Loading...",spinning:x,delay:500,children:(0,f.jsx)(u.A,{page:v.page,count:a,pageSize:v.page_size,columns:j,data:k,loading:x,onPageChange:function(r,a){e((0,m.Vz)({...v,page_size:a,page:0==r?1:r})),e((0,g.Z)({...v,page_size:a,page:0==r?1:r}))},showTotal:function(e){return"Total "+e+" items"},scroll:!0})})})]})})})]})}}}]);
//# sourceMappingURL=9642.7fd1d8ed.chunk.js.map