From 593dd8e50a55e7e33fe0a672c382e1228b0bb6bc Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 14 Apr 2023 15:21:49 +0700
Subject: fix

---
 src/lib/form/components/KunjunganSales.jsx | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

(limited to 'src/lib/form/components/KunjunganSales.jsx')

diff --git a/src/lib/form/components/KunjunganSales.jsx b/src/lib/form/components/KunjunganSales.jsx
index bb7df05b..38a07345 100644
--- a/src/lib/form/components/KunjunganSales.jsx
+++ b/src/lib/form/components/KunjunganSales.jsx
@@ -47,22 +47,20 @@ const KunjunganSales = () => {
       return
     }
 
-    const descriptions = [
-      `Nama Perusahaan: ${values.company}`,
-      `No. Telepon: ${values.phone}`,
-      `Alamat Lengkap: ${values.address}`,
-      `Kota: ${values.city}`,
-      `Unit Perusahaan: ${values.companyType}`,
-      `No. Handphone: ${values.mobile}`,
-      `Alamat Email: ${values.email}`,
-      `Keterangan: ${values.description}`
-    ]
-
     const data = {
-      name: `Permintaan Kunjungan Sales - ${values.company}`,
+      name: `Pengajuan Kunjungan Sales - ${values.company}`,
       email_from: values.email,
       phone: values.phone,
-      description: descriptions.join('\n')
+      description: [
+        `Nama Perusahaan: ${values.company}`,
+        `No. Telepon: ${values.phone}`,
+        `Alamat Lengkap: ${values.address}`,
+        `Kota: ${values.city}`,
+        `Unit Perusahaan: ${values.companyType}`,
+        `No. Handphone: ${values.mobile}`,
+        `Alamat Email: ${values.email}`,
+        `Keterangan: ${values.description}`
+      ].join('\n')
     }
 
     const createLead = await createLeadApi({ data })
@@ -168,7 +166,6 @@ const KunjunganSales = () => {
           <div>
             <label className='form-label mb-2'>Keterangan</label>
             <textarea {...register('description')} type='text' className='form-input' />
-            <div className='text-caption-2 text-danger-500 mt-1'>{errors.description?.message}</div>
           </div>
 
           <ReCAPTCHA ref={recaptchaRef} sitekey={process.env.NEXT_PUBLIC_RECAPTCHA_GOOGLE} />
@@ -181,6 +178,7 @@ const KunjunganSales = () => {
     </div>
   )
 }
+
 const validationSchema = Yup.object().shape({
   email: Yup.string().email('Format harus seperti contoh@email.com').required('Harus di-isi'),
   company: Yup.string().required('Harus di-isi'),
@@ -189,6 +187,7 @@ const validationSchema = Yup.object().shape({
   address: Yup.string().required('Harus di-isi'),
   city: Yup.string().required('Harus dipilih')
 })
+
 const defaultValues = {
   email: '',
   company: '',
-- 
cgit v1.2.3

