Skip to content

Commit

Permalink
fixed back button issue in plan inbox
Browse files Browse the repository at this point in the history
  • Loading branch information
rachana-egov committed Nov 29, 2024
1 parent 68dd704 commit 799aa24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const ConfirmationPopUp = ({ onClose, alertHeading, alertMessage, submitLabel, u
variation="secondary"
label={t(submitLabel)}
onClick={handleSave}
isDisabled={isSubmitting} // Disable button during submission
isDisabled={isSubmitting || mutation.isLoading} // Disable button during submission
/>,
<Button
key="close-button"
Expand All @@ -68,7 +68,7 @@ const ConfirmationPopUp = ({ onClose, alertHeading, alertMessage, submitLabel, u
variation="primary"
label={t(cancelLabel)}
onClick={onClose}
isDisabled={isSubmitting} // Disable button during submission
isDisabled={isSubmitting || mutation.isLoading} // Disable button during submission
/>,
]}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const PlanInbox = () => {
}, [planObject]);

const fetchStatusCount = async () => {
console.log('fffffffffffffffffffffffffff');
if (planObject) {
try {
await mutation.mutateAsync(
Expand Down Expand Up @@ -804,6 +805,8 @@ const PlanInbox = () => {
userRole = "PLAN_ESTIMATION_APPROVER";
}
});

console.log(!isRootApprover, isStatusConditionMet(totalStatusCount), 'chhhhhhhhhhhhhhhhhhhhhhhhhh');


return (
Expand Down Expand Up @@ -1015,7 +1018,7 @@ labelPrefix={"PLAN_ACTIONS_"}
/>
}

{isRootApprover && isStatusConditionMet(totalStatusCount) && (
{isRootApprover && isStatusConditionMet(totalStatusCount) && planObject?.status === "RESOURCE_ESTIMATION_IN_PROGRESS" && (
<ActionBar
actionFields={[
<Button
Expand All @@ -1034,8 +1037,7 @@ labelPrefix={"PLAN_ACTIONS_"}
/>
)}

{(!isRootApprover && isStatusConditionMet(totalStatusCount) && planObject?.status === "RESOURCE_ESTIMATION_IN_PROGRESS") ||
(disabledAction && (
{((!isRootApprover && isStatusConditionMet(totalStatusCount) ) || disabledAction) && (
<ActionBar
actionFields={[
<Button
Expand All @@ -1053,7 +1055,7 @@ labelPrefix={"PLAN_ACTIONS_"}
sortActionFields
style={{}}
/>
))}
)}

{actionBarPopUp && (
<ConfirmationPopUp
Expand Down

0 comments on commit 799aa24

Please sign in to comment.