- Nach Mitarbeitern, Ressourcen, und Klienten filtern
    - Ziele in Modal-Popup mit PartialView gepackt
This commit is contained in:
2022-08-10 14:13:29 +02:00
parent 04d972cb4b
commit 682e4b9222
22 changed files with 412 additions and 387 deletions

View File

@@ -17,7 +17,7 @@
<AssemblyName>BeWoPlanerMobil</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<UseIISExpress>false</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
@@ -1335,7 +1335,6 @@
<Content Include="Scripts\view-scripts\customer.js" />
<Content Include="Scripts\view-scripts\main.js" />
<Content Include="TestWebService.asmx" />
<Content Include="Scripts\devExpressScheduler.js" />
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
@@ -1374,6 +1373,7 @@
<Content Include="Views\Scheduler\AppointmentFormPartial.cshtml" />
<Content Include="Views\Main\GroupBookingPartial.cshtml" />
<Content Include="Views\Main\SingleBookingPartial.cshtml" />
<Content Include="Views\Main\GoalTreePartial.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
@@ -1573,7 +1573,7 @@
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort>8808</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:8808/</IISUrl>
<IISUrl>http://localhost/BeWoPlanerMobil</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>
<UseIISExpress>false</UseIISExpress>
<Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<ProjectView>ShowAllFiles</ProjectView>
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
@@ -40,7 +41,7 @@ namespace BeWoPlanerMobil.Controllers
return null;
}
if(((MainModel) Session[ModelSessionConstants.MainModelKey])?.Employee == null)
if(((MainModel) Session[ModelSessionConstants.MainModelKey])?.Employee is null)
{
_Model = new MainModel { Employee = MobileSessionFacade.LoggedInEmployee };
Session[ModelSessionConstants.MainModelKey] = _Model;
@@ -63,7 +64,7 @@ namespace BeWoPlanerMobil.Controllers
{
var mandator = (MandatorDC) HttpContext.Session["mandator"];
if(mandator == null)
if(mandator is null)
{
mandator = OperationsService.GetMandator();
HttpContext.Session["mandator"] = mandator;
@@ -152,12 +153,12 @@ namespace BeWoPlanerMobil.Controllers
Model.ShowDistanceField = UserSettingsUtils.GetSettingValueAsBool(mandatorSettings, SettingsKeys.ShowDistanceFields);
Model.Dokutypes = ValueListService.GetAllValueListEntrysByType(ValueListEntryType.DocumentType);
if (Model.Dokutypes != null)
if(!(Model.Dokutypes is null))
{
Model.Dokutypes = Model.Dokutypes.OrderBy(s => s.ValueListEntryOid).ToArray();
}
if(MainModel.AllEmployees == null)
if(MainModel.AllEmployees is null)
{
MainModel.AllEmployees = EmployeeService.GetAllActiveEmployeesCompact().OrderBy(e => e.LastName).ToList();
}
@@ -192,38 +193,38 @@ namespace BeWoPlanerMobil.Controllers
{
var endDate = MainModel.GetEndDateOfSupportConcept(supportConcept);
return endDate == null || endDate.Value >= DateTime.Now.Date;
return endDate is null || endDate.Value >= DateTime.Now.Date;
}).ToList();
}
if(Model.ServiceCategories == null)
if(Model.ServiceCategories is null)
{
Model.ServiceCategories = new List<ServiceCategoryModel>();
}
if(Model.SelectedConceptCostBearerRelations == null)
if(Model.SelectedConceptCostBearerRelations is null)
{
Model.SelectedConceptCostBearerRelations = new List<SupportConceptCostBearerRelDC>();
}
if (Model.SelectedEmployee == null)
if(Model.SelectedEmployee is null)
{
Model.SelectedEmployee = MobileSessionFacade.LoggedInCompactEmployee;
}
Model.IsServiceRecordNoticeMandatory = UserSettingsUtils.GetSettingValueAsBool(mandatorSettings, SettingsKeys.IsServiceRecordNoticeMandatory);
var isInList = Model.SelectedSupportConceptListObject != null && Model.SupportConceptListObjects.Contains(Model.SelectedSupportConceptListObject);
var isInList = !(Model.SelectedSupportConceptListObject is null) && Model.SupportConceptListObjects.Contains(Model.SelectedSupportConceptListObject);
if(Model.SelectedSupportConceptListObject == null || !isInList)
if(Model.SelectedSupportConceptListObject is null || !isInList)
{
if (Model.SelectedSupportConceptListObject != null && !isInList)
if(!(Model.SelectedSupportConceptListObject is null) && !isInList)
{
Log.Info($"Model.SelectedSupportConceptListObject.Oid = {Model.SelectedSupportConceptListObject.CostBearer2SupportConceptOid} is not in list !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
StringBuilder sb = new StringBuilder();
foreach (var o in Model.SupportConceptListObjects)
var sb = new StringBuilder();
foreach(var o in Model.SupportConceptListObjects)
{
if (sb.Length > 0)
{
@@ -235,7 +236,7 @@ namespace BeWoPlanerMobil.Controllers
Log.Info($"Model.SupportConceptListObjects Oids = {sb}");
}
//Log.Info(String.Format("Main() Set CostBearer2SupportConceptOid = -1: Model.SelectedSupportConceptListObject == null {0}, isInList {1}", Model.SelectedSupportConceptListObject == null, isInList));
//Log.Info(String.Format("Main() Set CostBearer2SupportConceptOid = -1: Model.SelectedSupportConceptListObject is null {0}, isInList {1}", Model.SelectedSupportConceptListObject is null, isInList));
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.FirstOrDefault(f => f.CostBearer2SupportConceptOid == "-1") ?? Model.SupportConceptListObjects.First();
Model.CostBearer2SupportConceptOid = -1;
@@ -243,7 +244,7 @@ namespace BeWoPlanerMobil.Controllers
Model.HasAnyRatingTypes = OperationsService.GetAllRatingTypes().Any();
}
if(Model.CostBearer2SupportConceptOid != null)
if(!(Model.CostBearer2SupportConceptOid is null))
{
LoadRecordsToModel();
}
@@ -252,7 +253,7 @@ namespace BeWoPlanerMobil.Controllers
Model.IsZeiterfassungInStdMin = UserSettingsUtils.GetSettingValueAsBool(mandatorSettings, SettingsKeys.IsZeiterfassungInStdMin);
}
catch (Exception e)
catch(Exception e)
{
Log.Error(e.Message, e);
}
@@ -263,7 +264,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public void LoadGoalRatings()
{
if(Model == null)
if(Model is null)
{
return;
}
@@ -276,7 +277,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string RateSelectedGoal(long? ratingTypeOid, long? goalOid)
{
if(Model == null || ratingTypeOid == null || goalOid == null)
if(Model is null || ratingTypeOid is null || goalOid is null)
{
return _LeerzeichenFuerGetMethoden;
}
@@ -289,6 +290,15 @@ namespace BeWoPlanerMobil.Controllers
goal.RatingTypeOid = ratingTypeOid;
if(Model.IsInEditingMode && Model.SelectedGoals.Any(a => a.ValueListEntryOid.HasValue && a.ValueListEntryOid.Value == goal.ValueListEntryOid))
{
var selectedGoal = Model.SelectedGoals.FirstOrDefault(a => a.ValueListEntryOid.HasValue && a.ValueListEntryOid.Value == goal.ValueListEntryOid);
if(!(selectedGoal is null))
{
selectedGoal.RatingTypeOid = ratingTypeOid;
}
}
return SerializeObject(new GoalRating(rating?.DisplayName ?? string.Empty, goal.ValueListEntryOid ?? 0));
}
@@ -299,7 +309,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult SetShowExpiredSupportConcepts(FormCollection pCollection)
{
if (Model == null)
if(Model is null)
{
return Logout();
}
@@ -317,21 +327,19 @@ namespace BeWoPlanerMobil.Controllers
return base.Logout();
}
// Wird beim Neuladen der Seite ausgeführt per Get-Aufruf
[Authorize]
public string LoadGoals()
public void LoadGoals()
{
if((!Model.CostBearer2SupportConceptOid.HasValue || Model.CostBearer2SupportConceptOid.Value > 0) && Model.SelectedSupportConcept == null)
if((!Model.CostBearer2SupportConceptOid.HasValue || Model.CostBearer2SupportConceptOid.Value > 0) && Model.SelectedSupportConcept is null)
{
Logout();
return null;
}
var supportConcept = Model.SupportConcepts.FirstOrDefault(sc => sc.CostBearerRelations.Any(sc2Cb => sc2Cb.CostBearer2SupportConceptOid.HasValue && sc2Cb.CostBearer2SupportConceptOid.Value.Equals(Model.CostBearer2SupportConceptOid.Value)));
if (supportConcept == null)
if (supportConcept is null)
{
return null;
return;
}
Model.SelectedSupportConcept = supportConcept;
@@ -343,14 +351,15 @@ namespace BeWoPlanerMobil.Controllers
_ParentGoals = new Dictionary<long, ValueListEntryDC>();
foreach (var oid in missingParents)
{
LoadMissingParents(oid.Value);
if(oid.HasValue)
{
LoadMissingParents(oid.Value);
}
}
var allGoals = selectedGoals.Union(_ParentGoals.Values).ToList();
var goalTree = BuildGoalTree(allGoals);
return SerializeObject(goalTree);
Model.GoalTree = BuildGoalTree(allGoals);
}
private List<GoalTreeItem> BuildGoalTree(IReadOnlyCollection<ValueListEntryDC> goals)
@@ -368,7 +377,7 @@ namespace BeWoPlanerMobil.Controllers
goalTreeDic.Add(ziel.ValueListEntryOid.Value, treeItem);
if(ziel.ParentOid == null)
if(ziel.ParentOid is null)
{
goalTree.Add(treeItem);
}
@@ -438,9 +447,24 @@ namespace BeWoPlanerMobil.Controllers
}
*/
goalTree = goalTree.OrderBy(o => o.ValueListEntryOid).ToList();
foreach(var item in goalTree)
{
SortGoals(item);
}
return goalTree;
}
private void SortGoals(GoalTreeItem goalTreeItem)
{
goalTreeItem.Children = goalTreeItem.Children.OrderBy(s => s.ValueListEntryOid).ToList();
foreach(var test in goalTreeItem.Children)
{
SortGoals(test);
}
}
private void LoadMissingParents(long pParentOid)
{
while(true)
@@ -467,7 +491,7 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -613,7 +637,7 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -692,7 +716,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string LoadServiceCategories(long pServiceCategoryOid)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -719,7 +743,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string LoadTextbausteineForServiceCategory(long pServiceCategoryOid)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -747,7 +771,7 @@ namespace BeWoPlanerMobil.Controllers
}
Model.Textbausteine = textbausteine.Where(
w => (w.ServiceCategory == null || w.ServiceCategory.ServiceCategoryOid == pServiceCategoryOid) && !string.IsNullOrEmpty(w.Text)
w => (w.ServiceCategory is null || w.ServiceCategory.ServiceCategoryOid == pServiceCategoryOid) && !string.IsNullOrEmpty(w.Text)
&& (w.IsOnlyForEmployee && w.Employee.EmployeeOid.Equals(Model.Employee.EmployeeOid) || !w.IsOnlyForEmployee)).OrderBy(t => t.Text).ToList();
Model.Textbausteine.AddRangeIfElementsNotIn(Utils.GetParentTextModules(Model.Textbausteine));
@@ -764,7 +788,7 @@ namespace BeWoPlanerMobil.Controllers
}
}
var test = newItems.Where(item => item.ParentOid == null).ToList();
var test = newItems.Where(item => item.ParentOid is null).ToList();
if(test.Count == 0)
{
@@ -817,7 +841,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string LoadCompleteTextbausteinByOid(long pTextbausteinOid)
{
if (Model == null)
if(Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -825,7 +849,7 @@ namespace BeWoPlanerMobil.Controllers
var textModule = Model.Textbausteine.FirstOrDefault(f => f.TextModuleOid.HasValue && f.TextModuleOid.Value == pTextbausteinOid);
return textModule == null ? null : string.IsNullOrWhiteSpace(textModule.Text) ? textModule.Name : textModule.Text;
return textModule is null ? null : string.IsNullOrWhiteSpace(textModule.Text) ? textModule.Name : textModule.Text;
}
[HttpPost]
@@ -834,7 +858,7 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if(Model == null)
if(Model is null)
{
return Logout();
}
@@ -929,13 +953,13 @@ namespace BeWoPlanerMobil.Controllers
Model.NewServiceRecord = Model.GetServiceRecord(selectedRecordOid.Value);
}
if(Model.NewServiceRecord == null)
if(Model.NewServiceRecord is null)
{
return RedirectToActionPermanent("Main");
}
Model.NewServiceRecord.IP = Request.UserHostAddress;
// ToDo: Funktioniert noch nicht zu 100 %
Model.NewServiceRecord.Goals = Model.SelectedGoals;
Model.NewServiceRecord.Start = zeitenFeld[0];
Model.NewServiceRecord.End = zeitenFeld[1];
@@ -1151,7 +1175,7 @@ namespace BeWoPlanerMobil.Controllers
{
cb2ScOids.Add(scdc.CostBearerRelations.ElementAt(0).CostBearer2SupportConceptOid.Value);
if(org == null)
if(org is null)
{
org = scdc.CostBearerRelations.ElementAt(0).CostBearer;
if(org != null)
@@ -1161,7 +1185,7 @@ namespace BeWoPlanerMobil.Controllers
}
else
{
if(scdc.CostBearerRelations.ElementAt(0).CostBearer == null || !org.Equals(scdc.CostBearerRelations.ElementAt(0).CostBearer))
if(scdc.CostBearerRelations.ElementAt(0).CostBearer is null || !org.Equals(scdc.CostBearerRelations.ElementAt(0).CostBearer))
{
roundDuration = false;
}
@@ -1228,7 +1252,7 @@ namespace BeWoPlanerMobil.Controllers
item.GroupOid = Model.NewServiceRecord.GroupOid;
item.GroupRoundedDuration = groupDuration;
if(item.CostBearer != null && item.CostBearer.CostBearerOid == null && item.SupportConcept != null && item.SupportConcept.CostBearerList.Count > 0)
if(item.CostBearer != null && item.CostBearer.CostBearerOid is null && item.SupportConcept != null && item.SupportConcept.CostBearerList.Count > 0)
{
item.CostBearer.CostBearerOid = item.SupportConcept.CostBearerList[0].CostBearerOid;
}
@@ -1472,7 +1496,7 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if (Model == null)
if (Model is null)
{
return Logout();
}
@@ -1486,6 +1510,9 @@ namespace BeWoPlanerMobil.Controllers
LoadGoalRatings();
// ToDo: Hier LoadGoals aufrufen!
LoadGoals();
return ResetEditingMode();
}
catch (Exception e)
@@ -1498,12 +1525,12 @@ namespace BeWoPlanerMobil.Controllers
private void LoadServiceCategoriesToModel(long? cb2ScOid)
{
if (cb2ScOid == null)
if (cb2ScOid is null)
{
Log.Info("cb2ScOid == null !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
Log.Info("cb2ScOid is null !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
if (cb2ScOid == null && Model.IsInGroupBookingMode)
if (cb2ScOid is null && Model.IsInGroupBookingMode)
{
Model.ServiceCategories = CreateServiceCategoryModels(OperationsService.GetAllServiceDescriptions());
@@ -1544,14 +1571,14 @@ namespace BeWoPlanerMobil.Controllers
}
else
{
Log.Info("Model.SelectedSupportConcept == null !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
Log.Info("Model.SelectedSupportConcept is null !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
if (Model.SelectedSupportConceptListObject == null ||
if (Model.SelectedSupportConceptListObject is null ||
Model.SelectedSupportConceptListObject.CostBearer2SupportConceptOid == "-1")
{
Log.Info($"LoadServiceCategoriesToModel() Model.SelectedSupportConceptListObject == null {Model.SelectedSupportConceptListObject == null}, Model.SelectedSupportConceptListObject.CostBearer2SupportConceptOid == {Model.SelectedSupportConceptListObject?.CostBearer2SupportConceptOid}");
Log.Info($"LoadServiceCategoriesToModel() Model.SelectedSupportConceptListObject is null {Model.SelectedSupportConceptListObject is null}, Model.SelectedSupportConceptListObject.CostBearer2SupportConceptOid == {Model.SelectedSupportConceptListObject?.CostBearer2SupportConceptOid}");
}
if (Model.ServiceCategories != null)
@@ -1564,7 +1591,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult DeleteServiceRecord(FormCollection formCollection)
{
if (Model == null)
if (Model is null)
{
return Logout();
}
@@ -1592,14 +1619,14 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string UpdateGoals(string pGoalOids)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
}
var sc = Model.SelectedSupportConcept;
if (sc == null)
if (sc is null)
{
return _LeerzeichenFuerGetMethoden;
}
@@ -1616,7 +1643,14 @@ namespace BeWoPlanerMobil.Controllers
var goals = sc.Goals.Where(w => w.ValueListEntryOid.HasValue && selectedGoalOids.Contains(w.ValueListEntryOid.Value)).ToList();
Model.SelectedGoals = goals;
// ToDo: Hier liegt der Bug!
// ToDo: vorhandene Bewertungen beachten!
var stillSelectedGoals = Model.SelectedGoals.Where(s => goals.Any(a => a.ValueListEntryOid.HasValue && a.ValueListEntryOid.Value == s.ValueListEntryOid)).ToList();
Model.SelectedGoals = stillSelectedGoals;
Model.SelectedGoals.AddRangeIfElementsNotIn(goals);
//Model.SelectedGoals = goals;
return _LeerzeichenFuerGetMethoden;
}
@@ -1624,7 +1658,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string SetServiceDescription(long pServiceDescriptionOid)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -1638,7 +1672,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult LoadServiceRecords(FormCollection formCollection)
{
if (Model == null)
if (Model is null)
{
return Logout();
}
@@ -1658,7 +1692,7 @@ namespace BeWoPlanerMobil.Controllers
private void LoadRecordsToModel()
{
if (Model == null)
if (Model is null)
{
Logout();
return;
@@ -1693,7 +1727,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult SelectRecordToEdit(FormCollection formCollection)
{
if(Model == null)
if(Model is null)
{
return Logout();
}
@@ -1711,7 +1745,7 @@ namespace BeWoPlanerMobil.Controllers
var selectedServiceRecord = Model.GetServiceRecord(serviceRecordOid);
if(selectedServiceRecord == null)
if(selectedServiceRecord is null)
{
return RedirectToActionPermanent("Main");
}
@@ -1759,7 +1793,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string GetSelectedRecordInformation()
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -1778,7 +1812,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string GetSelectedRecordInformationWithOid(long oid)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -1792,7 +1826,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string CheckRights(string von, string bis, bool inEditMode, string dateString, string startString, string endString)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -1834,7 +1868,7 @@ namespace BeWoPlanerMobil.Controllers
checkServiceRecord = Model.ServiceRecords.FirstOrDefault(f => f.ServiceRecordOid.HasValue && f.ServiceRecordOid.Value.Equals(Model.SelectedServiceRecordOid));
}
if (checkServiceRecord == null)
if (checkServiceRecord is null)
{
checkServiceRecord = new ServiceRecordDC();
}
@@ -2101,7 +2135,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string ValidateServiceRecordDeletion(string serviceRecordOidString)
{
if(Model == null)
if(Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -2118,7 +2152,7 @@ namespace BeWoPlanerMobil.Controllers
var serviceRecord = Model.GetServiceRecord(serviceRecordOid);
if(serviceRecord == null)
if(serviceRecord is null)
{
return _LeerzeichenFuerGetMethoden;
}
@@ -2155,7 +2189,7 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -2169,7 +2203,7 @@ namespace BeWoPlanerMobil.Controllers
Log.Info("Error in SetServiceRecordEmployee:");
Log.Error(e.Message, e);
if (MainModel.AllEmployees == null)
if (MainModel.AllEmployees is null)
{
Log.Info("Weitere Infos: AllEmployees = null!");
}
@@ -2221,7 +2255,7 @@ namespace BeWoPlanerMobil.Controllers
return RedirectToActionPermanent("PreselectCustomer", "Customer", new {Model.SelectedSupportConcept.Customer.CustomerOid});
}
if(Model?.SelectedSupportConcept == null && (CustomerModel)Session[ModelSessionConstants.CustomerModelKey] != null)
if(Model?.SelectedSupportConcept is null && (CustomerModel)Session[ModelSessionConstants.CustomerModelKey] != null)
{
var customerModel = (CustomerModel) Session[ModelSessionConstants.CustomerModelKey];
customerModel.SelectedCustomerOid = null;
@@ -2257,7 +2291,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult SetGroupBookingMode(FormCollection pFormCollection)
{
if (Model == null)
if (Model is null)
{
return Logout();
}
@@ -2277,7 +2311,7 @@ namespace BeWoPlanerMobil.Controllers
/// Bei false wird davon ausgegangen, dass man von der Gruppenbuchung in eine Einzelbuchung wechselt und der vorher ausgewählte Mitarbeiter und Hilfeplan wird automatisch ausgewählt.</param>
private void ResetGroupBookingMode(bool pIsInGroupBookingMode)
{
if (Model == null)
if (Model is null)
{
Logout();
return;
@@ -2335,7 +2369,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult ResetEditingMode()
{
if (Model == null)
if (Model is null)
{
return Logout();
}
@@ -2368,7 +2402,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string AddSupportConceptCostBearerRelationsToGroupBooking(string pRelOids, string pGroupOids)
{
if(Model == null)
if(Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -2387,7 +2421,7 @@ namespace BeWoPlanerMobil.Controllers
rawGroupOids.DoForEach(s =>
{
var group = Model.GroupsOfPeople.FirstOrDefault(f => f.GroupOfPeopleOid.HasValue && f.GroupOfPeopleOid.Value.Equals(long.Parse(s)));
if(group == null)
if(group is null)
{
return;
}
@@ -2438,7 +2472,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string RemoveSupportConceptCostBearerRelationFromGroupBooking(string pRelOid)
{
if(Model == null)
if(Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -2465,7 +2499,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string AddEmployeesToGroupBooking(string pEmployeeOids)
{
if(Model == null)
if(Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -2493,7 +2527,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string GetSignatureImage(long serviceRecordOid, long signatureOid)
{
if(Model == null)
if(Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -2519,7 +2553,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult SetSupportConceptFilter(FormCollection formCollection)
{
if(Model == null)
if(Model is null)
{
return Logout();
}
@@ -2540,7 +2574,7 @@ namespace BeWoPlanerMobil.Controllers
[HttpPost]
public ActionResult CreateOrUpdateGroupBooking(FormCollection formCollection)
{
if(Model == null)
if(Model is null)
{
return Logout();
}
@@ -2658,7 +2692,7 @@ namespace BeWoPlanerMobil.Controllers
dauer = (int)(zeitenFeld[1] - zeitenFeld[0]).TotalMinutes;
}
if(Model.NewServiceRecord == null)
if(Model.NewServiceRecord is null)
{
return RedirectToActionPermanent("Main");
}

View File

@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BeWoPlanerMobil.Models;
@@ -33,7 +32,7 @@ namespace BeWoPlanerMobil.Controllers
return null;
}
if (((SchedulerModel) Session[ModelSessionConstants.SchedulerModelKey])?.Employee == null)
if (((SchedulerModel) Session[ModelSessionConstants.SchedulerModelKey])?.Employee is null)
{
_Model = new SchedulerModel { Employee = MobileSessionFacade.LoggedInEmployee };
Session[ModelSessionConstants.SchedulerModelKey] = _Model;
@@ -76,7 +75,7 @@ namespace BeWoPlanerMobil.Controllers
private void LoadAppointmentsForDate()
{
if(Model?.Employee.EmployeeOid == null)
if(Model?.Employee.EmployeeOid is null)
{
return;
}
@@ -99,7 +98,11 @@ namespace BeWoPlanerMobil.Controllers
end = sunday;
}
var appointments = KalenderService.LoadFilteredAppointmentsMitAufgaben(AbstractModel.HasRightToSeeAllEmployeeAppointments, Model.Employee.EmployeeOid.Value, start.Date, end, new List<long>(), new List<long>(), new List<long>(), false, false, false, false, true, true).ToList();
var selectedCustomers = Model.SelectedCustomers?.Select(s => s.CustomerOid).ToList() ?? new List<long>();
var selectedEmployees = Model.SelectedEmployees?.Select(s => s.EmployeeOid).ToList() ?? new List<long>();
var selectedResources = Model.SelectedResources?.Where(w => w.ResourceOid.HasValue).Select(s => s.ResourceOid.Value).ToList() ?? new List<long>();
var appointments = KalenderService.LoadFilteredAppointmentsMitAufgaben(AbstractModel.HasRightToSeeAllEmployeeAppointments, Model.Employee.EmployeeOid.Value, start.Date, end, selectedEmployees, selectedCustomers, selectedResources, false, false, false, false, true, true).ToList();
var tasks = appointments.Where(w => w.IsTask).ToList();
@@ -127,7 +130,7 @@ namespace BeWoPlanerMobil.Controllers
(date.InBetween(w.StartDate.Value, w.EndDate.Value, false) || date.CompareShortDates(w.StartDate.Value))
// Einzeltermine oder Ausnahmen und gelöschte Ausnahmen
&& (w.RecurrenceInfo == null || w.RecurrenceInfo != null && (w.Type == 3 || w.Type == 4))
&& (w.RecurrenceInfo is null || w.RecurrenceInfo != null && (w.Type == 3 || w.Type == 4))
).ToList();
@@ -239,7 +242,7 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if (Model == null)
if (Model is null)
{
Logout();
}
@@ -258,12 +261,12 @@ namespace BeWoPlanerMobil.Controllers
var isSuccessfulStartTime = DateTime.TryParseExact(rawStartTime, "HH:mm", null, DateTimeStyles.None, out var startTime);
var isSuccessfulEndTime = DateTime.TryParseExact(rawEndTime, "HH:mm", null, DateTimeStyles.None, out var endTime);
if(rawStartTime == null)
if(rawStartTime is null)
{
rawStartTime = "00:00";
}
if (rawEndTime == null)
if (rawEndTime is null)
{
rawEndTime = "00:00";
}
@@ -346,7 +349,7 @@ namespace BeWoPlanerMobil.Controllers
[HttpPost]
public ActionResult NavigateToPreviousDate()
{
if (Model == null)
if (Model is null)
{
Logout();
}
@@ -366,7 +369,7 @@ namespace BeWoPlanerMobil.Controllers
[HttpPost]
public ActionResult NavigateToNextDate()
{
if(Model == null)
if(Model is null)
{
Logout();
}
@@ -385,7 +388,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
[HttpPost]
public ActionResult SelectSchedulerDate(FormCollection formCollection) {
if (Model == null)
if (Model is null)
{
Logout();
}
@@ -447,7 +450,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public JsonResult CheckForOverlappingAppointments(string startDateRaw, string endDateRaw, string startTimeRaw, string endTimeRaw)
{
if (Model == null)
if (Model is null)
{
Logout();
return null;
@@ -480,7 +483,7 @@ namespace BeWoPlanerMobil.Controllers
// TODO: Serientermine überprüfen
if(Model.Appointments != null)
{
foreach(var appointment in Model.Appointments.Where(app => app.SchedulerAppointmentOid == null && app.IsTask == false))
foreach(var appointment in Model.Appointments.Where(app => app.SchedulerAppointmentOid is null && app.IsTask == false))
{
}
@@ -493,7 +496,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string SelectResourcesForAppointment(string resourceOids)
{
if(Model == null)
if(Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -513,7 +516,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string SelectEmployeesForAppointment(string oidString)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -529,7 +532,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string SelectCustomersForAppointment(string oidString)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -582,7 +585,7 @@ namespace BeWoPlanerMobil.Controllers
[HttpPost]
public ActionResult ChangeSchedulerView(FormCollection formCollection)
{
if(Model == null)
if(Model is null)
{
return Logout();
}
@@ -598,7 +601,7 @@ namespace BeWoPlanerMobil.Controllers
[HttpPost]
public ActionResult FindFreeIntervals(FormCollection formCollection)
{
if(Model == null)
if(Model is null)
{
return Logout();
}
@@ -628,7 +631,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string SelectEmployeesForIntervalFinder(string oidString)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -644,7 +647,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string SelectCustomersForIntervalFinder(string oidString)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -660,7 +663,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string SelectResourcesForIntervalFinder(string resourceOids)
{
if (Model == null)
if (Model is null)
{
Logout();
return _LeerzeichenFuerGetMethoden;
@@ -681,7 +684,7 @@ namespace BeWoPlanerMobil.Controllers
[HttpPost]
public ActionResult SetIsInIntervalFinderMode(FormCollection formCollection)
{
if(Model == null)
if(Model is null)
{
return Logout();
}
@@ -704,7 +707,7 @@ namespace BeWoPlanerMobil.Controllers
[HttpPost]
public ActionResult SelectIntervalForForm(FormCollection formCollection)
{
if(Model == null)
if(Model is null)
{
return Logout();
}
@@ -754,7 +757,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string ResetIntervalFinder()
{
if(Model == null)
if(Model is null)
{
return _LeerzeichenFuerGetMethoden;
}
@@ -765,5 +768,13 @@ namespace BeWoPlanerMobil.Controllers
return _LeerzeichenFuerGetMethoden;
}
[Authorize]
public ActionResult FetchAppointments()
{
LoadAppointmentsForDate();
return PartialView("OneDaySchedulerPartial", Model);
}
}
}

View File

@@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Linq;
using System.Web.Mvc;
using BeWo.View.Navigation.Filter;
@@ -212,6 +215,13 @@ namespace BeWoPlanerMobil.Models
set => _SelectedGoals = value;
}
private string GetRatingName(ValueListEntryDC ratedValueListEntry)
{
var rating = GoalRatingTypes.FirstOrDefault(f => f.RatingTypeOid.HasValue && f.RatingTypeOid.Value.Equals(ratedValueListEntry.RatingTypeOid));
return rating?.DisplayName ?? "NULL";
}
public ServiceRecordDC NewServiceRecord { get; set; }
public long? ServiceRecordOidToDelete { get; set; }
@@ -572,6 +582,8 @@ namespace BeWoPlanerMobil.Models
}
public bool HasAnyRatingTypes { get; set; }
public List<GoalTreeItem> GoalTree { get; set; } = new List<GoalTreeItem>();
}
public class CustomSelectListItem

View File

@@ -1,4 +1,4 @@
function changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, checkBoxIdSuffix) {
function changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, checkBoxIdSuffix, filterAppointmentsUrl) {
try {
if (url === undefined || url === null) {
return;
@@ -12,7 +12,9 @@
});
$.get(url, { oidString: oidStr }).done(function (jsonResult) {
updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url);
updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url, filterAppointmentsUrl);
$("#one-day-scheduler-partial-container").load(filterAppointmentsUrl);
});
} catch(error) {
logError(error.message);
@@ -20,7 +22,7 @@
}
// Col-Value berechnen
function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url) {
function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url, filterAppointmentsUrl) {
try {
if(isEmptyOrSpaces(jsonResult)) {
return;
@@ -48,7 +50,7 @@ function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupI
var id = itemIdPrefix + oid;
var removeParams = oid + ", '" + checkBoxIdSuffix + "', " + isCustomer + ", '" + url + "', '" + popupId + "', '" + listId + "', '" + itemIdPrefix + "'";
var removeParams = oid + ", '" + checkBoxIdSuffix + "', " + isCustomer + ", '" + url + "', '" + popupId + "', '" + listId + "', '" + itemIdPrefix + "', '" + filterAppointmentsUrl + "'";
var html =
"<div class=\"list-group-item my-auto\" id=\"" + id + "\">" +
@@ -76,7 +78,7 @@ function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupI
}
}
function removeSelectedItem(itemOid, itemSuffix, isCustomer, url, popupId, listId, itemIdPrefix) {
function removeSelectedItem(itemOid, itemSuffix, isCustomer, url, popupId, listId, itemIdPrefix, filterAppointmentsUrl) {
try {
var prefix = isCustomer ? "customer-" : "employee-";
@@ -86,7 +88,7 @@ function removeSelectedItem(itemOid, itemSuffix, isCustomer, url, popupId, listI
checkBox.prop("checked", false);
}
changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, itemSuffix);
changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, itemSuffix, filterAppointmentsUrl);
} catch(error) {
logError(error);
}

View File

@@ -1,4 +1,4 @@
function changeResourceSelection(popupId, url, listId, listItemIdPrefix, checkBoxIdPrefix) {
function changeResourceSelection(popupId, url, listId, listItemIdPrefix, checkBoxIdPrefix, filterAppointmentsUrl) {
var selectedOids = [];
var oidString = "";
@@ -13,11 +13,13 @@
}
$.get(url, { resourceOids: oidString }).done(function (jsonResult) {
updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupId, checkBoxIdPrefix, url);
updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupId, checkBoxIdPrefix, url, filterAppointmentsUrl);
$("#one-day-scheduler-partial-container").load(filterAppointmentsUrl);
});
}
function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupId, checkBoxIdPrefix, url) {
function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupId, checkBoxIdPrefix, url, filterAppointmentsUrl) {
var list = $("#" + listId);
list.empty();
@@ -41,7 +43,7 @@ function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupI
"</div>" +
"<p class=\"form-control border-0 bg-transparent text-truncate\">" + customListItem.Name + "<p>" +
"<div class=\"input-group-append\">" +
"<button class=\"btn btn-primary\" type=\"button\" onclick=\"removeSelectedResource('" + listItemId + "', '" + checkBoxId + "', '" + popupId + "', '" + url + "', '" + listId + "')\"><span class=\"fas fa-times-circle\"></span></button>" +
"<button class=\"btn btn-primary\" type=\"button\" onclick=\"removeSelectedResource('" + listItemId + "', '" + checkBoxId + "', '" + popupId + "', '" + url + "', '" + listId + "', '" + filterAppointmentsUrl + "')\"><span class=\"fas fa-times-circle\"></span></button>" +
"</div>" +
"</div>" +
"</div>" +
@@ -51,7 +53,8 @@ function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupI
});
}
function removeSelectedResource(listItemId, checkBoxId, popupId, url, listId) {
// ToDo: FetchAppointments-Url hinzufügen
function removeSelectedResource(listItemId, checkBoxId, popupId, url, listId, fetchAppointmentsUrl) {
$("#" + listItemId).remove();
var checkbox = $("#" + checkBoxId);
@@ -60,5 +63,5 @@ function removeSelectedResource(listItemId, checkBoxId, popupId, url, listId) {
checkbox.prop("checked", false);
}
changeResourceSelection(popupId, url, listId);
changeResourceSelection(popupId, url, listId, null, null, fetchAppointmentsUrl);
}

View File

@@ -440,53 +440,8 @@ function validateForm(form) {
}
}
var treeHtml = "";
function buildGoalsTree(treeData) {
var container = $("#goals-container");
container.empty();
treeHtml = "";
$.each(treeData, function(index) {
buildGoaldTreeBranch(treeData[index]);
});
container.append(treeHtml);
}
function buildGoaldTreeBranch(goalItem) {
var goalOid = goalItem.ValueListEntryOid;
var goalHeader = goalItem.Header;
var isChecked = getSelectedGoalOids() !== null && isInArray(goalOid, getSelectedGoalOids()) ? "checked" : "";
var ratingName = goalItem.RatingName;
if(!goalItem.IsLeaf) {
treeHtml +=
'<div class="card w-100 mb-3" id="c-' + goalOid + '">' +
'<div class="card-header px-1">' + goalHeader + "</div>" +
'<div class="card-body px-1 py-1">';
$.each(goalItem.Children, function(index) {
buildGoaldTreeBranch(goalItem.Children[index]);
});
treeHtml +=
"</div>" +
"</div>";
} else {
treeHtml +=
'<div class="custom-control custom-checkbox">' +
'<input type="checkbox" class="custom-control-input" id="' + goalOid + '" ' + isChecked + ' onchange="updateSelectedGoals()">' +
'<label class="custom-control-label" for="' + goalOid + '">' + goalHeader + "</label>" +
"<span id='goal-rating-" + goalOid + "' class='badge badge-bewo-goal-rating goal-rating-badge ml-1' onclick='showGoalRatingPopup(" + goalOid + ")'>" + ratingName + "</span>" +
"</div>";
}
}
function showGoalRatingPopup(goalOid) {
try {
console.log("jquery version " + $().jquery);
$("#goal-rating-popup").modal("show");
$("#goal-to-rate-oid").val(goalOid);
} catch (error) {
@@ -540,7 +495,7 @@ function checkChildNodes(parentOid) {
}
function getCheckedGoals() {
var rootElement = $("#goals-container");
var rootElement = $("#goals-tree");
var checkboxes = rootElement.find("input");
var selectedGoals = "";

View File

@@ -177,7 +177,7 @@ function getSignatures(signatureOidStrings, containerId) {
if(isUndefinedOrNull(json) || !checkJson(json)) {
if(!checkJson(json)) {
hideSpinner();
logError("Fehler loadConfirmationReceiptSignatures: " + json);
logError("Fehler loadConfirmationReceiptSignatures: <" + json + ">");
}
}
@@ -236,10 +236,10 @@ function hideSignatureContainer() {
$("#report-form-container").show();
}
function showSignaturePad(overwrite, signatureOidsString, canSign, cardBodyId, customerOid, numberOfEntries, customerName, timeSpan, isEmployeeSignature) {
function showSignaturePad(overwrite, signatureOidsString, canSign, cardBodyId, customerOid, numberOfEntries, customerName, timeSpan, isEmployeeSignature, employeeName) {
try {
cardHeaderButtonClick(cardBodyId);
$("#report-form-container").hide();
$("#report-signature-container-div").addClass("d-block");
@@ -252,7 +252,9 @@ function showSignaturePad(overwrite, signatureOidsString, canSign, cardBodyId, c
var leistungPlural = entryCount > 1 ? "en" : "";
$("#report-info-column-h4").html("Unterschrift" + plural + " für " + numberOfEntries + " erbrachte Leistung" + leistungPlural + " von " + customerName + " (" + timeSpan + ")");
var signatureGiverName = isEmployeeSignature ? employeeName : customerName;
$("#report-info-column-h4").html("Unterschrift" + plural + " von " + signatureGiverName + " für " + numberOfEntries + " erbrachte Leistung" + leistungPlural + " von " + customerName + " (" + timeSpan + ")");
if(overwrite) {
$("#overwriting-signature-alert").addClass("d-block");

View File

@@ -16,6 +16,6 @@ namespace BeWoPlanerMobil.Util
public long? TopmostParentOid { get; set; }
public string RatingName { get; set; } = "Bewerten";//string.Empty;
public string RatingName { get; set; } = "Bewerten";
}
}

View File

@@ -117,13 +117,6 @@
</text>
}
@if(Model?.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
{
<text>
initializeGoalsTreeView();
</text>
}
setInputFilter();
@if(Model.IsInGroupBookingMode)
@@ -248,12 +241,6 @@
return @(Model != null && Model.IsServiceRecordNoticeMandatory ? "true" : "false");
}
function initializeGoalsTreeView() {
$.get("@Url.Action("LoadGoals")").done(function(jsonGoals) {
buildGoalsTree($.parseJSON(jsonGoals));
});
}
function getSelectedGoalOids() {
return @Html.Raw(Json.Encode(Model.SelectedGoals.Select(s => s.ValueListEntryOid.Value).ToArray()));
}
@@ -372,27 +359,6 @@
</div>
</div>
<!-- Ziele und Maßnahmen Popup -->
<div class="modal" tabindex="-1" role="dialog" id="goal-popup">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title">Ziele und Maßnahmen</h6>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body">
<div id="goals-tree"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
</div>
</div>
</div>
</div>
<!-- Unterschriften-Layover -->
<div class="container-fluid d-none mb-3" id="signature-container">

View File

@@ -5,9 +5,9 @@
<div class="row">
<!-- Einzelbuchungsformular -->
<div class="col col-12 col-md-5">
@if (Model != null)
@if(Model != null)
{
using (Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { Id = "selectSupportConceptForm" }))
using(Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { Id = "selectSupportConceptForm" }))
{
var selectedSuportConceptTimeSpanColorClass = Model.SelectedSupportConceptListObject.IsAboutToExpire ? "text-bewo-is-about-to-expire" : Model.SelectedSupportConceptListObject.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
<div>
@@ -25,7 +25,7 @@
</a>
</div>
</div>
@if (Model.CostBearer2SupportConceptOid != null && Model.CostBearer2SupportConceptOid > 0)
@if(Model.CostBearer2SupportConceptOid != null && Model.CostBearer2SupportConceptOid > 0)
{
<div class="col-md-auto mt-3">
<button type="button" class="btn btn-outline-primary w-100 h-100" id="statistics-button" data-toggle="modal" data-target="#statistics-popup" onclick="showPieChart()">
@@ -62,7 +62,7 @@
<!-- Hilfeplanliste -->
<div class="list-group">
@foreach (var supportConceptListObject in Model.SupportConceptListObjects)
@foreach(var supportConceptListObject in Model.SupportConceptListObjects)
{
var timeSpanColorClass = supportConceptListObject.IsAboutToExpire ? "text-bewo-is-about-to-expire" : supportConceptListObject.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
@@ -87,7 +87,7 @@
<input type="text" class="d-none" name="CostBearer2SupportConceptOid" id="CostBearer2SupportConceptOid" value="@Model.SelectedSupportConceptListObject.CostBearer2SupportConceptOid">
}
using (Html.BeginForm("CreateOrUpdateServiceRecord", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset()", id = "singleBookingForm" }))
using(Html.BeginForm("CreateOrUpdateServiceRecord", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset()", id = "singleBookingForm" }))
{
<div class="mt-3">
<!-- Einzelbuchung: Mitarbeiter -->
@@ -99,12 +99,12 @@
</div>
</div>
</div>
@if (Model.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
@if(Model.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
{
<!-- Einzelbuchung: Ziele -->
<div class="form-row">
<div class="col-md">
<button type="button" class="btn btn-primary form-control my-3" data-toggle="collapse" data-target="#goals-container" id="goals-button">Ziele</button>
<button type="button" class="btn btn-primary form-control my-3" data-toggle="modal" data-target="#goal-popup" id="goals-button">Ziele</button>
</div>
</div>
<div class="form-row">
@@ -151,7 +151,7 @@
</div>
</div>
<!-- Einzelbuchung: Enddatum -->
@if (Model.IsEndDateVisible)
@if(Model.IsEndDateVisible)
{
<div class="col-md">
<div class="form-group mb-1">
@@ -200,7 +200,7 @@
<input type="text" class="form-control" id="duration" name="Dauer" onchange="onDurationChange()" value="@Model.DurationToEdit">
</div>
</div>
@if (Model.IsZeiterfassungInStdMin)
@if(Model.IsZeiterfassungInStdMin)
{
<div class="col-md">
<div class="form-group mb-1">
@@ -219,7 +219,7 @@
}
</div>
<!-- Einzelbuchung: Distanz -->
@if (Model.ShowDistanceField)
@if(Model.ShowDistanceField)
{
<div class="form-row">
<div class="col-md">
@@ -230,7 +230,7 @@
</div>
</div>
}
@if (AbstractModel.HasRightToSeeTextModules)
@if(AbstractModel.HasRightToSeeTextModules)
{
<!-- Einzelbuchung: Textbausteine -->
<div class="form-row" id="textmodule-container">
@@ -241,7 +241,7 @@
}
<div class="form-row">
<div class="col-md mt-3">
@if (Model.NumberOfDokuTypes == 0)
@if(Model.NumberOfDokuTypes == 0)
{
<div class="form-group">
<label for="dokufeld">Dokumentation</label>
@@ -251,7 +251,7 @@
else
{
<ul class="nav nav-tabs" role="tab-list">
@for (var i = 0; i < Model.Dokutypes.Length; i++)
@for(var i = 0; i < Model.Dokutypes.Length; i++)
{
var currentDokuType = Model.Dokutypes[i];
@@ -263,7 +263,7 @@
}
</ul>
<div class="tab-content" id="dokufelderTab">
@for (var i = 0; i < Model.Dokutypes.Length; i++)
@for(var i = 0; i < Model.Dokutypes.Length; i++)
{
var textareaName = i + 1 < 1 ? "Dokumentation" : "Dokumentation" + (i + 1);
@@ -282,9 +282,9 @@
<div class="mr-auto bd-highlight">
</div>
@if (Model.IsInEditingMode)
@if(Model.IsInEditingMode)
{
using (Html.BeginForm("ResetEditingMode", "Main", FormMethod.Post))
using(Html.BeginForm("ResetEditingMode", "Main", FormMethod.Post))
{
<button type="submit" class="btn btn-primary" onclick="showSpinner()">Abbrechen</button>
}
@@ -305,29 +305,29 @@
<!-- /Einzelbuchungsformular -->
<!-- Liste mit den Einträgen und dem Auswahl-Select -->
<div class="col col-12 col-md-7">
@if (Model != null)
@if(Model != null)
{
if (Model.SelectedSupportConcept != null || Model.CostBearer2SupportConceptOid == -2)
if(Model.SelectedSupportConcept != null || Model.CostBearer2SupportConceptOid == -2)
{
<div class="container-fluid w-100 mt-3 p-0">
@using (Html.BeginForm("LoadServiceRecords", "Main", FormMethod.Post, new { id = "selectServiceRecordForm" }))
@using(Html.BeginForm("LoadServiceRecords", "Main", FormMethod.Post, new { id = "selectServiceRecordForm" }))
{
<select name="Records" class="custom-select" onchange="showSpinner();this.form.submit();" id="timeFrameSelect">
<option value="-1">Zeitraum wählen</option>
<option value="7"
@{if (Model.Zeitraum == 7) { @Html.Raw("selected") }}>
@{if(Model.Zeitraum == 7) { @Html.Raw("selected") }}>
Letzte 7 Tage
</option>
<option value="30"
@{if (Model.Zeitraum == 30) { @Html.Raw("selected") }}>
@{if(Model.Zeitraum == 30) { @Html.Raw("selected") }}>
Letzte 30 Tage
</option>
<option value="90"
@{if (Model.Zeitraum == 90) { @Html.Raw("selected") }}>
@{if(Model.Zeitraum == 90) { @Html.Raw("selected") }}>
Letzte 90 Tage
</option>
<option value="0"
@{if (Model.Zeitraum == 0) { @Html.Raw("selected") }}>
@{if(Model.Zeitraum == 0) { @Html.Raw("selected") }}>
Alle
</option>
</select>
@@ -338,9 +338,9 @@
<div class="container-fluid mt-3">
@{
foreach (var serviceRecord in Model.ServiceRecords)
foreach(var serviceRecord in Model.ServiceRecords)
{
if (serviceRecord.Start == null || serviceRecord.End == null)
if(serviceRecord.Start == null || serviceRecord.End == null)
{
continue;
}
@@ -352,7 +352,7 @@
var duration = (end - start).TotalMinutes;
var roundedDuration = MobileUtils.GetDecimalValueWithMaxDecimal(serviceRecord.RoundedDuration, 2);
if (serviceRecord.ServiceDescription.Category.Percentage > 0 && serviceRecord.ServiceDescription.Category.Percentage < 100)
if(serviceRecord.ServiceDescription.Category.Percentage > 0 && serviceRecord.ServiceDescription.Category.Percentage < 100)
{
roundedDuration = roundedDuration * serviceRecord.ServiceDescription.Category.Percentage / 100;
}
@@ -361,13 +361,13 @@
var goalsString = string.Empty;
if (serviceRecord.Goals != null && serviceRecord.Goals.Count > 0)
if(serviceRecord.Goals != null && serviceRecord.Goals.Count > 0)
{
foreach (var goal in serviceRecord.Goals)
foreach(var goal in serviceRecord.Goals)
{
goalsString += goal.TypeDescription;
if (serviceRecord.Goals.IndexOf(goal) < serviceRecord.Goals.Count - 1)
if(serviceRecord.Goals.IndexOf(goal) < serviceRecord.Goals.Count - 1)
{
goalsString += ", ";
}
@@ -392,9 +392,9 @@
<div class="card-body">
<div class="container">
<div class="row mb-3">
@if (Model.HasRightToEditServiceRecord(serviceRecord))
@if(Model.HasRightToEditServiceRecord(serviceRecord))
{
using (Html.BeginForm("SelectRecordToEdit", "Main", FormMethod.Post))
using(Html.BeginForm("SelectRecordToEdit", "Main", FormMethod.Post))
{
<div class="col-auto">
<button type="submit" class="btn btn-primary">
@@ -405,7 +405,7 @@
}
}
@if (MainModel.IsAllowedToDeleteServiceRecord(serviceRecord))
@if(MainModel.IsAllowedToDeleteServiceRecord(serviceRecord))
{
<div class="col-auto">
<button type="button" class="btn btn-primary" onclick="deleteServiceRecord(@serviceRecord.ServiceRecordOid)">
@@ -414,7 +414,7 @@
</div>
}
@if (Model.ShowSignature && !serviceRecord.SignatureOid.HasValue)
@if(Model.ShowSignature && !serviceRecord.SignatureOid.HasValue)
{
<div class="col-auto">
<button type="button" class="btn btn-primary" onclick="initializeSignature(@serviceRecord.ServiceRecordOid)">
@@ -422,7 +422,7 @@
</button>
</div>
}
else if (Model.ShowSignature && serviceRecord.SignatureOid.HasValue)
else if(Model.ShowSignature && serviceRecord.SignatureOid.HasValue)
{
<div class="col-auto">
<button type="submit" data-toggle="modal" class="btn btn-primary" onclick="getSignatureImage(@serviceRecord.ServiceRecordOid.Value, @serviceRecord.SignatureOid.Value)">
@@ -439,7 +439,7 @@
@durationStr
</div>
</div>
@if (Model.ShowDistanceField && serviceRecord.DistanceInMeter != null && serviceRecord.DistanceInMeter.Value > 0)
@if(Model.ShowDistanceField && serviceRecord.DistanceInMeter != null && serviceRecord.DistanceInMeter.Value > 0)
{
<div class="row">
<div class="col text-secondary">
@@ -450,7 +450,7 @@
</div>
</div>
}
@if (serviceRecord.Goals != null && serviceRecord.Goals.Count > 0)
@if(serviceRecord.Goals != null && serviceRecord.Goals.Count > 0)
{
<div class="row">
<div class="col text-secondary">
@@ -496,7 +496,7 @@
@{
var header1 = "Dokumentation";
if (Model.NumberOfDokuTypes >= 1)
if(Model.NumberOfDokuTypes >= 1)
{
header1 = Model.Dokutypes[0].TypeDescription;
}
@@ -510,20 +510,20 @@
</div>
</div>
for (var i = 1; i < serviceRecord.NoticeList.Count; i++)
for(var i = 1; i < serviceRecord.NoticeList.Count; i++)
{
var notice = serviceRecord.NoticeList[i];
if (string.IsNullOrWhiteSpace(notice) || Model.NumberOfDokuTypes <= i)
if(string.IsNullOrWhiteSpace(notice) || Model.NumberOfDokuTypes <= i)
{
continue;
}
var header = $"Dokumentation {i + 1}";
if (Model.NumberOfDokuTypes >= 2)
if(Model.NumberOfDokuTypes >= 2)
{
if (Model.NumberOfDokuTypes <= i)
if(Model.NumberOfDokuTypes <= i)
{
continue;
}
@@ -560,4 +560,26 @@
}
</div>
<!-- /Liste mit den Einträgen und dem Auswahl-Select -->
<!-- Ziele und Maßnahmen Popup -->
<div class="modal" tabindex="-1" role="dialog" id="goal-popup">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title">Ziele und Maßnahmen (test)</h6>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body">
<div id="goals-tree">
@Html.Partial("GoalTreePartial", Model)
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
</div>
</div>
</div>
</div>
</div>

View File

@@ -200,17 +200,20 @@
var canCustomerSign = customerSignatureState != SignatureState.All;
var canEmployeeSign = employeeSignatureState != SignatureState.All;
var employeeName = Model.Employee.ToString();
//overwrite, signatureOidsString, canSign, cardBodyId, customerOid, numberOfEntries, customerName, timeSpan, isEmployeeSignature
var methodName = "showSignaturePad(" +
$"{result.HasCustomerSignature.ToString().ToLower()}, " +
$"'{customerSignatureOidsString}', " +
$"{canCustomerSign.ToString().ToLower()}, " +
$"'#collapse-result-{result.Identifier}', " +
$"{result.CustomerOid}, " +
$"{result.Items.Count}, " +
$"'{result.CustomerName}', " +
$"'{Model.ConfirmationReceiptObject.TimeSpanString}', " +
"false)" ;
$"{result.HasCustomerSignature.ToString().ToLower()}, " +
$"'{customerSignatureOidsString}', " +
$"{canCustomerSign.ToString().ToLower()}, " +
$"'#collapse-result-{result.Identifier}', " +
$"{result.CustomerOid}, " +
$"{result.Items.Count}, " +
$"'{result.CustomerName}', " +
$"'{Model.ConfirmationReceiptObject.TimeSpanString}', " +
"false, " +
$"'{employeeName}')" ;
//overwrite, signatureOidsString, canSign, cardBodyId, customerOid, numberOfEntries, customerName, timeSpan, isEmployeeSignature
var overwrite_ssp = (employeeSignatureState == SignatureState.All).ToString().ToLower();
@@ -222,7 +225,9 @@
var customerName_ssp = result.CustomerName;
var timeSpan_ssp = Model.ConfirmationReceiptObject.TimeSpanString;
var employeeMethodName = $"showSignaturePad({overwrite_ssp}, '{signatureOidsString_ssp}', {canSign_ssp}, '{cardBodyId_ssp}', {customerOid_ssp}, {numberOfEntries_ssp}, '{customerName_ssp}', '{timeSpan_ssp}', true)";
var employeeMethodName = $"showSignaturePad({overwrite_ssp}, '{signatureOidsString_ssp}', {canSign_ssp}, '{cardBodyId_ssp}', {customerOid_ssp}, {numberOfEntries_ssp}, '{customerName_ssp}', '{timeSpan_ssp}', true, '{employeeName}')";
var employeeBtnColor = "transparent";
var customerBtnColor = "transparent";
@@ -269,10 +274,12 @@
<button class="btn btn-bewo-customers rounded mr-1" type="button" onclick="@methodName">
<span class="fas fa-signature"></span>
<span class="fas fa-@customerIcon" style="color: @customerBtnColor !important"></span>
K
</button>
<button class="btn btn-bewo-employee rounded" type="button" onclick="@employeeMethodName">
<span class="fas fa-signature"></span>
<span class="fas fa-@employeeIcon" style="color: @employeeBtnColor !important"></span>
M
</button>
</div>
</div>

View File

@@ -126,7 +126,7 @@
@selectedEmployee.DetailDescription
</p>
<div class="input-group-append">
<button type="button" class="btn btn-primary" onclick="removeSelectedItem(@selectedEmployee.EmployeeOid, '-checkbox', false, '@Url.Action("SelectEmployeesForAppointment", "Scheduler")', 'employees-popup', 'selected-employees-list', 'related-employee-')">
<button type="button" class="btn btn-primary" onclick="removeSelectedItem(@selectedEmployee.EmployeeOid, '-checkbox', false, '@Url.Action("SelectEmployeesForAppointment", "Scheduler")', 'employees-popup', 'selected-employees-list', 'related-employee-', '@Url.Action("FetchAppointments", "Scheduler")')">
<span class="fas fa-times-circle"></span>
</button>
</div>
@@ -159,7 +159,9 @@
var url = Url.Action("SelectCustomersForAppointment", "Scheduler");
var oid = selectedCustomer.CustomerOid;
var onClickParams = $"{oid}, '-checkbox', true, '{url}', 'customers-popup', 'selected-customers-list', 'related-customer-'";
var filterAppointmentsUrl = Url.Action("FetchAppointments", "Scheduler");
var onClickParams = $"{oid}, '-checkbox', true, '{url}', 'customers-popup', 'selected-customers-list', 'related-customer-', '{filterAppointmentsUrl}'";
}
<button type="button" class="btn btn-primary" onclick="removeSelectedItem(@onClickParams)">
@@ -285,7 +287,7 @@
var checkedValue = Model.SelectedResources.Contains(resource) ? "checked" : string.Empty;
<div class="custom-control custom-checkbox resource-text">
<input type="checkbox" class="custom-control-input" id="resource-@resource.ResourceOid-checkbox" @checkedValue onchange="changeResourceSelection('resources-popup', '@Url.Action("SelectResourcesForAppointment", "Scheduler")', 'selected-resources-list', 'relation-item-', '-checkbox')" />
<input type="checkbox" class="custom-control-input" id="resource-@resource.ResourceOid-checkbox" @checkedValue onchange="changeResourceSelection('resources-popup', '@Url.Action("SelectResourcesForAppointment", "Scheduler")', 'selected-resources-list', 'relation-item-', '-checkbox', '@Url.Action("FetchAppointments", "Scheduler")')" />
<label class="custom-control-label resource-name-label" for="resource-@resource.ResourceOid-checkbox">@resource.Name</label>
</div>
}
@@ -330,7 +332,7 @@
var checkedValue = Model.SelectedEmployees.Contains(employee) ? "checked" : string.Empty;
<div class="custom-control custom-checkbox employee-text">
<input type="checkbox" class="custom-control-input" id="employee-@employee.EmployeeOid-checkbox" @checkedValue onchange="changeItemListSelection('@Url.Action("SelectEmployeesForAppointment", "Scheduler")', 'employees-popup', 'selected-employees-list', 'related-employee-', false, '-checkbox')" />
<input type="checkbox" class="custom-control-input" id="employee-@employee.EmployeeOid-checkbox" @checkedValue onchange="changeItemListSelection('@Url.Action("SelectEmployeesForAppointment", "Scheduler")', 'employees-popup', 'selected-employees-list', 'related-employee-', false, '-checkbox', '@Url.Action("FetchAppointments", "Scheduler")')" />
<label class="custom-control-label employee-name-label" for="employee-@employee.EmployeeOid-checkbox">@employee.DetailDescription</label>
</div>
}
@@ -371,7 +373,7 @@
var checkedValue = Model.SelectedCustomers.Contains(customer) ? "checked" : string.Empty;
<div class="custom-control custom-checkbox customer-text">
<input type="checkbox" class="custom-control-input" id="customer-@customer.CustomerOid-checkbox" @checkedValue onchange="changeItemListSelection('@Url.Action("SelectCustomersForAppointment", "Scheduler")', 'customers-popup', 'selected-customers-list', 'related-customer-', true, '-checkbox')" />
<input type="checkbox" class="custom-control-input" id="customer-@customer.CustomerOid-checkbox" @checkedValue onchange="changeItemListSelection('@Url.Action("SelectCustomersForAppointment", "Scheduler")', 'customers-popup', 'selected-customers-list', 'related-customer-', true, '-checkbox', '@Url.Action("FetchAppointments", "Scheduler")')" />
<label class="custom-control-label customer-name-label" for="customer-@customer.CustomerOid-checkbox">@customer.DetailDescription</label>
</div>
}

View File

@@ -226,7 +226,9 @@
var url = Url.Action("SelectEmployeesForIntervalFinder", "Scheduler");
var oid = selectedEmployee.EmployeeOid;
var onClickParams = $"{oid}, '-interval-finder-checkbox', false, '{url}', 'employees-interval-finder-popup', 'employees-interval-finder-popup', 'related-employee-interval-finder-'";
var filterAppointmentsUrl = Url.Action("FetchAppointments", "Scheduler");
var onClickParams = $"{oid}, '-interval-finder-checkbox', false, '{url}', 'employees-interval-finder-popup', 'employees-interval-finder-popup', 'related-employee-interval-finder-', '{filterAppointmentsUrl}'";
}
<button type="button" class="btn btn-primary" onclick="removeSelectedItem(@onClickParams)">
@@ -262,7 +264,9 @@
var url = Url.Action("SelectCustomersForIntervalFinder", "Scheduler");
var oid = selectedCustomer.CustomerOid;
var onClickParams = $"{oid}, '-interval-finder-checkbox', false, '{url}', 'customers-interval-finder-popup', 'customers-interval-finder-popup', 'related-customer-interval-finder-'";
var filterAppointmentsUrl = Url.Action("FetchAppointments", "Scheduler");
var onClickParams = $"{oid}, '-interval-finder-checkbox', false, '{url}', 'customers-interval-finder-popup', 'customers-interval-finder-popup', 'related-customer-interval-finder-', '{filterAppointmentsUrl}'";
}
<button type="button" class="btn btn-primary" onclick="removeSelectedItem(@onClickParams)">
<span class="fas fa-times-circle"></span>
@@ -293,7 +297,7 @@
@selectedResource.Name
</p>
<div class="input-group-append">
<button type="button" class="btn btn-primary" onclick="removeSelectedResource('related-resource-interval-finder-item-@selectedResource.ResourceOid', 'resource-@selectedResource.ResourceOid-interval-finder-checkbox', 'resources-interval-finder-popup', '@Url.Action("SelectResourcesForIntervalFinder", "Scheduler")', 'selected-resources-interval-finder-list')">
<button type="button" class="btn btn-primary" onclick="removeSelectedResource('related-resource-interval-finder-item-@selectedResource.ResourceOid', 'resource-@selectedResource.ResourceOid-interval-finder-checkbox', 'resources-interval-finder-popup', '@Url.Action("SelectResourcesForIntervalFinder", "Scheduler")', 'selected-resources-interval-finder-list', '@Url.Action("FetchAppointments", "Scheduler")')">
<span class="fas fa-times-circle"></span>
</button>
</div>
@@ -366,7 +370,7 @@
var checkedValue = Model.SelectedResourcesForIntervalFinder.Contains(resource) ? "checked" : string.Empty;
<div class="custom-control custom-checkbox resource-text">
<input type="checkbox" class="custom-control-input" id="resource-@resource.ResourceOid-interval-finder-checkbox" @checkedValue onchange="changeResourceSelection('resources-interval-finder-popup', '@Url.Action("SelectResourcesForIntervalFinder", "Scheduler")', 'selected-resources-interval-finder-list', 'related-resource-interval-finder-item-', '-interval-finder-checkbox')"/>
<input type="checkbox" class="custom-control-input" id="resource-@resource.ResourceOid-interval-finder-checkbox" @checkedValue onchange="changeResourceSelection('resources-interval-finder-popup', '@Url.Action("SelectResourcesForIntervalFinder", "Scheduler")', 'selected-resources-interval-finder-list', 'related-resource-interval-finder-item-', '-interval-finder-checkbox', '@Url.Action("FetchAppointments", "Scheduler")')"/>
<label class="custom-control-label resource-name-label" for="resource-@resource.ResourceOid-interval-finder-checkbox">@resource.Name</label>
</div>
}
@@ -411,8 +415,10 @@
var checkedValue = Model.SelectedEmployeesForIntervalFinder.Contains(employee) ? "checked" : string.Empty;
var url = Url.Action("SelectEmployeesForIntervalFinder", "Scheduler");
var filterAppointmentsUrl = Url.Action("FetchAppointments", "Scheduler");
var onClickParams = $"'{url}', 'employees-interval-finder-popup', 'selected-employees-interval-finder-list', 'related-employee-interval-finder-', false, '-interval-finder-checkbox'";
var onClickParams = $"'{url}', 'employees-interval-finder-popup', 'selected-employees-interval-finder-list', 'related-employee-interval-finder-', false, '-interval-finder-checkbox', '{filterAppointmentsUrl}'";
<div class="custom-control custom-checkbox interval-finder-employee-text">
<input type="checkbox" class="custom-control-input" id="employee-@employee.EmployeeOid-interval-finder-checkbox" @checkedValue onchange="changeItemListSelection(@onClickParams)" />
@@ -457,7 +463,9 @@
var url = Url.Action("SelectCustomersForIntervalFinder", "Scheduler");
var onClickParams = $"'{url}', 'customers-interval-finder-popup', 'selected-customers-interval-finder-list', 'related-customer-interval-finder-', true, '-interval-finder-checkbox'";
var filterAppointmentsUrl = Url.Action("FetchAppointments", "Scheduler");
var onClickParams = $"'{url}', 'customers-interval-finder-popup', 'selected-customers-interval-finder-list', 'related-customer-interval-finder-', true, '-interval-finder-checkbox', '{filterAppointmentsUrl}'";
<div class="custom-control custom-checkbox interval-finder-customer-text">
<input type="checkbox" class="custom-control-input" id="customer-@customer.CustomerOid-interval-finder-checkbox" @checkedValue onchange="changeItemListSelection(@onClickParams)"/>

View File

@@ -1,19 +1,107 @@
@model BeWoPlanerMobil.Models.SchedulerModel
@* Ganztagestermine in eine Liste mit weniger Margin und Padding *@
@if (Model.AppointmentListItems.Any(a => a.AllDay))
{
foreach (var appointment in Model.AppointmentListItems.Where(a => a.AllDay))
<div id="one-day-scheduler-partial-container">
@if(Model.AppointmentListItems.Any(a => a.AllDay))
{
<div class="card w-100 mb-3 p-0">
<div class="card-header border-left appointment-header py-0 my-0" onclick="cardHeaderClick('#chevron-appointment-@appointment.Identifier', '#collapse-appointment-@appointment.Identifier')">
<div style="vertical-align: middle; display: inline;">
foreach(var appointment in Model.AppointmentListItems.Where(a => a.AllDay))
{
<div class="card w-100 mb-3 p-0">
<div class="card-header border-left appointment-header py-0 my-0" onclick="cardHeaderClick('#chevron-appointment-@appointment.Identifier', '#collapse-appointment-@appointment.Identifier')">
<div style="vertical-align: middle; display: inline;">
<i class="fas fa-chevron-down h-100 text-primary" id="chevron-appointment-@appointment.Identifier"></i>
</div>
<div class="p2 d-inline-flex text-primary h-100">
<button type="button" class="btn btn-link">
@if(appointment.IsTask)
{
<span class="text-bewo-task-red">@appointment.DateTimeInfo</span>
}
else
{
<span>@appointment.DateTimeInfo</span>
}
@if(appointment.Oid is null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@if(appointment.IsException)
{
<span class="fa-stack ml-2" style="display: inline;">
<i class="fas fa-sync-alt fa-stack-1x text-secondary"></i>
<i class="fas fa-slash fa-stack-1x text-secondary"></i>
</span>
}
</button>
</div>
</div>
<div class="collapse" id="collapse-appointment-@appointment.Identifier">
<div class="card-body">
<div class="container-fluid">
@if(appointment.HasEmployeesCustomersOrResources && !appointment.IsTask)
{
<div class="row">
@if(!string.IsNullOrWhiteSpace(appointment.EmployeeListInfo))
{
<div class="col col-12 col-md-@appointment.ColSize">
<i class="fas fa-user text-bewo-employee"></i>
@appointment.EmployeeListInfo
</div>
}
@if(!string.IsNullOrWhiteSpace(appointment.CustomerListInfo))
{
<div class="col col-12 col-md-@appointment.ColSize">
<i class="fas fa-user text-bewo-customers"></i>
@appointment.CustomerListInfo
</div>
}
@if(!string.IsNullOrWhiteSpace(appointment.ResourceListInfo))
{
<div class="col col-12 col-md-@appointment.ColSize">
<i class="fas fa-cubes text-bewo-resource"></i>
@appointment.ResourceListInfo
</div>
}
</div>
<hr />
}
@if(Model.HasRightToEditAppointment(appointment.Oid) && !appointment.IsTask && appointment.Oid.HasValue)
{
using(Html.BeginForm("SelectAppointmentToEdit", "Scheduler", FormMethod.Post))
{
<div class="row mb-3">
<div class="col-auto">
<button type="submit" class="btn btn-primary" onclick="showSpinner()">
<span class="fas fa-edit"></span>
</button>
<input type="hidden" name="scheduler-oid-holder" value="@appointment.Oid" />
</div>
</div>
}
}
<p>@appointment.Description</p>
</div>
</div>
</div>
</div>
}
<hr />
}
@foreach(var appointment in Model.AppointmentListItems.Where(a => !a.AllDay))
{
<div class="card w-100 mb-3">
<div class="card-header border-left appointment-header" onclick="cardHeaderClick('#chevron-appointment-@appointment.Identifier', '#collapse-appointment-@appointment.Identifier')">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-primary" id="chevron-appointment-@appointment.Identifier"></i>
</div>
<div class="p2 d-inline-flex text-primary h-100">
<button type="button" class="btn btn-link">
@if (appointment.IsTask)
@if(appointment.IsTask)
{
<span class="text-bewo-task-red">@appointment.DateTimeInfo</span>
}
@@ -22,12 +110,12 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@if (appointment.IsException)
@if(appointment.IsException)
{
<span class="fa-stack ml-2" style="display: inline;">
<i class="fas fa-sync-alt fa-stack-1x text-secondary"></i>
@@ -40,24 +128,24 @@
<div class="collapse" id="collapse-appointment-@appointment.Identifier">
<div class="card-body">
<div class="container-fluid">
@if (appointment.HasEmployeesCustomersOrResources && !appointment.IsTask)
@if(appointment.HasEmployeesCustomersOrResources && !appointment.IsTask)
{
<div class="row">
@if (!string.IsNullOrWhiteSpace(appointment.EmployeeListInfo))
@if(!string.IsNullOrWhiteSpace(appointment.EmployeeListInfo))
{
<div class="col col-12 col-md-@appointment.ColSize">
<i class="fas fa-user text-bewo-employee"></i>
@appointment.EmployeeListInfo
</div>
}
@if (!string.IsNullOrWhiteSpace(appointment.CustomerListInfo))
@if(!string.IsNullOrWhiteSpace(appointment.CustomerListInfo))
{
<div class="col col-12 col-md-@appointment.ColSize">
<i class="fas fa-user text-bewo-customers"></i>
@appointment.CustomerListInfo
</div>
}
@if (!string.IsNullOrWhiteSpace(appointment.ResourceListInfo))
@if(!string.IsNullOrWhiteSpace(appointment.ResourceListInfo))
{
<div class="col col-12 col-md-@appointment.ColSize">
<i class="fas fa-cubes text-bewo-resource"></i>
@@ -68,9 +156,9 @@
<hr />
}
@if (Model.HasRightToEditAppointment(appointment.Oid) && !appointment.IsTask && appointment.Oid.HasValue)
@if(Model.HasRightToEditAppointment(appointment.Oid) && !appointment.IsTask && appointment.Oid.HasValue)
{
using (Html.BeginForm("SelectAppointmentToEdit", "Scheduler", FormMethod.Post))
using(Html.BeginForm("SelectAppointmentToEdit", "Scheduler", FormMethod.Post))
{
<div class="row mb-3">
<div class="col-auto">
@@ -88,91 +176,4 @@
</div>
</div>
}
<hr />
}
@foreach (var appointment in Model.AppointmentListItems.Where(a => !a.AllDay))
{
<div class="card w-100 mb-3">
<div class="card-header border-left appointment-header" onclick="cardHeaderClick('#chevron-appointment-@appointment.Identifier', '#collapse-appointment-@appointment.Identifier')">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-primary" id="chevron-appointment-@appointment.Identifier"></i>
</div>
<div class="p2 d-inline-flex text-primary h-100">
<button type="button" class="btn btn-link">
@if (appointment.IsTask)
{
<span class="text-bewo-task-red">@appointment.DateTimeInfo</span>
}
else
{
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@if (appointment.IsException)
{
<span class="fa-stack ml-2" style="display: inline;">
<i class="fas fa-sync-alt fa-stack-1x text-secondary"></i>
<i class="fas fa-slash fa-stack-1x text-secondary"></i>
</span>
}
</button>
</div>
</div>
<div class="collapse" id="collapse-appointment-@appointment.Identifier">
<div class="card-body">
<div class="container-fluid">
@if (appointment.HasEmployeesCustomersOrResources && !appointment.IsTask)
{
<div class="row">
@if (!string.IsNullOrWhiteSpace(appointment.EmployeeListInfo))
{
<div class="col col-12 col-md-@appointment.ColSize">
<i class="fas fa-user text-bewo-employee"></i>
@appointment.EmployeeListInfo
</div>
}
@if (!string.IsNullOrWhiteSpace(appointment.CustomerListInfo))
{
<div class="col col-12 col-md-@appointment.ColSize">
<i class="fas fa-user text-bewo-customers"></i>
@appointment.CustomerListInfo
</div>
}
@if (!string.IsNullOrWhiteSpace(appointment.ResourceListInfo))
{
<div class="col col-12 col-md-@appointment.ColSize">
<i class="fas fa-cubes text-bewo-resource"></i>
@appointment.ResourceListInfo
</div>
}
</div>
<hr />
}
@if (Model.HasRightToEditAppointment(appointment.Oid) && !appointment.IsTask && appointment.Oid.HasValue)
{
using (Html.BeginForm("SelectAppointmentToEdit", "Scheduler", FormMethod.Post))
{
<div class="row mb-3">
<div class="col-auto">
<button type="submit" class="btn btn-primary" onclick="showSpinner()">
<span class="fas fa-edit"></span>
</button>
<input type="hidden" name="scheduler-oid-holder" value="@appointment.Oid" />
</div>
</div>
}
}
<p>@appointment.Description</p>
</div>
</div>
</div>
</div>
}
</div>

View File

@@ -118,7 +118,7 @@
listCol = "col-md-12";
}
}
<div class="col col-12 @editorCol col-lg-3">
<div class="col col-12 @editorCol col-lg-3" id="test-container">
@if (Model.IsInIntervalFinderMode)
{
<!-- Intervallfinder -->
@@ -144,7 +144,7 @@
}
else
{
@Html.Partial("OneDaySchedulerPartial", Model)
Html.RenderAction("FetchAppointments", Model);
}
</div>
</div>

View File

@@ -38,13 +38,13 @@
<script src="~/Scripts/view-scripts/customer.js?v=1.11"></script>
<script src="~/Scripts/view-scripts/scheduler.js?v=1.11"></script>
<script src="~/Scripts/utils/dateUtils.js?v=1.11"></script>
<script src="~/Scripts/view-scripts/report.js?v=1.11"></script>
<script src="~/Scripts/view-scripts/report.js?v=1.12"></script>
<script src="~/Scripts/signature_pad-3.2.min.js?v=1.11"></script>
<script src="~/Scripts/utils/trimCanvas.js?v=1.11"></script>
<script src="~/Scripts/utils/resources-list-utils.js?v=1.11"></script>
<script src="~/Scripts/utils/list-utils.js?v=1.11"></script>
<script src="~/Scripts/utils/list-utils.js?v=1.12"></script>
@Html.DevExpress().GetStyleSheets(
@*@Html.DevExpress().GetStyleSheets(
new StyleSheet { ExtensionSuite = ExtensionSuite.NavigationAndLayout },
new StyleSheet { ExtensionSuite = ExtensionSuite.Editors },
new StyleSheet { ExtensionSuite = ExtensionSuite.HtmlEditor },
@@ -70,9 +70,9 @@
new Script { ExtensionSuite = ExtensionSuite.TreeList },
new Script { ExtensionSuite = ExtensionSuite.Spreadsheet },
new Script { ExtensionSuite = ExtensionSuite.SpellChecker }
)
)*@
<script type="text/javascript">
@*<script type="text/javascript">
function UpdateSchedulerHeight() {
scheduler.SetHeight(1);
var containerHeight = ASPxClientUtils.GetDocumentClientHeight();
@@ -83,7 +83,7 @@
scheduler.SetHeight(containerHeight);
}
</script>
</script>*@
<script>
$(document).ready(function() {
@@ -182,7 +182,7 @@
}
@if (Model != null)
@if(Model != null)
{
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top justify-content-end">
<div class="container-fluid">

View File

@@ -28,6 +28,9 @@ namespace BeWo.Data.ICF
{
file = "icf.xml";
}
var baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
file = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICF\" + file);
//file = @"D:\Projects\beyondSoft\BeWoPlaner\BeWo\Data\ICF\icf.xml";
_File = XDocument.Load(file);

View File

@@ -5802,6 +5802,7 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(e);
}
}
public List<ValueListEntryDC> GetWholeIcfOhneImportierte(List<ValueListEntryDC> vorhandeneZiele)
{
try

View File

@@ -655,7 +655,7 @@ namespace BS.Shared.Core
var exists = Directory.Exists(path);
if (exists)
if(exists)
{
using (var file = new StreamWriter(path + pFilename, true))
{

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using BS.Shared.DataContracts.Compact;
using System.Runtime.Serialization;
namespace BS.Shared.DataContracts
{