delete job api implementation

This commit was merged in pull request #62.
This commit is contained in:
victorAnumudu
2023-05-12 21:07:17 +01:00
parent c7985e6b48
commit d51c9dc55d
2 changed files with 18 additions and 7 deletions
+11 -3
View File
@@ -13,7 +13,7 @@ const validationSchema = Yup.object().shape({
.max(25, "Maximum 25 characters")
.required("Country is required"),
price: Yup.number()
.typeError("you must specify a number")
.typeError("you must specify a number")
.min(1, "Price must be greater than 0")
.required("Price is required"),
title: Yup.string()
@@ -36,7 +36,7 @@ const validationSchema = Yup.object().shape({
let initialValues = { // initial values for formik
country: '',
price: '',
price: 0,
title: '',
description: '',
job_detail: '',
@@ -137,8 +137,10 @@ function AddJob() {
<select
id='country'
name='country'
value={props.values.country}
className={`input-field p-2 mt-3 rounded-md placeholder:text-base text-dark-gray dark:text-white w-full h-10 bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none`}
onChange={props.handleChange}
onBlur={props.handleBlur}
>
{country.loading ? (
<option className="text-slate-500 text-lg" value="">
@@ -179,11 +181,13 @@ function AddJob() {
label="Price"
labelClass='tracking-wide'
inputBg = 'bg-slate-100'
type="text"
type="number"
name="price"
fieldClass='text-right'
// placeholder="Please Enter Amount"
value={props.values.price}
inputHandler={props.handleChange}
blurHandler={props.handleBlur}
/>
{props.errors.price && props.touched.price && (
<p className="text-sm text-red-500">
@@ -206,6 +210,7 @@ function AddJob() {
// placeholder="Enter Job Title"
value={props.values.title}
inputHandler={props.handleChange}
blurHandler={props.handleBlur}
/>
{props.errors.title && props.touched.title && (
<p className="text-sm text-red-500">
@@ -226,6 +231,7 @@ function AddJob() {
// placeholder="Enter a description"
value={props.values.description}
inputHandler={props.handleChange}
blurHandler={props.handleBlur}
/>
{props.errors.description && props.touched.description && (
<p className="text-sm text-red-500">
@@ -258,6 +264,7 @@ function AddJob() {
name='job_detail'
value={props.values.job_detail}
onChange={props.handleChange}
onBlur={props.handleBlur}
/>
{props.errors.job_detail && props.touched.job_detail && (
<p className="text-sm text-red-500">
@@ -278,6 +285,7 @@ function AddJob() {
// placeholder="Please Enter Detail Description of Job"
value={props.values.timeline_days}
inputHandler={props.handleChange}
blurHandler={props.handleBlur}
/>
{props.errors.timeline_days && props.touched.timeline_days && (
<p className="text-sm text-red-500">