.
This commit was merged in pull request #115.
This commit is contained in:
@@ -6,7 +6,7 @@ import usersService from "../../services/UsersService";
|
|||||||
|
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
import { Form, Formik } from "formik";
|
import { Field, Form, Formik } from "formik";
|
||||||
import * as Yup from "yup";
|
import * as Yup from "yup";
|
||||||
|
|
||||||
const validationSchema = Yup.object().shape({
|
const validationSchema = Yup.object().shape({
|
||||||
@@ -50,7 +50,7 @@ function AddJob() {
|
|||||||
const ApiCall = new usersService();
|
const ApiCall = new usersService();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
let {userDetails} = useSelector((state)=> state.userDetails)
|
let { userDetails } = useSelector((state) => state.userDetails);
|
||||||
|
|
||||||
let [pageLoading, setPageLoading] = useState(true); // State used for knowing when the page is mounting
|
let [pageLoading, setPageLoading] = useState(true); // State used for knowing when the page is mounting
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ function AddJob() {
|
|||||||
Select...
|
Select...
|
||||||
</option>
|
</option>
|
||||||
{country.data.map((item, index) => {
|
{country.data.map((item, index) => {
|
||||||
if(item[0] == userDetails.country){
|
if (item[0] == userDetails.country) {
|
||||||
return (
|
return (
|
||||||
<option
|
<option
|
||||||
key={index}
|
key={index}
|
||||||
@@ -208,7 +208,7 @@ function AddJob() {
|
|||||||
>
|
>
|
||||||
{item[1]}
|
{item[1]}
|
||||||
</option>
|
</option>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
@@ -316,19 +316,34 @@ function AddJob() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="field w-full mb-6">
|
<div className="field w-full mb-6">
|
||||||
<InputCom
|
<div className={`flex items-center justify-between mb-2.5`}>
|
||||||
fieldClass="px-6"
|
<label
|
||||||
label="Timeline"
|
className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold block"
|
||||||
labelClass="tracking-wide"
|
htmlFor="timeline_days"
|
||||||
inputBg="bg-slate-100"
|
>
|
||||||
type="text"
|
Timeline
|
||||||
|
<span className="text-green-700 text-sm tracking-wide">
|
||||||
|
- Expected duration of this task
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
component="select"
|
||||||
name="timeline_days"
|
name="timeline_days"
|
||||||
spanTag=" - Expected duration of this task"
|
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"
|
||||||
// placeholder="Please Enter Detail Description of Job"
|
|
||||||
value={props.values.timeline_days}
|
value={props.values.timeline_days}
|
||||||
inputHandler={props.handleChange}
|
>
|
||||||
blurHandler={props.handleBlur}
|
<option value="">Select Duration</option>
|
||||||
/>
|
{publicArray.map(({ name, duration }, idx) => (
|
||||||
|
<option
|
||||||
|
className="text-slate-500 text-lg"
|
||||||
|
value={duration}
|
||||||
|
>
|
||||||
|
{name}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</Field>
|
||||||
{props.errors.timeline_days &&
|
{props.errors.timeline_days &&
|
||||||
props.touched.timeline_days && (
|
props.touched.timeline_days && (
|
||||||
<p className="text-sm text-red-500">
|
<p className="text-sm text-red-500">
|
||||||
@@ -396,3 +411,16 @@ function AddJob() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default AddJob;
|
export default AddJob;
|
||||||
|
|
||||||
|
const publicArray = [
|
||||||
|
{ duration: 1, name: "1 day" },
|
||||||
|
{ duration: 2, name: "2 days" },
|
||||||
|
{ duration: 3, name: "3 days" },
|
||||||
|
{ duration: 4, name: "4 days" },
|
||||||
|
{ duration: 5, name: "5 days" },
|
||||||
|
{ duration: 6, name: "6 days" },
|
||||||
|
{ duration: 7, name: "1 week" },
|
||||||
|
{ duration: 14, name: "2 weeks" },
|
||||||
|
{ duration: 21, name: "3 weeks" },
|
||||||
|
{ duration: 28, name: "4 weeks" },
|
||||||
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user