@zimyo/manage 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
 
2
2
  type overviewPropTypes = {
3
3
  onTabChange: (value: number) => void;
4
- overviewData: OverviewData;
4
+ overviewData?: OverviewData;
5
5
  };
6
6
  type OverviewData = {
7
7
  employee_details: {
package/dist/main.cjs CHANGED
@@ -6525,7 +6525,7 @@ Excel and Word File Support for Onboarding Documents</font></font></font></b></f
6525
6525
 
6526
6526
  </p>
6527
6527
  </body>
6528
- </html>`,product:"Advance HR"}],n=["Core HR","Advance HR","Finance","Engage","Timesheet","Workflow","Reports","Request","Payroll","Recruit","Perform","Learn"],[t,r]=Y.useState(n[0]),[o,i]=Y.useState(null),a=Y.useMemo(()=>e.filter(l=>l.product===t),[t]),s=l=>{i(u=>u===l?null:l)};return k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column",height:"100vh",bgcolor:"#fafbfc"},children:[k.jsx(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"center",px:4,py:2.5,bgcolor:"white",borderBottom:"1px solid #e5e7eb",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:k.jsx(vn,{variant:"h4",sx:{fontWeight:700,color:"#1976d2",letterSpacing:"-0.5px"},children:"What's New"})}),k.jsxs(Bt,{sx:{display:"flex",flex:1,overflow:"hidden"},children:[k.jsxs(Bt,{sx:{width:280,bgcolor:"white",borderRight:"1px solid #e5e7eb",overflowY:"auto"},children:[k.jsx(vn,{variant:"overline",sx:{display:"block",px:3,pt:2,pb:1,color:"#6b7280",fontWeight:600,letterSpacing:"0.5px"},children:"Products"}),k.jsx(dP,{component:"nav",disablePadding:!0,children:n.map(l=>k.jsx(G3e,{selected:t===l,onClick:()=>r(l),sx:{py:1.5,px:3,borderRight:t===l?"3px solid #1976d2":"3px solid transparent",bgcolor:t===l?"rgba(25,118,210,0.08)":"transparent","&:hover":{bgcolor:t===l?"rgba(25,118,210,0.12)":"rgba(0,0,0,0.04)"}},children:k.jsx(Ioe,{primary:l,primaryTypographyProps:{fontSize:"0.9rem",fontWeight:t===l?600:500,color:t===l?"#1976d2":"#374151"}})},l))})]}),k.jsx(Bt,{sx:{flex:1,p:4,overflowY:"auto"},children:k.jsx(Bt,{sx:{maxWidth:900,margin:"0 auto"},children:a.length===0?k.jsx(Ow,{sx:{textAlign:"center",py:6,px:3,borderRadius:2,boxShadow:"0 1px 3px rgba(0,0,0,0.08)"},children:k.jsxs(_9,{children:[k.jsxs(vn,{variant:"h6",sx:{color:"#6b7280",mb:1},children:['No updates found for "',t,'"']}),k.jsx(vn,{variant:"body2",sx:{color:"#9ca3af"},children:"Check back later for new updates"})]})}):a.map(l=>k.jsx(Ow,{sx:{mb:3,borderRadius:2,boxShadow:"0 1px 3px rgba(0,0,0,0.08)",transition:"all 0.3s","&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.12)"}},children:k.jsxs(_9,{sx:{p:3},children:[k.jsx(Bt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1.5},children:k.jsx(vn,{variant:"h5",sx:{fontWeight:700,color:"#1976d2"},children:l.title})}),k.jsx(vn,{variant:"body2",sx:{color:"#6b7280",lineHeight:1.6,mb:2},children:l.excerpt}),k.jsx(c3,{in:o===l.id,children:k.jsx(vn,{variant:"body2",sx:{color:"#6b7280",lineHeight:1.8,mb:2},children:Svn(l.description)})}),k.jsx(qa,{sx:{mb:2}}),k.jsxs(Bt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[k.jsx(Bt,{sx:{display:"flex",gap:1.5,alignItems:"center"},children:k.jsxs(Bt,{children:[k.jsx(vn,{variant:"body2",sx:{fontWeight:600,color:"#111827"},children:"Product Team"}),k.jsx(vn,{variant:"caption",sx:{color:"#9ca3af"},children:l.date})]})}),k.jsx(ld,{variant:"contained",onClick:()=>s(l.id),endIcon:o===l.id?k.jsx($it,{}):k.jsx(jit,{}),sx:{bgcolor:"#1976d2",fontWeight:600,textTransform:"none",borderRadius:2,"&:hover":{bgcolor:"#1565c0"}},children:o===l.id?"Show less":"Read more"})]})]})},l.id))})})]})]})};function _vn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"},child:[]},{tag:"rect",attr:{width:"20",height:"14",x:"2",y:"6",rx:"2"},child:[]}]})(e)}function zre(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M9 22v-4h6v4"},child:[]},{tag:"path",attr:{d:"M8 6h.01"},child:[]},{tag:"path",attr:{d:"M16 6h.01"},child:[]},{tag:"path",attr:{d:"M12 6h.01"},child:[]},{tag:"path",attr:{d:"M12 10h.01"},child:[]},{tag:"path",attr:{d:"M12 14h.01"},child:[]},{tag:"path",attr:{d:"M16 10h.01"},child:[]},{tag:"path",attr:{d:"M16 14h.01"},child:[]},{tag:"path",attr:{d:"M8 10h.01"},child:[]},{tag:"path",attr:{d:"M8 14h.01"},child:[]}]})(e)}function Mvn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 3v16a2 2 0 0 0 2 2h16"},child:[]},{tag:"path",attr:{d:"m19 9-5 5-4-4-3 3"},child:[]}]})(e)}function Tvn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"20",height:"16",x:"2",y:"4",rx:"2"},child:[]},{tag:"path",attr:{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"},child:[]}]})(e)}function kvn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 21a8 8 0 0 0-16 0"},child:[]},{tag:"circle",attr:{cx:"10",cy:"8",r:"5"},child:[]},{tag:"path",attr:{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3"},child:[]}]})(e)}function _Ee(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"},child:[]},{tag:"path",attr:{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"},child:[]}]})(e)}function Ovn(e){return Zf({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M12,22 C12,22 4,16 4,10 C4,5 8,2 12,2 C16,2 20,5 20,10 C20,16 12,22 12,22 Z M12,13 C13.657,13 15,11.657 15,10 C15,8.343 13.657,7 12,7 C10.343,7 9,8.343 9,10 C9,11.657 10.343,13 12,13 L12,13 Z"},child:[]}]})(e)}function Evn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}var Ade={},Avn=Yo;Object.defineProperty(Ade,"__esModule",{value:!0});var Pde=Ade.default=void 0,Pvn=Avn(Uo()),MEe=k;Pde=Ade.default=(0,Pvn.default)([(0,MEe.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,MEe.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");var Dde={},Dvn=Yo;Object.defineProperty(Dde,"__esModule",{value:!0});var jZe=Dde.default=void 0,Rvn=Dvn(Uo()),Nvn=k;jZe=Dde.default=(0,Rvn.default)((0,Nvn.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"People");const zvn="_main_container_1861l_17",Lvn="_first_row_1861l_24",$vn="_card_container_1861l_34",jvn="_billing_container_1861l_48",Fvn="_companyinfo_container_1861l_62",Bvn="_second_row_1861l_76",Vvn="_leftside_container_1861l_86",Wvn="_last_invoice_1861l_96",Gvn="_planDetails_container_1861l_111",Hvn="_moduleUsage_container_1861l_126",Yvn="_flex_col_1861l_140",Uvn="_addons_box_1861l_148",Xvn="_innerIcon_container_1861l_175",Zvn="_icon_box_1861l_198",qvn="_addons_wrapper_1861l_221",uc={main_container:zvn,first_row:Lvn,card_container:$vn,billing_container:jvn,companyinfo_container:Fvn,second_row:Bvn,leftside_container:Vvn,last_invoice:Wvn,planDetails_container:Gvn,moduleUsage_container:Hvn,flex_col:Yvn,addons_box:Uvn,innerIcon_container:Xvn,icon_box:Zvn,addons_wrapper:qvn},Jvn=({label:e,icon:n})=>k.jsxs("div",{className:"flex justify-start items-center gap-2",children:[n&&k.jsx("span",{className:"text-2xl rounded p-1 bg-gray-100 text-gray-600",children:n}),k.jsx("span",{children:e})]}),VI=({children:e,className:n,title:t,icon:r})=>k.jsxs("div",{className:qn("bg-white border rounded border-gray-200 rounded shadow-sm hover:shadow-md transition-shadow duration-200 p-2",n),children:[t&&k.jsx(vZe,{heading:k.jsx(Jvn,{label:t,icon:r})}),e]}),Kvn={Analytics:k.jsx(Mvn,{style:{fontSize:"28px",color:"#335AFF"}}),"Digital Signature":k.jsx(DV,{sx:{fontSize:"28px",color:"#335AFF"}}),Learn:k.jsx(zre,{style:{fontSize:"28px",color:"#335AFF"}}),Payout:k.jsx(nD,{sx:{fontSize:"28px",color:"#335AFF"}}),Trip:k.jsx(_vn,{style:{fontSize:"28px",color:"#335AFF"}}),Timesheet:k.jsx(Pde,{sx:{fontSize:"28px",color:"#335AFF"}}),Recruit:k.jsx(kvn,{style:{fontSize:"28px",color:"#335AFF"}})},Qvn=e=>{var x,C,w,I,_,M,O,A,E,T,P,R,z,L,F,B,j,G,H,Q;const{onTabChange:n}=e,t=[{id:1,name:"Monthly"},{id:2,name:"Quarterly"},{id:3,name:"Half Yearly"},{id:4,name:"Yearly"},{id:5,name:"2 Years"},{id:6,name:"3 Years"}],{data:r,isFetching:o}=rl(Sp,{url:K4,params:{}},"subsription-overview"),{session:{API_BASE_URL:i,mode:a}}=Um(),s=_0(),{handleSubmit:l,isDisabled:u,isLoading:c}=Fm({url:Z8}),d=Z=>{const q=t.find(K=>K.id===Z);return q?q.name:"-"},p=()=>{if(!(r!=null&&r.openInvoice))return;const Z={customer_id:r.openInvoice.customer_id,invoice_id:r.openInvoice.id,isDownload:1};u||l(Z,null,q=>{Ti.downloadFileFromBuffer(q==null?void 0:q.data)},null)},{handleSubmit:h,isDisabled:f}=Fm({url:Wre}),g=()=>{var q;const Z={plan_id:r==null?void 0:r.plan_id,add_on_id:r==null?void 0:r.add_on_id,invoice_id:(q=r==null?void 0:r.openInvoice)==null?void 0:q.id};h(Z,null,K=>{var le;Ti.cashfreePayment((le=K==null?void 0:K.data)==null?void 0:le.payment_session_id,i,()=>{},s,a)},null)},m=Y.useMemo(()=>{var q,K,le,se,te,re;const Z=(r==null?void 0:r.wallet)||{};return{balance:(q=Z==null?void 0:Z.balance)!=null?q:0,status:"Active",totalAmount:(K=Z==null?void 0:Z.openingBalance)!=null?K:0,dailyRate:(le=Z==null?void 0:Z.dailyRate)!=null?le:0,daysElapsed:(se=Z==null?void 0:Z.daysElapsed)!=null?se:"0 / 0",amountUsed:(te=Z==null?void 0:Z.amountUsed)!=null?te:0,consumptionPercentage:((re=Z==null?void 0:Z.percentage)!=null?re:0)*100}},[r]),y=Y.useMemo(()=>{if(!Ti.validateDataType(r==null?void 0:r.usageCredit,va.ARRAY))return[];const Z=["HRMS","Payroll","Performance","ATS"],q=["#10B981","#3B82F6","#F59E0B","#EAB308","#14B8A6"];return[...r.usageCredit].sort((le,se)=>Z.indexOf(le.APP_MODULE)-Z.indexOf(se.APP_MODULE)).map((le,se)=>({name:le.APP_MODULE,users:le.TOTAL_USER_COUNT,color:q[se%q.length]}))},[r]),b=Y.useMemo(()=>Ti.validateDataType(r==null?void 0:r.addOnProduct,va.ARRAY)?r.addOnProduct.map(Z=>({name:Z.product_name,icon:Kvn[Z.product_name]||k.jsx(RV,{sx:{fontSize:"28px",color:"#335AFF"}})})):[],[r]);return k.jsxs("div",{className:`${uc.main_container}`,children:[k.jsx(eg,{visible:o||c}),k.jsxs(Go,{container:!0,spacing:2,children:[k.jsxs(Go,{size:{xs:12,lg:12},className:`${uc.first_row}`,children:[k.jsx(VI,{className:`${uc.card_container}`,children:k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",height:"100%"},children:[k.jsx(Bt,{sx:{display:"flex",alignItems:"center"},children:k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[k.jsx(_Ee,{style:{fontSize:"16px"}}),k.jsx("span",{style:{color:"#6B7280",fontSize:"16px"},children:"Wallet"}),k.jsx(EV,{label:m.status,type:"success",size:"sm"})]})}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:[k.jsx(_Ee,{style:{fontSize:"32px"}}),k.jsx("span",{style:{fontSize:"32px",fontWeight:700,color:"#335AFF"},children:m.balance.toLocaleString()})]}),k.jsxs("span",{style:{fontSize:"32px",fontWeight:700,color:"#111827"},children:["₹",m.totalAmount.toLocaleString("en-IN",{minimumFractionDigits:2})," ",k.jsx("span",{style:{fontSize:"24px",fontWeight:300,color:"#335AFF"},children:"p/m"})]})]}),k.jsx(qa,{}),k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column"},children:[k.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#111827"},children:"Usage Breakdown"}),k.jsx(Go,{container:!0,spacing:3,children:[{label:"Daily Rate",value:`₹${m.dailyRate}`},{label:"Days Elapsed",value:m.daysElapsed},{label:"Amount Used",value:`₹${m.amountUsed.toFixed(2)}`}].map(({label:Z,value:q})=>k.jsx(Go,{size:{xs:4},children:k.jsxs(Bt,{children:[k.jsx("span",{style:{fontSize:12,color:"#6B7280",display:"block"},children:Z}),k.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#111827"},children:q})]})},Z))})]}),k.jsxs(Bt,{children:[k.jsx(Bt,{children:k.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111827"},children:"Consumption"})}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:2,mb:4},children:[k.jsx(W3e,{variant:"determinate",value:m.consumptionPercentage,sx:{flex:1,height:8,borderRadius:1,backgroundColor:"#E5E7EB","& .MuiLinearProgress-bar":{backgroundColor:"#335AFF",borderRadius:1}}}),k.jsxs("span",{style:{fontSize:"14px",fontWeight:600,color:"#111827"},children:[m.consumptionPercentage.toFixed(1),"%"]})]})]})]})}),k.jsxs(VI,{className:`${uc.billing_container}`,children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[k.jsx(Ovn,{style:{color:"#6B7280",width:"24px",height:"24px"}}),k.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"#111827"},children:"Billing Address"})]}),k.jsx(Bt,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%"},children:[{label:"Street Address",value:(x=r==null?void 0:r.orgInfo)!=null&&x.address_1?`${(C=r==null?void 0:r.orgInfo)==null?void 0:C.address_1} ${(w=r==null?void 0:r.orgInfo)==null?void 0:w.address_2}`:"-"},{label:"City, State",value:`${((I=r==null?void 0:r.orgInfo)==null?void 0:I.city_name)||"-"}, ${((_=r==null?void 0:r.orgInfo)==null?void 0:_.state_name)||"-"}`},{label:"Postal Code",value:((M=r==null?void 0:r.orgInfo)==null?void 0:M.zip_code)||"-"},{label:"Country",value:((O=r==null?void 0:r.orgInfo)==null?void 0:O.country_name)||"-"}].map((Z,q,K)=>k.jsxs(Bt,{children:[k.jsx("span",{style:{fontSize:"12px",color:"#6B7280",display:"block"},children:Z.label}),k.jsx("span",{style:{fontSize:"14px",color:"#111827",wordBreak:"break-word",whiteSpace:"normal"},children:Z.value}),K.length-1!==q?k.jsx(qa,{sx:{width:"100%"}}):k.jsx(k.Fragment,{})]}))})]}),k.jsxs(VI,{className:uc.companyinfo_container,children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[k.jsx(zre,{style:{color:"#6B7280",width:"24px",height:"24px"}}),k.jsx("span",{style:{fontSize:16,fontWeight:600,color:"#111827"},children:"Company Information"})]}),k.jsx(Bt,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%"},children:[{icon:k.jsx(zre,{style:{fontSize:20,color:"#9CA3AF"}}),label:"Name :",value:((A=r==null?void 0:r.orgInfo)==null?void 0:A.org_name)||"-",color:"#111827"},{icon:k.jsx(Evn,{style:{fontSize:20,color:"#9CA3AF"}}),label:"Phone :",value:((E=r==null?void 0:r.orgInfo)==null?void 0:E.mobile_number)||"-",color:"#111827"},{icon:k.jsx(mF,{sx:{fontSize:20,color:"#9CA3AF"}}),label:"GST IN :",value:((T=r==null?void 0:r.orgInfo)==null?void 0:T.gstin)||"-",color:"#111827"},{icon:k.jsx(Tvn,{style:{fontSize:20,color:"#9CA3AF"}}),label:"Email :",value:((P=r==null?void 0:r.orgInfo)==null?void 0:P.email_id)||"-",color:"#335AFF"}].map(({icon:Z,label:q,value:K,color:le},se,te)=>k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column",gap:2,padding:"5px 0px"},children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Z,k.jsx("span",{style:{fontSize:12,color:"#6B7280"},children:q}),k.jsx("span",{style:{fontSize:14,wordBreak:"break-word",whiteSpace:"normal"},children:K})]}),te.length-1!==se?k.jsx(qa,{sx:{width:"100%"}}):k.jsx(k.Fragment,{})]},q))})]})]}),k.jsxs("div",{className:`${uc.second_row}`,children:[k.jsxs("div",{className:`${uc.leftside_container}`,children:[k.jsxs(VI,{className:uc.last_invoice,children:[k.jsx(Bt,{mb:2,sx:{display:"flex",alignItems:"center",width:"100%"},children:k.jsx("span",{style:{fontSize:16,fontWeight:600,color:"#111827"},children:"Last Invoice"})}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",gap:4},children:[[{icon:k.jsx(LA,{sx:{fontSize:20,color:"#6B7280"}}),label:"Due By",value:(R=r==null?void 0:r.openInvoice)!=null&&R.invoice_due_date?new Date(r.openInvoice.invoice_due_date).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}):"-"},{icon:k.jsx(nD,{sx:{fontSize:20,color:"#6B7280"}}),label:"Amount",value:`${((z=r==null?void 0:r.openInvoice)==null?void 0:z.currency_symbol)||"₹"} ${((F=(L=r==null?void 0:r.openInvoice)==null?void 0:L.grand_total_amount)==null?void 0:F.toLocaleString("en-IN"))||"-"}`},{icon:k.jsx(mF,{sx:{fontSize:20,color:"#6B7280"}}),label:"Invoice",value:k.jsxs("span",{style:{color:"#EF4444",cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",gap:4},onClick:p,children:[k.jsx(aBe,{style:{fontSize:20}})," Download PDF"]})}].map(({icon:Z,label:q,value:K},le,se)=>k.jsxs(Y.Fragment,{children:[k.jsx(Bt,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"space-between"},children:k.jsxs(Bt,{className:uc.flex_col,children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[Z,k.jsx("span",{style:{fontSize:14,color:"#6B7280"},children:q})]}),k.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#111827"},children:K})]})}),le<se.length-1&&k.jsx(qa,{orientation:"vertical",flexItem:!0})]},q)),((B=r==null?void 0:r.openInvoice)==null?void 0:B.payment_status)===1&&k.jsx(Bm,{style:{textTransform:"none",color:"#FFFFFF",backgroundColor:"#18191aff",borderRadius:"4px"},size:"small",disabled:f,onClick:g,children:"Pay here"})]})]}),k.jsxs(VI,{className:`${uc.planDetails_container}`,children:[k.jsx(Bt,{children:k.jsxs("span",{style:{fontSize:"16px",fontWeight:600,color:"#111827"},children:["Plan Details"," ",k.jsxs("span",{style:{fontSize:"14px",color:"#6B7280"},children:["(",((j=r==null?void 0:r.planDetails)==null?void 0:j.current_plan)||"-",")"]})]})}),k.jsx(Bt,{sx:{display:"flex",justifyContent:"space-between",width:"100%",gap:3,flexWrap:"wrap"},children:[{icon:k.jsx(LA,{sx:{fontSize:"20px",color:"#6B7280"}}),label:"Billing Cycle",value:d((G=r==null?void 0:r.planDetails)==null?void 0:G.billing_cycle)},{icon:k.jsx(Pde,{style:{fontSize:"20px",color:"#6B7280"}}),label:"Plan Validity",value:(H=r==null?void 0:r.planDetails)!=null&&H.plan_expiring_date?new Date(r.planDetails.plan_expiring_date).toLocaleDateString("en-GB"):"-"},{icon:k.jsx(LA,{sx:{fontSize:"20px",color:"#6B7280"}}),label:"Remaining Days",value:(()=>{var re;const Z=(re=r==null?void 0:r.planDetails)==null?void 0:re.plan_expiring_date;if(!Z)return"-";const q=new Date(Z),K=new Date;q.setHours(0,0,0,0),K.setHours(0,0,0,0);const le=Math.ceil((q.getTime()-K.getTime())/(1e3*60*60*24)),se=Math.abs(le),te=se===1?"day":"days";return le<0?`Overdue by ${se} ${te}`:`${se} ${te}`})()}].map(({icon:Z,label:q,value:K})=>k.jsxs(Bt,{sx:{display:"flex",alignItems:"flex-start",minWidth:0},children:[k.jsx(Bt,{sx:{p:.5,borderRadius:1,display:"flex",alignItems:"center",justifyContent:"center"},children:Z}),k.jsxs(Bt,{children:[k.jsx("span",{style:{fontSize:"14px",color:"#6B7280",display:"block"},children:q}),k.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"#111827"},children:K})]})]},q))})]})]}),k.jsxs(VI,{className:uc.moduleUsage_container,children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column"},children:[k.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"#335AFF"},children:"Module Usage"}),k.jsx("span",{style:{fontSize:"12px",color:"#6B7280"},children:"Active users by module"})]}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1,backgroundColor:"rgba(235, 239, 255, 1)",color:"rgba(51, 90, 255, 1)",px:1.5,borderRadius:1},children:[k.jsx(jZe,{sx:{fontSize:"18px"}}),k.jsx("span",{style:{fontSize:"16px",fontWeight:600},children:((Q=r==null?void 0:r.employee_details)==null?void 0:Q.active_employee)||0})]})]}),y.length>0?k.jsx(Bt,{sx:{display:"flex",flexDirection:"column",gap:1,maxHeight:4*60,overflowY:"auto",pr:1,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{backgroundColor:"#F3F4F6",borderRadius:"10px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"rgba(92, 123, 255, 1)",borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"rgba(92, 123, 255, 1)"}},children:y.map((Z,q)=>k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"#F8FAFC",p:1.5,borderRadius:1},children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[k.jsx(Bt,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:Z.color}}),k.jsx("span",{style:{fontSize:"14px",color:"#111827"},children:Z.name})]}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"baseline",gap:.5},children:[k.jsx("span",{style:{fontSize:"16px",fontWeight:700,color:"#111827"},children:Z.users}),k.jsx("span",{style:{fontSize:"12px",color:"#6B7280"},children:"users"})]})]},q))}):k.jsx(m0,{message:"No Module Usage Data"})]})]}),k.jsx(Go,{size:{xs:12,lg:12},children:k.jsxs(fu,{elevation:0,sx:{p:2,border:"1px solid #E5E7EB"},children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[k.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"#111827"},children:"Add Ons"}),k.jsxs("span",{style:{fontSize:"14px",color:"#6B7280"},children:[b.length," Modules"]})]}),b.length>0?k.jsx(Go,{container:!0,spacing:2,children:b.map((Z,q)=>k.jsx(Go,{size:{xs:6,sm:4,md:2},className:`${uc.addons_wrapper}`,children:k.jsx(Bt,{className:`${uc.addons_box}`,children:k.jsxs(Bt,{className:`${uc.innerIcon_container}`,children:[k.jsx(Bt,{className:`${uc.icon_box}`,children:Z.icon}),k.jsx("span",{style:{fontSize:"13px",fontWeight:500,color:"#111827",textAlign:"center"},children:Z.name})]})})},q))}):k.jsx(m0,{message:"No Add Ons Found"})]})})]})]})};/**
6528
+ </html>`,product:"Advance HR"}],n=["Core HR","Advance HR","Finance","Engage","Timesheet","Workflow","Reports","Request","Payroll","Recruit","Perform","Learn"],[t,r]=Y.useState(n[0]),[o,i]=Y.useState(null),a=Y.useMemo(()=>e.filter(l=>l.product===t),[t]),s=l=>{i(u=>u===l?null:l)};return k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column",height:"100vh",bgcolor:"#fafbfc"},children:[k.jsx(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"center",px:4,py:2.5,bgcolor:"white",borderBottom:"1px solid #e5e7eb",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:k.jsx(vn,{variant:"h4",sx:{fontWeight:700,color:"#1976d2",letterSpacing:"-0.5px"},children:"What's New"})}),k.jsxs(Bt,{sx:{display:"flex",flex:1,overflow:"hidden"},children:[k.jsxs(Bt,{sx:{width:280,bgcolor:"white",borderRight:"1px solid #e5e7eb",overflowY:"auto"},children:[k.jsx(vn,{variant:"overline",sx:{display:"block",px:3,pt:2,pb:1,color:"#6b7280",fontWeight:600,letterSpacing:"0.5px"},children:"Products"}),k.jsx(dP,{component:"nav",disablePadding:!0,children:n.map(l=>k.jsx(G3e,{selected:t===l,onClick:()=>r(l),sx:{py:1.5,px:3,borderRight:t===l?"3px solid #1976d2":"3px solid transparent",bgcolor:t===l?"rgba(25,118,210,0.08)":"transparent","&:hover":{bgcolor:t===l?"rgba(25,118,210,0.12)":"rgba(0,0,0,0.04)"}},children:k.jsx(Ioe,{primary:l,primaryTypographyProps:{fontSize:"0.9rem",fontWeight:t===l?600:500,color:t===l?"#1976d2":"#374151"}})},l))})]}),k.jsx(Bt,{sx:{flex:1,p:4,overflowY:"auto"},children:k.jsx(Bt,{sx:{maxWidth:900,margin:"0 auto"},children:a.length===0?k.jsx(Ow,{sx:{textAlign:"center",py:6,px:3,borderRadius:2,boxShadow:"0 1px 3px rgba(0,0,0,0.08)"},children:k.jsxs(_9,{children:[k.jsxs(vn,{variant:"h6",sx:{color:"#6b7280",mb:1},children:['No updates found for "',t,'"']}),k.jsx(vn,{variant:"body2",sx:{color:"#9ca3af"},children:"Check back later for new updates"})]})}):a.map(l=>k.jsx(Ow,{sx:{mb:3,borderRadius:2,boxShadow:"0 1px 3px rgba(0,0,0,0.08)",transition:"all 0.3s","&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.12)"}},children:k.jsxs(_9,{sx:{p:3},children:[k.jsx(Bt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1.5},children:k.jsx(vn,{variant:"h5",sx:{fontWeight:700,color:"#1976d2"},children:l.title})}),k.jsx(vn,{variant:"body2",sx:{color:"#6b7280",lineHeight:1.6,mb:2},children:l.excerpt}),k.jsx(c3,{in:o===l.id,children:k.jsx(vn,{variant:"body2",sx:{color:"#6b7280",lineHeight:1.8,mb:2},children:Svn(l.description)})}),k.jsx(qa,{sx:{mb:2}}),k.jsxs(Bt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[k.jsx(Bt,{sx:{display:"flex",gap:1.5,alignItems:"center"},children:k.jsxs(Bt,{children:[k.jsx(vn,{variant:"body2",sx:{fontWeight:600,color:"#111827"},children:"Product Team"}),k.jsx(vn,{variant:"caption",sx:{color:"#9ca3af"},children:l.date})]})}),k.jsx(ld,{variant:"contained",onClick:()=>s(l.id),endIcon:o===l.id?k.jsx($it,{}):k.jsx(jit,{}),sx:{bgcolor:"#1976d2",fontWeight:600,textTransform:"none",borderRadius:2,"&:hover":{bgcolor:"#1565c0"}},children:o===l.id?"Show less":"Read more"})]})]})},l.id))})})]})]})};function _vn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"},child:[]},{tag:"rect",attr:{width:"20",height:"14",x:"2",y:"6",rx:"2"},child:[]}]})(e)}function zre(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M9 22v-4h6v4"},child:[]},{tag:"path",attr:{d:"M8 6h.01"},child:[]},{tag:"path",attr:{d:"M16 6h.01"},child:[]},{tag:"path",attr:{d:"M12 6h.01"},child:[]},{tag:"path",attr:{d:"M12 10h.01"},child:[]},{tag:"path",attr:{d:"M12 14h.01"},child:[]},{tag:"path",attr:{d:"M16 10h.01"},child:[]},{tag:"path",attr:{d:"M16 14h.01"},child:[]},{tag:"path",attr:{d:"M8 10h.01"},child:[]},{tag:"path",attr:{d:"M8 14h.01"},child:[]}]})(e)}function Mvn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 3v16a2 2 0 0 0 2 2h16"},child:[]},{tag:"path",attr:{d:"m19 9-5 5-4-4-3 3"},child:[]}]})(e)}function Tvn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"20",height:"16",x:"2",y:"4",rx:"2"},child:[]},{tag:"path",attr:{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"},child:[]}]})(e)}function kvn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 21a8 8 0 0 0-16 0"},child:[]},{tag:"circle",attr:{cx:"10",cy:"8",r:"5"},child:[]},{tag:"path",attr:{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3"},child:[]}]})(e)}function _Ee(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"},child:[]},{tag:"path",attr:{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"},child:[]}]})(e)}function Ovn(e){return Zf({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M12,22 C12,22 4,16 4,10 C4,5 8,2 12,2 C16,2 20,5 20,10 C20,16 12,22 12,22 Z M12,13 C13.657,13 15,11.657 15,10 C15,8.343 13.657,7 12,7 C10.343,7 9,8.343 9,10 C9,11.657 10.343,13 12,13 L12,13 Z"},child:[]}]})(e)}function Evn(e){return Zf({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}var Ade={},Avn=Yo;Object.defineProperty(Ade,"__esModule",{value:!0});var Pde=Ade.default=void 0,Pvn=Avn(Uo()),MEe=k;Pde=Ade.default=(0,Pvn.default)([(0,MEe.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,MEe.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");var Dde={},Dvn=Yo;Object.defineProperty(Dde,"__esModule",{value:!0});var jZe=Dde.default=void 0,Rvn=Dvn(Uo()),Nvn=k;jZe=Dde.default=(0,Rvn.default)((0,Nvn.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"People");const zvn="_main_container_1861l_17",Lvn="_first_row_1861l_24",$vn="_card_container_1861l_34",jvn="_billing_container_1861l_48",Fvn="_companyinfo_container_1861l_62",Bvn="_second_row_1861l_76",Vvn="_leftside_container_1861l_86",Wvn="_last_invoice_1861l_96",Gvn="_planDetails_container_1861l_111",Hvn="_moduleUsage_container_1861l_126",Yvn="_flex_col_1861l_140",Uvn="_addons_box_1861l_148",Xvn="_innerIcon_container_1861l_175",Zvn="_icon_box_1861l_198",qvn="_addons_wrapper_1861l_221",uc={main_container:zvn,first_row:Lvn,card_container:$vn,billing_container:jvn,companyinfo_container:Fvn,second_row:Bvn,leftside_container:Vvn,last_invoice:Wvn,planDetails_container:Gvn,moduleUsage_container:Hvn,flex_col:Yvn,addons_box:Uvn,innerIcon_container:Xvn,icon_box:Zvn,addons_wrapper:qvn},Jvn=({label:e,icon:n})=>k.jsxs("div",{className:"flex justify-start items-center gap-2",children:[n&&k.jsx("span",{className:"text-2xl rounded p-1 bg-gray-100 text-gray-600",children:n}),k.jsx("span",{children:e})]}),VI=({children:e,className:n,title:t,icon:r})=>k.jsxs("div",{className:qn("bg-white border rounded border-gray-200 rounded shadow-sm hover:shadow-md transition-shadow duration-200 p-2",n),children:[t&&k.jsx(vZe,{heading:k.jsx(Jvn,{label:t,icon:r})}),e]}),Kvn={Analytics:k.jsx(Mvn,{style:{fontSize:"28px",color:"#335AFF"}}),"Digital Signature":k.jsx(DV,{sx:{fontSize:"28px",color:"#335AFF"}}),Learn:k.jsx(zre,{style:{fontSize:"28px",color:"#335AFF"}}),Payout:k.jsx(nD,{sx:{fontSize:"28px",color:"#335AFF"}}),Trip:k.jsx(_vn,{style:{fontSize:"28px",color:"#335AFF"}}),Timesheet:k.jsx(Pde,{sx:{fontSize:"28px",color:"#335AFF"}}),Recruit:k.jsx(kvn,{style:{fontSize:"28px",color:"#335AFF"}})},Qvn=e=>{var x,C,w,I,_,M,O,A,E,T,P,R,z,L,F,B,j,G,H,Q;const{onTabChange:n}=e,t=[{id:1,name:"Monthly"},{id:2,name:"Quarterly"},{id:3,name:"Half Yearly"},{id:4,name:"Yearly"},{id:5,name:"2 Years"},{id:6,name:"3 Years"}],{data:r,isFetching:o}=rl(Sp,{url:K4,params:{}},"subsription-overview"),{session:{API_BASE_URL:i,mode:a}}=Um(),s=_0(),{handleSubmit:l,isDisabled:u,isLoading:c}=Fm({url:Z8}),d=Z=>{const q=t.find(K=>K.id===Z);return q?q.name:"-"},p=()=>{if(!(r!=null&&r.openInvoice))return;const Z={customer_id:r.openInvoice.customer_id,invoice_id:r.openInvoice.id,isDownload:1};u||l(Z,null,q=>{Ti.downloadFileFromBuffer(q==null?void 0:q.data)},null)},{handleSubmit:h,isDisabled:f}=Fm({url:Wre}),g=()=>{var q;const Z={plan_id:r==null?void 0:r.plan_id,add_on_id:r==null?void 0:r.add_on_id,invoice_id:(q=r==null?void 0:r.openInvoice)==null?void 0:q.id};h(Z,null,K=>{var le;Ti.cashfreePayment((le=K==null?void 0:K.data)==null?void 0:le.payment_session_id,i,()=>{},s,a)},null)},m=Y.useMemo(()=>{var q,K,le,se,te,re;const Z=(r==null?void 0:r.wallet)||{};return{balance:(q=Z==null?void 0:Z.balance)!=null?q:0,status:"Active",totalAmount:(K=Z==null?void 0:Z.openingBalance)!=null?K:0,dailyRate:(le=Z==null?void 0:Z.dailyRate)!=null?le:0,daysElapsed:(se=Z==null?void 0:Z.daysElapsed)!=null?se:"0 / 0",amountUsed:(te=Z==null?void 0:Z.amountUsed)!=null?te:0,consumptionPercentage:((re=Z==null?void 0:Z.percentage)!=null?re:0)*100}},[r]),y=Y.useMemo(()=>{if(!Ti.validateDataType(r==null?void 0:r.usageCredit,va.ARRAY))return[];const Z=["HRMS","Payroll","Performance","ATS"],q=["#10B981","#3B82F6","#F59E0B","#EAB308","#14B8A6"];return[...r.usageCredit].sort((le,se)=>Z.indexOf(le.APP_MODULE)-Z.indexOf(se.APP_MODULE)).map((le,se)=>({name:le.APP_MODULE,users:le.TOTAL_USER_COUNT,color:q[se%q.length]}))},[r]),b=Y.useMemo(()=>Ti.validateDataType(r==null?void 0:r.addOnProduct,va.ARRAY)?r.addOnProduct.map(Z=>({name:Z.product_name,icon:Kvn[Z.product_name]||k.jsx(RV,{sx:{fontSize:"28px",color:"#335AFF"}})})):[],[r]);return k.jsxs("div",{className:`${uc.main_container}`,children:[k.jsx(eg,{visible:o||c}),k.jsxs(Go,{container:!0,spacing:2,children:[k.jsxs(Go,{size:{xs:12,lg:12},className:`${uc.first_row}`,children:[k.jsx(VI,{className:`${uc.card_container}`,children:k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",height:"100%"},children:[k.jsx(Bt,{sx:{display:"flex",alignItems:"center"},children:k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[k.jsx(_Ee,{style:{fontSize:"16px"}}),k.jsx("span",{style:{color:"#6B7280",fontSize:"16px"},children:"Wallet"}),k.jsx(EV,{label:m.status,type:"success",size:"sm"})]})}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:[k.jsx(_Ee,{style:{fontSize:"32px"}}),k.jsx("span",{style:{fontSize:"32px",fontWeight:700,color:"#335AFF"},children:m.balance.toLocaleString()})]}),k.jsxs("span",{style:{fontSize:"32px",fontWeight:700,color:"#111827"},children:["₹",m.totalAmount.toLocaleString("en-IN",{minimumFractionDigits:2})," ",k.jsx("span",{style:{fontSize:"24px",fontWeight:300,color:"#335AFF"},children:"p/m"})]})]}),k.jsx(qa,{}),k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column"},children:[k.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#111827"},children:"Usage Breakdown"}),k.jsx(Go,{container:!0,spacing:3,children:[{label:"Daily Rate",value:`₹${m.dailyRate}`},{label:"Days Elapsed",value:m.daysElapsed},{label:"Amount Used",value:`₹${m.amountUsed.toFixed(2)}`}].map(({label:Z,value:q})=>k.jsx(Go,{size:{xs:4},children:k.jsxs(Bt,{children:[k.jsx("span",{style:{fontSize:12,color:"#6B7280",display:"block"},children:Z}),k.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#111827"},children:q})]})},Z))})]}),k.jsxs(Bt,{children:[k.jsx(Bt,{children:k.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111827"},children:"Consumption"})}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:2,mb:4},children:[k.jsx(W3e,{variant:"determinate",value:m.consumptionPercentage,sx:{flex:1,height:8,borderRadius:1,backgroundColor:"#E5E7EB","& .MuiLinearProgress-bar":{backgroundColor:"#335AFF",borderRadius:1}}}),k.jsxs("span",{style:{fontSize:"14px",fontWeight:600,color:"#111827"},children:[m.consumptionPercentage.toFixed(1),"%"]})]})]})]})}),k.jsxs(VI,{className:`${uc.billing_container}`,children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[k.jsx(Ovn,{style:{color:"#6B7280",width:"24px",height:"24px"}}),k.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"#111827"},children:"Billing Address"})]}),k.jsx(Bt,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%"},children:[{label:"Street Address",value:(x=r==null?void 0:r.orgInfo)!=null&&x.address_1?`${(C=r==null?void 0:r.orgInfo)==null?void 0:C.address_1} ${(w=r==null?void 0:r.orgInfo)==null?void 0:w.address_2}`:"-"},{label:"City, State",value:`${((I=r==null?void 0:r.orgInfo)==null?void 0:I.city_name)||"-"}, ${((_=r==null?void 0:r.orgInfo)==null?void 0:_.state_name)||"-"}`},{label:"Postal Code",value:((M=r==null?void 0:r.orgInfo)==null?void 0:M.zip_code)||"-"},{label:"Country",value:((O=r==null?void 0:r.orgInfo)==null?void 0:O.country_name)||"-"}].map((Z,q,K)=>k.jsxs(Bt,{children:[k.jsx("span",{style:{fontSize:"12px",color:"#6B7280",display:"block"},children:Z.label}),k.jsx("span",{style:{fontSize:"14px",color:"#111827",wordBreak:"break-word",whiteSpace:"normal"},children:Z.value}),K.length-1!==q?k.jsx(qa,{sx:{width:"100%"}}):k.jsx(k.Fragment,{})]}))})]}),k.jsxs(VI,{className:uc.companyinfo_container,children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[k.jsx(zre,{style:{color:"#6B7280",width:"24px",height:"24px"}}),k.jsx("span",{style:{fontSize:16,fontWeight:600,color:"#111827"},children:"Company Information"})]}),k.jsx(Bt,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%"},children:[{icon:k.jsx(zre,{style:{fontSize:20,color:"#9CA3AF"}}),label:"Name :",value:((A=r==null?void 0:r.orgInfo)==null?void 0:A.org_name)||"-",color:"#111827"},{icon:k.jsx(Evn,{style:{fontSize:20,color:"#9CA3AF"}}),label:"Phone :",value:((E=r==null?void 0:r.orgInfo)==null?void 0:E.mobile_number)||"-",color:"#111827"},{icon:k.jsx(mF,{sx:{fontSize:20,color:"#9CA3AF"}}),label:"GST IN :",value:((T=r==null?void 0:r.orgInfo)==null?void 0:T.gstin)||"-",color:"#111827"},{icon:k.jsx(Tvn,{style:{fontSize:20,color:"#9CA3AF"}}),label:"Email :",value:((P=r==null?void 0:r.orgInfo)==null?void 0:P.email_id)||"-",color:"#335AFF"}].map(({icon:Z,label:q,value:K,color:le},se,te)=>k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column",gap:2,padding:"5px 0px"},children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Z,k.jsx("span",{style:{fontSize:12,color:"#6B7280"},children:q}),k.jsx("span",{style:{fontSize:14,wordBreak:"break-word",whiteSpace:"normal"},children:K})]}),te.length-1!==se?k.jsx(qa,{sx:{width:"100%"}}):k.jsx(k.Fragment,{})]},q))})]})]}),k.jsxs("div",{className:`${uc.second_row}`,children:[k.jsxs("div",{className:`${uc.leftside_container}`,children:[k.jsxs(VI,{className:uc.last_invoice,children:[k.jsx(Bt,{mb:2,sx:{display:"flex",alignItems:"center",width:"100%"},children:k.jsx("span",{style:{fontSize:16,fontWeight:600,color:"#111827"},children:"Last Invoice"})}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",gap:4},children:[[{icon:k.jsx(LA,{sx:{fontSize:20,color:"#6B7280"}}),label:"Due By",value:(R=r==null?void 0:r.openInvoice)!=null&&R.invoice_due_date?new Date(r.openInvoice.invoice_due_date).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}):"-"},{icon:k.jsx(nD,{sx:{fontSize:20,color:"#6B7280"}}),label:"Amount",value:`${((z=r==null?void 0:r.openInvoice)==null?void 0:z.currency_symbol)||"₹"} ${((F=(L=r==null?void 0:r.openInvoice)==null?void 0:L.grand_total_amount)==null?void 0:F.toLocaleString("en-IN"))||"-"}`},{icon:k.jsx(mF,{sx:{fontSize:20,color:"#6B7280"}}),label:"Invoice",value:k.jsxs("span",{style:{color:"#EF4444",cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",gap:4},onClick:p,children:[k.jsx(aBe,{style:{fontSize:20}})," Download PDF"]})}].map(({icon:Z,label:q,value:K},le,se)=>k.jsxs(Y.Fragment,{children:[k.jsx(Bt,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"space-between"},children:k.jsxs(Bt,{className:uc.flex_col,children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[Z,k.jsx("span",{style:{fontSize:14,color:"#6B7280"},children:q})]}),k.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#111827"},children:K})]})}),le<se.length-1&&k.jsx(qa,{orientation:"vertical",flexItem:!0})]},q)),((B=r==null?void 0:r.openInvoice)==null?void 0:B.payment_status)===2&&k.jsx(Bm,{style:{textTransform:"none",color:"#FFFFFF",backgroundColor:"#18191aff",borderRadius:"4px"},size:"small",disabled:f,onClick:g,children:"Pay here"})]})]}),k.jsxs(VI,{className:`${uc.planDetails_container}`,children:[k.jsx(Bt,{children:k.jsxs("span",{style:{fontSize:"16px",fontWeight:600,color:"#111827"},children:["Plan Details"," ",k.jsxs("span",{style:{fontSize:"14px",color:"#6B7280"},children:["(",((j=r==null?void 0:r.planDetails)==null?void 0:j.current_plan)||"-",")"]})]})}),k.jsx(Bt,{sx:{display:"flex",justifyContent:"space-between",width:"100%",gap:3,flexWrap:"wrap"},children:[{icon:k.jsx(LA,{sx:{fontSize:"20px",color:"#6B7280"}}),label:"Billing Cycle",value:d((G=r==null?void 0:r.planDetails)==null?void 0:G.billing_cycle)},{icon:k.jsx(Pde,{style:{fontSize:"20px",color:"#6B7280"}}),label:"Plan Validity",value:(H=r==null?void 0:r.planDetails)!=null&&H.plan_expiring_date?new Date(r.planDetails.plan_expiring_date).toLocaleDateString("en-GB"):"-"},{icon:k.jsx(LA,{sx:{fontSize:"20px",color:"#6B7280"}}),label:"Remaining Days",value:(()=>{var re;const Z=(re=r==null?void 0:r.planDetails)==null?void 0:re.plan_expiring_date;if(!Z)return"-";const q=new Date(Z),K=new Date;q.setHours(0,0,0,0),K.setHours(0,0,0,0);const le=Math.ceil((q.getTime()-K.getTime())/(1e3*60*60*24)),se=Math.abs(le),te=se===1?"day":"days";return le<0?`Overdue by ${se} ${te}`:`${se} ${te}`})()}].map(({icon:Z,label:q,value:K})=>k.jsxs(Bt,{sx:{display:"flex",alignItems:"flex-start",minWidth:0},children:[k.jsx(Bt,{sx:{p:.5,borderRadius:1,display:"flex",alignItems:"center",justifyContent:"center"},children:Z}),k.jsxs(Bt,{children:[k.jsx("span",{style:{fontSize:"14px",color:"#6B7280",display:"block"},children:q}),k.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"#111827"},children:K})]})]},q))})]})]}),k.jsxs(VI,{className:uc.moduleUsage_container,children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[k.jsxs(Bt,{sx:{display:"flex",flexDirection:"column"},children:[k.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"#335AFF"},children:"Module Usage"}),k.jsx("span",{style:{fontSize:"12px",color:"#6B7280"},children:"Active users by module"})]}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1,backgroundColor:"rgba(235, 239, 255, 1)",color:"rgba(51, 90, 255, 1)",px:1.5,borderRadius:1},children:[k.jsx(jZe,{sx:{fontSize:"18px"}}),k.jsx("span",{style:{fontSize:"16px",fontWeight:600},children:((Q=r==null?void 0:r.employee_details)==null?void 0:Q.active_employee)||0})]})]}),y.length>0?k.jsx(Bt,{sx:{display:"flex",flexDirection:"column",gap:1,maxHeight:4*60,overflowY:"auto",pr:1,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{backgroundColor:"#F3F4F6",borderRadius:"10px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"rgba(92, 123, 255, 1)",borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"rgba(92, 123, 255, 1)"}},children:y.map((Z,q)=>k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"#F8FAFC",p:1.5,borderRadius:1},children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[k.jsx(Bt,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:Z.color}}),k.jsx("span",{style:{fontSize:"14px",color:"#111827"},children:Z.name})]}),k.jsxs(Bt,{sx:{display:"flex",alignItems:"baseline",gap:.5},children:[k.jsx("span",{style:{fontSize:"16px",fontWeight:700,color:"#111827"},children:Z.users}),k.jsx("span",{style:{fontSize:"12px",color:"#6B7280"},children:"users"})]})]},q))}):k.jsx(m0,{message:"No Module Usage Data"})]})]}),k.jsx(Go,{size:{xs:12,lg:12},children:k.jsxs(fu,{elevation:0,sx:{p:2,border:"1px solid #E5E7EB"},children:[k.jsxs(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[k.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"#111827"},children:"Add Ons"}),k.jsxs("span",{style:{fontSize:"14px",color:"#6B7280"},children:[b.length," Modules"]})]}),b.length>0?k.jsx(Go,{container:!0,spacing:2,children:b.map((Z,q)=>k.jsx(Go,{size:{xs:6,sm:4,md:2},className:`${uc.addons_wrapper}`,children:k.jsx(Bt,{className:`${uc.addons_box}`,children:k.jsxs(Bt,{className:`${uc.innerIcon_container}`,children:[k.jsx(Bt,{className:`${uc.icon_box}`,children:Z.icon}),k.jsx("span",{style:{fontSize:"13px",fontWeight:500,color:"#111827",textAlign:"center"},children:Z.name})]})})},q))}):k.jsx(m0,{message:"No Add Ons Found"})]})})]})]})};/**
6529
6529
  * @license lucide-react v0.525.0 - ISC
