Compare commits

...

3 Commits

Author SHA1 Message Date
victorAnumudu 9f11e8b415 input error position changed 2023-07-03 19:32:18 +01:00
CHIEFSOFT\ameye a1d74b773d family pictures 2023-07-02 19:30:48 -04:00
ameye 7969199584 Merge branch 'blog-count' of WrenchBoard/Users-Wrench into master 2023-07-02 21:44:55 +00:00
8 changed files with 18 additions and 28 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

+13 -21
View File
@@ -23,15 +23,15 @@ const validationSchema = Yup.object().shape({
}) })
.required("Price is required"), .required("Price is required"),
title: Yup.string() title: Yup.string()
.min(3, "Minimum 3 characters") .min(25, "Minimum 25 characters")
.max(100, "Maximum 25 characters") .max(45, "Maximum 45 characters")
.required("Title is required"), .required("Title is required"),
description: Yup.string() description: Yup.string()
.min(3, "Minimum 3 characters") .min(25, "Minimum 25 characters")
.max(250, "Maximum 250 characters") .max(250, "Maximum 250 characters")
.required("Description is required"), .required("Description is required"),
job_detail: Yup.string() job_detail: Yup.string()
.min(3, "Minimum 3 characters") .min(25, "Minimum 25 characters")
.max(250, "Maximum 250 characters") .max(250, "Maximum 250 characters")
.required("Details is required"), .required("Details is required"),
timeline_days: Yup.number() timeline_days: Yup.number()
@@ -162,19 +162,16 @@ function AddJob({ popUpHandler, categories }) {
<div className="field w-full mb-6 xl:mb-0"> <div className="field w-full mb-6 xl:mb-0">
<label <label
htmlFor="country" htmlFor="country"
className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold block" className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold flex item-center gap-1"
> >
Currency Currency
{props.errors.country && props.touched.country && <span className="text-[12px] text-red-500">{props.errors.country}</span>}
</label> </label>
<select <select
id="country" id="country"
name="country" name="country"
value={props.values.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 ${ 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`}
props.errors.country && props.touched.country
? "border-[#ff0a0a63] shadow-red-500 border-[0.5px] animate-shake"
: "border border-[#f5f8fa] dark:border-[#5e6278]"
}`}
onChange={props.handleChange} onChange={props.handleChange}
onBlur={props.handleBlur} onBlur={props.handleBlur}
> >
@@ -218,7 +215,7 @@ function AddJob({ popUpHandler, categories }) {
value={props.values.price} value={props.values.price}
inputHandler={props.handleChange} inputHandler={props.handleChange}
blurHandler={props.handleBlur} blurHandler={props.handleBlur}
errorBorder={props.errors.price && props.touched.price} error={props.errors.price && props.touched.price && props.errors.price}
/> />
</div> </div>
</div> </div>
@@ -236,7 +233,7 @@ function AddJob({ popUpHandler, categories }) {
value={props.values.title} value={props.values.title}
inputHandler={props.handleChange} inputHandler={props.handleChange}
blurHandler={props.handleBlur} blurHandler={props.handleBlur}
errorBorder={props.errors.title && props.touched.title} error={props.errors.title && props.touched.title && props.errors.title}
/> />
</div> </div>
@@ -252,9 +249,7 @@ function AddJob({ popUpHandler, categories }) {
value={props.values.description} value={props.values.description}
inputHandler={props.handleChange} inputHandler={props.handleChange}
blurHandler={props.handleBlur} blurHandler={props.handleBlur}
errorBorder={ error={props.errors.description && props.touched.description && props.errors.description}
props.errors.description && props.touched.description
}
/> />
</div> </div>
@@ -263,18 +258,15 @@ function AddJob({ popUpHandler, categories }) {
<div className="sm:w-[60%] w-full"> <div className="sm:w-[60%] w-full">
<label <label
htmlFor="Job Delivery Details" htmlFor="Job Delivery Details"
className='className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold block"' className='className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold flex items-center gap-1'
> >
Job Delivery Details Job Delivery Details
{props.errors.job_detail && props.touched.job_detail && <span className="text-[12px] text-red-500">{props.errors.job_detail}</span>}
</label> </label>
<textarea <textarea
id="Job Delivery Details" id="Job Delivery Details"
rows="5" rows="5"
className={`input-field px-3 py-2 placeholder:text-base text-dark-gray dark:text-white w-full h-[100px] bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-[#dce4e9] ${ className={`input-field px-3 py-2 placeholder:text-base text-dark-gray dark:text-white w-full h-[100px] bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-[#dce4e9] rounded-[10px]`}
props.errors.job_detail && props.touched.job_detail
? "border-[#ff0a0a63] shadow-red-500 border-[0.5px] animate-shake"
: "border border-[#f5f8fa] dark:border-[#5e6278]"
} rounded-[10px]`}
style={{ resize: "none" }} style={{ resize: "none" }}
name="job_detail" name="job_detail"
value={props.values.job_detail} value={props.values.job_detail}
@@ -22,7 +22,7 @@ export default function InputCom({
spanTag, spanTag,
inputBg, inputBg,
direction, direction,
errorBorder, error,
}) { }) {
const inputRef = useRef(null); const inputRef = useRef(null);
// Entry Validation // Entry Validation
@@ -48,7 +48,7 @@ export default function InputCom({
<div className={`flex items-center justify-between mb-2.5 ${labelClass}`}> <div className={`flex items-center justify-between mb-2.5 ${labelClass}`}>
{label && ( {label && (
<label <label
className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold block" className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold flex items-center gap-1"
htmlFor={name} htmlFor={name}
> >
{label} {label}
@@ -62,6 +62,8 @@ export default function InputCom({
{spanTag} {spanTag}
</span> </span>
)} )}
{/* displays error is any */}
{error && <span className="text-[12px] text-red-500">{error}</span>}
</label> </label>
)} )}
{forgotPassword && ( {forgotPassword && (
@@ -74,11 +76,7 @@ export default function InputCom({
)} )}
</div> </div>
<div <div
className={`input-wrapper border ${ className={`input-wrapper border w-full rounded-full h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] text-base ${inputClass}`}
errorBorder
? "border-[#ff0a0a63] border-[0.5px] shadow-red-500 animate-shake"
: "border border-[#f5f8fa] dark:border-[#5e6278]"
} w-full rounded-full h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] text-base ${inputClass}`}
> >
<input <input
placeholder={placeholder} placeholder={placeholder}