MoK-Kalender weitergemacht

This commit is contained in:
2026-06-29 13:45:15 +02:00
parent 95bf29a901
commit c25af9c053
45 changed files with 2059 additions and 777 deletions

View File

@@ -1595,7 +1595,9 @@ namespace BeWo.Scheduler.View
private void AllowAppointmentCreateEvent(object sender, AppointmentOperationEventArgs e)
{
e.Allow = BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderAnsehen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAnlegen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnlegen);
e.Allow = BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderAnsehen) ||
BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAnlegen) ||
BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnlegen);
}
private void UpdateOptionPanel()
@@ -1733,9 +1735,9 @@ namespace BeWo.Scheduler.View
}
var empList = customFieldStorage.EmployeeList;
var or = customFieldStorage.Originator;
var originator = customFieldStorage.Originator;
return or.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) && empList.Any(a => a.IsPChanged && a.ParticipationAnswer != ParticipationAnswer.Offen && a.ParticipationAnswer != ParticipationAnswer.Verstrichen && !a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid));
return originator.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) && empList.Any(employee2AppointmentRelation => employee2AppointmentRelation.IsPChanged && employee2AppointmentRelation.ParticipationAnswer != ParticipationAnswer.Offen && employee2AppointmentRelation.ParticipationAnswer != ParticipationAnswer.Verstrichen && !employee2AppointmentRelation.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid));
}).ToList();
}
@@ -2176,7 +2178,7 @@ namespace BeWo.Scheduler.View
{
if(service.IsDataRefreshAllowed)
{
GetCacheObjects((c, e, r) =>
GetCacheObjects((customers, employees, resources) =>
{
ServiceFacade.DoResourceServiceAsync(s2 => s2.LoadFilteredAppointmentsMitAufgaben(
BeWoApp.HasLoggedOnUserRight(new[]
@@ -2218,11 +2220,11 @@ namespace BeWo.Scheduler.View
prefilteredAppointments = prefilteredAppointments.Where(app => !app.IsTask).ToList();
}
var vm = new SchedulerAppointmentListVM(prefilteredAppointments, c, e, r);
var vm = new SchedulerAppointmentListVM(prefilteredAppointments, customers, employees, resources);
if(pShouldShowAbsenceTimes)
{
vm.Appointments.AddRange(ViewModel.ConvertAbsenceTimesToAppointments(customerAbsenceTimes, end, e, c));
vm.Appointments.AddRange(ViewModel.ConvertAbsenceTimesToAppointments(employeeAbsenceTimes, end, e, c));
vm.Appointments.AddRange(ViewModel.ConvertAbsenceTimesToAppointments(customerAbsenceTimes, end, employees, customers));
vm.Appointments.AddRange(ViewModel.ConvertAbsenceTimesToAppointments(employeeAbsenceTimes, end, employees, customers));
//vm.Appointments.AddRange(ViewModel.ConvertAbsenceTimesToAppointments(employeeAbsenceTimes.Where(w => { return SelectedEmployees.Count == 0 || SelectedEmployees.Any(a => a.EmployeeOid == w.EmployeeOid); }), end, e, c));
}