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

Commits on Dec 25, 2024
9bb8233

✨ Add schema-based JSON response parsing for OpenRouter chat

This commit enhances the OpenRouter chat functionality by:

  1. Adding a new 'schema' parameter to the chat method
  2. Implementing JSON schema validation for structured responses
  3. Parsing JSON responses when a schema is provided
  4. Updating the Event model to use the new schema feature (commented out)

These changes allow for more structured and predictable AI responses, improving data handling and reducing potential parsing errors.

26c50a6

🔧 Refine OpenRouter configuration and improve flexibility

Commits on Dec 20, 2024
0d9afa7

🐛 Add additional checks for public answers and qas in event feedback

This commit enhances the conditional rendering of event feedback responses. It now checks for the presence of public answers and non-empty qas before displaying the response, improving the accuracy of the displayed information.

Commits on Dec 18, 2024
9d10f02

🐛 Fix annual donation handling and reset in OrganisationMonthlyDonations

This commit addresses issues with annual donation handling in the OrganisationMonthlyDonations module:

  1. Add monthly_donation_annual field reset when clearing GoCardless and Patreon donations
  2. Explicitly set monthly_donation_annual to false for non-annual subscriptions
  3. Adjust monthly amount calculation for annual donations

These changes ensure more accurate and consistent handling of annual donations across different payment methods.

2a29ec1

✨ Add support for annual payment option in monthly donor email

This commit enhances the new monthly donor email template to include information about annual payment when applicable. It improves the clarity of the donation details provided to the organization.

30a2a08

✨ Add support for annual monthly donations

This commit introduces the following changes:

  1. Update the Organisationship model to include a new field 'monthly_donation_annual' to track annual donations.
  2. Modify the monthly donation processing logic to:
    • Detect annual subscriptions based on the subscription name.
    • Adjust the monthly donation amount for annual subscriptions by dividing it by 12.
  3. Update the monthly donation partial view to display an "Paid annually" label for annual donations.

These changes allow for better handling and display of annual donations, improving the user experience and data accuracy.

f82949c

✨ Add new monthly donor notification system

This commit introduces a new feature to notify admins when a new monthly donor is added. The changes include:

  1. Creating a new email template for new monthly donors
  2. Implementing notification logic in GoCardless and Patreon subscriptions
  3. Adding a method to send notifications via Mailgun
  4. Refactoring subscription logic for better organization and reusability

These changes improve the organization's ability to track and acknowledge new monthly donors, enhancing donor relations and internal communication.

0935487

🔥 Remove validation preventing organiser change for events with orders

5c9bd41

🔒️ Prevent changing organiser or revenue sharer when event has orders

This commit adds validation to ensure that the organiser or revenue sharer cannot be changed if the event already has orders. This is crucial for maintaining financial integrity and preventing potential disputes.

Commits on Dec 15, 2024
afa4707

♻️ Replace .empty? with .blank? for more robust emptiness check

This change improves the robustness of the emptiness check for the book summary. The .blank? method handles more cases of emptiness, including nil values and strings with only whitespace, enhancing the reliability of the redirection logic.

7f2b14b

🐛 Fix redirect condition in book detail page

Change the condition for redirecting to Goodreads from checking 'Full text' to checking 'Summary' field, ensuring correct behavior when book summary is available.

562cd9d

✨ Add redirection to Goodreads for books without full text

This commit enhances the '/books/:slug' route to improve user experience. Now, when a book doesn't have full text available, users are redirected to the corresponding Goodreads page instead of seeing an empty page.

Commits on Dec 13, 2024
99fbd9f

🐛 Remove condition for multiple tickets in ticketholder link display

This commit removes the condition that checks for multiple tickets before displaying the ticketholder link in email templates and success page. The change allows the link to be shown for all orders, regardless of the number of tickets, improving user experience and data collection consistency.

Commits on Dec 11, 2024
a30afe8

⬆️ Upgrade actions/cache from v1 to v4 in GitHub Actions workflow

Commits on Dec 10, 2024
8f650d6

🐛 Fix balance display condition in payment form

The commit updates the condition for displaying the balance in the payment form. It now checks if the balance is greater than 1 GBP instead of 0, ensuring a more meaningful threshold for displaying the balance.

89b6e5c

🚚 Reorder organisation attribute updates for better readability

This commit reorders the setting of organisation attributes in the organisations task. The monthly_donations_count and monthly_donors_count are now set immediately after calculation, improving code flow and readability. This change doesn't affect functionality but makes the code structure more logical and easier to follow.

a727c21

♻️ Refactor organisation stripe topup logic

Improve code structure by moving stripe customer check to the outer condition. This change enhances readability and reduces unnecessary variable assignments when the organisation doesn't have a stripe customer ID.

bb668ca

🔧 Refactor contribution_gbp calculation in EventAccounting module

This commit simplifies and improves the logic for calculating the contribution in GBP for events. The changes include:

  1. Removing the date-based condition for percent_requested
  2. Separating the logic for capped and uncapped contributions
  3. Simplifying the calculation for uncapped contributions

These changes make the code more maintainable and easier to understand, while also preparing for future adjustments to the contribution model.

f813e73

🚨 Update event contribution calculation logic

This commit updates the event contribution calculation in the EventAccounting module. The changes introduce a variable contribution percentage based on the event's start date and modify the calculation accordingly.

da7af3c

🎨 Refactor organisation stats table structure and data display

This commit improves the structure and readability of the organisation stats table. It moves the balance column inside the conditional block, ensuring that balance data is only displayed when available. This change enhances the consistency of the table and prevents displaying empty cells unnecessarily.