-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Iteration 1]Merge spring 24 main to snp-cloud main #356
Conversation
…"" This reverts commit 7b664f0.
…ofile-admin-toggle
…mplate 187057754 event types submission template
187057653 fix "edit profile" shows admin and confirmed toggles as a non-admin
update INSTALL_SNAPCON.md
Merge in SP23 Main
template_name: template_name) | ||
# if email subject is empty, use custom template | ||
if @ticket_purchase.ticket.email_subject.empty? && !@ticket_purchase.ticket.email_body.empty? | ||
@ticket_purchase.ticket.email_body = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_body) |
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.
The conditional statements is very self explanatory so I think this comment can be deleted
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.
Hi! Good overall, just some clean up to do and data to be updated about the members of the team
if @ticket_purchase.ticket.email_subject.empty? && !@ticket_purchase.ticket.email_body.empty? | ||
@ticket_purchase.ticket.email_body = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_body) | ||
mail(subject: "#{@conference.title} | Ticket Confirmation and PDF!", template_name: 'custom_ticket_confirmation_template') | ||
# if email body is empty, use default template with subject |
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.
The conditional statements is very self explanatory so I think this comment can be deleted
elsif !@ticket_purchase.ticket.email_subject.empty? && @ticket_purchase.ticket.email_body.empty? | ||
@ticket_purchase.ticket.email_subject = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_subject) | ||
mail(subject: @ticket_purchase.ticket.email_subject, template_name: 'ticket_confirmation_template') | ||
# if both exist, use custom |
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.
The conditional statements is very self explanatory so I think this comment can be deleted
@ticket_purchase.ticket.email_body = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_body) | ||
@ticket_purchase.ticket.email_subject = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_subject) | ||
mail(subject: @ticket_purchase.ticket.email_subject, template_name: 'custom_ticket_confirmation_template') | ||
# if both empty, use default |
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.
The conditional statements is very self explanatory so I think this comment can be deleted
@@ -0,0 +1,32 @@ | |||
project: |
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.
Please update with your team information
it 'add a currency conversion', feature: true do | ||
visit admin_conference_currency_conversions_path(conference.short_title) | ||
click_link 'Add Currency Conversion' | ||
|
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 can remove this empty line
fill_in 'currency_conversion_from_currency', with: 'USD' | ||
fill_in 'currency_conversion_to_currency', with: 'EUR' | ||
fill_in 'currency_conversion_rate', with: '0.89' | ||
|
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 can remove this empty line
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.
just some empty lines, tiny stuff but again overall looks good :)
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.
Really minor things, but I will merge and might make a tidy-ing PR myself then deploy soon.
@@ -1,4 +1,6 @@ | |||
version: "2" |
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.
It's likely worth noting that this is now out of sync with the local config (I think...) but that's probably OK.
|
||
# Only allow a list of trusted parameters through. |
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.
# Only allow a list of trusted parameters through. |
# if email subject is empty, use custom template | ||
if @ticket_purchase.ticket.email_subject.empty? && !@ticket_purchase.ticket.email_body.empty? |
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.
# if email subject is empty, use custom template | |
if @ticket_purchase.ticket.email_subject.empty? && !@ticket_purchase.ticket.email_body.empty? | |
if @ticket_purchase.ticket.email_subject.empty? && @ticket_purchase.ticket.email_body.present? |
Use .present?
which is a little more readable than ! empty
if @ticket_purchase.ticket.email_subject.empty? && !@ticket_purchase.ticket.email_body.empty? | ||
@ticket_purchase.ticket.email_body = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_body) | ||
mail(subject: "#{@conference.title} | Ticket Confirmation and PDF!", template_name: 'custom_ticket_confirmation_template') | ||
# if email body is empty, use default template with subject |
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.
# if email body is empty, use default template with subject |
@ticket_purchase.ticket.email_body = @ticket_purchase.generate_confirmation_mail(@ticket_purchase.ticket.email_body) | ||
mail(subject: "#{@conference.title} | Ticket Confirmation and PDF!", template_name: 'custom_ticket_confirmation_template') | ||
# if email body is empty, use default template with subject | ||
elsif !@ticket_purchase.ticket.email_subject.empty? && @ticket_purchase.ticket.email_body.empty? |
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.
elsif !@ticket_purchase.ticket.email_subject.empty? && @ticket_purchase.ticket.email_body.empty? | |
elsif @ticket_purchase.ticket.email_subject.present? && @ticket_purchase.ticket.email_body.empty? |
@@ -0,0 +1 @@ | |||
<%= @ticket_purchase.ticket.email_body %> |
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.
Ideally there should be a newline.
@@ -32,11 +32,28 @@ def ticket_confirmation_mail(ticket_purchase) | |||
attachments["ticket_for_#{@conference.short_title}_#{physical_ticket.id}.pdf"] = pdf.render | |||
end | |||
|
|||
template_name = 'ticket_confirmation_template' | |||
template_name = 'young_thinkers_ticket_confirmation_template' if @ticket_purchase.ticket_id == YTLF_TICKET_ID | |||
if @ticket_purchase.ticket_id == YTLF_TICKET_ID |
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.
For the future, I think we can delete this code path once custom tickets are merged in
Checklist
master
branch.Short description of what this resolves/which issues does this fix?:
#344
Changes proposed in this pull request: