Skip to main content

Management Fees Feature

Description

This feature allows organizers to configure who pays the management fees associated with their events. Organizers can have fees configured with different types (fixed amount, percentage, or combined), and this feature allows them to decide whether the participant or the organizer absorbs these costs.

Implemented Features

1. Database

  • New fields in the eventos table:
    • management_fees_config: JSON for additional configuration
    • participant_pays_fees: Boolean (true if the participant pays)
    • organizer_pays_fees: Boolean (true if the organizer pays)

2. Evento Model

  • Added the new fields to $fillable and $casts
  • getOrganizerTariffConfig() method to retrieve the organizer’s fee configuration

3. Controller

  • ManagementFeesController with methods:
    • index(): Shows the current configuration
    • update(): Updates the configuration
    • Access permission validation

4. Views

  • Main view at resources/views/eventos/config/management_fees/index.blade.php
  • Shows the organizer’s fee configuration
  • Form to configure who pays the fees
  • Integration with the existing navigation system

5. Routes

  • GET events/config/management-fees/{id}: View configuration
  • PUT events/config/management-fees/{id}/update: Update configuration

How to Use

For Organizers

  1. Access the configuration:
    • Go to the event edit page
    • In the side menu, expand the “Configuration” section
    • Click on “Management Fees” (below “Taxes”)
  2. View organizer configuration:
    • The view automatically shows the fees configured for the organizer
    • Includes type, amount, percentage, period, and status
  3. Configure who pays:
    • Select between “Participant” or “Organizer”
    • Add additional configuration if needed
    • Save the changes

For Developers

Accessing the configuration programmatically:

Applying the fee logic:

File Structure

Validations

  • Only organizers and administrators can access
  • Validation that at least one option is selected
  • Data type validation for the boolean fields

Technical Notes

  • The fields are mutually exclusive (only one can be true)
  • The configuration is saved in JSON format for flexibility
  • Full integration with the existing navigation system
  • Compatible with the existing fee system
  • Accessible from the event configuration side menu