269 lines
7.3 KiB
C#
269 lines
7.3 KiB
C#
using Koogle.Application.DTOs;
|
|
|
|
namespace Koogle.Web.Store.DayState;
|
|
|
|
// Load Days Actions
|
|
|
|
/// <summary>
|
|
/// Action to load all days for the current club.
|
|
/// </summary>
|
|
public record LoadDaysAction(DayFilterDto? Filter = null);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when days are loaded successfully.
|
|
/// </summary>
|
|
public record LoadDaysSuccessAction(IReadOnlyList<DaySummaryDto> Days);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when loading days fails.
|
|
/// </summary>
|
|
public record LoadDaysFailureAction(string Error);
|
|
|
|
// Load Day Details Actions
|
|
|
|
/// <summary>
|
|
/// Action to load a single day with full details.
|
|
/// </summary>
|
|
public record LoadDayDetailsAction(Guid DayId);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when day details are loaded successfully.
|
|
/// </summary>
|
|
public record LoadDayDetailsSuccessAction(DayDto Day);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when loading day details fails.
|
|
/// </summary>
|
|
public record LoadDayDetailsFailureAction(string Error);
|
|
|
|
// Create Day Actions
|
|
|
|
/// <summary>
|
|
/// Action to create a new day.
|
|
/// </summary>
|
|
public record CreateDayAction(CreateDayDto Dto);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when day is created successfully.
|
|
/// </summary>
|
|
public record CreateDaySuccessAction(DayDto Day);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when creating day fails.
|
|
/// </summary>
|
|
public record CreateDayFailureAction(string Error);
|
|
|
|
// Update Day Actions
|
|
|
|
/// <summary>
|
|
/// Action to update an existing day.
|
|
/// </summary>
|
|
public record UpdateDayAction(UpdateDayDto Dto);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when day is updated successfully.
|
|
/// </summary>
|
|
public record UpdateDaySuccessAction(DayDto Day);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when updating day fails.
|
|
/// </summary>
|
|
public record UpdateDayFailureAction(string Error);
|
|
|
|
// Delete Day Actions
|
|
|
|
/// <summary>
|
|
/// Action to delete a day.
|
|
/// </summary>
|
|
public record DeleteDayAction(Guid Id);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when day is deleted successfully.
|
|
/// </summary>
|
|
public record DeleteDaySuccessAction(Guid Id);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when deleting day fails.
|
|
/// </summary>
|
|
public record DeleteDayFailureAction(string Error);
|
|
|
|
// Participant Actions
|
|
|
|
/// <summary>
|
|
/// Action to add a participant to a day.
|
|
/// </summary>
|
|
public record AddDayParticipantAction(AddDayParticipantDto Dto);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when participant is added successfully.
|
|
/// </summary>
|
|
public record AddDayParticipantSuccessAction(DayDto Day);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when adding participant fails.
|
|
/// </summary>
|
|
public record AddDayParticipantFailureAction(string Error);
|
|
|
|
/// <summary>
|
|
/// Action to remove a participant from a day.
|
|
/// </summary>
|
|
public record RemoveDayParticipantAction(RemoveDayParticipantDto Dto);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when participant is removed successfully.
|
|
/// </summary>
|
|
public record RemoveDayParticipantSuccessAction(DayDto Day);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when removing participant fails.
|
|
/// </summary>
|
|
public record RemoveDayParticipantFailureAction(string Error);
|
|
|
|
// Status Actions
|
|
|
|
/// <summary>
|
|
/// Action to advance day status (New → Started → Closed).
|
|
/// </summary>
|
|
public record AdvanceDayStatusAction(Guid DayId);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when status is advanced successfully.
|
|
/// </summary>
|
|
public record AdvanceDayStatusSuccessAction(DayDto Day);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when advancing status fails.
|
|
/// </summary>
|
|
public record AdvanceDayStatusFailureAction(string Error);
|
|
|
|
// Available Persons Actions
|
|
|
|
/// <summary>
|
|
/// Action to load available persons for participant selection.
|
|
/// </summary>
|
|
public record LoadAvailablePersonsAction;
|
|
|
|
/// <summary>
|
|
/// Action dispatched when available persons are loaded successfully.
|
|
/// </summary>
|
|
public record LoadAvailablePersonsSuccessAction(IReadOnlyList<PersonDto> Persons);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when loading available persons fails.
|
|
/// </summary>
|
|
public record LoadAvailablePersonsFailureAction(string Error);
|
|
|
|
// Selection and Error Actions
|
|
|
|
/// <summary>
|
|
/// Action to select a day for editing.
|
|
/// </summary>
|
|
public record SelectDayAction(DayDto? Day);
|
|
|
|
/// <summary>
|
|
/// Action to clear day error state.
|
|
/// </summary>
|
|
public record ClearDayErrorAction;
|
|
|
|
/// <summary>
|
|
/// Action to set filter for day list.
|
|
/// </summary>
|
|
public record SetDayFilterAction(DayFilterDto? Filter);
|
|
|
|
// PersonExpense Actions
|
|
|
|
/// <summary>
|
|
/// Action to load person expenses for a day.
|
|
/// </summary>
|
|
public record LoadDayExpensesAction(Guid DayId);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when day expenses are loaded successfully.
|
|
/// </summary>
|
|
public record LoadDayExpensesSuccessAction(IReadOnlyList<PersonExpenseDto> Expenses);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when loading day expenses fails.
|
|
/// </summary>
|
|
public record LoadDayExpensesFailureAction(string Error);
|
|
|
|
/// <summary>
|
|
/// Action to load available expense templates.
|
|
/// </summary>
|
|
public record LoadAvailableExpensesAction;
|
|
|
|
/// <summary>
|
|
/// Action dispatched when available expenses are loaded successfully.
|
|
/// </summary>
|
|
public record LoadAvailableExpensesSuccessAction(IReadOnlyList<ExpenseDto> Expenses);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when loading available expenses fails.
|
|
/// </summary>
|
|
public record LoadAvailableExpensesFailureAction(string Error);
|
|
|
|
/// <summary>
|
|
/// Action to create a new person expense.
|
|
/// </summary>
|
|
public record CreatePersonExpenseAction(CreatePersonExpenseDto Dto);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when person expense is created successfully.
|
|
/// </summary>
|
|
public record CreatePersonExpenseSuccessAction(PersonExpenseDto Expense);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when creating person expense fails.
|
|
/// </summary>
|
|
public record CreatePersonExpenseFailureAction(string Error);
|
|
|
|
/// <summary>
|
|
/// Action to create an inverse person expense (charged to all except one).
|
|
/// </summary>
|
|
public record CreateInversePersonExpenseAction(CreateInversePersonExpenseDto Dto);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when inverse expenses are created successfully.
|
|
/// </summary>
|
|
public record CreateInversePersonExpenseSuccessAction(IReadOnlyList<PersonExpenseDto> Expenses);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when creating inverse expense fails.
|
|
/// </summary>
|
|
public record CreateInversePersonExpenseFailureAction(string Error);
|
|
|
|
/// <summary>
|
|
/// Action to delete a person expense.
|
|
/// </summary>
|
|
public record DeletePersonExpenseAction(Guid Id, Guid DayId);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when person expense is deleted successfully.
|
|
/// </summary>
|
|
public record DeletePersonExpenseSuccessAction(Guid Id);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when deleting person expense fails.
|
|
/// </summary>
|
|
public record DeletePersonExpenseFailureAction(string Error);
|
|
|
|
/// <summary>
|
|
/// Action to update person expense status (Open/Done).
|
|
/// </summary>
|
|
public record UpdatePersonExpenseStatusAction(UpdatePersonExpenseStatusDto Dto);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when person expense status is updated successfully.
|
|
/// </summary>
|
|
public record UpdatePersonExpenseStatusSuccessAction(PersonExpenseDto Expense);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when updating person expense status fails.
|
|
/// </summary>
|
|
public record UpdatePersonExpenseStatusFailureAction(string Error);
|
|
|
|
/// <summary>
|
|
/// Action dispatched when trigger-based expenses are created (e.g., Gutter, Strike).
|
|
/// </summary>
|
|
public record TriggerExpensesCreatedAction(IReadOnlyList<PersonExpenseDto> Expenses);
|