Events-MVC (example with htmx)
This commit is contained in:
67
Events-MVC/Events.MVC/Constants.cs
Normal file
67
Events-MVC/Events.MVC/Constants.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
namespace Events.MVC;
|
||||
|
||||
public static class Constants
|
||||
{
|
||||
public static class TempDataKeys
|
||||
{
|
||||
public const string ToastMessage = "ToastMessage";
|
||||
public const string ToastVariant = "ToastVariant";
|
||||
public const string ToastTitle = "ToastTitle";
|
||||
}
|
||||
|
||||
public static class ToastVariants
|
||||
{
|
||||
public const string Success = "success";
|
||||
public const string Error = "error";
|
||||
}
|
||||
|
||||
public static class ToastTitles
|
||||
{
|
||||
public const string Success = "Success";
|
||||
public const string Error = "Error";
|
||||
public const string Notification = "Notification";
|
||||
}
|
||||
|
||||
public static class ViewDataKeys
|
||||
{
|
||||
public const string Title = "Title";
|
||||
public const string HeaderActionLabel = "HeaderActionLabel";
|
||||
public const string HeaderActionTarget = "HeaderActionTarget";
|
||||
public const string CreatePersonModel = "CreatePersonModel";
|
||||
public const string Prefix = "Prefix";
|
||||
public const string CanRemoveRows = "CanRemoveRows";
|
||||
}
|
||||
|
||||
public static class HtmxHeaders
|
||||
{
|
||||
public const string Request = "HX-Request";
|
||||
public const string Retarget = "HX-Retarget";
|
||||
public const string Reswap = "HX-Reswap";
|
||||
public const string Trigger = "HX-Trigger";
|
||||
}
|
||||
|
||||
public static class HtmxEvents
|
||||
{
|
||||
public const string ShowToast = "show-toast";
|
||||
public const string CountryCreated = "country-created";
|
||||
public const string EventCreated = "event-created";
|
||||
public const string PersonCreated = "person-created";
|
||||
public const string RegistrationCreated = "registration-created";
|
||||
public const string SportCreated = "sport-created";
|
||||
}
|
||||
|
||||
public static class HtmxSwap
|
||||
{
|
||||
public const string OuterHtml = "outerHTML";
|
||||
}
|
||||
|
||||
public static class Messages
|
||||
{
|
||||
public const string EmailOrContactPhoneRequired = "Email or contact phone is required.";
|
||||
public const string CountriesRequiredForPeople = "At least one country must be created before adding people.";
|
||||
public const string EventsRequiredForRegistrations = "At least one event must be created before adding registrations.";
|
||||
public const string SportsRequiredForRegistrations = "At least one sport must be created before adding registrations.";
|
||||
public const string PeopleRequiredForRegistrations = "At least one person must be created before adding registrations.";
|
||||
public const string RegistrationDependenciesRequired = "At least one event, one person, and one sport are required before adding registrations.";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user