Compare commits

...

5 Commits

Author SHA1 Message Date
victorAnumudu 7089b8f14b fixed popout header style 2024-03-21 13:38:01 +01:00
ameye 781f5cc5a6 Merge branch 'add-group-email' of WrenchBoard/Users-Wrench into master 2024-03-21 11:33:48 +00:00
ameye 58097d8b57 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-03-21 11:33:41 +00:00
Ebube ed9f2dec0e fixed link location 2024-03-21 12:01:32 +01:00
Ebube d2ed29c6a6 fixed link location 2024-03-21 11:53:58 +01:00
4 changed files with 85 additions and 21 deletions
+10 -1
View File
@@ -21,5 +21,14 @@
"emmet.triggerExpansionOnTab": true, "emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": { "emmet.includeLanguages": {
"javascript": "javascriptreact" "javascript": "javascriptreact"
} },
"cSpell.words": [
"completesignuplink",
"MOBILEUSER",
"MYFILES",
"mynotifications",
"PASSWORDRESET",
"TRANSFERSTART",
"WRENCHBOARD"
]
} }
+61 -9
View File
@@ -24,12 +24,6 @@ export default function MemberList({
const handleFieldsChange = ({ target: { name, value } }) => { const handleFieldsChange = ({ target: { name, value } }) => {
setFields((prev) => ({ ...prev, [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 == "") { if (value == "") {
setRequestState({ setRequestState({
@@ -89,6 +83,63 @@ export default function MemberList({
// return // 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 //checks if email is a valid email address
let regEx = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/; let regEx = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/;
if (!EmailValidator(fields.email)) { if (!EmailValidator(fields.email)) {
@@ -201,7 +252,7 @@ export default function MemberList({
{selectedGroup?.name} {selectedGroup?.name}
</h1> </h1>
<div className="w-full flex flex-col-reverse lg:flex-col"> <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="relative grid grid-cols-1 sm:grid-cols-2 gap-2 place-content-center">
<div className="input-item"> <div className="input-item">
<InputCom <InputCom
@@ -268,10 +319,11 @@ export default function MemberList({
</button> </button>
)} )}
</div> </div>
</div>
<div className="absolute top-full w-full my-1 text-center">
{!requestState.loading && requestState.message && ( {!requestState.loading && requestState.message && (
<p <p
className={`text-lg absolute -bottom-7 left-0 ${ className={`text-base ${
requestState.status ? "text-green-500" : "text-red-500" requestState.status ? "text-green-500" : "text-red-500"
}`} }`}
> >
@@ -119,8 +119,8 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
return ( return (
<ModalCom action={onClose} situation={situation}> <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-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]"> <div className="modal-header-con">
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide"> <h1 className="modal-title">
{details.offer_code} {details.offer_code}
</h1> </h1>
<CloseIcon onClose={onClose} /> <CloseIcon onClose={onClose} />
@@ -153,7 +153,7 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
}, },
].map(({ name, content, danger }, idx) => ( ].map(({ name, content, danger }, idx) => (
<div className={`my-3 md:flex items-center`} key={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} {name}
</label> </label>
<div <div
@@ -198,7 +198,7 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
<hr /> <hr />
<div className="w-full flex flex-col gap-3"> <div className="w-full flex flex-col gap-3">
<div className="w-full"> <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: If you have any questions about this task:
</label> </label>
<textarea <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="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="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"> <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? Interested in the task?
</p> </p>
<hr /> <hr />
@@ -270,10 +270,13 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
<div className="text-slate-900"> <div className="text-slate-900">
<p className="flex items-center tracking-wide"> <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> </p>
<hr /> <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>
</div> </div>
<button <button
@@ -296,7 +299,7 @@ export default MarketPopUp;
const CloseIcon = ({ onClose }) => ( const CloseIcon = ({ onClose }) => (
<button <button
type="button" type="button"
className="text-[#374557] dark:text-red-500" className="modal-close-btn"
onClick={onClose} onClick={onClose}
> >
<svg <svg
+3 -3
View File
@@ -546,13 +546,13 @@ function ActiveJobs(props) {
{/* MESSAGE SECTION */} {/* MESSAGE SECTION */}
<div className="w-full lg:w-1/2"> <div className="w-full lg:w-1/2">
<div className="flex justify-between items-center gap-5"> <div className="flex justify-between items-center gap-5 justify-between">
<p className="w-full text-lg font-bold text-dark-gray dark:text-white tracking-wide flex items-center gap-2"> <p className="w-full text-lg font-bold text-dark-gray dark:text-white tracking-wide flex items-center gap-2 justify-between">
<span>Message</span> <span>Message</span>
<button <button
type="button" type="button"
onClick={popUpHandler} onClick={popUpHandler}
className="text-[12px] tracking-wider text-emerald-600 dark:text-emerald-300" className="text-[12px] tracking-wider text-gray-400 dark:text-slate-400"
> >
View all View all
</button> </button>