Implement enhanced static file caching and improve calendar event loading with detailed logging
This commit introduces a new static file caching strategy in Program.cs, optimizing cache headers for Blazor assets to improve performance and ensure fresh content after deployments. Additionally, the Calendar component in Index.razor has been updated to include comprehensive logging for event loading, handling null occurrences, and error management during calendar item creation. The CalendarEventItem model is also initialized to prevent null reference issues. These changes enhance the application's reliability and user experience.
This commit is contained in:
@@ -24,6 +24,10 @@ public class CalendarEventItem : CalendarItem
|
||||
/// </summary>
|
||||
public CalendarEventItem()
|
||||
{
|
||||
// Initialize base class properties to avoid null reference issues
|
||||
Text = string.Empty;
|
||||
Start = DateTime.MinValue;
|
||||
End = DateTime.MinValue;
|
||||
}
|
||||
|
||||
public CalendarEventItem(Core.Entities.EventOccurrence occurrence, Core.Entities.EventDefinition? eventDefinition = null)
|
||||
|
||||
Reference in New Issue
Block a user