From cd6ed4eee53531fed565530f8c02ec408cc4f0e6 Mon Sep 17 00:00:00 2001 From: Zotov Ivan Yuryevich Date: Mon, 1 Jun 2026 20:54:42 +0300 Subject: [PATCH] chore: correct form fields --- schema.graphql | 5 +++ src/components/ContactForm.tsx | 63 +++++++++++++-------------------- src/components/ContactModal.tsx | 2 +- src/graphql/graphql.ts | 5 +++ 4 files changed, 36 insertions(+), 39 deletions(-) diff --git a/schema.graphql b/schema.graphql index 8a20c94..3ca0197 100644 --- a/schema.graphql +++ b/schema.graphql @@ -158,6 +158,7 @@ input ComponentCardsSolutionFiltersInput { } type ComponentSectionsAbout { + anchor: String cards(filters: ComponentCardsAdvantageFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsAdvantage] description: String id: ID! @@ -166,6 +167,7 @@ type ComponentSectionsAbout { } type ComponentSectionsCases { + anchor: String cards(filters: ComponentCardsCaseFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsCase] description: String id: ID! @@ -173,6 +175,7 @@ type ComponentSectionsCases { } type ComponentSectionsHomeHero { + anchor: String badge: String description: String id: ID! @@ -181,6 +184,7 @@ type ComponentSectionsHomeHero { } type ComponentSectionsServices { + anchor: String cards(filters: ComponentCardsServiceFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsService] description: String id: ID! @@ -188,6 +192,7 @@ type ComponentSectionsServices { } type ComponentSectionsSolutions { + anchor: String cards(filters: ComponentCardsSolutionFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsSolution] description: String id: ID! diff --git a/src/components/ContactForm.tsx b/src/components/ContactForm.tsx index becfb08..9ae7831 100644 --- a/src/components/ContactForm.tsx +++ b/src/components/ContactForm.tsx @@ -8,7 +8,7 @@ export type ContactFormField = | 'purpose' | 'timeline' | 'taskComment' - | 'meetingSlots' + | 'meetingSlot' | 'message' export interface ContactFormValues { @@ -19,8 +19,7 @@ export interface ContactFormValues { purpose?: string timeline?: string taskComment?: string - meetingSlot1?: string - meetingSlot2?: string + meetingSlot?: string message?: string } @@ -131,11 +130,12 @@ export function ContactForm({ id={withPrefix(idPrefix, 'purpose')} name="purpose" className="w-full px-4 py-3 bg-gray-50 border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white transition-all" - defaultValue={prefillValues?.purpose ?? 'emergency'} + defaultValue={prefillValues?.purpose ?? ''} required > - - + @@ -162,9 +162,10 @@ export function ContactForm({ defaultValue={prefillValues?.timeline ?? 'yesterday'} required > - - - + + @@ -205,39 +206,25 @@ export function ContactForm({ )} - {fields.has('meetingSlots') && ( + {fields.has('meetingSlot') && (
-