Compare commits

...

6 Commits

5 changed files with 102 additions and 24 deletions
@@ -453,7 +453,7 @@ const AssignTaskPopout = ({
</div>
{/* BTN */}
<div className="py-2 px-4 border-t-2 flex justify-between items-center">
<div className="modal-footer-wrapper">
{/* error or success display */}
<div className="w-auto h-auto flex items-center">
{requestStatus.message != "" &&
@@ -480,7 +480,7 @@ const AssignTaskPopout = ({
disabled={requestStatus.loading}
onClick={action}
type="button"
className="w-20 h-11 flex justify-center items-center border-gradient text-base rounded-full text-white cursor-pointer"
className="custom-btn border-gradient"
>
<span className="text-gradient">Close</span>
</button>
@@ -492,7 +492,7 @@ const AssignTaskPopout = ({
type="button"
disabled={requestStatus.loading}
onClick={assignFamilyTask}
className="px-1 w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white cursor-pointer"
className="custom-btn btn-gradient text-white"
>
Assign
</button>
+61 -9
View File
@@ -24,12 +24,6 @@ export default function MemberList({
const handleFieldsChange = ({ target: { name, value } }) => {
setFields((prev) => ({ ...prev, [name]: value }));
// let error = requestState?.errors?.indexOf(name) //// checks if the input field was in error array and removes it when the input changes
// if(error >= 0){
// let oldErrorArr = requestState.errors
// let newErrorArr = oldErrorArr.splice(error, 1)
// setRequestState(prev => ({...prev, errors:oldErrorArr}))
// }
if (value == "") {
setRequestState({
@@ -89,6 +83,63 @@ export default function MemberList({
// return
// }
if(fields.firstname.length > 25){ // checks if firstname length is more than 25
setRequestState({
loading: false,
status: false,
message: "Firstname must not be more than 25 characters",
data: [],
errors: [],
});
return setTimeout(() => {
setRequestState({
loading: false,
status: false,
message: "",
data: [],
errors: [],
});
}, 3000);
}
if(fields.lastname.length > 25){ // checks if lastname length is more than 25
setRequestState({
loading: false,
status: false,
message: "Lastname must not be more than 25 characters",
data: [],
errors: [],
});
return setTimeout(() => {
setRequestState({
loading: false,
status: false,
message: "",
data: [],
errors: [],
});
}, 3000);
}
if(fields.email.length > 45){ // checks if email length is more than 45
setRequestState({
loading: false,
status: false,
message: "Email must not be more than 45 characters",
data: [],
errors: [],
});
return setTimeout(() => {
setRequestState({
loading: false,
status: false,
message: "",
data: [],
errors: [],
});
}, 3000);
}
//checks if email is a valid email address
let regEx = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/;
if (!EmailValidator(fields.email)) {
@@ -201,7 +252,7 @@ export default function MemberList({
{selectedGroup?.name}
</h1>
<div className="w-full flex flex-col-reverse lg:flex-col">
<div className="py-3 w-full">
<div className="relative py-3 w-full">
<div className="relative grid grid-cols-1 sm:grid-cols-2 gap-2 place-content-center">
<div className="input-item">
<InputCom
@@ -268,10 +319,11 @@ export default function MemberList({
</button>
)}
</div>
</div>
<div className="absolute top-full w-full my-1 text-center">
{!requestState.loading && requestState.message && (
<p
className={`text-lg absolute -bottom-7 left-0 ${
className={`text-base ${
requestState.status ? "text-green-500" : "text-red-500"
}`}
>
@@ -119,8 +119,8 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
return (
<ModalCom action={onClose} situation={situation}>
<div className="logout-modal-wrapper w-11/12 md:w-[650px] md:h-[580px] h-full bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
<div className="logout-modal-header w-full flex items-center justify-between lg:p-6 px-[30px] py-[23px]">
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
<div className="modal-header-con">
<h1 className="modal-title">
{details.offer_code}
</h1>
<CloseIcon onClose={onClose} />
@@ -153,7 +153,7 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
},
].map(({ name, content, danger }, idx) => (
<div className={`my-3 md:flex items-center`} key={idx}>
<label className="w-full md:w-[19%] tracking-wide font-semibold whitespace-pre-wrap">
<label className="job-label w-full md:w-[19%]">
{name}
</label>
<div
@@ -198,7 +198,7 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
<hr />
<div className="w-full flex flex-col gap-3">
<div className="w-full">
<label className="w-full text-slate-900 dark:text-white tracking-wide font-semibold">
<label className="job-label w-full">
If you have any questions about this task:
</label>
<textarea
@@ -235,7 +235,7 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
<div className="w-full md:w-[23%] h-full flex flex-col">
<div className="mx-auto bg-[#f1f8ff] dark:bg-[#C2C8D3] px-4 rounded-md md:min-h-[420px] flex flex-col justify-between">
<div className="w-full flex flex-col justify-center pb-4 gap-2">
<p className="w-full text-slate-900 tracking-wide my-1 font-semibold">
<p className="job-label w-full">
Interested in the task?
</p>
<hr />
@@ -270,10 +270,13 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
<div className="text-slate-900">
<p className="flex items-center tracking-wide">
Interest: <b className="ml-1">{details.interest_count}</b>
<span className="job-label">Interest: </span> <b className="ml-1">{details.interest_count}</b>
</p>
<hr />
<p className="my-1">Expire: {details.expire}</p>
<p className="my-1 flex flex-col">
<span className="job-label">Expire: </span>
<span> {new Date(details.expire).toLocaleString()} </span>
</p>
</div>
</div>
<button
@@ -296,7 +299,7 @@ export default MarketPopUp;
const CloseIcon = ({ onClose }) => (
<button
type="button"
className="text-[#374557] dark:text-red-500"
className="modal-close-btn"
onClick={onClose}
>
<svg
+14 -2
View File
@@ -4,6 +4,7 @@ import Layout from "../Partials/Layout";
import MyJobTable from "./MyJobTable";
import CommonHead from "../UserHeader/CommonHead";
import AddJobPage from "../../views/AddJobPage";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
export default function MyJobs(props) {
let { state } = useLocation();
@@ -32,8 +33,8 @@ export default function MyJobs(props) {
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
<div className="sm:flex items-center mb-6">
<div className="mb-5 sm:mb-0">
<div className="sm:flex items-center mb-2">
<div className="w-full">
<h1 className="text-26 font-bold flex items-center space-x-1 text-dark-gray dark:text-white gap-2">
<span>My Jobs</span>
@@ -46,6 +47,17 @@ export default function MyJobs(props) {
</h1>
</div>
</div>
<div className="mb-5">
<CustomBreadcrumb
// title = 'My Jobs'
breadcrumb={
[
{ link: "/", title: "Home" },
{ link: "/myjobs", title: "My Jobs", active: true},
]
}
/>
</div>
<MyJobTable MyJobList={props.MyJobList} />
</div>
</div>
+13 -2
View File
@@ -160,7 +160,8 @@
@apply flex items-center gap-2
}
/* style for all modal header */
/* STYLES FOR MODAL */
/* Modal Header */
.modal-header-con{
@apply w-full flex items-center justify-between lg:px-10 lg:py-8 px-[30px] py-[23px] bg-sky-blue/50 border-b dark:border-[#5356fb29] border-light-purple
}
@@ -170,7 +171,17 @@
.modal-close-btn{
@apply text-[#000] dark:text-red-500
}
/* end of style for all modal header */
/* modal footer */
.modal-footer-wrapper{
@apply py-2 px-4 border-t-2 flex justify-between items-center
}
/* END OF STYLES FOR MODAL BOX */
/* STYLES FOR BUTTON */
.custom-btn {
@apply min-w-[80px] h-11 flex justify-center items-center text-base rounded-full cursor-pointer
}
}
/* ===================== EXTRA ===================== */