chore: correct form fields
This commit is contained in:
@@ -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
|
||||
>
|
||||
<option value="">Выберите цель покупки</option>
|
||||
<option value="emergency">🔥 Всё горит, нужна помощь!</option>
|
||||
<option value="" disabled hidden>
|
||||
Выберите цель покупки
|
||||
</option>
|
||||
<option value="modernization">Модернизация инфраструктуры</option>
|
||||
<option value="software-replacement">Замена импортного ПО на российское</option>
|
||||
<option value="capacity-expansion">Расширение мощностей</option>
|
||||
@@ -162,9 +162,10 @@ export function ContactForm({
|
||||
defaultValue={prefillValues?.timeline ?? 'yesterday'}
|
||||
required
|
||||
>
|
||||
<option value="">Выберите срок</option>
|
||||
<option value="yesterday">Еще вчера</option>
|
||||
<option value="urgent">Срочно (до 1 месяца)</option>
|
||||
<option value="" disabled hidden>
|
||||
Выберите срок
|
||||
</option>
|
||||
<option value="urgent">До 1 месяца</option>
|
||||
<option value="1-3-months">1-3 месяца</option>
|
||||
<option value="3-6-months">3-6 месяцев</option>
|
||||
<option value="6-12-months">6-12 месяцев</option>
|
||||
@@ -205,39 +206,25 @@ export function ContactForm({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{fields.has('meetingSlots') && (
|
||||
{fields.has('meetingSlot') && (
|
||||
<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" />
|
||||
Предпочитаемое время для встречи в ВКС (выберите 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>
|
||||
<input
|
||||
type="datetime-local"
|
||||
id={withPrefix(idPrefix, '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"
|
||||
defaultValue={prefillValues?.meetingSlot1}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<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 className="grid gap-4">
|
||||
<input
|
||||
type="datetime-local"
|
||||
id={withPrefix(idPrefix, '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"
|
||||
defaultValue={prefillValues?.meetingSlot}
|
||||
/>
|
||||
</div>
|
||||
<p className="text-xs text-gray-500 mt-2">Мы отправим вам приглашение в ВКС на один из выбранных слотов</p>
|
||||
<p className="text-xs text-gray-500 mt-2">Мы отправим вам приглашение в ВКС на выбранный слот</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ const DEFAULT_MODAL_VISIBLE_FIELDS: readonly ContactFormField[] = [
|
||||
'purpose',
|
||||
'timeline',
|
||||
'taskComment',
|
||||
'meetingSlots',
|
||||
'meetingSlot',
|
||||
]
|
||||
|
||||
export function ContactModal({
|
||||
|
||||
@@ -203,6 +203,7 @@ export type ComponentCardsSolutionFiltersInput = {
|
||||
|
||||
export type ComponentSectionsAbout = {
|
||||
__typename?: 'ComponentSectionsAbout';
|
||||
anchor?: Maybe<Scalars['String']['output']>;
|
||||
cards?: Maybe<Array<Maybe<ComponentCardsAdvantage>>>;
|
||||
description?: Maybe<Scalars['String']['output']>;
|
||||
id: Scalars['ID']['output'];
|
||||
@@ -226,6 +227,7 @@ export type ComponentSectionsAboutPartnersArgs = {
|
||||
|
||||
export type ComponentSectionsCases = {
|
||||
__typename?: 'ComponentSectionsCases';
|
||||
anchor?: Maybe<Scalars['String']['output']>;
|
||||
cards?: Maybe<Array<Maybe<ComponentCardsCase>>>;
|
||||
description?: Maybe<Scalars['String']['output']>;
|
||||
id: Scalars['ID']['output'];
|
||||
@@ -241,6 +243,7 @@ export type ComponentSectionsCasesCardsArgs = {
|
||||
|
||||
export type ComponentSectionsHomeHero = {
|
||||
__typename?: 'ComponentSectionsHomeHero';
|
||||
anchor?: Maybe<Scalars['String']['output']>;
|
||||
badge?: Maybe<Scalars['String']['output']>;
|
||||
description?: Maybe<Scalars['String']['output']>;
|
||||
id: Scalars['ID']['output'];
|
||||
@@ -257,6 +260,7 @@ export type ComponentSectionsHomeHeroStatsArgs = {
|
||||
|
||||
export type ComponentSectionsServices = {
|
||||
__typename?: 'ComponentSectionsServices';
|
||||
anchor?: Maybe<Scalars['String']['output']>;
|
||||
cards?: Maybe<Array<Maybe<ComponentCardsService>>>;
|
||||
description?: Maybe<Scalars['String']['output']>;
|
||||
id: Scalars['ID']['output'];
|
||||
@@ -272,6 +276,7 @@ export type ComponentSectionsServicesCardsArgs = {
|
||||
|
||||
export type ComponentSectionsSolutions = {
|
||||
__typename?: 'ComponentSectionsSolutions';
|
||||
anchor?: Maybe<Scalars['String']['output']>;
|
||||
cards?: Maybe<Array<Maybe<ComponentCardsSolution>>>;
|
||||
description?: Maybe<Scalars['String']['output']>;
|
||||
id: Scalars['ID']['output'];
|
||||
|
||||
Reference in New Issue
Block a user