@@ -7,7 +7,8 @@ import {
|
||||
SelectInput,
|
||||
TextInput,
|
||||
} from '@/components/site/form-field';
|
||||
import { serviceOptions } from '@/data/site';
|
||||
import { common, serviceOptions } from '@/content/common';
|
||||
import { useContent } from '@/hooks/use-locale';
|
||||
|
||||
/**
|
||||
* Compact consultation request form.
|
||||
@@ -16,6 +17,7 @@ import { serviceOptions } from '@/data/site';
|
||||
* endpoint before going live.
|
||||
*/
|
||||
export default function ConsultationForm({ idPrefix }: { idPrefix: string }) {
|
||||
const t = useContent(common);
|
||||
const [submitted, setSubmitted] = useState(false);
|
||||
|
||||
const handleSubmit = (event: FormEvent<HTMLFormElement>) => {
|
||||
@@ -27,49 +29,44 @@ export default function ConsultationForm({ idPrefix }: { idPrefix: string }) {
|
||||
<div className="border-outline-variant/60 bg-surface-container-high flex flex-col gap-4 rounded-2xl border p-6 shadow-xl lg:p-7">
|
||||
<div className="flex flex-col">
|
||||
<span className="font-display text-on-surface text-base font-bold">
|
||||
Jadwalkan Konsultasi IT
|
||||
{t.form.title}
|
||||
</span>
|
||||
<span className="text-on-surface-variant text-xs">
|
||||
Konfirmasi langsung oleh Lead Architect PAJ dalam 2 jam
|
||||
kerja.
|
||||
{t.form.subtitle}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{submitted ? (
|
||||
<FormSuccess
|
||||
title="Permintaan Terkirim!"
|
||||
message="Tim Lead Consultant PT Probindo Artika Jaya akan segera menghubungi kontak Anda untuk konfirmasi jadwal sesi konsultasi."
|
||||
title={t.form.successTitle}
|
||||
message={t.form.successMessage}
|
||||
/>
|
||||
) : (
|
||||
<form className="flex flex-col gap-3" onSubmit={handleSubmit}>
|
||||
<Field
|
||||
id={`${idPrefix}-name`}
|
||||
label="Nama Lengkap & Perusahaan"
|
||||
required
|
||||
>
|
||||
<Field id={`${idPrefix}-name`} label={t.form.name} required>
|
||||
<TextInput
|
||||
id={`${idPrefix}-name`}
|
||||
name="name"
|
||||
placeholder="Nama Anda (PT ...)"
|
||||
placeholder={t.form.namePlaceholder}
|
||||
required
|
||||
/>
|
||||
</Field>
|
||||
<Field
|
||||
id={`${idPrefix}-email`}
|
||||
label="Email Perusahaan / Kantor"
|
||||
label={t.form.email}
|
||||
required
|
||||
>
|
||||
<TextInput
|
||||
id={`${idPrefix}-email`}
|
||||
name="email"
|
||||
type="email"
|
||||
placeholder="nama@perusahaan.co.id"
|
||||
placeholder={t.form.emailPlaceholder}
|
||||
required
|
||||
/>
|
||||
</Field>
|
||||
<Field
|
||||
id={`${idPrefix}-phone`}
|
||||
label="No. WhatsApp / Telepon"
|
||||
label={t.form.phone}
|
||||
required
|
||||
>
|
||||
<TextInput
|
||||
@@ -80,14 +77,11 @@ export default function ConsultationForm({ idPrefix }: { idPrefix: string }) {
|
||||
required
|
||||
/>
|
||||
</Field>
|
||||
<Field
|
||||
id={`${idPrefix}-service`}
|
||||
label="Layanan Yang Dibutuhkan"
|
||||
>
|
||||
<Field id={`${idPrefix}-service`} label={t.form.service}>
|
||||
<SelectInput
|
||||
id={`${idPrefix}-service`}
|
||||
name="service"
|
||||
options={serviceOptions}
|
||||
options={serviceOptions(t)}
|
||||
/>
|
||||
</Field>
|
||||
<Button
|
||||
@@ -96,11 +90,10 @@ export default function ConsultationForm({ idPrefix }: { idPrefix: string }) {
|
||||
icon="send"
|
||||
className="mt-2"
|
||||
>
|
||||
Kirim Permintaan Konsultasi
|
||||
{t.form.submit}
|
||||
</Button>
|
||||
<p className="text-on-surface-variant text-center text-[11px]">
|
||||
Non-Disclosure Agreement (NDA) dapat ditandatangani
|
||||
sebelum audit teknis.
|
||||
{t.form.nda}
|
||||
</p>
|
||||
</form>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user