1import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{d as L,e as g,so as E,sp as F,sq as M,sr as G,L as T,gM as s,aa as k,bh as P}from"./loginCallback-DUlVA6A0.js";import{N as U}from"./addLoader-p8WLB-bt.js";import{r as D}from"./createLucideIcon-CiWnlb16.js";import{P as _}from"./PageTitle-BqRYU3UK.js";import{D as z}from"./DebtorCaseInformation-uDpYOKSK.js";import{N as q}from"./NumberRounding-D2cPCpEN.js";import{F as Y}from"./FormatNumber-CRRkVCz6.js";import{u as H,S as J,A as b,g as K,a as j,c as Q,b as V}from"./groundCalc-BsFK0T92.js";import"./config.release-CKeoGYk7.js";import"./index-CQOuJFSK.js";import"./declarantCompare-BOnRNkTz.js";import"./CustomToolTip-BQH2lGNu.js";import"./Tooltip-DqudYRkP.js";import"./TransitionGroupContext-BqazGbpp.js";import"./useSlot-C7WZeYvg.js";import"./useControlled-BlpSYMej.js";import"./useId-DUHkaswp.js";import"./utils-CrHD0CeB.js";import"./IconButton-BXAY2iRp.js";import"./createSimplePaletteValueFilter-CXCoacm9.js";import"./TextField-CrjUJzPO.js";import"./useFormControl-B_DA_RwI.js";import"./Close-C9FyhMtz.js";const S=[{idx:1,label:"â",width:"w-[80px]"},{idx:2,label:"Ðаименование",width:"w-[350px]",filterable:!0,fieldName:"creditorName",tooltip:"ФамилиÑ, ÑобÑÑвенное имÑ, оÑÑеÑÑво (еÑли Ñаковое имееÑÑÑ) каждого кÑедиÑоÑа â ÑизиÑеÑкого лиÑа, наименование каждого кÑедиÑоÑа ÑÑидиÑеÑкого лиÑа"},{idx:5,label:"Email",width:"w-[220px]",tooltip:"ÐдÑÐµÑ ÑлекÑÑонной поÑÑÑ"},{idx:7,label:"СÑмма",width:"w-[250px]",tooltip:"ÐбÑÐ°Ñ ÑÑмма ÑÑебований кÑедиÑоÑа из вÑеÑ
Ñазделов РееÑÑÑа"},{idx:8,label:"СÑмма Ñдов.",width:"w-[250px]",tooltip:"ÐбÑÐ°Ñ ÑÑмма ÑдовлеÑвоÑеннÑÑ
ÑÑебований кÑедиÑоÑа из вÑеÑ
Ñазделов РееÑÑÑа"},{idx:11,label:"РеÑÐµÐ½Ð¸Ñ ÑобÑаниÑ",width:"w-[220px]",tooltip:"Ð¡Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¾ ÑеÑениÑÑ
ÑобÑÐ°Ð½Ð¸Ñ ÐºÑедиÑоÑов, каÑаÑÑиÑ
ÑÑ Ð¿ÐµÑедаÑи имÑÑеÑÑва должника в ÑÑÐµÑ ÑдовлеÑвоÑÐµÐ½Ð¸Ñ ÑÑебований кÑедиÑоÑов"},{idx:12,label:"СÑмма погаÑеннÑÑ
",width:"w-[180px]",tooltip:"ÐбÑÐ°Ñ ÑÑмма погаÑеннÑÑ
ÑÑебований кÑедиÑоÑа"},{idx:10,label:"ÐаÑа акÑÑализаÑии",width:"w-[100px]"},{idx:13,label:"ÐзменениÑ",width:"w-[220px]",tooltip:"Ð¡Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¾ внеÑении изменений"}],v=l=>{const u=l.grounds??[];let o=0,d=0,a=0;const p={},f={},x={};return u.forEach(h=>{const r=Q(h);o+=r.requirementBYN,d+=r.satisfactionBYN,a+=r.remainingBYN,j(p,r.currencyAbbr,r.requirementInCurrency),j(f,r.currencyAbbr,r.satisfactionInCurrency),j(x,r.currencyAbbr,r.remainingInCurrency)}),{requirementBYN:o,satisfactionBYN:d,remainingBYN:a,coverage:V(o,a),reqDetails:Object.values(p),satDetails:Object.values(f),remDetails:Object.values(x)}},A=K([S]);function W({debtorId:l,isClosed:u=!1}){const o=L(),d=g(E),a=g(F);D.useEffect(()=>{if(!l)return;const t=new AbortController;return o(M()),o(G({id:String(l),signal:t.signal})),()=>t.abort()},[o,l]);const{filters:p,handleFilterChange:f,filteredItems:x,displayItems:h,visibleCount:r,loaderRef:R}=H(a,["creditorName","creditorCredentials"],l),y=u,N=D.useMemo(()=>{const t=(c,m)=>{const C={};return c.forEach(O=>O[m].forEach(B=>j(C,B.currency?.curAbbreviation,B.sum))),Object.values(C)},n=x.map(v),i=n.reduce((c,m)=>c+m.requirementBYN,0),I=n.reduce((c,m)=>c+m.satisfactionBYN,0),w=n.reduce((c,m)=>c+m.remainingBYN,0);return{totalReqBYN:i,totalSatBYN:I,totalRemBYN:w,coverage:i>0?(i-w)/i*100:0,reqDetails:t(n,"reqDetails"),satDetails:t(n,"satDetails"),remDetails:t(n,"remDetails")}},[x]);return d?e.jsx(T,{}):e.jsxs(J,{groups:[S],filters:p,onFilterChange:f,children:[e.jsx("tbody",{children:h.length>0?e.jsxs(e.Fragment,{children:[h.map((t,n)=>{const i=v(t);return e.jsxs("tr",{className:"hover:bg-[#f3f8ff]/50 transition-colors group",children:[e.jsx("td",{className:s("px-4 py-3 text-sm text-[#94a3b8]"),children:n+1}),e.jsx("td",{className:s("px-4 py-3 text-sm font-medium text-[#334e68]"),children:t.creditorName||"â"}),e.jsx("td",{className:s("px-4 py-3 text-sm text-[#0f6fff] wrap-anywhere"),children:t.email||"â"}),e.jsx("td",{className:s("px-4 py-3"),children:e.jsx(b,{mainAmount:i.requirementBYN,details:i.reqDetails})}),e.jsx("td",{className:s("px-4 py-3"),children:e.jsx(b,{mainAmount:i.satisfactionBYN,details:i.satDetails})}),e.jsx("td",{className:s("px-4 py-3 text-sm text-[#64748b] italic"),children:t.propertyTransferNote||"â"}),e.jsx("td",{className:s("px-4 py-3 text-left text-sm text-[#334e68]"),children:y?Y(q(i.remainingBYN)):null}),e.jsx("td",{className:s("px-4 py-3 text-xs text-[#94a3b8]"),children:k(t.decisionDate)||"â"}),e.jsx("td",{className:s("px-4 py-3 text-xs text-[#94a3b8]"),children:t.commentOnChange||"â"})]},n)}),r<x.length&&e.jsx("tr",{ref:R,children:e.jsx("td",{colSpan:A,className:"py-8 text-center text-sm text-[#94a3b8]",children:e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-[#0f6fff] border-t-transparent roun
1ded-full animate-spin"}),"ÐагÑÑзка даннÑÑ
..."]})})})]}):e.jsx("tr",{children:e.jsx("td",{colSpan:A,className:"px-4 py-10 text-center text-[#94a3b8]",children:"Совпадений не найдено"})})}),e.jsx("tfoot",{children:e.jsxs("tr",{children:[e.jsx("td",{colSpan:3,className:s("px-6 py-4 text-left"),children:e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#94a3b8]",children:"ÐÑого по ÑееÑÑÑÑ:"})}),e.jsx("td",{className:s("px-4 py-4 align-top"),children:e.jsx(b,{mainAmount:N.totalReqBYN,details:N.reqDetails})}),e.jsx("td",{className:s("px-4 py-4 align-top"),children:e.jsx(b,{mainAmount:N.totalSatBYN,details:N.satDetails})}),e.jsx("td",{}),e.jsx("td",{className:s("px-4 py-4 text-left"),children:e.jsx("span",{className:"font-bold text-[#ef4444]",children:y?Y(q(N.totalRemBYN)):null})}),e.jsx("td",{}),e.jsx("td",{})]})})]})}function ye({handleShowFilters:l,toggle:u,setToggle:o,debtorId:d}){const a=g(P),p=a?.debtorModel?.organization?.fullName||a?.debtorModel?.organization?.shortName;return e.jsxs("div",{className:"debtor-creditors-requirements-general-section",children:[e.jsx(U,{title:"ÐбÑий Ñаздел",handleShowFilters:l,toggle:u,setToggle:o}),e.jsx(_,{title:p,className:"pl-5 debtor-creditors-requirements-general-section-page-title"}),e.jsx(z,{debtor:a}),e.jsx(W,{debtorId:d,isClosed:!!a?.endDate})]})}export{ye 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.