6530
6530
  *
6531
6531
  * This source code is licensed under the ISC license.
package/dist/main.js CHANGED
@@ -136388,7 +136388,7 @@ const Bvn = "_main_container_1861l_17", Vvn = "_first_row_1861l_24", Wvn = "_car
136388
136388
  ),
136389
136389
  se < ae.length - 1 && /* @__PURE__ */ k.jsx(ns, { orientation: "vertical", flexItem: !0 })
136390
136390
  ] }, Z)),
136391
- ((B = r == null ? void 0 : r.openInvoice) == null ? void 0 : B.payment_status) === 1 && /* @__PURE__ */ k.jsx(
136391
+ ((B = r == null ? void 0 : r.openInvoice) == null ? void 0 : B.payment_status) === 2 && /* @__PURE__ */ k.jsx(
136392
136392
  Zm,
136393
136393
  {
136394
136394
  style: { textTransform: "none", color: "#FFFFFF", backgroundColor: "#18191aff", borderRadius: "4px" },
@@ -1,7 +1,7 @@
1
1
  import "./SubscriptionPricing.css";
2
2
  type overviewPropTypes = {
3
3
  onTabChange: (value: number) => void;
4
- overviewData: OverviewData;
4
+ overviewData?: OverviewData;
5
5
  };
6
6
  type OverviewData = {
7
7
  employee_details: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zimyo/manage",
3
3
  "private": false,
4
- "version": "0.3.8",
4
+ "version": "0.3.9",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"