import React from "react"; import { Button, InputCompOne } from ".."; import {Formik, Form} from 'formik' import * as Yup from "yup"; const initialValues = { salary_acct: "", confirm_salary_acct: false, qualification: "", doe: "", gl: "", ippis: "", employer_name: "", designation: "", checked: false }; // To get the validation schema const validationSchema = Yup.object().shape({ salary_acct: Yup.string() .required("Required") .test("no-e", "Invalid number", (value:any) => { if (value && /^[0-9]*$/.test(value) == false) { return false; } return true; }) .min(10, "must be 10 digits") .max(10, "must be 10 digits"), confirm_salary_acct: Yup.bool() // use bool instead of boolean .oneOf([true], "You must check the box"), qualification: Yup.string() .required("Required"), doe: Yup.string() .required("BVN is required"), gl: Yup.string() .required("Required"), ippis: Yup.string(), employer_name: Yup.string() .required("Required"), designation: Yup.string() .required("Required"), checked: Yup.bool() // use bool instead of boolean .oneOf([true], "You must accept that the information here is correct"), }); const EmployerValidation: React.FC= () => { // const inputRef = useRef(null); // const handleInput = (e: React.FormEvent) => { // const { name, value } = e.target as HTMLInputElement; // if (name === "bvn") { // const isNumeric = /^[0-9]+$/.test(value); // if (isNumeric) { // if (value.length === 10) { // setHideOTPComponent(false); // } else { // setHideOTPComponent(true); // } // } else { // console.log("Invalid BVN"); // } // } // }; //FUNCTION TO HANDLE SUBMIT const handleSubmit = (values:any) => { console.log(values) }; return ( <> {/* Header */}

EMPLOYER'S COMMITMENT AND VALIDATION

(This is to be filled and validated by the employer of the applicant)

{(props)=>(

We hereby confirm that Mr Victor Badmus (The Applicant) who applied for our loan facility is a permanent and confirmed (Non-contract) staff of Globalcom Nigeria limited and that he is actively on the company's payroll

We hereby irrevocably and unconditionally undertake to domicile his/her salaries to First City Monument Bank Ltd (FCMB) Accounts number.

Confirms Employee's salary account number {(props.errors.salary_acct && props.touched.salary_acct) && {props.errors.salary_acct} }

{(props.errors.confirm_salary_acct && props.touched.confirm_salary_acct) && {props.errors.confirm_salary_acct} }

We further undertake that we shall not change the domiciliation of the applicant's account from FCMB throughout the tenor of the loan and any extension thereof unless with your written consent stating that the applicant is no longer indebted to the Bank.

We agree to notigy you within 14 days in the event of transfer of the applicant from his/her present location, any change in the employment status or disengagement from the service of our organization or death of the applicant and shall pay his/her benefits, if applicable (excluding Pension Contribution) to the designated FCMB Account number above or issue a cheque or bank draft in favour of We further consent to any additional salary plus facility enhancement that may be obtained by the Beneficiary from your Bank subject to the Bank carrying out a due diligence as to the status of the Beneficiary's employment with our company prior to the approval of the facility Our commitment/consent and undertaking as stated above extends to cover additinal facilities of any kind that may be obtained from your Bank by any of the above mentioned Beneficiary(ies).

This Undertaking is given in good faith and shall remain irrevocable except with the written consent of the Bank.

Thank you.

Employers Validation

We hereby accept that all the information provided about the applicant (your employee) is true and correct to the best of our knowledge

{props.errors.checked && props.touched.checked && {props.errors.checked}}
{/* submit button */}
)}
); }; export default EmployerValidation; interface SelectOption { loading: boolean; data: {value: string; label: string}[] } const titleOptions: SelectOption = { loading: false, data: [ { value: "", label: "Select" }, { value: "m.sc", label: "M.sc" }, { value: "b.sc", label: "B.sc" }, { value: "p.hd", label: "P.hd" }, { value: "fslc", label: "FSLC" }, ] }