From 0efc31b000c0e47951e0661f6de2e6844737551d Mon Sep 17 00:00:00 2001 From: pascal Date: Sun, 12 Jul 2026 18:06:15 +0200 Subject: [PATCH] Dodaj widok Pomoc i kontakt w panelu uzytkownika --- frontend/src/App.tsx | 191 ++++++++++++++++++- frontend/src/styles.css | 406 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 594 insertions(+), 3 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d6efb40..242ad4b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -9,7 +9,7 @@ const cityImage = new URL('./assets/city-panorama.png', import.meta.url).href; const loginRoomImage = new URL('./assets/login-room.png', import.meta.url).href; const SMS_VERIFICATION_CODE = '123456'; -type View = 'home' | 'buy' | 'rent' | 'sell' | 'valuation' | 'priceHistory' | 'districtRanking' | 'negotiation' | 'comparison' | 'add' | 'services' | 'guides' | 'map' | 'login' | 'account' | 'accountPriceAlerts' | 'accountMeetings' | 'accountListings' | 'accountSettings' | 'accountSecurity' | 'accountProfileEdit' | 'accountPublicProfile' | 'notifications' | 'favorites' | 'messages' | 'admin' | 'listingDetail'; +type View = 'home' | 'buy' | 'rent' | 'sell' | 'valuation' | 'priceHistory' | 'districtRanking' | 'negotiation' | 'comparison' | 'add' | 'services' | 'guides' | 'map' | 'login' | 'account' | 'accountPriceAlerts' | 'accountMeetings' | 'accountListings' | 'accountSettings' | 'accountSecurity' | 'accountProfileEdit' | 'accountPublicProfile' | 'accountHelpContact' | 'notifications' | 'favorites' | 'messages' | 'admin' | 'listingDetail'; type MessageThreadListing = { listingId: number; @@ -110,7 +110,7 @@ const LIVE_LISTINGS_REFRESH_MS = 15000; const PROTECTED_VIEWS = new Set([ 'add', 'admin', 'account', 'accountPriceAlerts', 'accountMeetings', 'accountListings', 'accountSettings', - 'accountSecurity', 'accountProfileEdit', 'accountPublicProfile', 'notifications', 'favorites', 'messages', 'comparison', + 'accountSecurity', 'accountProfileEdit', 'accountPublicProfile', 'accountHelpContact', 'notifications', 'favorites', 'messages', 'comparison', ]); type NotificationCategory = 'listing' | 'messages' | 'system'; @@ -2914,6 +2914,7 @@ function App() { {view === 'accountSecurity' && } {view === 'accountProfileEdit' && } {view === 'accountPublicProfile' && } + {view === 'accountHelpContact' && } {view === 'notifications' && } {view === 'messages' && ( onNavigate('accountSettings')}> Dane i ustawienia - +
@@ -4942,6 +4944,189 @@ function AccountDashboardPage({ onNavigate, activeView }: { onNavigate: (view: V ); } +function AccountHelpContactPage({ onNavigate, activeView }: { onNavigate: (view: View) => void; activeView: View }) { + const supportChannels = [ + { + id: 'live-chat', + icon: 'message', + iconTone: 'green', + title: 'Czat na żywo', + badge: 'Najszybsza pomoc', + description: 'Porozmawiaj z naszym konsultantem w czasie rzeczywistym.', + action: 'Dostępny 8:00 - 20:00', + }, + { + id: 'email', + icon: 'mail', + iconTone: 'blue', + title: 'E-mail', + description: 'Napisz do nas, odpowiemy najszybciej jak to możliwe.', + action: 'bok@mieszko.pl', + }, + { + id: 'phone', + icon: 'phone', + iconTone: 'violet', + title: 'Telefon', + description: 'Zadzwoń do nas, chętnie odpowiemy na Twoje pytania.', + action: '+48 22 123 45 67', + }, + { + id: 'form', + icon: 'document', + iconTone: 'orange', + title: 'Formularz kontaktowy', + description: 'Wyślij nam wiadomość, a my skontaktujemy się z Tobą.', + action: 'Przejdź do formularza', + }, + ] as const; + + const faqItems = [ + 'Jak dodać ogłoszenie?', + 'Ile kosztuje dodanie ogłoszenia?', + 'Jak wyróżnić moje ogłoszenie?', + 'Jak edytować lub usunąć ogłoszenie?', + 'Jak działa porównywarka mieszkań?', + 'Jak ustawić alerty cenowe?', + ] as const; + + const moreHelpCards = [ + { + id: 'guides', + icon: 'document', + iconTone: 'green', + title: 'Poradniki', + description: 'Praktyczne artykuły i wskazówki dotyczące kupna, sprzedaży i wynajmu nieruchomości.', + action: 'Zobacz poradniki', + }, + { + id: 'security', + icon: 'shield', + iconTone: 'gold', + title: 'Bezpieczeństwo', + description: 'Dowiedz się jak bezpiecznie korzystać z serwisu i unikać oszustw.', + action: 'Zasady bezpieczeństwa', + }, + { + id: 'rules', + icon: 'list', + iconTone: 'blue', + title: 'Regulamin i zasady', + description: 'Zapoznaj się z regulaminem serwisu oraz zasadami korzystania.', + action: 'Przeczytaj regulamin', + }, + { + id: 'report', + icon: 'warning', + iconTone: 'red', + title: 'Zgłoś problem', + description: 'Zgłoś nieodpowiednie treści lub problemy techniczne.', + action: 'Zgłoś', + }, + ] as const; + + return ( +
+
+ + +
+
+
+
+

Pomoc i kontakt

+

Jesteśmy tutaj, aby Ci pomóc. Skontaktuj się z nami lub znajdź odpowiedzi na najczęściej zadawane pytania.

+
+ +
+ +
+

Jak możemy Ci pomóc?

+
+ {supportChannels.map((channel) => ( +
+
+ +
+

{channel.title}

+ {'badge' in channel && channel.badge ? {channel.badge} : null} +
+
+

{channel.description}

+ +
+ ))} +
+
+ +
+
+
+

Najczęściej zadawane pytania

+ +
+
+ {faqItems.map((question) => ( +
+ + {question} + + +

Znajdziesz odpowiedź w naszym centrum pomocy. W razie potrzeby skorzystaj z formularza kontaktowego obok.

+
+ ))} +
+
+ +
+

Napisz do nas

+
+
+ + +
+ +