feat: configure public contact details
This commit is contained in:
@@ -88,7 +88,7 @@ export default async function KontaktPage() {
|
|||||||
{contact.region && (
|
{contact.region && (
|
||||||
<p>
|
<p>
|
||||||
<span className="block text-xs font-medium uppercase tracking-[0.18em] text-anouma-plum/70">
|
<span className="block text-xs font-medium uppercase tracking-[0.18em] text-anouma-plum/70">
|
||||||
Region
|
Adresse
|
||||||
</span>
|
</span>
|
||||||
<span className="text-lg text-anouma-plum">{contact.region}</span>
|
<span className="text-lg text-anouma-plum">{contact.region}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ export const Contact: GlobalConfig = {
|
|||||||
fields: [
|
fields: [
|
||||||
{ name: "email", type: "email", label: "E-Mail", required: true, admin: { width: "34%" } },
|
{ name: "email", type: "email", label: "E-Mail", required: true, admin: { width: "34%" } },
|
||||||
{ name: "phone", type: "text", label: "Telefon", admin: { width: "33%" } },
|
{ name: "phone", type: "text", label: "Telefon", admin: { width: "33%" } },
|
||||||
{ name: "region", type: "text", label: "Region / Ort", admin: { width: "33%" } },
|
{ name: "region", type: "text", label: "Adresse / Ort", admin: { width: "33%" } },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
seoFields(),
|
seoFields(),
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import type { MigrateUpArgs } from "@payloadcms/db-postgres";
|
||||||
|
|
||||||
|
/** Applies the contact details approved for the public website. */
|
||||||
|
export async function up({ payload }: MigrateUpArgs): Promise<void> {
|
||||||
|
await payload.updateGlobal({
|
||||||
|
slug: "contact",
|
||||||
|
data: {
|
||||||
|
email: "info@anouma.org",
|
||||||
|
phone: "+49 151 53611786",
|
||||||
|
region: "Haldenweg 3, 79853 Lenzkirch",
|
||||||
|
},
|
||||||
|
overrideAccess: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
await payload.updateGlobal({
|
||||||
|
slug: "booking-settings",
|
||||||
|
data: {
|
||||||
|
locationName: "Anouma",
|
||||||
|
street: "Haldenweg 3",
|
||||||
|
postalCode: "79853",
|
||||||
|
city: "Lenzkirch",
|
||||||
|
country: "Deutschland",
|
||||||
|
},
|
||||||
|
overrideAccess: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Content entered by the site owner must not be discarded during a schema rollback.
|
||||||
|
export async function down(): Promise<void> {}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import * as migration_20260826_004425 from './20260826_004425';
|
import * as migration_20260826_004425 from './20260826_004425';
|
||||||
import * as migration_20260916_192252_cookie_settings from './20260916_192252_cookie_settings';
|
import * as migration_20260916_192252_cookie_settings from './20260916_192252_cookie_settings';
|
||||||
|
import * as migration_20260917_090000_contact_details from './20260917_090000_contact_details';
|
||||||
|
|
||||||
export const migrations = [
|
export const migrations = [
|
||||||
{
|
{
|
||||||
@@ -12,4 +13,9 @@ export const migrations = [
|
|||||||
down: migration_20260916_192252_cookie_settings.down,
|
down: migration_20260916_192252_cookie_settings.down,
|
||||||
name: '20260916_192252_cookie_settings'
|
name: '20260916_192252_cookie_settings'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
up: migration_20260917_090000_contact_details.up,
|
||||||
|
down: migration_20260917_090000_contact_details.down,
|
||||||
|
name: '20260917_090000_contact_details'
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
+16
-5
@@ -187,13 +187,24 @@ async function seedGlobals(payload: Awaited<ReturnType<typeof getPayload>>) {
|
|||||||
eyebrow: "Kontakt",
|
eyebrow: "Kontakt",
|
||||||
title: "Ich freue mich, von dir zu hören",
|
title: "Ich freue mich, von dir zu hören",
|
||||||
lead: "Ob Frage, Anliegen oder der Wunsch nach einem Kennenlerngespräch – schreib mir gerne.",
|
lead: "Ob Frage, Anliegen oder der Wunsch nach einem Kennenlerngespräch – schreib mir gerne.",
|
||||||
// Placeholder contact details — replace with the real ones in the admin.
|
email: "info@anouma.org",
|
||||||
email: "hallo@anouma.org",
|
phone: "+49 151 53611786",
|
||||||
phone: "+49 000 00 00 00",
|
region: "Haldenweg 3, 79853 Lenzkirch",
|
||||||
region: "Platzhalter – Ort / Region",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(" ↺ Global „Kontakt“ gesetzt (mit Platzhalter-Kontaktdaten — bitte im Admin ersetzen)");
|
console.log(" ↺ Global „Kontakt“ gesetzt");
|
||||||
|
|
||||||
|
await payload.updateGlobal({
|
||||||
|
slug: "booking-settings",
|
||||||
|
data: {
|
||||||
|
locationName: "Anouma",
|
||||||
|
street: "Haldenweg 3",
|
||||||
|
postalCode: "79853",
|
||||||
|
city: "Lenzkirch",
|
||||||
|
country: "Deutschland",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(" ↺ Global „Buchungseinstellungen“ gesetzt");
|
||||||
|
|
||||||
await payload.updateGlobal({
|
await payload.updateGlobal({
|
||||||
slug: "booking",
|
slug: "booking",
|
||||||
|
|||||||
Reference in New Issue
Block a user