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

Commits on Jan 12, 2025
fa81151

🔒️ Add authorization check for event ticket email preview

693eeac

🐛 Fix random event ordering and remove unnecessary auth check

This commit addresses two issues:

  1. Improves the random ordering of events by first fetching event IDs and then using them in the aggregation pipeline. This ensures that all events are included in the random selection.

  2. Removes the event_admins_only! check from the ticket email preview route, as it was unnecessarily restricting access.

These changes enhance the functionality and accessibility of the events feature.

9da0209

✨ Add random sorting option for events

This commit introduces a new feature allowing users to sort events randomly. The changes include:

  1. Adding a 'Random' option to the sort dropdown in the events view
  2. Implementing random sorting logic in both events and organisation_events controllers using MongoDB's $sample aggregation
  3. Ensuring compatibility with existing Event model by filtering aggregation results

This enhancement provides users with more flexibility in discovering events.

4165b4e

🚚 Rename contribution_gbp_custom to cap_gbp and add fixed_contribution_gbp

This commit introduces changes to the event contribution calculation logic:

  1. Renames 'contribution_gbp_custom' to 'cap_gbp' for clarity
  2. Adds 'fixed_contribution_gbp' field to events and organizations
  3. Updates contribution calculation to consider fixed contributions
  4. Implements a new priority order for contribution calculation

These changes provide more flexibility in defining event contributions and improve the overall structure of the contribution calculation process.

Commits on Jan 10, 2025
83a7c2f

✨ Add donation to Dandelion field in OrderFields module

This commit adds a new field 'de_donation_to_dandelion' to the OrderFields module, capturing the application fee paid to Dandelion for each order. This enhancement improves tracking of revenue distribution and provides more detailed financial reporting capabilities.

d9b37eb

💡 Update comment in StripeRowSplitter to clarify discount handling

This commit updates a comment in the StripeRowSplitter class to provide more precise information about the current limitations of discount handling. The clarification helps developers understand that the code can handle percentage discounts for non-monthly donors, but still has limitations for other discount types.

da29a4a

✨ Add support for percentage discounts in ticket processing

This commit enhances the StripeRowSplitter class to handle percentage discounts on tickets. The changes include:

  1. Adding a new variable to track discount percentage
  2. Updating the parsing logic to identify and extract discount information
  3. Applying the discount to the ticket amount calculation
  4. Including the discount information in the ticket description

These improvements allow for more accurate pricing and better representation of discounted tickets in the output.

8874427

🐛 Refine donation detection in StripeRowSplitter

This commit improves the donation detection logic in the StripeRowSplitter class to exclude donations specifically marked for "Dandelion". This change ensures that only general donations to the organization are processed, enhancing the accuracy of financial reporting and data analysis.

dc5056f

♻️ Refactor StripeRowSplitter for improved clarity and efficiency

This commit refactors the StripeRowSplitter class to enhance its functionality and readability. Key changes include:

  • Remove unnecessary return statement for rows without ticket info
  • Simplify amount calculation for ticket rows
  • Eliminate redundant empty results check
  • Streamline CSV output generation

These changes make the code more concise and easier to maintain, while also potentially improving its performance.

45ad61b

✨ Add Stripe row splitter functionality

This commit introduces a new feature to split Stripe CSV rows into separate entries for tickets and donations. It includes:

  1. New route in app.rb for handling CSV uploads and processing
  2. New view (stripe_row_splitter.erb) for file upload
  3. New StripeRowSplitter class to process and split CSV rows

This feature will improve financial reporting by separating ticket sales from donations in Stripe transaction data.

Commits on Jan 09, 2025
0960c0a

💄 Add padding to donation percent buttons for improved UI

5ca60be

🔥 Remove duplicate event confirmation page and simplify workflow

This commit removes the separate confirmation page for duplicating events and streamlines the process by directly duplicating the event when the 'duplicate' action is triggered. The change eliminates unnecessary steps in the user interface, improving efficiency and user experience.

c958697

🔥 Remove payment partial from event duplication and creation views

This commit removes the payment partial from the event duplication and creation views. The removal simplifies these pages and potentially eliminates unnecessary payment checks during these operations.

2acd84f

✨ Add label for promotion fee events in contribution view

This commit adds a new label "Promotion fee" to events that have no ticket types in the organisation's contribution view. This helps distinguish between regular events and promotional events, improving clarity for users.

4f047ca

🎨 Adjust column width for monthly donation in followers table

d96d0da

🎨 Adjust column width for monthly donation in followers table

This commit improves the layout of the followers table by changing the 'Monthly donation' column width from a fixed width to a minimum width. This allows for better responsiveness and accommodates longer content.

Commits on Jan 08, 2025
f700e8a

🐛 Fix potential nil error in organisation_tier calculation

This commit adds nil checks for monthly_donation_amount and monthly_donation_currency to prevent potential NoMethodError when these values are not set. This improves the robustness of the code and prevents unexpected crashes.

cee0a16

💄 Add padding to input group text for improved visual consistency

18b40ee

🐛 Fix ticket quantity selection behavior in purchase form

This commit addresses two issues in the ticket purchase form:

  1. When selecting a price for a ticket type, the quantity field is now automatically set to 1 if it was previously disabled.
  2. The initial value of the quantity field is no longer set to 1 for tickets without a price, ensuring consistency with the disabled state.

These changes improve the user experience and prevent potential errors in the ticket selection process.

a6412b3

🐛 Fix ticket quantity selection logic in purchase view

This commit addresses an issue in the ticket quantity selection dropdown. The changes ensure that the correct default value is set based on ticket price and user input, improving the user experience during ticket purchases.