Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo

This commit is contained in:
Christian
2022-04-19 18:33:43 +02:00
6 changed files with 15 additions and 21 deletions

View File

@@ -2031,6 +2031,8 @@ namespace BeWo.Scheduler.View
w.EmployeeList.Count > 0 && w.EmployeeList.Any(a => a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid)) ||
BeWoUtils.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen)) && (!w.EmployeeList.TrueForAll(e2a => e2a.ParticipationAnswer == ParticipationAnswer.Absage) || w.EmployeeList == null || w.EmployeeList.Count == 0)).ToList();
var editableAppointments = appointments.Where(w => w.CanBeEdited).ToList();
if(!IsTasksVisible)
{
prefilteredAppointments = prefilteredAppointments.Where(app => !app.IsTask).ToList();

View File

@@ -651,6 +651,8 @@ namespace BeWo.Scheduler.ViewModel
pDataContract.DueDate = _DueDate;
}
pDataContract.CanBeEdited = CanBeEdited;
return pDataContract;
}

View File

@@ -1576,7 +1576,7 @@ namespace BeWoPlanerMobil.Controllers
var serviceRecordDC = Model.ServiceRecords.FirstOrDefault(f => f.ServiceRecordOid != null && f.ServiceRecordOid.Value.Equals(Model.ServiceRecordOidToDelete));
var version = serviceRecordDC?.ServiceRecordVersion;
if (version != null)
if (version != null && MainModel.IsAllowedToDeleteServiceRecord(serviceRecordDC))
{
OperationsService.DeleteServiceRecord(Model.ServiceRecordOidToDelete.Value, version.Value);

View File

@@ -461,12 +461,10 @@
</div>
</div>
@if(AbstractModel.IsDeleteBtnVisible)
<!-- Löschformular -->
@using(Html.BeginForm("DeleteServiceRecord", "Main", FormMethod.Post, new { id = "deletion-form" }))
{
using(Html.BeginForm("DeleteServiceRecord", "Main", FormMethod.Post, new { id = "deletion-form" }))
{
<input type="hidden" name="serviceRecordOidHolder" id="oidHolder" />
}
<input type="hidden" name="serviceRecordOidHolder" id="oidHolder" />
}
<!-- Statistik-Popup -->

View File

@@ -12,8 +12,6 @@ using System.Web;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BS.Shared.Core;
using log4net.Config;
using NHibernate;

View File

@@ -1129,21 +1129,21 @@ namespace BeWo.Service.ServiceImplementations
long? ownerOid = null;
//Keine Auswahl getroffen: Nur meine Termine anzeigen
if((pSelectedEmployees == null || pSelectedEmployees.Count == 0) && (pSelectedCustomer == null || pSelectedCustomer.Count == 0) && (pSelectedResources == null || pSelectedResources.Count == 0))
if((pSelectedEmployees?.Count == 0) && (pSelectedCustomer?.Count == 0) && (pSelectedResources?.Count == 0))
{
ownerOid = pEmployeeOid;
}
//Benutzer hat sich selber selektiert
if(pSelectedEmployees != null && pSelectedEmployees.Exists(e => e == pEmployeeOid))
if(pSelectedEmployees?.Exists(e => e == pEmployeeOid) ?? false)
{
ownerOid = pEmployeeOid;
}
//Man hat nur Customer und/oder Ressourcen ausgewählt, dann dürfen die eigenen nicht angezeigt werden
if((pSelectedEmployees == null || pSelectedEmployees.Count == 0) &&
(pSelectedCustomer != null && pSelectedCustomer.Count > 0 ||
pSelectedResources != null && pSelectedResources.Count > 0))
if((pSelectedEmployees?.Count == 0) &&
(pSelectedCustomer?.Count > 0 ||
pSelectedResources?.Count > 0))
{
ownerOid = null;
}
@@ -1162,9 +1162,8 @@ namespace BeWo.Service.ServiceImplementations
pSelectedEmployees?.Remove(pEmployeeOid);
}
if(pPrivateAppointmentsOnly && (pSelectedEmployees == null || pSelectedEmployees.Count == 0) && (pSelectedCustomer == null || pSelectedCustomer.Count == 0) && (pSelectedResources == null || pSelectedResources.Count == 0) && !(pSelectedEmployees == null || pSelectedEmployees.Count == 0) &&
(pSelectedCustomer != null && pSelectedCustomer.Count > 0 ||
pSelectedResources != null && pSelectedResources.Count > 0))
if(pPrivateAppointmentsOnly && (pSelectedEmployees?.Count == 0) && (pSelectedCustomer?.Count == 0) && (pSelectedResources?.Count == 0) && !(pSelectedEmployees?.Count == 0) &&
(pSelectedCustomer?.Count > 0 || pSelectedResources?.Count > 0))
{
ownerOid = pEmployeeOid;
}
@@ -1499,11 +1498,6 @@ namespace BeWo.Service.ServiceImplementations
add = false;
}
if(app.SchedulerAppointmentOid == 21852)
{
}
if(add)
{
result.Add(app);