diff --git a/scripts/seed.ts b/scripts/seed.ts index b4996b8..409fc47 100644 --- a/scripts/seed.ts +++ b/scripts/seed.ts @@ -15,6 +15,154 @@ const PAGES = [ { pl: 'Impressum', de: 'Impressum', isHome: false }, ]; +const homeLayoutPl = [ + { + blockType: 'hero', + title: 'Odbierz zwrot podatku z Niemiec — rozliczymy Cię po polsku', + subtitle: 'Ponad 20 lat doświadczenia w rozliczeniach dla Polaków pracujących w Niemczech. Szybko, rzetelnie i w pełni po polsku.', + primaryCta: 'Napisz na WhatsApp', + secondaryCta: { text: 'Zobacz jak to działa', url: '/jak-to-dziala' }, + yearsOfExperience: 'Ponad 20 lat doświadczenia', + }, + { + blockType: 'trustBar', + items: [ + { text: 'Działam w ramach b.b.h.', icon: 'shield' }, + { text: 'Doradztwo 100% po polsku', icon: 'message' }, + { text: 'Wsparcie z Finanzamt', icon: 'check' }, + { text: 'Wieloletnie doświadczenie', icon: 'star' }, + ], + }, + { + blockType: 'uniqueValue', + title: 'Rozliczenia bez bariery językowej', + description: 'Niemieckie prawo podatkowe bywa skomplikowane. Przeprowadzę Cię przez cały proces w Twoim ojczystym języku, dbając o maksymalny zwrot i zero stresu.', + }, + { + blockType: 'servicesList', + title: 'Czym się zajmuję', + services: [ + { title: 'Deklaracje podatkowe', description: 'Kompleksowe sporządzenie i złożenie zeznania rocznego (Einkommensteuererklärung).', linkText: 'Zobacz więcej' }, + { title: 'Kontrola decyzji', description: 'Szczegółowa weryfikacja decyzji podatkowej (Steuerbescheid) z Finanzamt.', linkText: 'Zobacz więcej' }, + { title: 'Ulgi i dopłaty', description: 'Pomoc w uzyskaniu Kindergeld, Riester-Rente oraz odliczaniu kosztów dojazdów i podwójnego gospodarstwa.', linkText: 'Zobacz więcej' }, + ], + }, + { + blockType: 'process', + title: 'Jak to działa', + steps: [ + { title: 'Napisz na WhatsApp', description: 'Wyślij krótką wiadomość lub zadzwoń, by rozpocząć proces.' }, + { title: 'Przekaż dokumenty', description: 'Prześlij nam wymagane dokumenty bezpiecznie online lub dostarcz osobiście.' }, + { title: 'Odbierz zwrot', description: 'Zajmiemy się resztą i poinformujemy Cię o spodziewanym zwrocie z Finanzamt.' }, + ], + ctaText: 'Zobacz cały proces', + }, + { + blockType: 'affiliation', + title: 'Zaufanie i bezpieczeństwo', + description: 'Działam w ramach b.b.h. Lohnsteuerhilfeverein e.V. (Beratungsstelle). Oferujemy profesjonalną pomoc w sprawach podatku dochodowego w ramach uprawnień wynikających z §4 Nr. 11 StBerG.', + linkText: 'Poznaj stowarzyszenie', + }, + { + blockType: 'testimonials', + title: 'Opinie klientów', + testimonials: [ + { quote: 'Pan Janusz pomógł mi odzyskać podatek za 3 ostatnie lata. Wszystko jasno wytłumaczone po polsku.', author: 'Piotr, Monachium' }, + { quote: 'Szybki kontakt przez WhatsApp i pełne wsparcie przy odwołaniu od decyzji Finanzamt. Polecam!', author: 'Anna, Berlin' }, + { quote: 'Ogromna wiedza o ulgach dla pracowników budowlanych. Zwrot był znacznie wyższy niż się spodziewałem.', author: 'Krzysztof, Dortmund' }, + ], + }, + { + blockType: 'faqTeaser', + title: 'Częste pytania', + questions: [ + { question: 'Czy muszę przyjeżdżać osobiście?', answer: 'Nie, wszystkie formalności możemy załatwić zdalnie, przesyłając dokumenty online.' }, + { question: 'Do kiedy muszę złożyć deklarację?', answer: 'Standardowy termin to 31 sierpnia, ale korzystając z naszych usług, termin ten wydłuża się do końca lutego następnego roku.' }, + ], + linkText: 'Zobacz wszystkie pytania', + }, + { + blockType: 'finalCta', + title: 'Gotowy na wyższy zwrot podatku?', + subtitle: 'Napisz do mnie już teraz. Odpowiem najszybciej jak to możliwe.', + buttonText: 'Rozpocznij na WhatsApp', + } +]; + +const homeLayoutDe = [ + { + blockType: 'hero', + title: 'Sichern Sie sich Ihre Steuererstattung aus Deutschland — Beratung auf Polnisch', + subtitle: 'Über 20 Jahre Erfahrung in der Steuererklärung für in Deutschland arbeitende Polen. Schnell, zuverlässig und komplett auf Polnisch.', + primaryCta: 'Auf WhatsApp schreiben', + secondaryCta: { text: 'So funktioniert es', url: '/jak-to-dziala' }, + yearsOfExperience: 'Über 20 Jahre Erfahrung', + }, + { + blockType: 'trustBar', + items: [ + { text: 'Teil der b.b.h.', icon: 'shield' }, + { text: '100% Beratung auf Polnisch', icon: 'message' }, + { text: 'Finanzamt Unterstützung', icon: 'check' }, + { text: 'Langjährige Erfahrung', icon: 'star' }, + ], + }, + { + blockType: 'uniqueValue', + title: 'Steuererklärungen ohne Sprachbarriere', + description: 'Das deutsche Steuerrecht kann kompliziert sein. Ich begleite Sie durch den gesamten Prozess in Ihrer Muttersprache, sorge für die maximale Erstattung und garantiere null Stress.', + }, + { + blockType: 'servicesList', + title: 'Was ich anbiete', + services: [ + { title: 'Steuererklärungen', description: 'Umfassende Erstellung und Einreichung der jährlichen Einkommensteuererklärung.', linkText: 'Mehr anzeigen' }, + { title: 'Steuerbescheidprüfung', description: 'Detaillierte Prüfung des Steuerbescheids vom Finanzamt.', linkText: 'Mehr anzeigen' }, + { title: 'Vergünstigungen und Zuschüsse', description: 'Hilfe bei der Beantragung von Kindergeld, Riester-Rente und der Absetzung von Fahrtkosten sowie doppelter Haushaltsführung.', linkText: 'Mehr anzeigen' }, + ], + }, + { + blockType: 'process', + title: 'Wie es funktioniert', + steps: [ + { title: 'Auf WhatsApp schreiben', description: 'Senden Sie eine kurze Nachricht oder rufen Sie an, um den Prozess zu starten.' }, + { title: 'Dokumente einreichen', description: 'Senden Sie uns die erforderlichen Dokumente sicher online oder bringen Sie sie persönlich vorbei.' }, + { title: 'Erstattung erhalten', description: 'Wir kümmern uns um den Rest und informieren Sie über die erwartete Rückerstattung vom Finanzamt.' }, + ], + ctaText: 'Den gesamten Prozess ansehen', + }, + { + blockType: 'affiliation', + title: 'Vertrauen und Sicherheit', + description: 'Ich bin im Rahmen des b.b.h. Lohnsteuerhilfevereins e.V. (Beratungsstelle) tätig. Wir bieten professionelle Hilfe in Lohnsteuersachen im Rahmen der Befugnisse nach §4 Nr. 11 StBerG.', + linkText: 'Den Verein kennenlernen', + }, + { + blockType: 'testimonials', + title: 'Kundenrezensionen', + testimonials: [ + { quote: 'Herr Janusz half mir, meine Steuern für die letzten 3 Jahre zurückzubekommen. Alles wurde klar auf Polnisch erklärt.', author: 'Piotr, München' }, + { quote: 'Schneller Kontakt über WhatsApp und volle Unterstützung bei Einsprüchen beim Finanzamt. Sehr zu empfehlen!', author: 'Anna, Berlin' }, + { quote: 'Enormes Wissen über Vergünstigungen für Bauarbeiter. Die Erstattung war viel höher als erwartet.', author: 'Krzysztof, Dortmund' }, + ], + }, + { + blockType: 'faqTeaser', + title: 'Häufige Fragen', + questions: [ + { question: 'Muss ich persönlich kommen?', answer: 'Nein, alle Formalitäten können online erledigt werden, indem Sie uns die Dokumente zusenden.' }, + { question: 'Bis wann muss ich die Steuererklärung einreichen?', answer: 'Die Standardfrist ist der 31. August, aber durch unsere Dienste verlängert sich diese bis Ende Februar des Folgejahres.' }, + ], + linkText: 'Alle Fragen ansehen', + }, + { + blockType: 'finalCta', + title: 'Bereit für eine höhere Steuererstattung?', + subtitle: 'Schreiben Sie mir jetzt. Ich werde so schnell wie möglich antworten.', + buttonText: 'Auf WhatsApp starten', + } +]; + async function run() { const payload = await getPayload({ config: configPromise }) @@ -35,21 +183,16 @@ async function run() { data: { title: page.pl, slug: page.isHome ? 'home' : toSlug(page.pl), - layout: [ + layout: (page.isHome ? homeLayoutPl : [ { blockType: 'TextSection', - text: page.isHome - ? 'Witaj na nowej stronie głównej opartej o mechanizm klocków (blocks) i Payload CMS.' - : 'Treść w przygotowaniu', + text: 'Treść w przygotowaniu', } - ] + ]) as any }, locale: 'pl', }); - // Rzutowanie na number: Payload domyślnie może traktować ID jako 'string | number', - // jednak przy adapterze Postgres (domyślnie serial) ID to zawsze 'number', - // czego z kolei ściśle wymaga pole relacyjne w updateGlobal. pageIds.push(createdPage.id as unknown as number); // @ts-ignore @@ -59,14 +202,12 @@ async function run() { data: { title: page.de, slug: page.isHome ? 'home' : toSlug(page.de), - layout: [ + layout: (page.isHome ? homeLayoutDe : [ { blockType: 'TextSection', - text: page.isHome - ? 'Willkommen auf der neuen Startseite basierend auf dem Blöcke-Mechanismus und Payload CMS.' - : 'Inhalt in Vorbereitung', + text: 'Inhalt in Vorbereitung', } - ] + ]) as any }, locale: 'de', }); @@ -74,10 +215,7 @@ async function run() { console.log(`- Created ${page.pl} / ${page.de}`); } - // Dodanie ich do globalnego nagłówka (pominąć 'Stowarzyszenie' i strony prawne jako główne menu wg życzenia) - // "Domyślna zawartość na start: Strona główna / Usługi / Jak się umówić / O mnie / FAQ / Kontakt" console.log('Seeding global header...') - // @ts-ignore await payload.updateGlobal({ slug: 'header', @@ -91,7 +229,7 @@ async function run() { await payload.updateGlobal({ slug: 'company', data: { - address: 'Beratungsstelle b.b.h.\nLohnsteuerhilfeverein e.V.\nJanusz Kedzierski\nPrzykładowa ulica 123\n12345 Przykładowe Miasto', + address: 'DO POTWIERDZENIA PRZEZ KLIENTA', phone: '+49 123 456 789', email: 'kontakt@example.com', hours: 'Pon-Pt: 9:00 - 17:00\nPo wcześniejszym umówieniu', @@ -100,7 +238,6 @@ async function run() { }); console.log('Seeding global footer...') - // Wszystkie pozycje z headera + 3 strony prawne (Indeksy: od 0 do 5 oraz od 7 do 9) const footerNavIndices = [0, 1, 2, 3, 4, 5, 7, 8, 9]; const footerNavPages = footerNavIndices.map(index => ({ page: pageIds[index] })); @@ -110,7 +247,7 @@ async function run() { data: { navigation: footerNavPages, association: { - title: 'Członek b.b.h. Lohnsteuerhilfeverein e.V.', + title: 'Działam w ramach b.b.h. Lohnsteuerhilfeverein e.V.', link: 'https://bbh-lohnsteuerhilfe.de', } } @@ -121,10 +258,10 @@ async function run() { await payload.updateGlobal({ slug: 'site-settings', data: { - siteName: 'Janusz Kędzierski', + siteName: 'Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski', titleOrder: 'page-first', titleSeparator: '|', - homepage: pageIds[0], // Pierwsza strona to Strona główna (isHome: true) + homepage: pageIds[0], } }); diff --git a/src/app/(frontend)/[locale]/[[...slug]]/page.tsx b/src/app/(frontend)/[locale]/[[...slug]]/page.tsx index 6132f61..0be9a7e 100644 --- a/src/app/(frontend)/[locale]/[[...slug]]/page.tsx +++ b/src/app/(frontend)/[locale]/[[...slug]]/page.tsx @@ -6,6 +6,7 @@ import { resolveRoute } from '@intecion/ipal-kit' import { getLocalizedSlugs } from '@intecion/ipal-kit' import { i18n } from '../../../../i18n.config' import { SetLanguageSlugs } from '../../../../components/LanguageSlugsProvider' +import { RenderBlocks } from '../../../../blocks/RenderBlocks' export default async function Page(props: { params: Promise<{ locale: string; slug?: string[] }> @@ -57,16 +58,9 @@ export default async function Page(props: { )} - {layout.map((block: any, index: number) => { - if (block.blockType === 'TextSection') { - return ( -
-

{block.text}

-
- ) - } - return
Nieznany blok: {block.blockType}
- })} +
+ +
) } diff --git a/src/app/(frontend)/layout.tsx b/src/app/(frontend)/layout.tsx index 59fce0f..0deace8 100644 --- a/src/app/(frontend)/layout.tsx +++ b/src/app/(frontend)/layout.tsx @@ -12,7 +12,7 @@ const inter = Inter({ subsets: ['latin'], variable: '--font-sans' }) const outfit = Outfit({ subsets: ['latin'], variable: '--font-heading' }) export const metadata = { - title: 'Janusz Kędzierski - Beratungsstelle b.b.h. Lohnsteuerhilfeverein e.V.', + title: 'Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski', description: 'Profesjonalne doradztwo podatkowe.', } @@ -57,6 +57,19 @@ export default async function RootLayout({
{children}