-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Disallow publish event without tickets #4674
fix: Disallow publish event without tickets #4674
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/ilxo4zoba |
app/controllers/events/view.js
Outdated
}); | ||
return; | ||
} | ||
if (state === 'draft' && isEmpty(this.model.locationName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both if statements can be nested in state === 'draft'
if condition
Is it possible to make the "Publish" button gray instead of green, if an event cannot be published? |
Yes, shoud be possible. |
@Haider8 Please check new comments as well |
Codecov Report
@@ Coverage Diff @@
## development #4674 +/- ##
===============================================
- Coverage 23.11% 23.08% -0.03%
===============================================
Files 476 476
Lines 4967 4972 +5
Branches 8 8
===============================================
Hits 1148 1148
- Misses 3818 3823 +5
Partials 1 1
Continue to review full report at Codecov.
|
Thinking this further. Instead of showing a message "Do you want to publish...". As we already know that the event cannot be published, it would make more sense to show a message: "You need to add more details such as location and tickets to your event in order to be able to publish it." [Ok]. |
…frontend into publish-without-ticket
@iamareebjamal Please review |
{{t 'Are you sure?'}} | ||
{{else}} | ||
{{t 'Incomplete event details'}} | ||
{{/if}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have used tabs instead of spaces. Please use spaces
<p>{{t 'This will publish the event and the event will be visible on the Internet. Please confirm you want to publish your event.'}}</p> | ||
{{else}} | ||
<p>{{t 'You need to add more details such as location and tickets to your event in order to publish it.'}}</p> | ||
{{/if}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have used tabs instead of spaces. Please use spaces
<button type="button" class="ui button" {{action 'toggleView'}}> | ||
{{t 'Okay'}} | ||
</button> | ||
{{/if}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have used tabs instead of spaces. Please use spaces
Merging now, please follow up with changing tabs to spaces |
Fixes #4525
Short description of what this resolves:
Possible to publish event from event manage overview page
Changes proposed in this pull request:
Don't publish event (show error) without tickets
Checklist
development
branch.