PageSourceSearch

https://hintermoos.at/assets/OwnersNews-KzO5FRfT.js

js hintermoos.at collected 2026-10-09 22:01:46 UTC 18,310 bytes, 1 lines download raw bytes

1import{o as ee,u as se,p as te,r as N,s as m,j as e,w as x,x as h,K as w,N as b,O as ae,L as ne,B as re}from"./index-MoAbC8_9.js";import{O as ie,S as oe}from"./OwnersLayout-Cd0M3dw8.js";import{u as de}from"./useHouseContacts-CRglCbrb.js";import{B as K}from"./badge-BHbYeRgi.js";import{S as E}from"./separator-CQ84aZ0V.js";import{P as ce,C as le,a as me,b as pe}from"./collapsible-BIxz44zB.js";import{T as ue,a as xe,b as G,c as S,d as he,e as M}from"./table-BNHSYido.js";import{C as W}from"./circle-alert-CI-iPm0z.js";import{B as ge}from"./breadcrumb-CmKLwRya.js";import{W as je}from"./wrench-B4A_f5hE.js";import{U as R}from"./users-xui-UtA1.js";import{C as fe}from"./calendar-CnsXUgOr.js";import{E as we}from"./external-link-Bd1Ktkpe.js";import{C as Z}from"./chevron-down-BDe4YKQW.js";import{C as be}from"./chevron-up-JyGCcpt9.js";import{S as Ne}from"./Header-CnJGZ8vQ.js";import"./skeleton-ClxqB572.js";import"./switch-BHj3-8MN.js";import"./index-D9-GACGG.js";import"./house-DjS1WMqx.js";import"./receipt-DnGXta2k.js";import"./building-crte1H4H.js";import"./file-text-Bif0RP8Y.js";import"./user-Cvsz7Lm_.js";import"./chart-column-Bo5i9GGE.js";import"./upload-BH1HltYO.js";import"./piggy-bank-DP-A2O0m.js";import"./landmark-C0TkBs1l.js";import"./flame-wMx8KIS8.js";import"./trending-up-Cg9WFJWB.js";import"./euro-Cc6O9qjZ.js";import"./eye-DKrvAixa.js";import"./dialog-DrI7Oddz.js";import"./tabs-5EVsfllK.js";import"./textarea-4z16PwID.js";import"./mountain-BHfTfCFy.js";const _e=({member:i})=>{const[g,s]=N.useState(!1);return e.jsxs(K,{variant:"secondary",className:"text-sm py-1.5 px-3 gap-1.5 cursor-pointer select-none transition-all",onClick:()=>i.email&&s(o=>!o),children:[e.jsx("span",{className:"font-medium",children:[i.first_name,i.last_name].filter(Boolean).join(" ")}),i.apartment_codes.length>0&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",i.apartment_codes.join(", "),")"]}),i.email&&e.jsxs(e.Fragment,{children:[e.jsx(Z,{className:`h-3 w-3 text-muted-foreground transition-transform ${g?"rotate-180":""}`}),g&&e.jsx("a",{href:`mailto:${i.email}`,className:"text-xs text-primary hover:underline ml-0.5",onClick:o=>o.stopPropagation(),children:i.email})]})]})},ve=({members:i})=>e.jsx("div",{className:"flex flex-wrap gap-2",children:i.map((g,s)=>e.jsx(_e,{member:g},s))}),ds=()=>{var U;const{user:i}=ee(),{t:g,language:s}=se(),{byType:o,loading:ye}=de();te();const[P,$]=N.useState([]),[T,F]=N.useState([]),[A,V]=N.useState(null),[v,O]=N.useState([]),[J,L]=N.useState(!0);N.useEffect(()=>{i&&(Q(),Y(),X())},[i]);const Q=async()=>{L(!0);const{data:t}=await m.from("announcements").select("*").order("created_at",{ascending:!1});$(t||[]),L(!1)},X=async()=>{const{data:t}=await m.from("user_roles").select("user_id, beirat_since").eq("role","beirat"),d=(t||[]).map(a=>a.user_id);if(d.length===0){O([]);return}const{data:p}=await m.from("owner_contacts").select("id, first_name, last_name, email, user_id").in("user_id",d),{data:u}=await m.from("owner_contact_persons").select("id, first_name, last_name, email, user_id, owner_contact_id").in("user_id",d),j=(p||[]).map(a=>a.id).filter(Boolean),B=(u||[]).map(a=>a.owner_contact_id).filter(Boolean),r=[...new Set([...j,...B])],{data:_}=await m.from("apartment_owners").select("user_id, apartment:apartments(code)").in("user_id",d).eq("is_current",!0),{data:y}=r.length>0?await m.from("apartment_owners").select("owner_contact_id, apartment:apartments(code)").in("owner_contact_id",r).eq("is_current",!0):{data:[]},f={};(p||[]).forEach(a=>{a.user_id&&(f[a.id]=a.user_id)});const k={};(u||[]).forEach(a=>{a.owner_contact_id&&a.user_id&&(k[a.owner_contact_id]||(k[a.owner_contact_id]=[]),k[a.owner_contact_id].push(a.user_id))});const c={};(_||[]).forEach(a=>{var l;c[a.user_id]||(c[a.user_id]=new Set),(l=a.apartment)!=null&&l.code&&c[a.user_id].add(a.apartment.code)}),(y||[]).forEach(a=>{var I;const l=f[a.owner_contact_id];l&&(c[l]||(c[l]=new Set),(I=a.apartment)!=null&&I.code&&c[l].add(a.apartment.code)),(k[a.owner_contact_id]||[]).forEach(C=>{var q;c[C]||(c[C]=new Set),(q=a.apartment)!=null&&q.code&&c[C].add(a.apartment.code)})});const D={};
1(t||[]).forEach(a=>{D[a.user_id]=a.beirat_since||null});const z={};(p||[]).forEach(a=>{z[a.user_id]={first_name:a.first_name,last_name:a.last_name,email:a.email||null,apartment_codes:[],beirat_since:D[a.user_id]||null}}),(u||[]).forEach(a=>{z[a.user_id]||(z[a.user_id]={first_name:a.first_name,last_name:a.last_name,email:a.email||null,apartment_codes:[],beirat_since:D[a.user_id]||null})}),O(Object.entries(z).map(([a,l])=>({...l,apartment_codes:Array.from(c[a]||[])})))},Y=async()=>{const{data:t}=await m.from("apartments").select("id, code, floor, sort_order").order("sort_order",{ascending:!0}),{data:d}=await m.from("apartment_owners").select("apartment_id, owner_contact_id, updated_at").eq("is_current",!0),p=(d||[]).map(r=>r.updated_at).filter(Boolean);if(p.length>0){const r=p.sort().reverse()[0];V(r)}const u=[...new Set((d||[]).map(r=>r.owner_contact_id).filter(Boolean))];let j={};if(u.length>0){const{data:r}=await m.from("owner_contacts").select("id, first_name, last_name").in("id",u);for(const _ of r||[])j[_.id]=[_.first_name,_.last_name].filter(Boolean).join(" ")||"—"}const B=(t||[]).map(r=>{const y=(d||[]).filter(f=>f.apartment_id===r.id).map(f=>f.owner_contact_id?j[f.owner_contact_id]:null).filter(Boolean);return{apartment_code:r.code,floor:r.floor,owner_name:y.length>0?y.join(", "):"—"}});F(B)},H=t=>new Date(t).toLocaleDateString(s==="de"?"de-DE":s==="cs"?"cs-CZ":"en-US",{year:"numeric",month:"long",day:"numeric"}),n={title:s==="cs"?"Správa domu":s==="de"?"Hausverwaltung":"House Management",description:s==="cs"?"Organizační a provozní přehled pro vlastníky":s==="de"?"Organisations- und Betriebsübersicht für Eigentümer":"Organizational and operational overview for owners",manager:s==="cs"?"Správa nemovitosti":s==="de"?"Hausverwaltung":"Property Management",caretaker:s==="cs"?"Správce domu":s==="de"?"Hausmeister":"Caretaker",contacts:s==="cs"?"Důležité kontakty":s==="de"?"Wichtige Kontakte":"Important Contacts",rules:s==="cs"?"Domovní řád":s==="de"?"Hausordnung":"House Rules",announcements:s==="cs"?"Oznámení":s==="de"?"Ankündigungen":"Announcements",quietHours:s==="cs"?"Noční klid":s==="de"?"Nachtruhe":"Quiet Hours",quietHoursDesc:s==="cs"||s==="de"?"22:00 – 06:00":"10 PM – 6 AM",waste:s==="cs"?"Třídění odpadu":s==="de"?"Mülltrennung":"Waste Sorting",wasteDesc:s==="cs"?"Prosíme o důsledné třídění odpadu dle označení kontejnerů.":s==="de"?"Bitte den Müll nach den Behälterbeschriftungen trennen.":"Please sort waste according to container labels.",parking:s==="cs"?"Parkování":s==="de"?"Parken":"Parking",parkingDesc:s==="cs"?"Parkujte pouze na vyhrazených místech.":s==="de"?"Bitte nur auf den zugewiesenen Stellplätzen parken.":"Please park only in designated spots.",pets:s==="cs"?"Domácí zvířata":s==="de"?"Haustiere":"Pets",petsDesc:s==="cs"?"Domácí zvířata jsou povolena. Majitelé zodpovídají za čistotu.":s==="de"?"Haustiere sind erlaubt. Eigentümer sind für die Sauberkeit verantwortlich.":"Pets are allowed. Owners are responsible for cleanliness.",ownersList:s==="cs"?"Seznam majitelů":s==="de"?"Eigentümerliste":"Owners List",apartment:s==="cs"?"Byt":s==="de"?"Wohnung":"Apartment",floorLabel:s==="cs"?"Patro":s==="de"?"Stock":"Floor",ownerName:s==="cs"?"Jméno a příjmení":"Name",beiratTitle:s==="cs"?"Poradní sbor vlastníků (Beirat)":s==="de"?"Eigentümerbeirat":"Owners Advisory Board (Beirat)",beiratRole:s==="cs"?"Poradní a koordinační orgán vlastníků, který spolupracuje se správou domu a pomáhá předběžně projednávat vybraná témata. Nemá přímou rozhodovací pravomoc.":s==="de"?"Beratungs- und Koordinationsorgan der Eigentümer, das mit der Hausverwaltung zusammenarbeitet und ausgewählte Themen vorab bespricht. Der Beirat hat keine direkte Entscheidungsbefugnis.":"Advisory and coordination body of owners that cooperates with the property management and helps discuss selected topics in advance. The board has no direct decision-making authority.",beiratMembers:s==="cs"?"Aktuální členové":s==="de"?"Aktuelle Mitglieder":"Current Members",beiratNoMembers:s==="cs"?"Žádní evidovaní členové":s==="de"?"Keine registrierten Mitglieder":"No registered members",beiratElected:s==="cs"?"Zvoleni na shromáždění vlastníků"
1:s==="de"?"Gewählt bei der Eigentümerversammlung":"Elected at the owners' meeting",beiratElectionDetail:s==="cs"?"Bod 8 protokolu – jednomyslně zvoleni přítomnými vlastníky (77,46 % podílů zastoupeno).":s==="de"?"Punkt 8 des Protokolls – einstimmig von den anwesenden Eigentümern gewählt (77,46 % der Anteile vertreten).":"Agenda item 8 – unanimously elected by the present owners (77.46% of shares represented).",beiratMemberSince:s==="cs"?"Člen od":s==="de"?"Mitglied seit":"Member since"};return e.jsx(ie,{title:n.title,description:n.description,breadcrumbs:[{label:n.title}],isLoading:J,children:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("section",{children:[e.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2 mb-4",children:[e.jsx(W,{className:"h-5 w-5 text-primary"}),n.announcements]}),P.length===0?e.jsx(x,{children:e.jsx(h,{className:"p-8 text-center text-muted-foreground",children:g("owners.noAnnouncements")})}):e.jsx("div",{className:"space-y-4",children:P.map(t=>e.jsxs(x,{className:t.is_important?"border-destructive/50 bg-destructive/5":"",children:[e.jsx(w,{children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(b,{className:"text-xl",children:t.title}),e.jsx(ae,{children:H(t.created_at)})]}),t.is_important&&e.jsxs(K,{variant:"destructive",className:"flex items-center gap-1",children:[e.jsx(W,{className:"h-3 w-3"}),g("owners.important")]})]})}),e.jsx(h,{children:e.jsx("p",{className:"text-muted-foreground whitespace-pre-wrap",children:t.content})})]},t.id))})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs(x,{children:[e.jsx(w,{className:"pb-3",children:e.jsxs(b,{className:"flex items-center gap-2 text-lg",children:[e.jsx(ge,{className:"h-5 w-5 text-primary"}),n.manager]})}),e.jsxs(h,{className:"space-y-3",children:[o("manager").map(t=>e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold",children:t.name}),t.role&&e.jsx("p",{className:"text-sm text-muted-foreground",children:t.role}),e.jsx(E,{className:"my-2"}),e.jsxs("div",{className:"space-y-1 text-sm",children:[t.phone&&e.jsxs("p",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Tel:"})," ",t.phone]}),t.email&&e.jsxs("p",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Email:"})," ",t.email]}),t.website&&e.jsxs("p",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Web:"})," ",t.website]})]})]},t.id)),o("manager").length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"—"})]})]}),e.jsxs(x,{children:[e.jsx(w,{className:"pb-3",children:e.jsxs(b,{className:"flex items-center gap-2 text-lg",children:[e.jsx(je,{className:"h-5 w-5 text-primary"}),n.caretaker]})}),e.jsxs(h,{className:"space-y-3",children:[o("caretaker").map(t=>e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold",children:t.name}),t.role&&e.jsx("p",{className:"text-sm text-muted-foreground",children:t.role}),e.jsx(E,{className:"my-2"}),e.jsxs("div",{className:"space-y-1 text-sm",children:[t.phone&&e.jsxs("p",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Tel:"})," ",t.phone]}),t.email&&e.jsxs("p",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Email:"})," ",t.email]})]})]},t.id)),o("caretaker").length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"—"})]})]})]}),e.jsxs(x,{children:[e.jsx(w,{className:"pb-3",children:e.jsxs(b,{className:"flex items-center gap-2 text-lg",children:[e.jsx(R,{className:"h-5 w-5 text-primary"}),n.beiratTitle]})}),e.jsxs(h,{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n.beiratRole}),v.length>0&&((U=v[0])==null?void 0:U.beirat_since)&&e.jsxs("div",{className:"rounded-md bg-muted/50 border border-border/50 px-3 py-2.5 space-y-1",children:[e.jsxs("p",{className:"text-xs font-medium text-foreground flex items-center gap-1.5",children:[e.jsx(fe,{className:"h-3.5 w-3.5 text-primary"}),n.beiratElected,": ",new Date(v[0].beirat_since).toLocaleDateString(s==="cs"?"cs-CZ":s==="de"?"de-AT":"en-GB")]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n.beiratElectionDetail})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:n.beiratMembers}),v.length>0?e.jsx(ve,{members:v}):e.jsx("p",{className:"text-sm text-muted-foreground",children:n.beiratNoMembers})]})]})]}),e.jsxs(x,{children:[e.jsx(w,{className:"pb-3",children:e.jsxs(b,{className:"flex items-center gap-2 text-lg",children:[e.jsx(ce,{className:"h-5 w-5 text-primary"}),n.contacts]})}),e.jsx(h,{children:e.jsxs("div",{className:"space-y-2 text-sm",children:[o("emergency").filter(t=>[1,2,3,4,13,14].includes(t.sort_order||0)).map((t,d)=>{var j;const p=((j=t.additional_data)==null?void 0:j[`label_${s}`])||t.name,u=d===0;return e.jsxs("div",{children:[d===4&&e.jsx(E,{className:"my-1"}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:p}),e.jsx("span",{className:`font-mono font-semibold ${u?"text-destructive":""}`,children:t.phone})]})]},t.id)}),o("emergency").length>7&&e.jsxs(e.Fragment,{children:[e.jsx(E,{className:"my-2"}),e.jsxs(ne,{to:"/owners/contacts",className:"flex items-center gap-1.5 text-xs text-primary hover:underline",children:[e.jsx(we,{className:"h-3 w-3"}),s==="cs"?"Všechny kontakty":s==="de"?"Alle Kontakte":"All contacts",` (${o("emergency").length})`]})]})]})})]}),e.jsxs(x,{children:[e.jsx(w,{className:"pb-3",children:e.jsxs(b,{className:"flex items-center gap-2 text-lg",children:[e.jsx(oe,{className:"h-5 w-5 text-primary"}),n.rules]})}),e.jsx(h,{children:e.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"p-3 rounded-lg bg-muted/50",children:[e.jsx("p",{className:"font-medium text-sm",children:n.quietHours}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:n.quietHoursDesc})]}),e.jsxs("div",{className:"p-3 rounded-lg bg-muted/50",children:[e.jsx("p",{className:"font-medium text-sm",children:n.waste}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:n.wasteDesc})]}),e.jsxs("div",{className:"p-3 rounded-lg bg-muted/50",children:[e.jsx("p",{className:"font-medium text-sm",children:n.parking}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:n.parkingDesc})]}),e.jsxs("div",{className:"p-3 rounded-lg bg-muted/50",children:[e.jsx("p",{className:"font-medium text-sm",children:n.pets}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:n.petsDesc})]})]})})]}),e.jsx(le,{children:e.jsxs(x,{children:[e.jsxs(w,{className:"flex flex-row items-center justify-between",children:[e.jsxs(b,{className:"flex items-center gap-2 text-base",children:[e.jsx(R,{className:"h-5 w-5 text-primary"}),n.ownersList," (",T.length,")"]}),e.jsx(me,{asChild:!0,children:e.jsxs(re,{variant:"outline",size:"sm",className:"gap-1.5",children:[e.jsx("span",{className:"text-xs",children:s==="cs"?"Zobrazit seznam":s==="de"?"Liste anzeigen":"Show list"}),e.jsx(Z,{className:"h-4 w-4 transition-transform [[data-state=open]_&]:hidden"}),e.jsx(be,{className:"h-4 w-4 transition-transform [[data-state=closed]_&]:hidden"})]})})]}),e.jsx(pe,{children:e.jsxs(h,{children:[A&&e.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:[s==="cs"?"Poslední aktualizace: ":s==="de"?"Letzte Aktualisierung: ":"Last updated: ",H(A)]}),e.jsxs("div",{className:"flex gap-3 items-start p-3 mb-4 rounded-lg bg-muted/50 border border-border text-xs text-muted-foreground",children:[e.jsx(Ne,{className:"h-4 w-4 mt-0.5 shrink-0 text-primary"}),e.jsx("p",{children:s==="cs"?"Tato sekce je určena výhradně pro komunikaci mezi vlastníky, sdílení informací souvisejících se správou domu a výkon práv vyplývajících ze spoluvlastnictví, včetně hlasování. Zobrazeny jsou pouze údaje v nezbytném rozsahu, zejména jméno vlastníka a označení jednotky (TOP). Přístup k těmto údajům mají pouze vlastníci a další oprávněné osoby; údaje nejsou veřejně dostupné. Tyto údaje smějí být používány pouze pro účely správy domu a vzájemné komunikace vlastníků, v souladu s GDPR a WEG 2002.":s==="de"?"Dieser Bereich dient ausschließlich der Kommunikation zwischen Eigentümern, dem Austausch von Informationen zur Hausverwaltung und der Ausübung von Miteigentumsrechten, einschließlich Abstimmungen. Es werden nur die notwendigsten Grunddaten angezeigt, insbesondere der Name des Eigentümers und die Bezeichnung der Einheit (TOP). Der Zugang zu diesen Daten ist auf Eigentümer und berechtigte Personen beschränkt; die Daten sind nicht öffentlich zugänglich. Diese Art der Bereitstellung entspricht den Anforderungen der DSGVO und des WEG 2002.":"This section is exclusively for communication between owners, sharing property management information, and exercising co-ownership rights, including voting. Only essential data is displayed, namely the owner's name and unit designation (TOP). Access is restricted to owners and authorized persons; data is not publicly accessible. This disclosure complies with GDPR and WEG 2002 requirements."})]}),e.jsxs(ue,{children:[e.jsx(xe,{children:e.jsxs(G,{className:"bg-muted/50 hover:bg-muted/50",children:[e.jsx(S,{className:"h-9 text-xs",children:n.apartment}),e.jsx(S,{className:"h-9 text-xs",children:n.floorLabel}),e.jsx(S,{className:"h-9 text-xs",children:n.ownerName})]})}),e.jsx(he,{children:T.map(t=>e.jsxs(G,{className:"h-7",children:[e.jsx(M,{className:"font-medium text-xs py-1",children:t.apartment_code}),e.jsx(M,{className:"text-xs py-1",children:t.floor!=null?t.floor:"—"}),e.jsx(M,{className:"text-xs py-1",children:t.owner_name})]},t.apartment_code))})]})]})})]})})]})})};export{ds 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.