Skip to content
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

Merged
merged 4 commits into from
Jul 31, 2020

Conversation

Haider8
Copy link
Contributor

@Haider8 Haider8 commented Jul 30, 2020

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

without-ticket-publish

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Jul 30, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/ilxo4zoba
✅ Preview: https://open-event-frontend-git-fork-haider8-publish-without-ticket.eventyay.vercel.app

});
return;
}
if (state === 'draft' && isEmpty(this.model.locationName)) {
Copy link
Member

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

@mariobehling
Copy link
Member

Is it possible to make the "Publish" button gray instead of green, if an event cannot be published?

@snitin315
Copy link
Member

Yes, shoud be possible.

@Haider8 Haider8 requested a review from iamareebjamal July 30, 2020 17:16
@iamareebjamal
Copy link
Member

@Haider8 Please check new comments as well

@codecov
Copy link

codecov bot commented Jul 30, 2020

Codecov Report

Merging #4674 into development will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               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              
Impacted Files Coverage Δ
app/controllers/events/view.js 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fca1c75...3b94165. Read the comment docs.

@mariobehling
Copy link
Member

mariobehling commented Jul 30, 2020

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].

@vercel vercel bot temporarily deployed to Preview July 30, 2020 19:39 Inactive
@Haider8
Copy link
Contributor Author

Haider8 commented Jul 30, 2020

@iamareebjamal Please review

event-unpublishable

{{t 'Are you sure?'}}
{{else}}
{{t 'Incomplete event details'}}
{{/if}}
Copy link
Member

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}}
Copy link
Member

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}}
Copy link
Member

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

@iamareebjamal
Copy link
Member

Merging now, please follow up with changing tabs to spaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible to publish events without ticket and minimum requirements through Event Dashboard
4 participants