Skip to content

fix: add missing disabled binding to Close Campaign button#432

Open
MuraariK13052008 wants to merge 1 commit intohatnote:masterfrom
MuraariK13052008:fix/bug-03-close-campaign-disabled
Open

fix: add missing disabled binding to Close Campaign button#432
MuraariK13052008 wants to merge 1 commit intohatnote:masterfrom
MuraariK13052008:fix/bug-03-close-campaign-disabled

Conversation

@MuraariK13052008
Copy link
Copy Markdown

What this fixes

The "Close Campaign" button was always clickable regardless of whether the campaign was actually active.

Root cause

canCloseCampaign is a reactive ref that is correctly set to true only when campaign.status === 'active' inside reloadState(). However, the Close Campaign button in the template had no :disabled binding at all — the ref was declared and populated but never consumed in the template, making the button permanently enabled.

Fix

Added :disabled="!canCloseCampaign" to the Close Campaign button on line 7 of ViewCampaign.vue.

Files changed

  • frontend/src/components/Campaign/ViewCampaign.vue

How to verify

  1. Open a campaign that is not active (e.g. finalized or paused)
  2. Confirm the "Close Campaign" button is now disabled
  3. Open an active campaign — confirm the button is enabled

Relates to: T415578

The button was always enabled because :disabled binding
was missing. Now correctly reflects canCloseCampaign state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant