"use strict";(globalThis.webpackChunkwheelsmart_admin_react||=[]).push([[8204],{38204(t,e,a){a.r(e);var i=a(65043),l=a(97508),n=a(91688),o=a(89421),d=a(26655),s=a(11645),c=a(5835),r=a(12779),h=a(47419),m=a(5397),u=a(30190),x=a(94733),p=a(86178),g=a.n(p),w=a(79797),_=a(29635),C=a(70579);const I=(0,l.Ng)(function(t){let{collection:e}=t;return{collectionList:e.collectionList||[],listCount:e.listCount||0,collectionParams:e.collectionParams,loading:e.loading}},{getCollectionList:_.lB,setCollectionParams:_.Tz})(function(t){var e,a;const l=(0,n.useHistory)();(0,i.useEffect)(()=>{t.getCollectionList({page:1,search:"",page_size:10})},[]);const p=[{title:"S.No",dataIndex:"index",width:60,fixed:"left"},{title:"Loan Number",dataIndex:"loan_number",width:140,fixed:"left"},{title:"Centre",dataIndex:"centre",width:100},{title:"Customer",dataIndex:"customer_name",width:140},{title:"Customer Mobile",dataIndex:"cust_mobile",width:130},{title:"Vehicle No",dataIndex:"vehicle_number",width:120},{title:"Variant",dataIndex:"variant",width:150},{title:"Mfg Year",dataIndex:"mfg_year",width:80},{title:"Company",dataIndex:"company",width:100},{title:"Branch",dataIndex:"branch",width:70},{title:"Collection Manager",dataIndex:"collection_manager",width:150},{title:"Executive",width:120,render:t=>{var e;return(null===(e=t.executive)||void 0===e?void 0:e.fullname)||"-"}},{title:"OPE EMI",dataIndex:"ope_emi",width:90},{title:"RUN EMI",dataIndex:"run_emi",width:90},{title:"EMI Due",dataIndex:"emi_due",width:90},{title:"Total Dues",dataIndex:"total_dues",width:100},{title:"Monthly Collection",dataIndex:"monthly_collection",width:140},{title:"Balance",dataIndex:"balance",width:100},{title:"Gross Collected",dataIndex:"gross_collected",width:120},{title:"LPC Dues",dataIndex:"lpc_dues",width:90},{title:"LPC Collected",dataIndex:"lpc_collected",width:110},{title:"Handloan",dataIndex:"handloan",width:90},{title:"Status",dataIndex:"latest_status",width:90},{title:"Collection Status",dataIndex:"collection_status_name",width:130},{title:"Visit Status",width:100,render:t=>t.is_visited?"Yes":"No"},{title:"Not Visit Reason",dataIndex:"not_visited_reason_name",width:140},{title:"Visit Description",dataIndex:"visit_description",width:150},{title:"Remarks",dataIndex:"remarks",width:150},{title:"Follow-up Date",width:120,render:t=>t.follow_up_date?g()(t.follow_up_date).format("DD-MM-YYYY"):"-"},{title:"Last Rcvd Date",width:120,render:t=>t.last_rcvd_date?g()(t.last_rcvd_date).format("DD-MM-YYYY"):"-"},{title:"Last Due Date",width:120,render:t=>t.last_due_date?g()(t.last_due_date).format("DD-MM-YYYY"):"-"},{title:"Created On",width:120,render:t=>t.createdon?g()(t.createdon).format("DD-MM-YYYY"):"-"}],_=(t.collectionList||[]).map((e,a)=>({...e,index:(t.collectionParams.page-1)*t.collectionParams.page_size+a+1})),{Search:I}=c.A;return(0,C.jsxs)(h.A,{gutter:[12,12],children:[(0,C.jsx)(w.A,{pageTitle:"Collections",goBack:!1}),(0,C.jsx)(s.A,{span:24,children:(0,C.jsxs)(h.A,{gutter:[12,12],children:[(0,C.jsx)(s.A,{span:24,xs:24,sm:24,md:16,children:(0,C.jsx)(I,{placeholder:"Search...",allowClear:!0,onChange:e=>{""==e.target.value&&(t.setCollectionParams({...t.collectionParams,page:1,search:""}),t.getCollectionList({...t.collectionParams,page:1,search:""}))},onSearch:e=>{var a;e&&(a=e,t.setCollectionParams({...t.collectionParams,page:1,search:a}),t.getCollectionList({...t.collectionParams,page:1,search:a}))}})}),(0,C.jsx)(s.A,{span:24,xs:24,sm:24,md:4,children:(0,C.jsx)(o.A,{className:"hp-w-100 hp-p-12",icon:(0,C.jsx)(x.A,{className:"hp-mr-10"}),onClick:()=>l.push("/Masters/collections-import"),children:"Import"})})]})}),(0,C.jsx)(s.A,{span:24,children:(0,C.jsxs)(d.A,{children:[(0,C.jsx)(m.A,{tip:"Loading...",spinning:t.loading,delay:500,children:(0,C.jsx)(u.A,{columns:p,dataSource:_,scroll:{x:4e3},rowKey:"id",pagination:!1,size:"middle"})}),(0,C.jsx)(r.A,{size:"small",current:null===(e=t.collectionParams)||void 0===e?void 0:e.page,pageSize:null===(a=t.collectionParams)||void 0===a?void 0:a.page_size,total:t.listCount||0,showTotal:t=>"Total "+t+" items",showSizeChanger:!0,onChange:function(e,a){t.setCollectionParams({...t.collectionParams,page_size:a,page:0==e?1:e}),t.getCollectionList({...t.collectionParams,page_size:a,page:0==e?1:e})},className:"hp-mb-12 hp-mt-24 hp-float-right"})]})})]})});a.d(e,["default",0,I])}}]);
//# sourceMappingURL=8204.897f65f5.chunk.js.map