Fixed suggested task bug
This commit is contained in:
@@ -64,9 +64,10 @@ const SuggestTask = ({ details, onClose, situation, continuePopupData }) => {
|
||||
<div className="logout-modal-wrapper lw-[90%] md:w-[768px] h-full lg:h-auto 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] border-b dark:border-[#5356fb29] border-light-purple">
|
||||
<h1 className="text-base md:text-lg font-bold text-dark-gray dark:text-white tracking-wide">
|
||||
{pathname === '/acc-family/activities' && "activities"}
|
||||
{pathname === "/manage-family"
|
||||
? `${state?.firstname}'s Suggested Task`
|
||||
: pathname === "/acc-family/activities"
|
||||
? "Suggested Task"
|
||||
: "Suggest to Parent"}
|
||||
</h1>
|
||||
<button
|
||||
@@ -98,7 +99,8 @@ const SuggestTask = ({ details, onClose, situation, continuePopupData }) => {
|
||||
<Formik
|
||||
initialValues={initialValues}
|
||||
onSubmit={
|
||||
pathname !== "/manage-family"
|
||||
pathname !== "/manage-family" ||
|
||||
pathname !== "/acc-family/activities"
|
||||
? handleSuggestedTask
|
||||
: handleParentSuggestion
|
||||
}
|
||||
@@ -123,16 +125,16 @@ const SuggestTask = ({ details, onClose, situation, continuePopupData }) => {
|
||||
<div className="field w-full mb-[15px]">
|
||||
<InputCom
|
||||
fieldClass={
|
||||
pathname ===
|
||||
"/manage-family"
|
||||
pathname === "/manage-family" ||
|
||||
pathname === "/acc-family/activities"
|
||||
? "px-2"
|
||||
: "px-6"
|
||||
}
|
||||
label="Title"
|
||||
labelClass="tracking-wide"
|
||||
inputBg={
|
||||
pathname ===
|
||||
"/manage-family"
|
||||
pathname === "/manage-family" ||
|
||||
pathname === "/acc-family/activities"
|
||||
? "bg-white"
|
||||
: "bg-slate-100"
|
||||
}
|
||||
@@ -169,8 +171,8 @@ const SuggestTask = ({ details, onClose, situation, continuePopupData }) => {
|
||||
id="description"
|
||||
rows="5"
|
||||
className={`input-field pt-2 placeholder:text-base text-dark-gray dark:text-white w-full ${
|
||||
pathname ===
|
||||
"/manage-family"
|
||||
pathname === "/manage-family" ||
|
||||
pathname === "/acc-family/activities"
|
||||
? "px-2 h-[110px]"
|
||||
: "bg-slate-100 px-3 dark:bg-[#11131F] focus:ring-0 focus:outline-[#dce4e9] rounded-[10px] h-[130px]"
|
||||
}`}
|
||||
@@ -183,8 +185,8 @@ const SuggestTask = ({ details, onClose, situation, continuePopupData }) => {
|
||||
</div>
|
||||
|
||||
{/* Radio buttons for family */}
|
||||
{pathname ===
|
||||
"/manage-family" ? (
|
||||
{pathname === "/manage-family" ||
|
||||
pathname === "/acc-family/activities" ? (
|
||||
<div className="h-[20px] w-full border-t dark:border-[#5356fb29] border-light-purple relative">
|
||||
<div id="my-radio-group" className="sr-only">
|
||||
Parent suggested next step
|
||||
@@ -250,8 +252,8 @@ const SuggestTask = ({ details, onClose, situation, continuePopupData }) => {
|
||||
disabled={props.isSubmitting}
|
||||
className="text-white primary-gradient text-18 tracking-wide px-4 py-3 rounded-full transition duration-150 ease-in-out flex items-center"
|
||||
>
|
||||
{pathname !==
|
||||
"/manage-family" ? (
|
||||
{pathname !== "/manage-family" ||
|
||||
pathname === "/acc-family/activities" ? (
|
||||
<>
|
||||
{submitTask.loading
|
||||
? "Submitting Task"
|
||||
|
||||
Reference in New Issue
Block a user