From 409acd300d42990310ded1b3553d49474049a9c6 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Tue, 11 Jun 2024 19:01:16 +0100 Subject: [PATCH] employer uid payload added --- .../Dashboard/home/DashboardHomeEmploymentInfo.tsx | 10 +++++----- src/components/shared/InputCompOne.tsx | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx b/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx index 5bae263..add4881 100644 --- a/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx +++ b/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx @@ -27,7 +27,7 @@ const initialValues = { salary_payment_date: "", employment_id: "", highest_eductaion: "", - employer: "", + employer_uid: "", isChecked: false }; @@ -79,7 +79,7 @@ const validationSchema = Yup.object().shape({ .required("Required"), highest_eductaion: Yup.string() .required("Required"), - employer: Yup.string().when('isChecked', { + employer_uid: Yup.string().when('isChecked', { is: false, then: () => Yup.string().required('required'), }), @@ -128,15 +128,15 @@ export default function DashboardHomeEmploymentInfo({handleNextStep}:Props) {
diff --git a/src/components/shared/InputCompOne.tsx b/src/components/shared/InputCompOne.tsx index ca9b296..776876d 100644 --- a/src/components/shared/InputCompOne.tsx +++ b/src/components/shared/InputCompOne.tsx @@ -105,7 +105,7 @@ const InputCompOne = forwardRef( > {selectOptions.loading ? - : selectOptions.data.length && name == 'employer' ? + : selectOptions.data.length && name == 'employer_uid' ? <> {selectOptions.data.map(({ uid, name }) => ( @@ -114,7 +114,7 @@ const InputCompOne = forwardRef( ))} - : selectOptions.data.length && name != 'employer' ? + : selectOptions.data.length && name != 'employer_uid' ? selectOptions.data.map(({ value, label }) => (