PageSourceSearch

https://hintermoos.at/assets/ExtraIncomeDetail-CRAZNGun.js

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

1import{E as W,a as $,u as q,r as S,j as e,m as Q,w as c,x as m,B as k,L as T,K as z,N as R,O as U}from"./index-MoAbC8_9.js";import{L as I}from"./Layout-jB2m3rBw.js";import{B as u}from"./badge-BHbYeRgi.js";import{S as X}from"./separator-CQ84aZ0V.js";import{g as _,f as o}from"./types-DDfmYF_E.js";import{b as ee,u as se}from"./useReserveFundData-CaCbmV8U.js";import{A as P}from"./arrow-left-CZKmX_Y-.js";import{G as p,C as A,S as M}from"./shirt-PwtPSFTy.js";import{E as C}from"./euro-Cc6O9qjZ.js";import{F as te}from"./file-text-Bif0RP8Y.js";import{C as ae}from"./calendar-CnsXUgOr.js";import{H as K}from"./house-DjS1WMqx.js";import"./Header-CnJGZ8vQ.js";import"./mountain-BHfTfCFy.js";import"./user-Cvsz7Lm_.js";const ve=()=>{const{year:Z}=W(),b=$(),{language:n}=q(),h=_(n),{data:x,isLoading:G}=ee(),{data:g,isLoading:H}=se(),i=parseInt(Z||"2024"),a=n,j=S.useMemo(()=>x==null?void 0:x.find(s=>s.year===i),[x,i]),d=S.useMemo(()=>(g==null?void 0:g.filter(s=>s.year===i))||[],[g,i]),B=d.filter(s=>s.type==="sonderumlage"),L=d.filter(s=>s.type==="rental"),O=d.filter(s=>s.type==="laundry"),F=d.filter(s=>s.type==="interest"),D=d.filter(s=>s.type==="other"),N=B.reduce((s,l)=>s+l.amount,0),v=L.reduce((s,l)=>s+l.amount,0),f=O.reduce((s,l)=>s+l.amount,0),y=F.reduce((s,l)=>s+l.amount,0),w=D.reduce((s,l)=>s+l.amount,0),r=N+v+f+y+w,J=s=>{switch(s){case"sonderumlage":return e.jsx(A,{className:"h-5 w-5 text-yellow-600"});case"rental":return e.jsx(K,{className:"h-5 w-5 text-blue-600"});case"laundry":return e.jsx(M,{className:"h-5 w-5 text-teal-600"});case"interest":return e.jsx(C,{className:"h-5 w-5 text-green-600"});default:return e.jsx(p,{className:"h-5 w-5 text-purple-600"})}},Y=s=>{switch(s){case"sonderumlage":return e.jsx(u,{variant:"outline",className:"bg-yellow-100 text-yellow-700 border-yellow-300",children:h.sonderumlage});case"rental":return e.jsx(u,{variant:"outline",className:"bg-blue-100 text-blue-700 border-blue-300",children:h.rentalIncome});case"laundry":return e.jsx(u,{variant:"outline",className:"bg-teal-100 text-teal-700 border-teal-300",children:h.laundryIncome});case"interest":return e.jsx(u,{variant:"outline",className:"bg-green-100 text-green-700 border-green-300",children:a==="cs"?"Úroky":a==="de"?"Zinsen":"Interest"});default:return e.jsx(u,{variant:"outline",children:h.otherIncome})}},E={cs:{title:"Detail mimořádných příjmů",backToOverview:"Zpět na přehled",yearOverview:"Přehled roku",totalIncome:"Celkové příjmy",fundBalance:"Stav fondu",contributions:"Mandatorní příspěvky",incomeCategories:"Kategorie příjmů",sonderumlage:"Mimořádné příspěvky",rentalIncome:"Příjmy z pronájmu",laundryIncome:"Prádelna",interestIncome:"Úroky",otherIncome:"Ostatní",items:"položek",noData:"Žádná data pro tento rok",detailedBreakdown:"Detailní rozpad",notes:"Poznámky",description:"Popis",loading:"Načítám..."},de:{title:"Details zu Sondereinnahmen",backToOverview:"Zurück zur Übersicht",yearOverview:"Jahresübersicht",totalIncome:"Gesamteinnahmen",fundBalance:"Rücklagenstand",contributions:"Pflichtbeiträge",incomeCategories:"Einnahmenkategorien",sonderumlage:"Sonderumlagen",rentalIncome:"Mieteinnahmen",laundryIncome:"Waschküche",interestIncome:"Zinsen",otherIncome:"Sonstiges",items:"Positionen",noData:"Keine Daten für dieses Jahr",detailedBreakdown:"Detaillierte Aufstellung",notes:"Anmerkungen",description:"Beschreibung",loading:"Laden..."},en:{title:"Extra Income Details",backToOverview:"Back to overview",yearOverview:"Year Overview",totalIncome:"Total Income",fundBalance:"Fund Balance",contributions:"Mandatory Contributions",incomeCategories:"Income Categories",sonderumlage:"Special Assessments",rentalIncome:"Rental Income",laundryIncome:"Laundry Room",interestIncome:"Interest",otherIncome:"Other",items:"items",noData:"No data for this year",detailedBreakdown:"Detailed Breakdown",notes:"Notes",description:"Description",loading:"Loading..."}},t=E[a]||E.cs;if(G||H)return e.jsx(I,{children:e.jsxs("div",{className:"container mx-auto px-4 py-8 flex items-center justify-center",children:[e.jsx(Q,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:t.loading})]})});if(!j||d.length===0)return e.jsx(I,{children:e.jsx("div",{className:"container mx-auto px-4 py-8",children:e.jsx(c,{children:e.jsxs(m,{className:"py-12 text-center",children:[e.jsx("p",{className:"text-muted-foreground",children:t.noData}),e.jsxs(k,{variant:"outline",className:"mt-4",onClick:()=>b("/costs?tab=house&subtab=reserve"),children:[e.jsx(P,{className:"h-4 w-4 mr-2"}),t.backToOverview]})]})})})});const V=(x==null?void 0:x.map(s=>s.year).sort((s,l)=>s-l))||[];return e.jsx(I,{children:e.jsxs("div",{className:"container mx-auto px-4 py-8 space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(k,{variant:"ghost",size:"sm",onClick:()=>b("/costs?tab=house&subtab=reserve"),children:[e.jsx(P,{className:"h-4 w-4 mr-2"}),t.backToOverview]}),e.jsx(X,{orientation:"vertical",className:"h-6"}),e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(T,{to:"/costs",className:"hover:underline",children:a==="cs"?"Náklady":a==="de"?"Kosten":"Costs"}),e.jsx("span",{children:"/"}),e.jsx(T,{to:"/costs?tab=house&subtab=reserve",className:"hover:underline",children:a==="cs"?"Fond oprav":a==="de"?"Rücklage":"Reserve Fund"}),e.jsx("span",{children:"/"}),e.jsxs("span",{className:"font-medium text-foreground",children:[t.title," ",i]})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-3 rounded-full bg-blue-100 dar
1k:bg-blue-900",children:e.jsx(p,{className:"h-6 w-6 text-blue-600"})}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold",children:[t.title," - ",i]}),e.jsx("p",{className:"text-muted-foreground",children:j.notes})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[e.jsx(c,{className:"border-blue-200 bg-blue-50/50 dark:bg-blue-950/20",children:e.jsxs(m,{className:"pt-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-blue-700 dark:text-blue-300 text-sm mb-1",children:[e.jsx(p,{className:"h-4 w-4"}),t.totalIncome]}),e.jsx("div",{className:"text-2xl font-bold text-blue-600",children:o(r,n)})]})}),e.jsx(c,{children:e.jsxs(m,{className:"pt-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm mb-1",children:[e.jsx(C,{className:"h-4 w-4"}),t.contributions]}),e.jsx("div",{className:"text-2xl font-bold text-green-600",children:o(j.contributions,n)})]})}),e.jsx(c,{children:e.jsxs(m,{className:"pt-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm mb-1",children:[e.jsx(te,{className:"h-4 w-4"}),t.items]}),e.jsx("div",{className:"text-2xl font-bold",children:d.length})]})}),e.jsx(c,{children:e.jsxs(m,{className:"pt-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm mb-1",children:[e.jsx(ae,{className:"h-4 w-4"}),a==="cs"?"Konečný stav":a==="de"?"Endstand":"End Balance"]}),e.jsx("div",{className:"text-2xl font-bold",children:o(j.endBalance,n)})]})})]}),e.jsxs(c,{children:[e.jsxs(z,{children:[e.jsx(R,{children:t.incomeCategories}),e.jsxs(U,{children:[t.yearOverview," ",i]})]}),e.jsx(m,{children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4",children:[e.jsxs("div",{className:"p-4 rounded-lg border bg-yellow-50/50 dark:bg-yellow-950/20 border-yellow-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(A,{className:"h-5 w-5 text-yellow-600"}),e.jsx("span",{className:"font-medium text-yellow-700 dark:text-yellow-300",children:t.sonderumlage})]}),e.jsx("div",{className:"text-2xl font-bold text-yellow-600",children:o(N,n)}),e.jsxs("div",{className:"text-sm text-muted-foreground mt-1",children:[B.length," ",t.items," • ",r>0?(N/r*100).toFixed(0):0,"%"]})]}),e.jsxs("div",{className:"p-4 rounded-lg border bg-blue-50/50 dark:bg-blue-950/20 border-blue-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(K,{className:"h-5 w-5 text-blue-600"}),e.jsx("span",{className:"font-medium text-blue-700 dark:text-blue-300",children:t.rentalIncome})]}),e.jsx("div",{className:"text-2xl font-bold text-blue-600",children:o(v,n)}),e.jsxs("div",{className:"text-sm text-muted-foreground mt-1",children:[L.length," ",t.items," • ",r>0?(v/r*100).toFixed(0):0,"%"]})]}),e.jsxs("div",{className:"p-4 rounded-lg border bg-teal-50/50 dark:bg-teal-950/20 border-teal-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(M,{className:"h-5 w-5 text-teal-600"}),e.jsx("span",{className:"font-medium text-teal-700 dark:text-teal-300",children:t.laundryIncome})]}),e.jsx("div",{className:"text-2xl font-bold text-teal-600",children:o(f,n)}),e.jsxs("div",{className:"text-sm text-muted-foreground mt-1",children:[O.length," ",t.items," • ",r>0?(f/r*100).toFixed(0):0,"%"]})]}),e.jsxs("div",{className:"p-4 rounded-lg border bg-green-50/50 dark:bg-green-950/20 border-green-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(C,{className:"h-5 w-5 text-green-600"}),e.jsx("span",{className:"font-medium text-green-700 dark:text-green-300",children:t.interestIncome})]}),e.jsx("div",{className:"text-2xl font-bold text-green-600",children:o(y,n)}),e.jsxs("div",{className:"text-sm text-muted-foreground mt-1",children:[F.length," ",t.items," • ",r>0?(y/r*100).toFixed(0):0,"%"]})]}),e.jsxs("div",{className:"p-4 rounded-lg border bg-purple-50/50 dark:bg-purple-950/20 border-purple-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(p,{className:"h-5 w-5 text-purple-600"}),e.jsx("span",{className:"font-medium text-purple-700 dark:text-purple-300",children:t.otherIncome})]}),e.jsx("div",{className:"text-2xl font-bold text-purple-600",children:o(w,n)}),e.jsxs("div",{className:"text-sm text-muted-foreground mt-1",children:[D.length," ",t.items," • ",r>0?(w/r*100).toFixed(0):0,"%"]})]})]})})]}),e.jsxs(c,{children:[e.jsx(z,{children:e.jsx(R,{children:t.detailedBreakdown})}),e.jsx(m,{children:e.jsx("div",{className:"space-y-4",children:d.map(s=>e.jsxs("div",{className:"flex items-start gap-4 p-4 rounded-lg border hover:bg-muted/50 transition-colors",children:[e.jsx("div",{className:"mt-1",children:J(s.type)}),e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium",children:s.description}),s.descriptionEn&&a==="en"&&e.jsx("p",{className:"text-sm text-muted-foreground",children:s.descriptionEn}),s.notes&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.notes}),e.jsx("div",{className:"mt-2",children:Y(s.type)})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-xl font-bold text-blue-600",children:o(s.amount,n)}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[r>0?(s.amount/r*100).toFixed(1):0,"% ",a==="cs"?"z celku":a==="de"?"vom Gesamtbetrag":"of total"]})]})]})})]},s.id))})})]}),e.jsx(c,{children:e.jsx(m,{className:"py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:a==="cs"?"Zobrazit jiný rok:":a==="de"?"Anderes Jahr anzeigen:":"View another year:"}),e.jsx("div",{className:"flex gap-2",children:V.map(s=>e.jsx(k,{variant:s===i?"default":"outline",size:"sm",onClick:()=>b(`/costs/extra-income/${s}`),children:s},s))})]})})})]})})};export{ve 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.