Dandelion is a fair source project. View the code on Github

Commits on Apr 01, 2025
9185a69

🦺 Add validation for payment amount

Ensure the :amount parameter is present and greater than zero before processing a payment request for an organisation.

Previously, the endpoint did not validate the payment amount, potentially leading to errors or invalid operations. This change adds a check that halts the request with a 400 Bad Request status if the amount is missing or not positive.

3ef0b95

🐛 Fix contribution calculation and simplify progress partial

Correctly calculate monthly contribution amount by multiplying the value from the fragment by 100 to convert to cents for Money lib.

Replace custom caching helper ('cp') with standard 'partial' calls in '_pay.erb' and 'home_signed_in.erb' for rendering the progress. Remove redundant STRIPE_SK environment variable check within the '_pay_progress' partial.

6b63098

🎨 Improve structure of pay progress partial

Wrap initial Ruby logic block in ERB tags and adjust indentation throughout the file. This improves readability and ensures the logic block is correctly processed as server-side code without unintended output.

d257dff

⚡️ Optimize pay progress display using cached data

Fetch monthly contribution data from a Fragment model instead of calculating it directly from the Stripe API within the view partial. This avoids slow, repeated Stripe API calls on every render of the _pay_progress partial, significantly improving page load performance.

Also, reorder the "Dominance" chart on the stats page for better visual structure.

6a45636

🎨 Simplify donation text rendering in event build view

Remove the conditional check for @event.donation_text. Always render the donation_text block to simplify the template structure.

3c5a910

🎨 (app/views/events/_tag_labels.erb): Refactor tag display with "show more" functionality

This commit improves the display of event tags by adding a "show more" link when there are more tags than the specified limit. This prevents long lists of tags from cluttering the event page.

  • Shuffles the order of tags displayed.
  • Wraps tags in a container for easier manipulation.
  • Hides tags exceeding the show_more_limit initially.
  • Adds a "show more" link to reveal hidden tags.


💬 (app/views/events/event.erb): Apply "show more" to event tags on event page

This commit applies the "show more" functionality to the event tags displayed on the event page, limiting the initial display to 5 tags.


🐛 (app/views/events_build/build.erb): Conditionally render donation text field

This commit fixes an issue where the donation text field was always rendered, even when no donation text was present. Now, the field is only rendered if @event.donation_text has a value.


🎨 (app/views/purchase/_suggested_donation.erb): Improve donation text display

This commit improves the display of donation text on the purchase page.

  • Moves the donation text to span two columns.
  • Conditionally renders the default donation text if no custom text is provided.


📝 (models/concerns/event_fields.rb): Update donation text field descriptions

This commit updates the descriptions of the add_a_donation_to field in EventFields to accurately reflect its position beside the donation field.


📝 (models/concerns/organisation_fields.rb): Update donation text field descriptions

This commit updates the descriptions of the add_a_donation_to field in OrganisationFields to accurately reflect its position beside the donation field.

Commits on Mar 31, 2025
c261813

🎨 (app/views/event_feedbacks/_event_feedbacks_table.erb): prevent line breaks in the actions column

Commits on Mar 27, 2025
c86c27d

🐛 (app/controllers/zapier.rb): fix organisation event orders endpoint

The event was previously being looked up in the scope of the organisation, but this is not necessary and was causing issues when the event_id was not associated with the organisation. This commit removes the organisation scope from the event lookup, allowing the endpoint to return orders for any event.

482fd7f

🐛 (models): fix issue with duplicate emails and downcase email

The event_emails method in Pmail was not mapping the tickets to emails, resulting in the emails.include?(ticket.email) check always returning false. This led to duplicate emails being sent. This commit fixes this by mapping the tickets to emails before checking for inclusion.

The email address was not downcased and stripped before validation in the Ticket model. This commit fixes this by downcasing and stripping the email address before validation.

f5a91ff

⚡️ (models/pmail.rb): improve performance of send_count method

The send_count method was inefficient when dealing with Events, because it was counting tickets multiple times. This commit introduces the event_emails method, which returns a unique list of emails for an event. The send_count method now uses this list to get the count, avoiding duplicate counting and improving performance.

f1c1274

🥅 (models/order.rb): catch Stripe::InvalidRequestError when creating transfer

This commit adds a rescue block for Stripe::InvalidRequestError when creating a transfer. This prevents the application from crashing when the transfer fails due to a non-existent account. The error is still reported to Airbrake, unless the error message includes 'No such transfer', in which case it is suppressed to avoid unnecessary noise.

2ff97b7

✨ (orders.rb, app/views/events/_ticket_price.erb): introduce discounted price for tickets

This commit introduces the concept of a discounted price for tickets. The price attribute of the Ticket model is renamed to discounted_price to better reflect its purpose. The view is updated to use the new discounted_price attribute when displaying and editing the ticket price. This change allows event admins to set a discounted price for tickets, potentially offering promotions or special deals.

Commits on Mar 26, 2025
d5b73ab

🔥 (app/views/_share.erb): remove unused social media share buttons

2c5b9bd

🐛 (app/views/events_build/build.erb): fix undefined method 'past?' for nil:NilClass

The 'past?' method was being called on a potentially nil @event object, leading to an error. This commit adds a check to ensure that @event is persisted? before calling 'past?', preventing the error.

a48a60f

✨ (app/views/events_build/build.erb): Add recording tab for past events
✨ (app/views/events_build/build.erb): Rename ticket_email to order_email
✨ (app/views/organisations/build.erb): Add recording_email_greeting
✨ (models/concerns/event_fields.rb): Rename ticket_email to order_email
✨ (models/concerns/organisation_fields.rb): Add recording_email_greeting
✨ (test/how_to_create_an_event_test.rb): Rename ticket_email to order_email

This commit introduces several changes related to event management and email confirmations:

  • A new "Recording" tab is added to the event build page, but only displayed for past events. This tab allows admins to add extra information related to the recording of the event.
  • The term "ticket email" has been consistently replaced with "order confirmation email" across the application for clarity.
  • A new recording_email_greeting field has been added to the organisation settings, allowing for a custom greeting in order confirmation emails for recordings of past events.
2ac16f0

🥅 (purchase.rb): catch Stripe::InvalidRequestError and notify admins
📝 (emails): create purchase_failed email template
✨ (OrderNotifications): add notify_of_failed_purchase method

Commits on Mar 24, 2025
428cd00

🐛 (models/ticket_type.rb): render integers instead of floats in price range

The price_or_range method was modified to render integers instead of floats when displaying the price range. This change ensures that the displayed price range is more user-friendly and avoids unnecessary decimal places when the values are whole numbers.

935436c

💄 (app/views/events_build/_ticket_types.erb): Improve ticket type form UI

Commits on Mar 14, 2025
5c6049b

✨ (app.js): add function to get currency symbol from currency code
🎨 (app/views): use javascript to dynamically update currency symbol The currency symbol was previously hardcoded in the views. This commit adds a javascript function to get the currency symbol from the currency code and uses this function to dynamically update the currency symbol in the views. This allows the currency symbol to be updated when the currency is changed.

Commits on Mar 13, 2025
8009309

💄 (app/views/search.erb): add line break on small screens for better readability
🐛 (models/payment.rb): fix: only create payment notifications if gathering is not hidden