1import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{d as I,e as j,sw as v,sx as F,sy as L,sz as M,L as D,gM as a,bh as O}from"./loginCallback-DUlVA6A0.js";import{N as A}from"./addLoader-p8WLB-bt.js";import{r as f,R as E,N as P}from"./createLucideIcon-CiWnlb16.js";import{P as T}from"./PageTitle-BqRYU3UK.js";import{D as z}from"./DebtorCaseInformation-uDpYOKSK.js";import{N as G}from"./NumberRounding-D2cPCpEN.js";import{F as U}from"./FormatNumber-CRRkVCz6.js";import{R as _}from"./requirementGroundSection-BkwKGQgB.js";import{u as $,c as S,b as w,S as k,d as s,g as H}from"./groundCalc-BsFK0T92.js";import{a as J}from"./auctionNumber-e8qX9CCs.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 B=[[{idx:1,label:"â",width:"w-[48px]",colSpan:1,rowSpan:2},{idx:2,label:"ТÑебование",width:"w-[120px]",colSpan:1,rowSpan:2},{idx:3,label:"Ðаименование",width:"w-[250px]",filterable:!0,fieldName:"creditorName",tooltip:"ФамилиÑ, ÑобÑÑвенное имÑ, оÑÑеÑÑво (еÑли Ñаковое имееÑÑÑ) кÑедиÑоÑа - ÑизиÑеÑкого лиÑа, наименование кÑедиÑоÑа - ÑÑидиÑеÑкого лиÑа",rowSpan:2},{idx:4,label:"СÑмма",width:"w-[200px]",tooltip:"СÑмма ÑÑебований кÑедиÑоÑа, подлежаÑÐ°Ñ ÑдовлеÑвоÑениÑ",rowSpan:2},{idx:5,label:"ÐокÑменÑÑ",width:"w-[220px]",tooltip:"ÐÑÑ
одÑÑие даннÑе докÑменÑов, подÑвеÑждаÑÑие ÑÑебование кÑедиÑоÑа",rowSpan:2},{idx:6,label:"Ð¡Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¾Ð± ÑдовлеÑвоÑении ÑÑебований кÑедиÑоÑов",width:"w-[710px]",align:"center",rowSpan:1,colSpan:3},{idx:7,label:"% Ñдов.",width:"w-[100px]",tooltip:"% ÑдовлеÑвоÑÐµÐ½Ð¸Ñ ÑÑебований кÑедиÑоÑов пÑÑем пеÑеÑиÑÐ»ÐµÐ½Ð¸Ñ Ð´ÐµÐ½ÐµÐ¶Ð½ÑÑ
ÑÑедÑÑв",rowSpan:2},{idx:8,label:"СÑмма погаÑеннÑÑ
",width:"w-[150px]",tooltip:"Ð¡Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¾ погаÑении ÑÑебований кÑедиÑоÑов",rowSpan:2},{idx:9,label:"ÐнÑе ÑведениÑ",width:"w-[180px]",tooltip:"ÐнÑе ÑведениÑ, каÑаÑÑиеÑÑ ÑдовлеÑвоÑÐµÐ½Ð¸Ñ ÑÑебований кÑедиÑоÑов, вклÑÑеннÑÑ
во вÑоÑой Ñаздел",rowSpan:2}],[{idx:10,label:"ÐÑего",width:"w-[150px]"},{idx:11,label:"ÐÑÑем пеÑеÑиÑлениÑ",width:"w-[150px]",tooltip:"ÐÑÑем пеÑеÑиÑÐ»ÐµÐ½Ð¸Ñ Ð´ÐµÐ½ÐµÐ¶Ð½ÑÑ
ÑÑедÑÑв"},{idx:12,label:"ÐнÑми ÑпоÑобами",width:"w-[150px]"}]],y=H(B);function K({debtorId:i,isClosed:d=!1}){const c=I(),p=j(v),o=j(F);f.useEffect(()=>{if(!i)return;const e=new AbortController;return c(L()),c(M({id:String(i),sections:[_.SecondSection],signal:e.signal})),()=>e.abort()},[c,i]);const x=f.useMemo(()=>Object.entries(o).flatMap(([e,n])=>n.items.map(r=>({...r,sectionKey:e}))),[o]),{filters:C,handleFilterChange:R,filteredItems:u,displayItems:g,visibleCount:q,loaderRef:Y}=$(x,["creditorName"],i),l=f.useMemo(()=>{let e=0,n=0,r=0,m=0,b=0;return u.forEach(h=>{const N=S(h.ground);e+=N.requirementBYN,n+=N.satisfactionBYN,r+=N.remainingBYN,m+=Number(h.cashSatisfactionSum)||0,b+=Number(h.otherSatisfactionSum)||0}),{totalReqBYN:e,totalSatBYN:n,totalRemBYN:r,totalSatCash:m,totalSatOther:b,coverage:w(e,r)}},[u]);return p?t.jsx(D,{}):t.jsxs(k,{groups:B,filters:C,onFilterChange:R,children:[t.jsx("tbody",{children:g.length>0?t.jsxs(t.Fragment,{children:[g.map((e,n)=>{const r=S(e.ground),m=w(r.requirementBYN,r.remainingBYN);return t.jsx(E.Fragment,{children:t.jsxs("tr",{className:"hover:bg-[#f3f8ff]/50 transition-colors group",children:[t.jsx("td",{className:"px-4 py-3 text-sm text-[#94a3b8]",children:n+1}),t.jsx("td",{className:"px-4 py-3 text-sm text-[#2295c3]",children:t.jsx(P,{to:`/creditor-requirements/${e.requirementId}/result`,children:J(e.requirementId)})}),t.jsx("td",{className:"px-4 py-3 text-sm font-medium text-[#334e68]",children:e.creditorName||"â"}),t.jsx("td",{className:"px-4 py-3",children:t.jsx(s,{amountRB:r.requirementBYN,amountCur:r.requirementInCurrency,currency:e.ground?.currency})}),t.jsx("td",{className:"px-4 py-3 text-sm text-[#334e68] wrap-anywhere",children:e.supportingDocuments??"â"}),t.jsx("td",{className:"px-4 py-3",children:t.jsx(s,{amountRB:r.satisfactionBYN,amountCur:r.satisfactionInCurrency,currency:e.ground?.currency})}),t.jsx("td",{className:"px-4 py-3",children:t.jsx(s,{amountRB:e.cashSatisfactionSum})}),t.jsx("td",{className:"px-4 py-3",children:t.jsx(s,{amountRB:e.otherSatisfactionSum})}),t.jsx("td",{className:a("px-4 py-3 text-left text-sm font-bold text-[#10b981]"),children:`${m.toFixed(2)}%`}),t.jsx("td",{className:"px-4 py-3 text-sm text-[#334e68]",children:d?t.jsx(s,{amountRB:r.remainingBYN,amountCur:r.remainingInCurrency,currency:e.ground?.currency}):null}),t.jsx("td",{className:"px-4 py-3 text-sm text-[#334e68]",children:e.otherSectionNotes})]})},n)}),q<u.length&&t.jsx("tr",{ref:Y,children:t.jsx("td",{colSpan:y,className:"py-8 text-center text-sm text-[#94a3b8]",children:t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("div",{className:"w-4 h-4 border-2 border-[#0f6fff] border-t-transparent roun
1ded-full animate-spin"}),"ÐагÑÑзка даннÑÑ
..."]})})})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:y,className:"px-4 py-10 text-center text-[#94a3b8]",children:"Совпадений не найдено"})})}),t.jsx("tfoot",{children:t.jsxs("tr",{children:[t.jsx("td",{colSpan:3,className:a("px-6 py-4 text-left"),children:t.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#94a3b8]",children:"ÐÑого по ÑееÑÑÑÑ:"})}),t.jsx("td",{className:a("px-4 py-4 align-top"),children:t.jsx(s,{amountRB:l.totalReqBYN})}),t.jsx("td",{}),t.jsx("td",{className:a("px-4 py-4 align-top"),children:t.jsx(s,{amountRB:l.totalSatBYN})}),t.jsx("td",{className:a("px-4 py-4 align-top"),children:t.jsx(s,{amountRB:l.totalSatCash})}),t.jsx("td",{className:a("px-4 py-4 align-top"),children:t.jsx(s,{amountRB:l.totalSatOther})}),t.jsx("td",{className:a("px-4 py-3 text-left text-sm font-bold text-[#10b981]"),children:`${l.coverage.toFixed(2)}%`}),t.jsx("td",{className:a("px-4 py-3 text-left text-sm font-bold text-[#ef4444]"),children:d?U(G(l.totalRemBYN)):null}),t.jsx("td",{})]})})]})}function St({handleShowFilters:i,toggle:d,setToggle:c,debtorId:p}){const o=j(O),x=o?.debtorModel?.organization?.fullName||o?.debtorModel?.organization?.shortName;return t.jsxs("div",{className:"debtor-creditors-requirements-second-phase",children:[t.jsx(A,{title:"Раздел 2",handleShowFilters:i,toggle:d,setToggle:c}),t.jsx(T,{title:x,className:"debtor-creditors-requirements-second-phase-page-title"}),t.jsx(z,{debtor:o}),t.jsx(K,{debtorId:p,isClosed:!!o?.endDate})]})}export{St 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.