summaryrefslogtreecommitdiff
path: root/src/lib/form/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/form/components')
-rw-r--r--src/lib/form/components/KunjunganService.jsx66
-rw-r--r--src/lib/form/components/Merchant.jsx4
-rw-r--r--src/lib/form/components/PembayaranTempo.jsx2
-rw-r--r--src/lib/form/components/SuratDukungan.jsx2
4 files changed, 45 insertions, 29 deletions
diff --git a/src/lib/form/components/KunjunganService.jsx b/src/lib/form/components/KunjunganService.jsx
index 7797444d..076f6814 100644
--- a/src/lib/form/components/KunjunganService.jsx
+++ b/src/lib/form/components/KunjunganService.jsx
@@ -41,18 +41,32 @@ const CreateKunjunganService = () => {
}
const data = {
...values,
- name : 'Pengajuan Kunjungan Service - ' + values.company,
- contact_name : values.cp,
- email_from : values.email,
- phone : values.mobile,
- description : "\r\n Nama Perusahaan : " + values.company + " \r\n Alamat : " + values.address + " \r\n Propinsi : " + values.city + " \r\n Telepon: " + values.phone + " \r\n Handphone : " + values.mobile +" \r\n Email : " + values.email + " \r\n Keterangan : " + values.description ,
+ name: 'Pengajuan Kunjungan Service - ' + values.company,
+ contact_name: values.cp,
+ email_from: values.email,
+ phone: values.mobile,
+ description:
+ '\r\n Nama Perusahaan : ' +
+ values.company +
+ ' \r\n Alamat : ' +
+ values.address +
+ ' \r\n Propinsi : ' +
+ values.city +
+ ' \r\n Telepon: ' +
+ values.phone +
+ ' \r\n Handphone : ' +
+ values.mobile +
+ ' \r\n Email : ' +
+ values.email +
+ ' \r\n Keterangan : ' +
+ values.description
}
const create_leads = await createLeadApi({ data })
if (create_leads) {
toast.success('Berhasil menambahkan alamat')
reset()
- recaptchaRef.current.reset()
+ recaptchaRef.current.reset()
}
}
return (
@@ -125,9 +139,7 @@ const CreateKunjunganService = () => {
type='text'
className='form-input'
/>
- <div className='text-caption-2 text-danger-500 mt-1'>
- {errors.cp?.message}
- </div>
+ <div className='text-caption-2 text-danger-500 mt-1'>{errors.cp?.message}</div>
</div>
</div>
<div className='grid grid-cols-1 md:grid-cols-2 gap-4 mt-4'>
@@ -156,7 +168,9 @@ const CreateKunjunganService = () => {
</div>
<div className='grid grid-cols-1 md:grid-cols-2 gap-4 mt-4'>
<div>
- <label className='form-label mb-2'>Sebutkan: Merek, Tipe, Permasalahan, Service, Perawatan</label>
+ <label className='form-label mb-2'>
+ Sebutkan: Merek, Tipe, Permasalahan, Service, Perawatan
+ </label>
<textarea {...register('description')} type='text' className='form-input' />
<div className='text-caption-2 text-danger-500 mt-1'>
{errors.description?.message}
@@ -181,24 +195,24 @@ const CreateKunjunganService = () => {
)
}
const validationSchema = Yup.object().shape({
- company: Yup.string().required('Harus di-isi'),
- email: Yup.string().email('Format harus seperti contoh@email.com').required('Harus di-isi'),
- phone: Yup.string().required('Harus di-isi'),
- city: Yup.string().required('Harus di-isi'),
- cp: Yup.string().required('Harus di-isi'),
- mobile: Yup.string().required('Harus di-isi'),
- email: Yup.string().required('Harus di-isi'),
- address: Yup.string().required('Harus di-isi')
+ company: Yup.string().required('Harus di-isi'),
+ email: Yup.string().email('Format harus seperti contoh@email.com').required('Harus di-isi'),
+ phone: Yup.string().required('Harus di-isi'),
+ city: Yup.string().required('Harus di-isi'),
+ cp: Yup.string().required('Harus di-isi'),
+ mobile: Yup.string().required('Harus di-isi'),
+ email: Yup.string().required('Harus di-isi'),
+ address: Yup.string().required('Harus di-isi')
})
const defaultValues = {
- company:'',
- email: '',
- phone: '',
- city: '',
- cp: '',
- mobile: '',
- email: '',
- address: ''
+ company: '',
+ email: '',
+ phone: '',
+ city: '',
+ cp: '',
+ mobile: '',
+ email: '',
+ address: ''
}
export default CreateKunjunganService
diff --git a/src/lib/form/components/Merchant.jsx b/src/lib/form/components/Merchant.jsx
index beb50f50..75b4e132 100644
--- a/src/lib/form/components/Merchant.jsx
+++ b/src/lib/form/components/Merchant.jsx
@@ -168,7 +168,9 @@ const CreateMerchant = () => {
control={control}
render={(props) => <HookFormSelect {...props} options={company_unit} />}
/>
- <div className='text-caption-2 text-danger-500 mt-1'>{errors.company_unit?.message}</div>
+ <div className='text-caption-2 text-danger-500 mt-1'>
+ {errors.company_unit?.message}
+ </div>
</div>
</div>
<div className='grid grid-cols-1 md:grid-cols-2 gap-4 mt-4'>
diff --git a/src/lib/form/components/PembayaranTempo.jsx b/src/lib/form/components/PembayaranTempo.jsx
index 5f32753e..ffdb0961 100644
--- a/src/lib/form/components/PembayaranTempo.jsx
+++ b/src/lib/form/components/PembayaranTempo.jsx
@@ -52,7 +52,7 @@ const PembayaranTempo = () => {
return (
<div className='container mx-auto p-4 md:p-0 my-0 md:my-10'>
<h1 className='text-h-sm md:text-title-sm font-semibold mb-6'>Pembayaran Tempo</h1>
-
+
<div className='w-full grid grid-cols-1 md:grid-cols-2'>
<form onSubmit={handleSubmit(onSubmitHandler)} className='grid grid-cols-1 gap-y-6'>
<div>
diff --git a/src/lib/form/components/SuratDukungan.jsx b/src/lib/form/components/SuratDukungan.jsx
index 3d90c2a9..0eab84a4 100644
--- a/src/lib/form/components/SuratDukungan.jsx
+++ b/src/lib/form/components/SuratDukungan.jsx
@@ -215,7 +215,7 @@ const defaultValues = {
npwp: '',
email: '',
address: '',
- address2: '',
+ address2: ''
}
export default CreateSuratDukungan