"use strict";(self.webpackChunkwheelsmart_admin_react=self.webpackChunkwheelsmart_admin_react||[]).push([[2301],{52301:(e,a,s)=>{s.r(a),s.d(a,{default:()=>x});var t=s(65043),n=s(68493),i=s(5835),r=s(47419),c=s(11645),l=s(26655),d=s(5397),p=s(83003),h=s(60273),o=s(16876),g=s(20541),u=s(43301),m=(s(5309),s(70579));const x=function(){const e=(0,p.wA)(),a=(0,h.MD)("masters","unit").unitlist,s=((0,p.d4)((e=>e.masters.unit.noofpages)),(0,p.d4)((e=>e.masters.unit.listCount))),x=(0,p.d4)((e=>e.masters.unit.unitParams)),f=(0,p.d4)((e=>e.masters.unit.loading)),[A]=((0,p.d4)((e=>e.system.userAccessList)),n.A.useForm());(0,t.useEffect)((()=>{e((0,u._)({page:1,search:"",page_size:10}))}),[]);const _=[{title:"S.No",dataIndex:"index",width:"5%"},{title:"Name",render:e=>(0,m.jsx)("span",{children:e.name}),filterMode:"tree",filterSearch:!0,width:"30%"}],j=null===a||void 0===a?void 0:a.map(((e,a)=>({...e,index:(x.page-1)*x.page_size+a+1}))),{Search:w}=i.A;return(0,m.jsxs)(r.A,{gutter:[12,12],className:"hp-mt-32",children:[(0,m.jsx)(o.A,{prefix:"Masters",postfix:"units",pageTitle:"Units",goBack:!0}),(0,m.jsx)(c.A,{span:24,children:(0,m.jsx)(l.A,{children:(0,m.jsxs)(r.A,{children:[(0,m.jsx)(c.A,{span:12,xs:24,sm:24,md:12,className:"hp-mb-12",children:(0,m.jsx)(w,{placeholder:"Search...",allowClear:!0,onChange:a=>{""==a.target.value&&(e((0,u._)({...x,page:1,search:""})),e((0,u.Z)({...x,page:1,search:""})))},onSearch:a=>{var s;s=a,e((0,u.Z)({...x,page:1,search:s})),e((0,u._)({...x,page:1,search:s}))}})}),(0,m.jsx)(c.A,{span:24,children:(0,m.jsx)(d.A,{tip:"Loading...",spinning:f,delay:500,children:(0,m.jsx)(g.A,{page:x.page,count:s,pageSize:x.page_size,columns:_,data:j,loading:f,onPageChange:function(a,s){e((0,u.Z)({...x,page_size:s,page:0==a?1:a})),e((0,u._)({...x,page_size:s,page:0==a?1:a}))},showTotal:function(e){return"Total "+e+" items"},scroll:!0})})})]})})})]})}}}]);
//# sourceMappingURL=2301.5d238156.chunk.js.map