Skip to content

Commit

Permalink
Merge pull request #263 from jadmsaadaot/SUBMIT-task#251
Browse files Browse the repository at this point in the history
Fix - save and exit disabled
  • Loading branch information
jadmsaadaot authored Jan 28, 2025
2 parents 7c10d13 + 3a29601 commit 607cf68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function ActionButtons() {
const navigate = useNavigate();

const handleSaveAndClose = async () => {
if (!isDirty) {
if (!isDirty || isSaveDisabled) {
navigate({
to: `/staff/projects/${projectId}/submission-packages/${submissionPackageId}`,
});
Expand Down Expand Up @@ -202,7 +202,7 @@ export default function ActionButtons() {
<LoadingButton
color="secondary"
onClick={handleSaveAndClose}
disabled={isLoading || isSaveDisabled}
disabled={isLoading}
loading={isSavingAndClosing}
>
Save & Exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function ActionButtons() {
const navigate = useNavigate();

const handleSaveAndClose = async () => {
if (!isDirty) {
if (!isDirty || isSaveDisabled) {
navigate({
to: `/staff/projects/${projectId}/submission-packages/${submissionPackageId}`,
});
Expand Down Expand Up @@ -184,7 +184,7 @@ export default function ActionButtons() {
<LoadingButton
color="secondary"
onClick={handleSaveAndClose}
disabled={isLoading || isSaveDisabled}
disabled={isLoading}
loading={isSavingAndClosing}
>
Save & Exit
Expand Down

0 comments on commit 607cf68

Please sign in to comment.