PageSourceSearch

https://vizops360.ai/assets/liabilities.new-nshLly8q.js

js vizops360.ai collected 2026-10-05 13:52:12 UTC 28,324 bytes, 1 lines download raw bytes

1import{ax as _,d4 as Y,az as J,c$ as Q,eG as X,eH as Z,r as u,e2 as D,j as e,L as ee,K as E,b5 as I,cS as te,cT as ae,cU as B,dG as M,V as P,cV as R,as as x,n as se,b7 as N,e3 as z,N as le,b as re,aI as p}from"./index-CpeGhXo5.js";import{a as ie}from"./Panel-Cf_wAUzv.js";import{a as h}from"./currency-CACMzR5Q.js";import{p as A}from"./financeMappers-CUv1G2pV.js";const de=["HDFC Bank","ICICI Bank","State Bank of India (SBI)","Axis Bank","Kotak Mahindra Bank","Punjab National Bank (PNB)","Bank of Baroda","HSBC Commercial Bank","Standard Chartered Bank","Citibank N.A.","Other NBFC / Private Lender"],ne=["Term Loan","Working Capital","Overdraft Line","Equipment Finance","Vehicle Finance","Commercial Real Estate Loan","Lease Liability"];function me(){const U=_(),v=Y(),{id:k}=J(),f=!!k,{activeCurrency:b}=Q(),[O,{isLoading:y}]=X(),[q,{isLoading:w}]=Z(),[s,C]=u.useState("fixed"),[l,d]=u.useState({name:"",type:"Term Loan",bank:"HDFC Bank",principal:"",rate:"8.5",emi:"",start:D(!0),end:"",autoDeduct:!0,agreementNo:"",collateral:"",notes:""}),[r,o]=u.useState({name:"",type:"Working Capital",bank:"ICICI Bank",limit:"",utilized:"",rate:"9.25",lastUpdate:D(!0),renewalDate:"",agreementNo:"",collateral:"",notes:""}),[F,g]=u.useState("facility"),[n,S]=u.useState({}),H=parseFloat(l.principal)||0,L=parseFloat(l.rate)||0,V=parseFloat(l.emi)||0,m=parseFloat(r.limit)||0,j=parseFloat(r.utilized)||0,c=m>0?j/m*100:0,$=Math.max(0,m-j),G=()=>{const t={};return s==="fixed"?(l.name.trim()||(t.name="Loan / Facility Name is required"),l.bank.trim()||(t.bank="Lending bank is required")):(r.name.trim()||(t.name="Facility Name is required"),r.bank.trim()||(t.bank="Lending bank is required")),S(a=>({...a,...t})),Object.keys(t).length>0?(p.error("Please fill all required facility particulars before proceeding"),!1):!0},K=()=>{G()&&g("valuation")},W=()=>{const t={};return s==="fixed"?(l.name.trim()||(t.name="Loan / Facility Name is required"),(!l.principal||parseFloat(l.principal)<=0)&&(t.principal="Enter a valid principal amount"),(!l.rate||parseFloat(l.rate)<=0)&&(t.rate="Enter valid interest rate (% p.a.)")):(r.name.trim()||(t.name="Facility Name is required"),(!r.limit||parseFloat(r.limit)<=0)&&(t.limit="Enter sanctioned credit limit"),(!r.utilized||parseFloat(r.utilized)<0)&&(t.utilized="Enter current utilized amount")),S(t),t.name&&g("facility"),Object.keys(t).length===0},T=async t=>{if(t&&t.preventDefault(),!W()){p.error("Please fill all required fields correctly.");return}let a;s==="fixed"?a=A({name:l.name,type:l.type,principal:parseFloat(l.principal)||0,outstanding:parseFloat(l.principal)||0,emi:parseFloat(l.emi)||0,ratePct:parseFloat(l.rate)||0,start:l.start||new Date().toISOString().split("T")[0],status:"Active"}):a=A({name:r.name,type:r.type,principal:parseFloat(r.limit)||0,outstanding:parseFloat(r.utilized)||0,emi:0,ratePct:parseFloat(r.rate)||0,start:r.lastUpdate||new Date().toISOString().split("T")[0],status:"Active"});try{f&&k?(await q({id:k,body:a}).unwrap(),p.success("Corporate liability updated successfully!")):(await O(a).unwrap(),p.success("New corporate liability registered successfully!")),U(`${v}/liabilities`)}catch{p.error("Failed to save liability entry.")}};return e.jsxs("div",{className:"w-full flex-1 flex flex-col bg-slate-50/50 dark:bg-slate-950/50",children:[e.jsx("div",{className:"px-6 py-4 border-b border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900",children:e.jsx(ie,{title:f?"Edit Corporate Liability":"Register Corporate Liability / Credit Facility",subtitle:"Corporate debt portfolio · Record term loans, bank overdrafts, revolving credit lines & EMI obligations",accent:"mod-expense",actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(ee,{to:`${v}/liabilities`,className:"h-8 px-3 rounded-md border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 hover:bg-slate-50 dark:hover:bg-slate-800 text-xs font-semibold text-slate-700 dark:text-slate-200 inline-flex items-center gap-1.5 transition-colors shadow-2xs",children:[e.jsx(E,{className:"w-3.5 h-3.5"})," Back to Liabilities"]}),e.jsxs("button",{type:"button",onClick:()=>
1T(),disabled:y||w,className:"h-8 px-4 rounded-md bg-blue-600 hover:bg-blue-700 text-white text-xs font-semibold inline-flex items-center gap-1.5 shadow-2xs transition-colors disabled:opacity-50",children:[e.jsx(I,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:f?"Update Facility":"Save Facility"})]})]})})}),e.jsxs(te,{value:F,onValueChange:t=>g(t),className:"w-full flex-1 flex flex-col",children:[e.jsxs("div",{className:"px-6 border-b border-slate-200 dark:border-slate-800 bg-slate-50/70 dark:bg-slate-900/70 flex items-center justify-between",children:[e.jsxs(ae,{className:"h-auto p-0 bg-transparent gap-8",children:[e.jsxs(B,{value:"facility",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-blue-600 dark:data-[state=active]:border-blue-400 data-[state=active]:bg-transparent data-[state=active]:text-blue-600 dark:data-[state=active]:text-blue-400 text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-200 text-xs font-bold px-0 py-3 shadow-none transition-all cursor-pointer flex items-center gap-2",children:[e.jsx(M,{className:"w-3.5 h-3.5 text-blue-600"}),e.jsx("span",{children:"1. Facility & Lender Particulars"})]}),e.jsxs(B,{value:"valuation",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-blue-600 dark:data-[state=active]:border-blue-400 data-[state=active]:bg-transparent data-[state=active]:text-blue-600 dark:data-[state=active]:text-blue-400 text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-200 text-xs font-bold px-0 py-3 shadow-none transition-all cursor-pointer flex items-center gap-2",children:[e.jsx(P,{className:"w-3.5 h-3.5 text-emerald-600"}),e.jsx("span",{children:"2. Financial Terms, EMI & Review"})]})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsx("span",{className:"text-[11px] font-semibold text-slate-500",children:F==="facility"?"Step 1 of 2: Facility Structure & Dates":"Step 2 of 2: Valuation, EMI & Clearances"})})]}),e.jsxs("div",{className:"w-full flex-1 grid grid-cols-1 lg:grid-cols-12 gap-0 bg-white dark:bg-slate-900",children:[e.jsx("div",{className:"lg:col-span-9 p-6 border-b lg:border-b-0 lg:border-r border-slate-200 dark:border-slate-800 space-y-6 flex flex-col justify-between",children:e.jsxs("form",{onSubmit:T,className:"space-y-6",children:[e.jsxs(R,{value:"facility",className:"space-y-6 mt-0",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 pb-1.5 border-b border-slate-100 dark:border-slate-800/80",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-blue-600 dark:bg-blue-400 shrink-0"}),e.jsx("h3",{className:"text-xs font-bold text-slate-800 dark:text-slate-200 uppercase tracking-wider",children:"Facility Structure & Repayment Model"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("button",{type:"button",onClick:()=>C("fixed"),className:x("p-3.5 rounded-xl border text-left transition-all flex items-start gap-3 cursor-pointer",s==="fixed"?"border-blue-600 bg-blue-50/50 dark:bg-blue-950/40 text-blue-900 dark:text-blue-100 ring-2 ring-blue-600/20":"border-slate-200 dark:border-slate-800 hover:bg-slate-50 dark:hover:bg-slate-800 text-slate-600"),children:[e.jsx(M,{className:x("w-4 h-4 shrink-0 mt-0.5",s==="fixed"?"text-blue-600":"text-slate-400")}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold",children:"Fixed EMI Term Loan"}),e.jsx("p",{className:"text-[11px] text-slate-500 mt-0.5",children:"Scheduled monthly principal + interest repayments (e.g. Commercial Term Loan, Vehicle EMI)."})]})]}),e.jsxs("button",{type:"button",onClick:()=>C("dynamic"),className:x("p-3.5 rounded-xl border text-left transition-all flex items-start gap-3 cursor-pointer",s==="dynamic"?"border-blue-600 bg-blue-50/50 dark:bg-blue-950/40 text-blue-900 dark:text-blue-100 ring-2 ring-blue-600/20":"border-slate-200 dark:border-slate-800 hover:bg-slate-50 dark:hover:bg-slate-800 text-slate-600"),children:[e.jsx(se,{className:x("w-4 h-4 shrink-0 mt-0.5",s==="dynamic"?"text-blue-600":"text-slate-400")}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold",children:"Dynamic / Revolving Credit Line"}),e.jsx("p",{className:"text-[11px] text-slate-500 mt-0.5",children:"Flexible overdraft or working c
1apital facility with variable utilization & interest (e.g. OD Line)."})]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 pb-1.5 border-b border-slate-100 dark:border-slate-800/80",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-blue-600 dark:bg-blue-400 shrink-0"}),e.jsx("h3",{className:"text-xs font-bold text-slate-800 dark:text-slate-200 uppercase tracking-wider",children:"Lending Bank & Loan Particulars"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:["Loan / Facility Name ",e.jsx("span",{className:"text-rose-500",children:"*"})]}),e.jsx("input",{type:"text",value:s==="fixed"?l.name:r.name,onChange:t=>{const a=t.target.value;s==="fixed"?d(i=>({...i,name:a})):o(i=>({...i,name:a}))},placeholder:s==="fixed"?"e.g. HDFC Commercial Term Loan":"e.g. ICICI Bank Overdraft Facility",className:"w-full h-9 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-medium focus:ring-2 focus:ring-blue-600 outline-none"}),n.name&&e.jsx("span",{className:"text-[10px] text-rose-500 mt-1 block",children:n.name})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:["Lending Bank / Institution ",e.jsx("span",{className:"text-rose-500",children:"*"})]}),e.jsx(N,{options:de.map(t=>({value:t,label:t})),value:s==="fixed"?l.bank:r.bank,onChange:t=>{s==="fixed"?d(a=>({...a,bank:t})):o(a=>({...a,bank:t}))},placeholder:"Select lending bank",className:"h-9 text-xs"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:"Facility Category"}),e.jsx(N,{options:ne.map(t=>({value:t,label:t}
1)),value:s==="fixed"?l.type:r.type,onChange:t=>{s==="fixed"?d(a=>({...a,type:t})):o(a=>({...a,type:t}))},placeholder:"Select loan category",className:"h-9 text-xs"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:"Sanction Letter / Agreement No."}),e.jsx("input",{type:"text",value:s==="fixed"?l.agreementNo:r.agreementNo,onChange:t=>{const a=t.target.value;s==="fixed"?d(i=>({...i,agreementNo:a})):o(i=>({...i,agreementNo:a}))},placeholder:"e.g. HDFC/COMM/2026/8892",className:"w-full h-9 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-medium focus:ring-2 focus:ring-blue-600 outline-none"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 pb-1.5 border-b border-slate-100 dark:border-slate-800/80",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-purple-600 dark:bg-purple-400 shrink-0"}),e.jsx("h3",{className:"text-xs font-bold text-slate-800 dark:text-slate-200 uppercase tracking-wider",children:"Timeline & Sanction Schedule"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 pt-1",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:s==="fixed"?"Loan Disbursement Date & Time":"Sanction / Revision Date & Time"}),e.jsx(z,{value:s==="fixed"?l.start:r.lastUpdate,onChange:t=>{s==="fixed"?d(a=>({...a,start:t})):o(a=>({...a,lastUpdate:t}))},showTime:!0,placeholder:"Select Date & Time",className:"h-9 text-xs font-semibold"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:s==="fixed"?"Expected Maturity Date & Time":"Annual Renewal Due Date & Time"}),e.jsx(z,{value:s==="fixed"?l.end:r.renewalDate,onChange:t=>{s==="fixed"?d(a=>({...a,end:t})):o(a=>({...a,renewalDate:t}))},showTime:!0,placeholder:"Select Date & Time",className:"h-9 text-xs font-semibold"})]})]})]}),e.jsx("div",{className:"flex justify-end pt-4 border-t border-slate-200 dark:border-slate-800",children:e.jsxs("button",{type:"button",onClick:K,className:"h-9 px-5 rounded-lg bg-blue-600 hover:bg-blue-700 text-white text-xs font-semibold inline-flex items-center gap-1.5 shadow-2xs transition-colors cursor-pointer",children:["Next: Financial Terms & EMI ",e.jsx(le,{className:"w-3.5 h-3.5"})]})})]}),e.jsxs(R,{value:"valuation",className:"space-y-6 mt-0",children:[s==="fixed"?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 pb-1.5 border-b border-slate-100 dark:border-slate-800/80",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-600 dark:bg-emerald-400 shrink-0"}),e.jsx("h3",{className:"text-xs font-bold text-slate-800 dark:text-slate-200 uppercase tracking-wider",children:"Financial Valuation & EMI Repayment"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:["Sanctioned Principal (₹) ",e.jsx("span",{className:"text-rose-500",children:"*"})]}),e.jsx("input",{type:"number",value:l.principal,onChange:t=>d(a=>({...a,principal:t.target.value})),placeholder:"0.00",className:"w-full h-9 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-data font-semibold focus:ring-2 focus:ring-blue-600 outline-none"}),n.principal&&e.jsx("span",{className:"text-[10px] text-rose-500 mt-1 block",children:n.principal})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:["Interest Rate (% p.a.) ",e.jsx("span",{className:"text-rose-500",children:"*"})]}),e.jsx("input",{type:"number",step:"0.01",value:l.rate,onChange:t=>d(a=>({...a,rate:t.target.value})),placeholder:"e.g. 8.5",className:"w-full h-9 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-data font-semibold focus:ring-2 focus:ring-blue-600 outline-none"}),n.rate&&e.jsx("span",{className:"text-[10px] text-rose-500 mt-1 block",children:n.rate})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:"Monthly EMI Outflow (₹)"}),e.jsx("input",{type:"number",value:l.emi,onChange:t=>d(a=>({...a,emi:t.target.value})),placeholder:"0.00",className:"w-full h-9 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-data font-semibold text-blue-600 focus:ring-2 focus:ring-blue-600 outline-none"})]})]}),e.jsxs("div",{className:"p-3 bg-slate-50 dark:bg-slate-800/60 rounded-xl flex items-center justify-between text-xs border border-slate-100 dar
1k:border-slate-800",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"autoDeduct",checked:l.autoDeduct,onChange:t=>d(a=>({...a,autoDeduct:t.target.checked})),className:"rounded border-slate-300 text-blue-600 focus:ring-blue-500 w-4 h-4 cursor-pointer"}),e.jsx("label",{htmlFor:"autoDeduct",className:"font-medium text-slate-700 dark:text-slate-200 cursor-pointer",children:"Auto EMI Expense Deduction (Automatically record monthly interest voucher in General Ledger)"})]}),e.jsx("span",{className:"text-[10px] text-blue-600 font-bold bg-blue-50 dark:bg-blue-950 px-2 py-0.5 rounded",children:"Recommended"})]})]}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 pb-1.5 border-b border-slate-100 dark:border-slate-800/80",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-blue-600 dark:bg-blue-400 shrink-0"}),e.jsx("h3",{className:"text-xs font-bold text-slate-800 dark:text-slate-200 uppercase tracking-wider",children:"Revolving Facility Limits & Utilization"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:["Sanctioned Credit Limit (₹) ",e.jsx("span",{className:"text-rose-500",children:"*"})]}),e.jsx("input",{type:"number",value:r.limit,onChange:t=>o(a=>({...a,limit:t.target.value})),placeholder:"0.00",className:"w-full h-9 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-data font-semibold focus:ring-2 focus:ring-blue-600 outline-none"}),n.limit&&e.jsx("span",{className:"text-[10px] text-rose-500 mt-1 block",children:n.limit})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:["Currently Utilized Amount (₹) ",e.jsx("span",{className:"text-rose-500",children:"*"})]}),e.jsx("input",{type:"number",value:r.utilized,onChange:t=>o(a=>({...a,utilized:t.target.value})),placeholder:"0.00",className:"w-full h-9 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-data font-semibold text-rose-600 focus:ring-2 focus:ring-blue-600 outline-none"}),n.utilized&&e.jsx("span",{className:"text-[10px] text-rose-500 mt-1 block",children:n.utilized})]})]}),m>0&&e.jsxs("div",{className:"p-3.5 bg-slate-50 dark:bg-slate-800/60 rounded-xl space-y-2 border border-slate-100 dark:border-slate-800",children:[e.jsxs("div",{className:"flex justify-between text-xs font-semibold",children:[e.jsx("span",{children:"Credit Line Utilization"}),e.jsxs("span",{className:x(c>90?"text-rose-600":c>70?"text-amber-600":"text-emerald-600"),children:[c.toFixed(1),"% (",c>90?"High Utilization":c>70?"Moderate":"Safe Band",")"]})]}),e.jsx("div",{className:"w-full h-2 bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden",children:e.jsx("div",{className:x("h-full transition-all",c>90?"bg-rose-500":c>70?"bg-amber-500":"bg-emerald-500"),style:{width:`${Math.min(100,c)}%`}})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 pb-1.5 border-b border-slate-100 dark:border-slate-800/80",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-blue-600 dark:bg-blue-400 shrink-0"}),e.jsx("h3",{className:"text-xs font-bold text-slate-800 dark:text-slate-200 uppercase tracking-wider",children:"Security & Collateral Terms"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:"Pledged Collateral / Primary Security"}),e.jsx("input",{type:"text",value:s==="fixed"?l.collateral:r.collateral,onChange:t=>{const a=t.target.value;s==="fixed"?d(i=>({...i,collateral:a})):o(i=>({...i,collateral:a}))},placeholder:"e.g. Commercial Real Estate Unit #401 / Fixed Deposit Lien",className:"w-full h-9 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-medium focus:ring-2 focus:ring-blue-600 outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300 block mb-1",children:"Special Covenants & Remarks"}),e.jsx("input",{type:"text",value:s==="fixed"?l.notes:r.notes,onChange:t=>{const a=t.target.value;s==="fixed"?d(i=>({...i,notes:a})):o(i=>({...i,notes:a}))},placeholder:"e.g. Hypothecation of office computing equipment & assets",className:"w-full h-9 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-xs font-medium focus:ring-2 focus:ring-blue-600 outline-none"})]})]})]}),e.jsxs("div",{className:"space-y-3 pt-2",children:[e.jsxs("div",{className:"flex items-center gap-2 pb-1.5 border-b border-slate-100 dar
1k:border-slate-800/80",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-600 dark:bg-emerald-400 shrink-0"}),e.jsx("h3",{className:"text-xs font-bold text-slate-800 dark:text-slate-200 uppercase tracking-wider",children:"Audit Trail & Executive Clearance"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"p-4 bg-slate-50/70 dark:bg-slate-800/40 rounded-xl border border-slate-200 dark:border-slate-800 space-y-3",children:[e.jsx("span",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-wider block",children:"1. Entry Lifecycle Timeline"}),e.jsxs("div",{className:"relative pl-6 space-y-3 before:absolute before:left-2 before:top-2 before:bottom-2 before:w-0.5 before:bg-slate-200 dark:before:bg-slate-700",children:[e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute -left-6 top-0 w-4 h-4 rounded-full bg-emerald-500 text-white flex items-center justify-center text-[10px] font-bold",children:"✓"}),e.jsx("div",{className:"text-xs font-semibold text-slate-800 dark:text-slate-200",children:"Liability Facility Initialized"}),e.jsx("p",{className:"text-[11px] text-slate-400",children:"Created by Accounting Team (Sarbjit Singh) • Today"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute -left-6 top-0 w-4 h-4 rounded-full bg-blue-500 text-white flex items-center justify-center text-[10px] font-bold",children:"i"}),e.jsx("div",{className:"text-xs font-semibold text-slate-800 dark:text-slate-200",children:"Banking Terms Verified"}),e.jsxs("p",{className:"text-[11px] text-slate-400",children:["Bank: ",s==="fixed"?l.bank:r.bank]})]})]})]}),e.jsxs("div",{className:"p-4 bg-slate-50/70 dark:bg-slate-800/40 rounded-xl border border-slate-200 dark:border-slate-800 space-y-3",children:[e.jsx("span",{className:"text-[11px] font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider block",children:"2. Executive Sign-Off"}),e.jsxs("div",{className:"space-y-2.5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-600 dark:text-slate-400 block mb-1",children:"Final Approver"}),e.jsx(N,{options:[{value:"Sarbjit Singh (CFO)",label:"Sarbjit Singh (CFO)"},{value:"Managing Director",label:"Managing Director"},{value:"Finance Lead",label:"Finance Lead"}],value:"Sarbjit Singh (CFO)",onChange:()=>{},className:"h-9 text-xs font-medium"})]}),e.jsx("div",{className:"p-2.5 bg-emerald-50 dark:bg-emerald-950/40 rounded-lg text-xs text-emerald-800 dark:text-emerald-300 border border-emerald-200 dark:border-emerald-800",children:"✔ Auto balance sheet debt sync and GL posting enabled."})]})]})]})]}),e.jsxs("div",{className:"flex justify-between pt-4 border-t border-slate-200 dark:border-slate-800",children:[e.jsxs("button",{type:"button",onClick:()=>g("facility"),className:"h-9 px-4 rounded-lg border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 hover:bg-slate-50 text-xs font-semibold text-slate-600 dark:text-slate-300 inline-flex items-center gap-1.5 transition-colors cursor-pointer",children:[e.jsx(E,{className:"w-3.5 h-3.5"})," Back: Facility Details"]}),e.jsxs("button",{type:"submit",disabled:y||w,className:"h-9 px-5 rounded-lg bg-blue-600 hover:bg-blue-700 text-white text-xs font-semibold inline-flex items-center gap-1.5 shadow-2xs transition-colors disabled:opacity-50 cursor-pointer",children:[e.jsx(I,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:f?"Update Corporate Liability":"Save Corporate Liability"})]})]})]})]})}),e.jsxs("div",{className:"lg:col-span-3 bg-slate-50/60 dark:bg-slate-900/60 p-6 space-y-5 flex flex-col justify-between h-full border-t lg:border-t-0",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-slate-200 dark:border-slate-800 pb-3.5",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"p-2 rounded-xl bg-blue-50 dark:bg-blue-950/60 text-blue-600 dark:text-blue-400 border border-blue-100 dark:border-blue-900/40",children:e.jsx(P,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-bold text-slate-800 dark:text-slate-100 uppercase tracking-wider",children:"Live Summary"}),e.jsx("span",{className:"text-[11px] text-slate-400 font-medium",children:"Repayment & Debt Matrix"})]})]}),e.jsx("span",{className:"text-[11px] font-bold px-2 py-0.5 rounded bg-blue-50 text-blue-700 dark:bg-blue-950/70 dark:text-blue-300 border border-blue-200/60 dark:border-blue-900/60",children:"INR"})]}),e.jsx("div",{className:"space-y-3",children:s==="fixed"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-3.5 rounded-xl bg-white dark:bg-slate-900/80 border border-slate-200/80 dark:border-slate-800/80 space-y-2 text-xs shadow-2xs",children:[e.jsxs("div",{className:"flex justify-between items-center text-slate-600 dar
1k:text-slate-400",children:[e.jsx("span",{className:"font-medium",children:"Sanctioned Principal"}),e.jsx("span",{className:"font-semibold text-slate-900 dark:text-slate-100 font-data",children:h(H,b)})]}),e.jsxs("div",{className:"flex justify-between items-center text-slate-600 dark:text-slate-400",children:[e.jsx("span",{className:"font-medium",children:"Interest Rate"}),e.jsx("span",{className:"font-semibold text-slate-700 dark:text-slate-300 font-data",children:L>0?`${L}% p.a.`:"—"})]}),e.jsxs("div",{className:"flex justify-between items-center text-slate-600 dark:text-slate-400",children:[e.jsx("span",{className:"font-medium",children:"Repayment Type"}),e.jsx("span",{className:"font-medium text-slate-700 dark:text-slate-300",children:"Monthly Fixed EMI"})]})]}),e.jsxs("div",{className:"p-3.5 rounded-xl bg-blue-50 dark:bg-blue-950/40 border border-blue-200/70 dark:border-blue-900/60 flex justify-between items-center text-xs",children:[e.jsx("span",{className:"font-bold text-blue-700 dark:text-blue-300",children:"Monthly EMI"}),e.jsx("span",{className:"font-extrabold text-blue-700 dark:text-blue-300 text-sm font-data",children:h(V,b)})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-3.5 rounded-xl bg-white dark:bg-slate-900/80 border border-slate-200/80 dark:border-slate-800/80 space-y-2 text-xs shadow-2xs",children:[e.jsxs("div",{className:"flex justify-between items-center text-slate-600 dark:text-slate-400",children:[e.jsx("span",{className:"font-medium",children:"Credit Limit"}),e.jsx("span",{className:"font-semibold text-slate-900 dark:text-slate-100 font-data",children:h(m,b)})]}),e.jsxs("div",{className:"flex justify-between items-center text-slate-600 dark:text-slate-400",children:[e.jsx("span",{className:"font-medium",children:"Utilized Portion"}),e.jsx("span",{className:"font-semibold text-rose-600 font-data",children:h(j,b)})]}),e.jsxs("div",{className:"flex justify-between items-center text-slate-600 dark:text-slate-400",children:[e.jsx("span",{className:"font-medium",children:"Available Headroom"}),e.jsx("span",{className:"font-semibold text-emerald-600 font-data",children:h($,b)})]})]}),e.jsxs("div",{className:"p-3.5 rounded-xl bg-purple-50 dark:bg-purple-950/40 border border-purple-200/70 dark:border-purple-900/60 flex justify-between items-center text-xs",children:[e.jsx("span",{className:"font-bold text-purple-700 dark:text-purple-300",children:"Utilization Rate"}),e.jsxs("span",{className:"font-extrabold text-purple-700 dark:text-purple-300 text-sm font-data",children:[c.toFixed(1),"%"]})]})]})})]}),e.jsxs("div",{className:"pt-4 border-t border-slate-200 dark:border-slate-800 text-[11px] text-slate-400 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-600 dark:text-slate-300 font-medium",children:[e.jsx(re,{className:"w-3.5 h-3.5 text-emerald-500"}),e.jsx("span",{children:"Balance Sheet & Debt Servicing Compliance"})]}),e.jsx("p",{className:"text-[10px] text-slate-400",children:"Entries update corporate solvency ratios, liquidity forecasts, and debt coverage covenants automatically."})]})]})]})]})]})}export{me as NewLiabilityPage,me as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.