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

Commits on Nov 12, 2024
72889bd

♻️ Refactor StripeCharge balance and fee calculation methods

Rename methods for clarity and consistency: - calculate_balance to balance_from_transactions - calculate_fees to fees_from_transactions

Update task to use new method names when setting balance and fees.

This change improves code readability and better reflects the methods' functionality, deriving values from transactions rather than calculation.

bdf27b4

⚡️ Optimize event accounting methods with memoization

This commit improves performance by implementing memoization for several methods in the EventAccounting module. The changes include:

  1. Refactoring instance variable creation in profit_share_roles method
  2. Adding memoization to credit_applied, credit_on_behalf_of_organisation, credit_on_behalf_of_revenue_sharer, fixed_discounts methods
  3. Implementing memoization for discounted_ticket_revenue
  4. Optimizing donation_revenue, organisation_discounted_ticket_revenue, and revenue_sharer_discounted_ticket_revenue with conditional memoization

These optimizations will reduce unnecessary recalculations and improve overall performance of the event accounting system.

5e714b8

⚡️ Implement memoization for expensive calculations in EventAccounting and StripeCharge

This commit improves performance by implementing memoization for expensive calculations in the EventAccounting module and StripeCharge model. The changes reduce redundant computations by caching results of method calls, which can significantly speed up subsequent accesses to the same data.

ebea5c2

✨ Add partials for event stats row components

This commit introduces a series of partials for each component of the event stats row. This refactoring improves code organization, readability, and maintainability by breaking down the large _event_stats_row.erb file into smaller, more manageable pieces.

The changes include:

  1. Creating separate partial files for each component of the event stats row.
  2. Updating the main _event_stats_row.erb file to use these new partials.
  3. Passing necessary local variables to each partial.

This modular approach allows for easier updates and modifications to individual components of the event stats row in the future.

9624f8b

🔥 Remove admin accounts from refund failure notifications

This commit removes the inclusion of admin accounts in the refund failure notification process. Now, only event facilitators will receive these notifications, streamlining the communication process and reducing unnecessary notifications to admin accounts.

00a7162

✨ Add notification system for failed refunds

This commit introduces a new feature to notify administrators and event facilitators when a refund fails. It includes:

  1. New email templates for failed order and ticket refunds
  2. Implementation of notification methods for both Order and Ticket models
  3. Integration of these notifications into the refund process
2486af7

🔥 Remove Hotjar and Simple Analytics tracking scripts

This commit removes the inclusion of Hotjar and Simple Analytics tracking scripts from the head partial. This change is likely made to reduce the number of third-party scripts loaded on the page, which can improve page load times and enhance user privacy.

4f3c185

🐛 Add error logging for timezone setting failure

Commits on Nov 07, 2024
04c66dc

🐛 Fix potential nil error in StripeWebhooks module


🚀 Add convenience method for finding Gathering by slug

8305fd5

♻️ Refactor search_events method for improved performance

The search_events method has been refactored to use a more efficient MongoDB query. This change replaces multiple separate queries with a single $or query, which should result in better performance and cleaner code.

Commits on Nov 06, 2024
0b83a26

🐛 Fix search_events method to work with Mongoid::Paranoia

The search_events method was refactored to address an issue with Mongoid::Paranoia breaking the .or query. The new implementation uses .and and .pluck to achieve the same result, ensuring compatibility with Mongoid::Paranoia and maintaining the search functionality across name, description, and location fields.

Commits on Nov 05, 2024
b4b7360

✨ Enhance account creation process with multiple entity support

This commit expands the account creation functionality to support various entities such as organizations, activities, local groups, and events. It allows for more flexible user onboarding and association with different parts of the system.

1c04973

💬 Update text for price selection instruction in ticket purchase view

The commit updates the instruction text for selecting a price in the ticket purchase view. This change aims to provide clearer guidance to users when interacting with the price selection feature, specifically for ticket types with a price range.

f7e1a07

🔥 Remove unused AI and machine learning gems from Gemfile

045a039

🔥 Remove unused AI service configurations and related code

This commit removes configurations and unused code related to various AI services, including OpenAI, Replicate, and Gemini. The changes were made to streamline the codebase and remove dependencies on services that are no longer in use.

cfe85bc

🐛 Fix MaxMind database update logic and improve error handling

This commit addresses issues with the MaxMind database update process:

  1. In helpers.rb:

    • Add a check for file existence before checking its creation time
    • Update log messages for clarity (update -> download)
  2. In boot.rb:

    • Remove redundant MaxMind download attempt during boot

These changes ensure more robust handling of the MaxMind database, preventing potential errors and improving the overall reliability of the geolocation feature.

Commits on Nov 03, 2024
ec74396

✨ Add option to view deleted orders in the orders list

This commit introduces a new feature allowing users to view deleted orders in the orders list. The changes include:

  1. Updating the orders controller to filter for deleted orders when the 'deleted' parameter is present.
  2. Adding a checkbox in the orders view to toggle the display of deleted orders.

These changes improve the functionality of the order management system by providing better visibility into the full order history, including deleted items.

bba7f0d

🚑️ Implement soft delete for events to prevent data loss

This commit introduces soft delete functionality for events, allowing for better data retention and recovery. The changes include:

  1. Adding Mongoid::Paranoia to the Event model
  2. Updating event queries to use unscoped when necessary
  3. Modifying views to handle deleted events appropriately
  4. Adding a "Deleted" filter option in the event stats search

These changes improve data management and provide admins with the ability to view and potentially restore deleted events when needed.

193a55f

✨ Add restore functionality for deleted tickets and improve order actions

This commit introduces the following changes:

  1. Add a new route to restore deleted tickets
  2. Update order actions dropdown to show different options for deleted orders
  3. Update ticket actions dropdown to show restore option for deleted tickets
  4. Add 'Resend order confirmation' option to ticket actions

These changes enhance the user experience by providing more flexibility in managing deleted tickets and orders, and improve the overall functionality of the ticketing system.

80be9f7

🎨 Refactor event feedback response UI and functionality

This commit improves the structure and user experience of the event feedback response feature. The changes include:

  1. Moving the response form to a separate partial for better organization
  2. Updating the UI to show/hide response elements more intuitively
  3. Improving the form submission process with a visible 'Send' button
  4. Adding a guard clause in the send_response method to prevent sending empty responses

These changes aim to enhance the usability and maintainability of the event feedback system.