diff --git a/migrations/0024_footer_working_hours.sql b/migrations/0024_footer_working_hours.sql
new file mode 100644
index 0000000..f0b5ac9
--- /dev/null
+++ b/migrations/0024_footer_working_hours.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "footer"
+ ADD COLUMN IF NOT EXISTS "contacts_hours" varchar DEFAULT 'щодня з 11:00 до 20:00';
diff --git a/migrations/20260612_120000.ts b/migrations/20260612_120000.ts
new file mode 100644
index 0000000..61cd43e
--- /dev/null
+++ b/migrations/20260612_120000.ts
@@ -0,0 +1,15 @@
+import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
+
+export async function up({ db }: MigrateUpArgs): Promise
- {STATIC_CONTACTS.hours} + {cmsContacts?.hours ?? STATIC_CONTACTS.hours}
diff --git a/src/globals/Footer.ts b/src/globals/Footer.ts index 0360e3a..0419283 100644 --- a/src/globals/Footer.ts +++ b/src/globals/Footer.ts @@ -25,6 +25,12 @@ export const Footer: GlobalConfig = { { name: 'phone', type: 'text' }, { name: 'email', type: 'email' }, { name: 'address', type: 'text' }, + { + name: 'hours', + type: 'text', + label: 'Час роботи', + defaultValue: 'щодня з 11:00 до 20:00', + }, ], }, { diff --git a/src/payload-generated-schema.ts b/src/payload-generated-schema.ts index 98a065d..2d0adaf 100644 --- a/src/payload-generated-schema.ts +++ b/src/payload-generated-schema.ts @@ -2854,6 +2854,7 @@ export const footer = pgTable( contacts_phone: varchar('contacts_phone'), contacts_email: varchar('contacts_email'), contacts_address: varchar('contacts_address'), + contacts_hours: varchar('contacts_hours').default('щодня з 11:00 до 20:00'), copyrightText: varchar('copyright_text'), updatedAt: timestamp('updated_at', { mode: 'string', withTimezone: true, precision: 3 }), createdAt: timestamp('created_at', { mode: 'string', withTimezone: true, precision: 3 }), diff --git a/src/payload-types.ts b/src/payload-types.ts index c92f82a..2c31d1c 100644 --- a/src/payload-types.ts +++ b/src/payload-types.ts @@ -2109,6 +2109,7 @@ export interface Footer { phone?: string | null email?: string | null address?: string | null + hours?: string | null } socials?: | { @@ -2979,6 +2980,7 @@ export interface FooterSelect