chore: correct form fields

This commit is contained in:
Zotov Ivan Yuryevich
2026-06-01 20:54:42 +03:00
parent f0df39fbaf
commit cd6ed4eee5
4 changed files with 36 additions and 39 deletions

View File

@@ -158,6 +158,7 @@ input ComponentCardsSolutionFiltersInput {
} }
type ComponentSectionsAbout { type ComponentSectionsAbout {
anchor: String
cards(filters: ComponentCardsAdvantageFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsAdvantage] cards(filters: ComponentCardsAdvantageFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsAdvantage]
description: String description: String
id: ID! id: ID!
@@ -166,6 +167,7 @@ type ComponentSectionsAbout {
} }
type ComponentSectionsCases { type ComponentSectionsCases {
anchor: String
cards(filters: ComponentCardsCaseFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsCase] cards(filters: ComponentCardsCaseFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsCase]
description: String description: String
id: ID! id: ID!
@@ -173,6 +175,7 @@ type ComponentSectionsCases {
} }
type ComponentSectionsHomeHero { type ComponentSectionsHomeHero {
anchor: String
badge: String badge: String
description: String description: String
id: ID! id: ID!
@@ -181,6 +184,7 @@ type ComponentSectionsHomeHero {
} }
type ComponentSectionsServices { type ComponentSectionsServices {
anchor: String
cards(filters: ComponentCardsServiceFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsService] cards(filters: ComponentCardsServiceFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsService]
description: String description: String
id: ID! id: ID!
@@ -188,6 +192,7 @@ type ComponentSectionsServices {
} }
type ComponentSectionsSolutions { type ComponentSectionsSolutions {
anchor: String
cards(filters: ComponentCardsSolutionFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsSolution] cards(filters: ComponentCardsSolutionFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsSolution]
description: String description: String
id: ID! id: ID!

View File

@@ -8,7 +8,7 @@ export type ContactFormField =
| 'purpose' | 'purpose'
| 'timeline' | 'timeline'
| 'taskComment' | 'taskComment'
| 'meetingSlots' | 'meetingSlot'
| 'message' | 'message'
export interface ContactFormValues { export interface ContactFormValues {
@@ -19,8 +19,7 @@ export interface ContactFormValues {
purpose?: string purpose?: string
timeline?: string timeline?: string
taskComment?: string taskComment?: string
meetingSlot1?: string meetingSlot?: string
meetingSlot2?: string
message?: string message?: string
} }
@@ -131,11 +130,12 @@ export function ContactForm({
id={withPrefix(idPrefix, 'purpose')} id={withPrefix(idPrefix, 'purpose')}
name="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" 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 required
> >
<option value="">Выберите цель покупки</option> <option value="" disabled hidden>
<option value="emergency">🔥 Всё горит, нужна помощь!</option> Выберите цель покупки
</option>
<option value="modernization">Модернизация инфраструктуры</option> <option value="modernization">Модернизация инфраструктуры</option>
<option value="software-replacement">Замена импортного ПО на российское</option> <option value="software-replacement">Замена импортного ПО на российское</option>
<option value="capacity-expansion">Расширение мощностей</option> <option value="capacity-expansion">Расширение мощностей</option>
@@ -162,9 +162,10 @@ export function ContactForm({
defaultValue={prefillValues?.timeline ?? 'yesterday'} defaultValue={prefillValues?.timeline ?? 'yesterday'}
required required
> >
<option value="">Выберите срок</option> <option value="" disabled hidden>
<option value="yesterday">Еще вчера</option> Выберите срок
<option value="urgent">Срочно (до 1 месяца)</option> </option>
<option value="urgent">До 1 месяца</option>
<option value="1-3-months">1-3 месяца</option> <option value="1-3-months">1-3 месяца</option>
<option value="3-6-months">3-6 месяцев</option> <option value="3-6-months">3-6 месяцев</option>
<option value="6-12-months">6-12 месяцев</option> <option value="6-12-months">6-12 месяцев</option>
@@ -205,39 +206,25 @@ export function ContactForm({
</div> </div>
)} )}
{fields.has('meetingSlots') && ( {fields.has('meetingSlot') && (
<div> <div>
<label className=" text-sm text-gray-700 mb-2 flex items-center gap-2"> <label
htmlFor={withPrefix(idPrefix, 'meetingSlot1')}
className="text-sm text-gray-700 mb-2 flex items-center gap-2"
>
<Calendar className="w-4 h-4" /> <Calendar className="w-4 h-4" />
Предпочитаемое время для встречи в ВКС (выберите 2 варианта) Предпочитаемое время для встречи в ВКС
</label>
<div className="grid md:grid-cols-2 gap-4">
<div>
<label htmlFor={withPrefix(idPrefix, 'meetingSlot1')} className="block text-xs text-gray-600 mb-1">
Вариант 1
</label> </label>
<div className="grid gap-4">
<input <input
type="datetime-local" type="datetime-local"
id={withPrefix(idPrefix, 'meetingSlot1')} id={withPrefix(idPrefix, 'meetingSlot1')}
name="meetingSlot1" name="meetingSlot1"
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" 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?.meetingSlot1} defaultValue={prefillValues?.meetingSlot}
/> />
</div> </div>
<div> <p className="text-xs text-gray-500 mt-2">Мы отправим вам приглашение в ВКС на выбранный слот</p>
<label htmlFor={withPrefix(idPrefix, 'meetingSlot2')} className="block text-xs text-gray-600 mb-1">
Вариант 2
</label>
<input
type="datetime-local"
id={withPrefix(idPrefix, 'meetingSlot2')}
name="meetingSlot2"
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?.meetingSlot2}
/>
</div>
</div>
<p className="text-xs text-gray-500 mt-2">Мы отправим вам приглашение в ВКС на один из выбранных слотов</p>
</div> </div>
)} )}

View File

@@ -23,7 +23,7 @@ const DEFAULT_MODAL_VISIBLE_FIELDS: readonly ContactFormField[] = [
'purpose', 'purpose',
'timeline', 'timeline',
'taskComment', 'taskComment',
'meetingSlots', 'meetingSlot',
] ]
export function ContactModal({ export function ContactModal({

View File

@@ -203,6 +203,7 @@ export type ComponentCardsSolutionFiltersInput = {
export type ComponentSectionsAbout = { export type ComponentSectionsAbout = {
__typename?: 'ComponentSectionsAbout'; __typename?: 'ComponentSectionsAbout';
anchor?: Maybe<Scalars['String']['output']>;
cards?: Maybe<Array<Maybe<ComponentCardsAdvantage>>>; cards?: Maybe<Array<Maybe<ComponentCardsAdvantage>>>;
description?: Maybe<Scalars['String']['output']>; description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output']; id: Scalars['ID']['output'];
@@ -226,6 +227,7 @@ export type ComponentSectionsAboutPartnersArgs = {
export type ComponentSectionsCases = { export type ComponentSectionsCases = {
__typename?: 'ComponentSectionsCases'; __typename?: 'ComponentSectionsCases';
anchor?: Maybe<Scalars['String']['output']>;
cards?: Maybe<Array<Maybe<ComponentCardsCase>>>; cards?: Maybe<Array<Maybe<ComponentCardsCase>>>;
description?: Maybe<Scalars['String']['output']>; description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output']; id: Scalars['ID']['output'];
@@ -241,6 +243,7 @@ export type ComponentSectionsCasesCardsArgs = {
export type ComponentSectionsHomeHero = { export type ComponentSectionsHomeHero = {
__typename?: 'ComponentSectionsHomeHero'; __typename?: 'ComponentSectionsHomeHero';
anchor?: Maybe<Scalars['String']['output']>;
badge?: Maybe<Scalars['String']['output']>; badge?: Maybe<Scalars['String']['output']>;
description?: Maybe<Scalars['String']['output']>; description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output']; id: Scalars['ID']['output'];
@@ -257,6 +260,7 @@ export type ComponentSectionsHomeHeroStatsArgs = {
export type ComponentSectionsServices = { export type ComponentSectionsServices = {
__typename?: 'ComponentSectionsServices'; __typename?: 'ComponentSectionsServices';
anchor?: Maybe<Scalars['String']['output']>;
cards?: Maybe<Array<Maybe<ComponentCardsService>>>; cards?: Maybe<Array<Maybe<ComponentCardsService>>>;
description?: Maybe<Scalars['String']['output']>; description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output']; id: Scalars['ID']['output'];
@@ -272,6 +276,7 @@ export type ComponentSectionsServicesCardsArgs = {
export type ComponentSectionsSolutions = { export type ComponentSectionsSolutions = {
__typename?: 'ComponentSectionsSolutions'; __typename?: 'ComponentSectionsSolutions';
anchor?: Maybe<Scalars['String']['output']>;
cards?: Maybe<Array<Maybe<ComponentCardsSolution>>>; cards?: Maybe<Array<Maybe<ComponentCardsSolution>>>;
description?: Maybe<Scalars['String']['output']>; description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output']; id: Scalars['ID']['output'];