PageSourceSearch

https://hintermoos.at/assets/CostsLoans-CgxRp4QC.js

js hintermoos.at collected 2026-10-09 22:02:11 UTC 18,352 bytes, 1 lines download raw bytes

1import{u as q,r as k,j as e,m as ae,w as u,K as p,N as g,x as f,F as O,O as ne,B as re}from"./index-MoAbC8_9.js";import{O as ie}from"./OwnersLayout-Cd0M3dw8.js";import{B as le}from"./badge-BHbYeRgi.js";import{P as F}from"./progress-CIau9pND.js";import{S as I}from"./separator-CQ84aZ0V.js";import{a as oe}from"./useReserveFundData-CaCbmV8U.js";import{T as ce,a as me,b as L,c as v,d as de,e as N}from"./table-BNHSYido.js";import{C as he,a as xe,b as ue}from"./collapsible-BIxz44zB.js";import{E as K}from"./euro-Cc6O9qjZ.js";import{C as G}from"./circle-check-7w5_oQMu.js";import{C as H}from"./credit-card-CGSfKXUy.js";import{P as pe}from"./percent-C2_9q8nG.js";import{B as W}from"./building-crte1H4H.js";import{I as ge}from"./info-CZr0REZX.js";import{C as fe}from"./chevron-up-JyGCcpt9.js";import{C as je}from"./chevron-down-BDe4YKQW.js";import{T as ye}from"./trending-down-EHPUNHPt.js";import{g as be,X as R,Y as S,f as ve,R as Z,C as V,T as J,L as $,B as U}from"./generateCategoricalChart-C2b_mvpD.js";import{A as T,C as Ne}from"./ComposedChart-DcPErJ04.js";import{L as ke}from"./Line-DFydwSLz.js";import{C as De}from"./calendar-CnsXUgOr.js";import{F as Pe}from"./flame-wMx8KIS8.js";import"./Header-CnJGZ8vQ.js";import"./mountain-BHfTfCFy.js";import"./user-Cvsz7Lm_.js";import"./skeleton-ClxqB572.js";import"./breadcrumb-CmKLwRya.js";import"./switch-BHj3-8MN.js";import"./index-D9-GACGG.js";import"./house-DjS1WMqx.js";import"./receipt-DnGXta2k.js";import"./file-text-Bif0RP8Y.js";import"./chart-column-Bo5i9GGE.js";import"./upload-BH1HltYO.js";import"./piggy-bank-DP-A2O0m.js";import"./landmark-C0TkBs1l.js";import"./trending-up-Cg9WFJWB.js";import"./users-xui-UtA1.js";import"./eye-DKrvAixa.js";import"./dialog-DrI7Oddz.js";import"./tabs-5EVsfllK.js";import"./textarea-4z16PwID.js";import"./index-Dh4i1-J3.js";var Ce=be({chartName:"AreaChart",GraphicalChild:T,axisComponents:[{axisType:"xAxis",AxisComp:R},{axisType:"yAxis",AxisComp:S}],formatAxisMap:ve});const Y=[{id:"514825",name:"Kredit Sanierung",purpose:{cs:"Sanace bytového domu",de:"Sanierung der EG-Wohnanlage",en:"Building renovation"},iban:"AT13 2040 4000 6051 4825",principal:29e4,totalAmount:316885,monthlyPayment:2640.71,numberOfPayments:120,startDate:"2015-01-21",firstPaymentDate:"2015-03-05",endDate:"2025-02-05",interestRate:"1,5% + 3M EURIBOR (min 0%)",effectiveRate:1.8,processingFee:1450,status:"completed",bank:"Salzburger Sparkasse Bank AG",contact:"Hans-Peter Auer, Tel: 05 0100-48494",icon:W},{id:"760220",name:"Kredit Heizung",purpose:{cs:"Výměna topného systému",de:"Erneuerung der Heizung",en:"Heating system renewal"},iban:"AT30 2040 4000 6076 0220",principal:7e4,totalAmount:76098.21,monthlyPayment:656.02,numberOfPayments:116,startDate:"2017-05-11",firstPaymentDate:"2017-06-05",endDate:"2027-01-05",interestRate:"1,5% + 3M EURIBOR (min 0%)",effectiveRate:1.8,processingFee:350,status:"active",bank:"Salzburger Sparkasse Bank AG",contact:"Herwig Scheiflinger, Tel: 05 0100-48490",icon:Pe}],Ae=i=>{const m=[],d=new Date(i.firstPaymentDate);let j=i.principal;const A=i.effectiveRate/100/12;for(let l=1;l<=i.numberOfPayments;l++){const y=j*A,D=i.monthlyPayment-y;j=Math.max(0,j-D);const P=new Date(d);P.setMonth(d.getMonth()+l-1),m.push({month:l,date:P.toISOString().split("T")[0],payment:i.monthlyPayment,principal:D,interest:y,balance:j})}return m},we=()=>{var E;const{language:i}=q(),{data:m,isLoading:d}=oe(),[j,A]=k.useState(null),l=t=>new Intl.NumberFormat(i==="de"?"de-DE":i==="cs"?"cs-CZ":"en-GB",{style:"currency",currency:"EUR",maximumFractionDigits:2}).format(t),y=t=>new Date(t).toLocaleDateString(i==="de"?"de-DE":i==="cs"?"cs-CZ":"en-GB",{day:"2-digit",month:"2-digit",year:"numeric"}),D=()=>i==="cs"?"2 úvěry":i==="de"?"2 Darlehen":"2 loans",P=()=>i==="cs"?"aktuálně":i==="de"?"aktuell":"currently",X=()=>i==="cs"?"splátek":i==="de"?"Raten":"payments",h=k.useMemo(()=>{const t=new Date;return Y.map(s=>{const r=new Date(s.firstPaymentDate),n=new Date(s.endDate),c=s.numberOfPayments,o=Math.min(c,Math.max(0,Math.floor((t.getTime()-r.getTime())/(30.44*24*60*60*1e3)))),x=Math.min(s.totalAmount,o*s.monthlyPayment),ee=Math.max(0,s.totalAmount-x),te=Math.max(0,c-o),se=
1o/c*100,C=t>=n||s.status==="completed";return{...s,elapsedMonths:o,remainingMonths:te,paidAmount:C?s.totalAmount:x,remainingAmount:C?0:ee,progressPercent:C?100:se,isCompleted:C,schedule:Ae(s)}})},[]),b=k.useMemo(()=>{if(!m)return{};const t=m.filter(r=>r.category==="loan_repayment"),s={};return t.forEach(r=>{const n=r.description.includes("514825")?"514825":r.description.includes("760220")?"760220":null;n&&(s[n]||(s[n]={}),s[n][r.year]=(s[n][r.year]||0)+Number(r.amount))}),s},[m]),M=k.useMemo(()=>{const t=[];return Object.values(b).forEach(r=>{Object.keys(r).forEach(n=>t.push(parseInt(n)))}),[...new Set(t)].sort().map(r=>{var n,c,o,x;return{year:r.toString(),"Sanierung (514825)":((n=b[514825])==null?void 0:n[r])||0,"Heizung (760220)":((c=b[760220])==null?void 0:c[r])||0,total:(((o=b[514825])==null?void 0:o[r])||0)+(((x=b[760220])==null?void 0:x[r])||0)}})},[b]),_=k.useMemo(()=>{const t=[];return h.forEach(s=>{const r={};s.principal,s.schedule.forEach(n=>{const c=n.date.substring(0,4);r[c]=n.balance,n.balance}),Object.entries(r).forEach(([n,c])=>{let o=t.find(x=>x.year===n);o||(o={year:n,sanierung:0,heizung:0},t.push(o)),s.id==="514825"?o.sanierung=c:o.heizung=c})}),t.sort((s,r)=>s.year.localeCompare(r.year))},[h]),B={cs:{title:"Přehled úvěrů",subtitle:"Detailní informace o úvěrech společenství vlastníků",overview:"Přehled",schedule:"Splátkový kalendář",details:"Detaily smlouvy",charts:"Grafy",principal:"Jistina",totalAmount:"Celková částka k úhradě",monthlyPayment:"Měsíční splátka",interestRate:"Úroková sazba",effectiveRate:"Efektivní roční sazba",startDate:"Datum uzavření",endDate:"Datum splacení",status:"Stav",active:"Aktivní",completed:"Splaceno",paidAmount:"Již splaceno",remainingAmount:"Zbývá splatit",remainingMonths:"Zbývajících splátek",bank:"Banka",contact:"Kontakt",iban:"IBAN",processingFee:"Poplatek za zpracování",purpose:"Účel úvěru",paymentNumber:"Č.",paymentDate:"Datum",payment:"Splátka",principalPart:"Jistina",interestPart:"Úrok",balance:"Zůstatek",annualPayments:"Roční splátky dle databáze",balanceDevelopment:"Vývoj zůstatků",showSchedule:"Zobrazit splátkový kalendář",hideSchedule:"Skrýt splátkový kalendář",totalPaid:"Celkem splaceno",totalRemaining:"Celkem zbývá"},de:{title:"Darlehen-Übersicht",subtitle:"Detaillierte Informationen zu den Gemeinschaftsdarlehen",overview:"Übersicht",schedule:"Tilgungsplan",details:"Vertragsdetails",charts:"Diagramme",principal:"Darlehensbetrag",totalAmount:"Gesamtbetrag",monthlyPayment:"Monatsrate",interestRate:"Zinssatz",effectiveRate:"Effektiver Jahreszins",startDate:"Vertragsdatum",endDate:"Tilgungsdatum",status:"Status",active:"Aktiv",completed:"Getilgt",paidAmount:"Bereits getilgt",remainingAmount:"Restschuld",remainingMonths:"Verbleibende Raten",bank:"Bank",contact:"Kontakt",iban:"IBAN",processingFee:"Bearbeitungsgebühr",purpose:"Verwendungszweck",paymentNumber:"Nr.",paymentDate:"Datum",payment:"Rate",principalPart:"Tilgung",interestPart:"Zinsen",balance:"Restschuld",annualPayments:"Jährliche Zahlungen lt. Datenbank",balanceDevelopment:"Restschuld-Entwicklung",showSchedule:"Tilgungsplan anzeigen",hideSchedule:"Tilgungsplan ausblenden",totalPaid:"Gesamt getilgt",totalRemaining:"Gesamt verbleibend"},en:{title:"Loan Overview",subtitle:"Detailed information about community loans",overview:"Overview",schedule:"Payment Schedule",details:"Contract Details",charts:"Charts",principal:"Principal",totalAmount:"Total Amount",monthlyPayment:"Monthly Payment",interestRate:"Interest Rate",effectiveRate:"Effective Annual Rate",startDate:"Contract Date",endDate:"Payoff Date",status:"Status",active:"Active",completed:"Paid Off",paidAmount:"Amount Paid",remainingAmount:"Remaining Balance",remainingMonths:"Remaining Payments",bank:"Bank",contact:"Contact",iban:"IBAN",processingFee:"Processing Fee",purpose:"Purpose",paymentNumber:"No.",paymentDate:"Date",payment:"Payment",principalPart:"Principal",interestPart:"Interest",balance:"Balance",annualPayments:"Annual Payments from Database",balanceDevelopment:"Balance Development",showSchedule:"Show Payment Schedule",hideSchedule:"Hide Payment Schedule",totalPaid:"Total Paid",totalRemaining:"Total Remaining"}},a=B[i]||B.de,w=h.reduce((t,s)=>t+s.paidAmount,0),z=h.reduce((t,s)=>
1t+s.remainingAmount,0),Q=Y.reduce((t,s)=>t+s.principal,0);return d?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(ae,{className:"h-8 w-8 animate-spin text-primary"})}):e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:a.title}),e.jsx("p",{className:"text-muted-foreground",children:a.subtitle})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-4",children:[e.jsxs(u,{children:[e.jsx(p,{className:"pb-2",children:e.jsxs(g,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(K,{className:"h-4 w-4"}),a.principal]})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:l(Q)}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:D()})]})]}),e.jsxs(u,{children:[e.jsx(p,{className:"pb-2",children:e.jsxs(g,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(G,{className:"h-4 w-4 text-green-600"}),a.totalPaid]})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold text-green-600",children:l(w)}),e.jsx(F,{value:w/(w+z)*100,className:"h-2 mt-2"})]})]}),e.jsxs(u,{children:[e.jsx(p,{className:"pb-2",children:e.jsxs(g,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(O,{className:"h-4 w-4 text-orange-500"}),a.totalRemaining]})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold text-orange-600",children:l(z)}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[((E=h.find(t=>t.id==="760220"))==null?void 0:E.remainingMonths)||0," ",X()]})]})]}),e.jsxs(u,{children:[e.jsx(p,{className:"pb-2",children:e.jsxs(g,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(H,{className:"h-4 w-4"}),a.monthlyPayment]})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:l(h.filter(t=>!t.isCompleted).reduce((t,s)=>t+s.monthlyPayment,0))}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:P()})]})]})]}),e.jsx("div",{className:"grid gap-6 lg:grid-cols-2",children:h.map(t=>{const s=t.icon,r=j===t.id;return e.jsxs(u,{className:`relative overflow-hidden ${t.isCompleted?"border-green-200 bg-green-50/30 dark:border-green-900 dark:bg-green-950/20":""}`,children:[e.jsx("div",{className:"absolute top-4 right-4",children:e.jsx(le,{variant:t.isCompleted?"default":"secondary",className:t.isCompleted?"bg-green-600":"",children:t.isCompleted?e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"h-3 w-3 mr-1"}),a.completed]}):e.jsxs(e.Fragment,{children:[e.jsx(O,{className:"h-3 w-3 mr-1"}),a.active]})})}),e.jsx(p,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`p-2 rounded-lg ${t.isCompleted?"bg-green-100 dark:bg-green-900":"bg-primary/10"}`,children:e.jsx(s,{className:`h-6 w-6 ${t.isCompleted?"text-green-600":"text-primary"}`})}),e.jsxs("div",{children:[e.jsx(g,{className:"text-lg",children:t.name}),e.jsx(ne,{children:t.purpose[i]||t.purpose.de})]})]})}),e.jsxs(f,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:a.paidAmount}),e.jsx("span",{className:"font-semibold text-green-600",children:l(t.paidAmount)})]}),e.jsx(F,{value:t.progressPercent,className:"h-3"}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:a.remainingAmount}),e.jsx("span",{className:"font-semibold",children:l(t.remainingAmount)})]})]}),e.jsx(I,{}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:a.principal}),e.jsx("p",{className:"font-semibold",children:l(t.principal)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:a.totalAmount}),e.jsx("p",{className:"font-semibold",children:l(t.totalAmount)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:a.monthlyPayment}),e.jsx("p",{className:"font-semibold",children:l(t.monthlyPayment)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:a.remainingMonths}),e.jsxs("p",{className:"font-semibold",children:[t.remainingMonths," / ",t.numberOfPayments]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:a.startDate}),e.jsx("p",{className:"font-semibold",children:y(t.startDate)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:a.endDate}),e.jsx("p",{className:"font-semibold",children:y(t.endDate)})]})]}),e.jsx(I,{}),e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),e.jsxs("div",{children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.interestRate,": "]}),e.jsx("span",{className:"font-medium",children:t.interestRate}),e.jsxs("span",{className:"text-muted-foreground ml-2",children:["(",a.effectiveRate,": ",t.effectiveRate,"% p.a.)"]})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(H,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),e.jsxs("div",{children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.iban,": "]}),e.jsx("span",{className:"font-mono text-xs",children:t.iban})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),e.jsxs("div",{children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.bank,": "]}),e.jsx("span",{children:t.bank})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ge,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),e.jsxs("div",{children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.contact,": "]}),e.jsx("span",{children:t.contact})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(K,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),e.jsxs("div",{children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.processingFee,": "]}),e.jsx("span",{children:l(t.processingFee)})]})]})]}),e.jsxs(he,{open:r,onOpenChange:()=>A(r?null:t.id),children:[e.jsx(xe,{asChild:!0,children:e.jsx(re,{variant:"outline",className:"w-full",children:r?e.jsxs(e.Fragment,{children:[e.jsx(fe,{className:"h-4 w-4 mr-2"}),a.hideSchedule]}):e.jsxs(e.Fragment,{children:[e.jsx(je,{className:"h-4 w-4 mr-2"}),a.showSchedule]})})}),e.jsx(ue,{className:"mt-4",children:e.jsx("div",{className:"rounded-lg border max-h-80 overflow-auto",children:e.jsxs(ce,{children:[e.jsx(me,{children:e.jsxs(L,{children:[e.jsx(v,{className:"w-12",children:a.paymentNumber}),e.jsx(v,{children:a.paymentDate}),e.jsx(v,{className:"text-right",children:a.payment}),e.jsx(v,{className:"text-right",children:a.principalPart}),e.jsx(v,{className:"text-right",children:a.interestPart}),e.jsx(v,{className:"text-right",children:a.balance})]})}),e.jsx(de,{children:t.schedule.map((n,c)=>{const o=new Date(n.date)<new Date;return e.jsxs(L,{className:o?"bg-muted/30":"",children:[e.jsx(N,{className:"font-mono text-xs",children:n.month}),e.jsx(N,{className:"font-mono text-xs",children:y(n.date)}),e.jsx(N,{className:"text-right font-mono text-xs",children:l(n.payment)}),e.jsx(N,{className:"text-right font-mono text-xs",children:l(n.principal)}),e.jsx(N,{className:"text-right font-mono text-xs",children:l(n.interest)}),e.jsx(N,{className:"text-right font-mono text-xs font-semibold",children:l(n.balance)})]},c)})})]})})})]})]})]},t.id)})}),M.length>0&&e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs(u,{children:[e.jsx(p,{children:e.jsxs(g,{className:"flex items-center gap-2",children:[e.jsx(ye,{className:"h-5 w-5 text-primary"}),a.annualPayments]})}),e.jsx(f,{children:e.jsx(Z,{width:"100%",height:300,children:e.jsxs(Ne,{data:M,children:[e.jsx(V,{strokeDasharray:"3 3",className:"stroke-muted"}),e.jsx(R,{dataKey:"year"}),e.jsx(S,{tickFormatter:t=>`€${(t/1e3).toFixed(0)}k`}),e.jsx(J,{formatter:t=>l(t)}),e.jsx($,{}),e.jsx(U,{dataKey:"Sanierung (514825)",name:"Sanierung",fill:"hsl(var(--primary))",radius:[4,4,0,0],stackId:"loans"}),e.jsx(U,{dataKey:"Heizung (760220)",name:"Heizung",fill:"hsl(142 71% 45%)",radius:[4,4,0,0],stackId:"loans"}),e.jsx(ke,{type:"monotone",dataKey:"total",name:"Celkem",stroke:"hsl(var(--foreground))",strokeWidth:2,dot:{fill:"hsl(var(--foreground))"}})]})})})]}),e.jsxs(u,{children:[e.jsx(p,{children:e.jsxs(g,{className:"flex items-center gap-2",children:[e.jsx(De,{className:"h-5 w-5 text-primary"}),a.balanceDevelopment]})}),e.jsx(f,{children:e.jsx(Z,{width:"100%",height:300,children:e.jsxs(Ce,{data:_,children:[e.jsx(V,{strokeDasharray:"3 3",className:"stroke-muted"}),e.jsx(R,{dataKey:"year"}),e.jsx(S,{tickFormatter:t=>`€${(t/1e3).toFixed(0)}k`}),e.jsx(J,{formatter:t=>l(t)}),e.jsx($,{}),e.jsx(T,{type:"monotone",dataKey:"sanierung",name:"Sanierung",stackId:"1",stroke:"hsl(var(--primary))",fill:"hsl(var(--primary))",fillOpacity:.6}),e.jsx(T,{type:"monotone",dataKey:"heizung",name:"Heizung",stackId:"1",stroke:"hsl(142 71% 45%)",fill:"hsl(142 71% 45%)",fillOpacity:.6})]})})})]})]})]})},jt=()=>{const{language:i}=q(),m={de:{title:"Darlehen",description:"Übersicht über alle Kredite und Tilgungspläne",costs:"Kosten"},en:{title:"Loans",description:"Overview of all loans and repayment schedules",costs:"Costs"},cs:{title:"Úvěry",description:"Přehled všech úvěrů a splátkových kalendářů",costs:"Náklady"}},d=m[i]||m.cs;
1return e.jsx(ie,{title:d.title,description:d.description,breadcrumbs:[{label:d.costs,href:"/owners/costs"},{label:d.title}],children:e.jsx(we,{})})};export{jt 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.