public IActionResult UpdateCalendarSettings(CalendarWidgetSetting model) { if (ModelState.IsValid) { var existingModel = _calendarWidget.GetModel(model.Id); if (existingModel == null) { _calendarWidget.SaveModel(model); existingModel = model; } else { existingModel.DefaultView = model.DefaultView; existingModel.Format12 = model.Format12; existingModel.StartDayOfWeek = model.StartDayOfWeek; existingModel.HideWeekends = model.HideWeekends; existingModel.MonthView = model.MonthView; existingModel.DayView = model.DayView; existingModel.WeekView = model.WeekView; existingModel.ListView = model.ListView; _calendarWidget.UpdateModel(existingModel); } return(Ok(existingModel)); } return(BadRequest()); }
public async Task <IViewComponentResult> InvokeAsync(CalendarWidgetSetting model) { return(View(model)); }
public async Task <IViewComponentResult> InvokeAsync(CalendarWidgetSetting id) { _calendarSecurity.AuthorizeForCreateEvents(); return(View()); }