- @*@if(Html.IsInDebugMode())
+ @*@if(Html.IsInDebugMode())
{
}*@
+
@@ -722,4 +866,32 @@
@Html.Partial("AptFltCustomersPartial", Model)
-@Html.Partial("AptFltResourcesPartial", Model)
\ No newline at end of file
+@Html.Partial("AptFltResourcesPartial", Model)
+
+
\ No newline at end of file
diff --git a/BeWoPlanerMobil/Views/DevExpressScheduler/SchedulerHelper.cs b/BeWoPlanerMobil/Views/DevExpressScheduler/SchedulerHelper.cs
index 38e2707ea..82840b150 100644
--- a/BeWoPlanerMobil/Views/DevExpressScheduler/SchedulerHelper.cs
+++ b/BeWoPlanerMobil/Views/DevExpressScheduler/SchedulerHelper.cs
@@ -58,6 +58,8 @@ namespace BeWoPlanerMobil.Views.DevExpressScheduler
appointmentStorage.CustomFieldMappings.Add(new ASPxAppointmentCustomFieldMapping("CanBeViewed", "CanBeViewed"));
appointmentStorage.CustomFieldMappings.Add(new ASPxAppointmentCustomFieldMapping("CanBeDeleted", "CanBeDeleted"));
+ appointmentStorage.CustomFieldMappings.Add(new ASPxAppointmentCustomFieldMapping("NewSchedulerAppointmentVersion", "NewSchedulerAppointmentVersion"));
+
return appointmentStorage;
}
diff --git a/BeWoPlanerMobil/Views/DevExpressScheduler/SchedulerPagePartial.cshtml b/BeWoPlanerMobil/Views/DevExpressScheduler/SchedulerPagePartial.cshtml
index 0bef741d6..bbe5a94f0 100644
--- a/BeWoPlanerMobil/Views/DevExpressScheduler/SchedulerPagePartial.cshtml
+++ b/BeWoPlanerMobil/Views/DevExpressScheduler/SchedulerPagePartial.cshtml
@@ -1,4 +1,5 @@
-@using BeWoPlanerMobil.Models
+@using System.Diagnostics
+@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util.SchedulerUtils
@using BeWoPlanerMobil.Views.DevExpressScheduler
@using BS.Shared.DataContracts
@@ -10,7 +11,7 @@
@functions
{
- //ToDo: So das EditForm verändern!
+ //ToDo: So das EditForm verändern:
//https://docs.devexpress.com/AspNetMvc/119776/components/scheduler/get-started/how-to-customize-the-appointment-dialog-using-view-model-api-working-with-custom-fields?utm_source=SupportCenter&utm_medium=website&utm_campaign=docs-feedback&utm_content=T743814
static AppointmentRecurrenceFormSettings CreateAppointmentRecurrenceFormSettings(CustomAppointmentTemplateContainer container)
@@ -45,13 +46,15 @@
"StatusSubMenu",
"LabelSubMenu",
"NewAllDayEvent",
- "NewRecurringEvent"
+ "NewRecurringEvent",
+ "DeleteAppointment"
};
if(menuId == SchedulerMenuItemId.AppointmentMenu)
{
+ e.Menu.Items.Add(new MenuItem("Löschen", "DeleteApt"));
e.Menu.Items.Add(new MenuItem("In die Zeiterfassung übertragen", "ToServiceRecord"));
-
+ e.Menu.Items.Add(new MenuItem("Serie zurücksetzen", "ResetRecurringApt"));
e.Menu.Items.Add(new MenuItem("Zusagen", "ConfirmApt"));
e.Menu.Items.Add(new MenuItem("Mit Vorbehalt zusagen", "MaybeApt"));
e.Menu.Items.Add(new MenuItem("Absagen", "CancelApt"));
@@ -193,16 +196,10 @@
settings.CustomActionRouteValues = new { Controller = "DevExpressScheduler", Action = "CustomCallBackAction" };
settings.ClientSideEvents.ToolTipDisplaying = "onToolTipDisplaying";
- settings.OptionsToolTips.SetAppointmentToolTipTemplateContent(() =>
- {
- Html.RenderPartial("CustomAppointmentToolTipPartial");
- });
+ settings.OptionsToolTips.SetAppointmentToolTipTemplateContent(() => { Html.RenderPartial("CustomAppointmentToolTipPartial"); });
settings.OptionsToolTips.SetAppointmentMobileToolTipTemplateContent(() => { Html.RenderPartial("CustomAppointmentToolTipPartial"); });
- settings.OptionsToolTips.SetAppointmentDragToolTipTemplateContent(() =>
- {
- Html.RenderPartial("CustomAppointmentDragToolTip");
- });
-
+ settings.OptionsToolTips.SetAppointmentDragToolTipTemplateContent(() => { Html.RenderPartial("CustomAppointmentDragToolTip"); });
+
settings.OptionsCustomization.AllowInplaceEditor = UsedAppointmentType.None;
settings.OptionsCustomization.AllowDisplayAppointmentFlyout = false;
@@ -211,7 +208,7 @@
settings.OptionsToolTips.ShowSelectionToolTip = false;
settings.ClientSideEvents.ActiveViewChanging = "onActiveViewChanged";
settings.ClientSideEvents.MenuItemClicked = "onMenuItemClicked";
-
+ settings.OptionsForms.RecurrenceFormName = "appointmentRecurrenceForm";
settings.OptionsCustomization.AllowAppointmentEdit = UsedAppointmentType.Custom;
settings.OptionsCustomization.AllowAppointmentCopy = UsedAppointmentType.Custom;
settings.OptionsCustomization.AllowAppointmentCreate = UsedAppointmentType.Custom;
@@ -227,6 +224,13 @@
settings.InitClientAppointment = (send, evargs) =>
{
+ var recurrenceId = evargs.Appointment.RecurrenceInfo?.Id?.ToString();
+ var index = evargs.Appointment.RecurrenceIndex;
+
+ evargs.Properties.Add("RecurrenceId", recurrenceId);
+
+ evargs.Properties.Add("HasOccurrencies", recurrenceId is string ? Model.RecurrenceIdsWithOccurrences.Contains(recurrenceId) : false);
+
var isTask = evargs.Appointment.CustomFields["IsTask"] is true;
var isAbsenceTime = evargs.Appointment.CustomFields["IsAbsenceTime"] is true;
var canBeEdited = evargs.Appointment.CustomFields["CanBeEdited"] is true;
@@ -259,40 +263,40 @@
foreach(var employee2Appointment in employeeList)
{
- if(employee2Appointment.SchedulerAppointmentOid is null || employee2Appointment.Employee2SchedulerAppointmentOid is null)
- {
- continue;
- }
+ if(employee2Appointment.SchedulerAppointmentOid is null || employee2Appointment.Employee2SchedulerAppointmentOid is null)
+ {
+ continue;
+ }
- var parcitipationInfoObject =
- new ParticipationInfoObject(
- employee2Appointment.Employee.DetailDescription,
- employee2Appointment.Employee2SchedulerAppointmentOid.Value,
- (int) employee2Appointment.ParticipationAnswer,
- employee2Appointment.SchedulerAppointmentOid.Value);
+ var parcitipationInfoObject =
+ new ParticipationInfoObject(
+ employee2Appointment.Employee.DetailDescription,
+ employee2Appointment.Employee2SchedulerAppointmentOid.Value,
+ (int) employee2Appointment.ParticipationAnswer,
+ employee2Appointment.SchedulerAppointmentOid.Value);
- participationInfos.Add(parcitipationInfoObject);
+ participationInfos.Add(parcitipationInfoObject);
}
foreach(var resource in resourceList)
{
- var resourceInfoObject =
- new ResourceInfoObject(
- oid,
- resource.Name,
- resource.Color
- );
+ var resourceInfoObject =
+ new ResourceInfoObject(
+ oid,
+ resource.Name,
+ resource.Color
+ );
resourceInfos.Add(resourceInfoObject);
}
foreach(var customer in customerList)
{
- var customerInfoObject =
- new CustomerInfoObject(
- oid,
- customer.DetailDescription
- );
+ var customerInfoObject =
+ new CustomerInfoObject(
+ oid,
+ customer.DetailDescription
+ );
customerInfos.Add(customerInfoObject);
}
@@ -301,6 +305,7 @@
evargs.Properties.Add("ResourceInfos", resourceInfos);
evargs.Properties.Add("CustomerInfos", customerInfos);
+
// originator ist bei einer Aufgabe null
var canConfirm = (false == isTask || false == isAbsenceTime) && end > DateTime.Now &&
false == (originator?.EmployeeOid.Equals(Model.LoggedInUserOid) ?? false) &&
@@ -314,6 +319,7 @@
settings.Storage.Appointments.Assign(SchedulerHelper.DefaultAppointmentStorage);
settings.Storage.EnableReminders = false;
settings.OptionsBehavior.ClientTimeZoneId = "W. Europe Standard Time";
+
settings.Width = Unit.Percentage(100);
settings.Height = Unit.Percentage(100);
@@ -321,8 +327,6 @@
settings.Start = BS.Shared.Extensions.DateTimeExtensions.GetDayOfWeek(DayOfWeek.Monday);
- settings.OptionsForms.RecurrenceFormName = "appointmentRecurrenceForm";
-
settings.ClientSideEvents.EndCallback = "resizeSchedulerEditForm";
settings.ClientSideEvents.Init = "resizeSchedulerEditForm";
@@ -354,6 +358,11 @@
settings.Views.TimelineView.SetHorizontalSameDayAppointmentTemplateContent(appointmentTemplateContainer => { Html.RenderPartial("HorizontalAppointmentTemplatePartial", appointmentTemplateContainer.AppointmentViewInfo); });
settings.Views.TimelineView.SetHorizontalAppointmentTemplateContent(appointmentTemplateContainer => { Html.RenderPartial("HorizontalAppointmentTemplatePartial", appointmentTemplateContainer.AppointmentViewInfo.Appointment); });
+ settings.OptionsForms.SetRecurrentAppointmentEditFormTemplateContent(c =>
+ {
+ Html.RenderPartial("CustomRecurrencePartial");
+ });
+
settings.OptionsForms.SetAppointmentFormTemplateContent(appointmentFormTemplateContainer =>
{
var container = (CustomAppointmentTemplateContainer) appointmentFormTemplateContainer;
@@ -374,7 +383,7 @@
EndTime = container.Appointment.End,
AllDay = container.Appointment.AllDay,
Description = container.Appointment.Description,
- EventType = (int?)container.Appointment.Type,
+ EventType = (int?) container.Appointment.Type,
CompletedNotice = container.Appointment.CustomFields["CompletedNotice"]?.ToString(),
CompletedUser = container.Appointment.CustomFields["CompletedUser"]?.ToString(),
TaskDescription = container.Appointment.CustomFields["TaskDescription"]?.ToString(),
@@ -384,7 +393,10 @@
IsTask = container.Appointment.CustomFields["IsTask"] is true,
DueDate = container.Appointment.CustomFields["DueDate"] is DateTime dueDate ? dueDate : null,
CompletedDate = container.Appointment.CustomFields["CompletedDate"] is DateTime completedDate ? completedDate : null,
- OriginatorOid = (container.Appointment.CustomFields["Originator"] as CompactEmployeeDC)?.EmployeeOid
+ OriginatorOid = (container.Appointment.CustomFields["Originator"] as CompactEmployeeDC)?.EmployeeOid,
+ RecurrenceInfo = container.Appointment.RecurrenceInfo?.ToXml(),
+ RecurrenceIndex = container.Appointment.RecurrenceIndex,
+ NewSchedulerAppointmentVersion = container.Appointment.CustomFields["NewSchedulerAppointmentVersion"] as long?
};
var appointmentModel = ViewData["EditableAppointmentModel"] != null ? (AppointmentModel)ViewData["EditableAppointmentModel"] : newModel;
diff --git a/BeWoPlanerMobil/Views/Login/Index.cshtml b/BeWoPlanerMobil/Views/Login/Index.cshtml
index c11f74129..d2966303e 100644
--- a/BeWoPlanerMobil/Views/Login/Index.cshtml
+++ b/BeWoPlanerMobil/Views/Login/Index.cshtml
@@ -24,7 +24,7 @@
- @if(ViewData[LoginController.LoginErrorIndex] != null || ViewData[AbstractBaseController.IsSessionTimedOut] != null)
+ @if(ViewData[LoginController.LoginErrorIndex] != null || TempData[LoginController.LoginErrorIndex] != null || ViewData[AbstractBaseController.IsSessionTimedOut] != null)
{
@ViewData[LoginController.LoginErrorIndex]
diff --git a/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml b/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml
index 44fff1a78..488aeb2cc 100644
--- a/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml
+++ b/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml
@@ -275,7 +275,7 @@
var $target;
var targetIndex;
- // Prüfen ob die Tab-Ansicht sichtbar ist (mehrere Dokutypes vorhanden)
+ // Prüfen, ob die Tab-Ansicht sichtbar ist (mehrere Dokutypes vorhanden)
var $activeTabTextarea = $('#dokufelderTab .tab-pane.active textarea');
if ($activeTabTextarea.length > 0) {
// Das aktive Tab-Textarea verwenden; Index aus der ID auslesen (sb-doku-textarea-{i})
diff --git a/BeWoPlanerMobil/Views/ReportViewer/BerichteFormPartialView.cshtml b/BeWoPlanerMobil/Views/ReportViewer/BerichteFormPartialView.cshtml
index a6a0cec48..b6cb618c7 100644
--- a/BeWoPlanerMobil/Views/ReportViewer/BerichteFormPartialView.cshtml
+++ b/BeWoPlanerMobil/Views/ReportViewer/BerichteFormPartialView.cshtml
@@ -5,150 +5,237 @@
@model BeWoPlanerMobil.Models.ReportViewerModel
@{
- if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
+ if(TempData[TempDataConstants.DoLogoutKey] is true)
{
}
}
-@if(Model.SelectedQuery != null && Model.SelectedQuery.Parameter != null && Model.SelectedQuery.Parameter.Count > 0)
+@if(Model?.SelectedQuery != null && Model?.SelectedQuery.Parameter != null && Model?.SelectedQuery.Parameter.Count > 0)
{
@@ -283,9 +370,9 @@
{
var selected = string.Empty;
- if(Model.SelectedValues.ContainsKey(parameterOid))
+ if(Model.QueryMonths.ContainsKey(parameterOid))
{
- if(Model.SelectedValues[parameterOid].Parameter is DateTime monthDate && month.Value.Equals(monthDate.Month.ToString()))
+ if(Model.QueryMonths[parameterOid].Month.ToString().Equals(month.Value))
{
selected = "selected";
}
@@ -295,7 +382,7 @@
var lastMonth = DateTime.Today.AddMonths(-1);
var selectedMonth = lastMonth.Month.ToString();
- if(selectedMonth.Equals(month.Text))
+ if(selectedMonth.Equals(month.Value))
{
selected = "selected";
}
@@ -309,9 +396,9 @@
{
var selected = string.Empty;
- if(Model.SelectedValues.ContainsKey(parameterOid) && Model.SelectedValues[parameterOid].Parameter is DateTime selectedYear)
+ if(Model.QueryYears.ContainsKey(parameterOid))
{
- if(year.Equals(selectedYear.Year))
+ if(year.Equals(Model.QueryYears[parameterOid].Year))
{
selected = "selected";
}
@@ -456,11 +543,13 @@
- @if(Model.HasRightToEdit || Model.HasRightToDelete)
+ @if(Model.HasRightToEdit || Model.CanDeleteAbsenceTime(absenceTime))
{
@@ -97,8 +97,8 @@
}
-
- @if(Model.HasRightToDelete)
+
+ @if(Model.CanDeleteAbsenceTime(absenceTime))
{