"use strict";(self.webpackChunkwheelsmart_admin_react=self.webpackChunkwheelsmart_admin_react||[]).push([[8204],{38204(t,e,a){a.r(e);var i=a(89379),l=a(65043),n=a(97508),d=a(91688),o=a(89421),s=a(26655),c=a(11645),r=a(5835),h=a(12779),m=a(47419),u=a(5397),x=a(97190),p=a(94733),w=a(86178),_=a.n(w),g=a(79797),C=a(29635),I=a(70579);const A=(0,n.Ng)(function(t){let e=t.collection;return{collectionList:e.collectionList||[],listCount:e.listCount||0,collectionParams:e.collectionParams,loading:e.loading}},{getCollectionList:C.lB,setCollectionParams:C.Tz})(function(t){var e,a;const n=(0,d.useHistory)();(0,l.useEffect)(()=>{t.getCollectionList({page:1,search:"",page_size:10})},[]);const w=[{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?_()(t.follow_up_date).format("DD-MM-YYYY"):"-"},{title:"Last Rcvd Date",width:120,render:t=>t.last_rcvd_date?_()(t.last_rcvd_date).format("DD-MM-YYYY"):"-"},{title:"Last Due Date",width:120,render:t=>t.last_due_date?_()(t.last_due_date).format("DD-MM-YYYY"):"-"},{title:"Created On",width:120,render:t=>t.createdon?_()(t.createdon).format("DD-MM-YYYY"):"-"}],C=(t.collectionList||[]).map((e,a)=>(0,i.A)((0,i.A)({},e),{},{index:(t.collectionParams.page-1)*t.collectionParams.page_size+a+1})),A=r.A.Search;return(0,I.jsxs)(m.A,{gutter:[12,12],children:[(0,I.jsx)(g.A,{pageTitle:"Collections",goBack:!1}),(0,I.jsx)(c.A,{span:24,children:(0,I.jsxs)(m.A,{gutter:[12,12],children:[(0,I.jsx)(c.A,{span:24,xs:24,sm:24,md:16,children:(0,I.jsx)(A,{placeholder:"Search...",allowClear:!0,onChange:e=>{""==e.target.value&&(t.setCollectionParams((0,i.A)((0,i.A)({},t.collectionParams),{},{page:1,search:""})),t.getCollectionList((0,i.A)((0,i.A)({},t.collectionParams),{},{page:1,search:""})))},onSearch:e=>{var a;e&&(a=e,t.setCollectionParams((0,i.A)((0,i.A)({},t.collectionParams),{},{page:1,search:a})),t.getCollectionList((0,i.A)((0,i.A)({},t.collectionParams),{},{page:1,search:a})))}})}),(0,I.jsx)(c.A,{span:24,xs:24,sm:24,md:4,children:(0,I.jsx)(o.A,{className:"hp-w-100 hp-p-12",icon:(0,I.jsx)(p.A,{className:"hp-mr-10"}),onClick:()=>n.push("/Masters/collections-import"),children:"Import"})})]})}),(0,I.jsx)(c.A,{span:24,children:(0,I.jsxs)(s.A,{children:[(0,I.jsx)(u.A,{tip:"Loading...",spinning:t.loading,delay:500,children:(0,I.jsx)(x.A,{columns:w,dataSource:C,scroll:{x:4e3},rowKey:"id",pagination:!1,size:"middle"})}),(0,I.jsx)(h.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((0,i.A)((0,i.A)({},t.collectionParams),{},{page_size:a,page:0==e?1:e})),t.getCollectionList((0,i.A)((0,i.A)({},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,A])}}]);
//# sourceMappingURL=8204.0dd2057c.chunk.js.map