Verbesserungen in der Mobilversion:

Termine werden beim Anlegen und Bearbeiten auf Überschneidungen geprüft und es wird gewarnt, wenn dem so ist.
Das Unterschriftenfeld hat jetzt eine Breite von 90% des Browsers.
This commit is contained in:
Lyndon Jetten
2020-05-12 14:20:58 +02:00
parent 4831940074
commit 51dfd9416c
10 changed files with 437 additions and 300 deletions

View File

@@ -137,9 +137,8 @@
<Reference Include="DevExpress.XtraScheduler.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraScheduler.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraScheduler.v17.1.Reporting, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.5\lib\net40\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework.Aero">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
@@ -150,6 +149,9 @@
<Reference Include="PresentationFramework.Luna">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="RestSharp, Version=105.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -292,11 +294,11 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Detail\AbsenceTimesView.xaml">
<Page Include="View\Detail\AbsenceTimesView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SchulbegleitenderDienst\View\AbsenceTimeEditView.xaml">
<Page Include="SchulbegleitenderDienst\View\AbsenceTimeEditView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -638,7 +640,6 @@
<Compile Include="Converter\AnonymizationRight2VisibilityConverter.cs" />
<Compile Include="Converter\BoolNullCheckConverter.cs" />
<Compile Include="Converter\BoolReverseConverter.cs" />
<Compile Include="Converter\CellColorConverter.cs" />
<Compile Include="Converter\CollectionContainsTag2BoolConverter.cs" />
<Compile Include="Converter\CollectionCountToBoolConverter.cs" />
@@ -662,7 +663,7 @@
<Compile Include="Core\BeWoWebClient.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Core\Commands\ButtonClickCommand.cs" />
<Compile Include="Core\Commands\ButtonClickCommand.cs" />
<Compile Include="Core\Config\AppSettings.cs" />
<Compile Include="Core\CustomSpellCheckerLocalizer.cs" />
<Compile Include="Core\DocumentWatcher.cs" />
@@ -707,11 +708,11 @@
</Compile>
<Compile Include="SchulbegleitenderDienst\TagesansichtVM.cs" />
<Compile Include="SchulbegleitenderDienst\TagesVertretung.cs" />
<Compile Include="SchulbegleitenderDienst\ViewModel\AbsenceTimeEditViewModel.cs" />
<Compile Include="SchulbegleitenderDienst\ViewModel\AbsenceTimeEditViewModel.cs" />
<Compile Include="SchulbegleitenderDienst\ViewModel\SbdConfigVM.cs" />
<Compile Include="SchulbegleitenderDienst\ViewModel\VertretungsansichtBaseVM.cs" />
<Compile Include="SchulbegleitenderDienst\ViewModel\VertretungWochenansichtVM.cs" />
<Compile Include="SchulbegleitenderDienst\View\AbsenceTimeEditView.xaml.cs">
<Compile Include="SchulbegleitenderDienst\View\AbsenceTimeEditView.xaml.cs">
<DependentUpon>AbsenceTimeEditView.xaml</DependentUpon>
</Compile>
<Compile Include="SchulbegleitenderDienst\View\SbdAdminView.xaml.cs">
@@ -890,7 +891,7 @@
<Compile Include="View\Detail\BudgetView.xaml.cs">
<DependentUpon>BudgetView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\AbsenceTimesView.xaml.cs">
<Compile Include="View\Detail\AbsenceTimesView.xaml.cs">
<DependentUpon>AbsenceTimesView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Report\AbwesenheitstabelleView.xaml.cs">
@@ -2149,6 +2150,7 @@
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -2292,372 +2294,372 @@
<ItemGroup>
<PublishFile Include="Blacklight.Wpf.Controls">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Charts.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Data.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Data.v17.1.Linq">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Office.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.PivotGrid.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Printing.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.RichEdit.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Sparkline.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Utils.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Charts.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Core.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Docking.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Grid.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Grid.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Layout.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Mvvm.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Printing.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Printing.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Ribbon.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Scheduler.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Themes.LightGray.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Themes.Office2007Black.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Themes.Office2010Black.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Themes.Office2013.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.Xpf.Themes.Office2016White.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraBars.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraCharts.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraEditors.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraNavBar.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraPivotGrid.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraPrinting.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraReports.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraScheduler.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraScheduler.v17.1.Core">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraScheduler.v17.1.Reporting">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="DevExpress.XtraTreeList.v17.1">
<Visible>False</Visible>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
</ItemGroup>

View File

@@ -984,19 +984,28 @@ namespace BeWo
}
}
public static string GetChatServerURL()
public static void GetChatServerUrlAsync(Action<string> callback)
{
if (chatServerURL.IsNullOrEmpty())
if (string.IsNullOrWhiteSpace(chatServerURL))
{
#if DEBUG
Login login = new Login("5473568546");
#else
Login login = new Login(BeWoApp.Tenant);
#endif
chatServerURL = login.ServerUrl;
var tenant = Tenant;
#if DEBUG
tenant = "5473568546";
#endif
var login = new Login(tenant, serverUrl =>
{
if (!string.IsNullOrWhiteSpace(serverUrl))
{
callback(serverUrl);
}
});
}
else
{
callback?.Invoke(chatServerURL);
}
return chatServerURL;
}
public static void Cleanup()

View File

@@ -52,6 +52,7 @@ using DevExpress.Xpf.Bars;
using DevExpress.Xpf.DocumentViewer;
using DevExpress.Xpf.Printing.PreviewControl.Bars;
using DevExpress.XtraScheduler;
using RestSharp;
using Control = System.Windows.Controls.Control;
using Utils = BS.Shared.Core.Utils;
@@ -2109,26 +2110,40 @@ namespace BeWo.Core
{
try
{
var serverUrl = BeWoApp.GetChatServerURL();
var tenant = BeWoApp.Tenant;
if (!String.IsNullOrEmpty(serverUrl))
#if DEBUG
tenant = "5473568546";
#endif
BeWoApp.GetChatServerUrlAsync(serverUrl =>
{
#if DEBUG
var endurl = serverUrl + "/api/ownchat/sync/schedule/" + BeWoApp.Mandator.Apikey + "/5473568546";
#else
var endurl = serverUrl + "/api/ownchat/sync/schedule/" + BeWoApp.Mandator.Apikey + "/" + BeWoApp.Tenant;
#endif
WebRequest request = WebRequest.Create(endurl);
var client = new RestClient($"{serverUrl}/api/ownchat/sync/schedule/{BeWoApp.Mandator.Apikey}/{tenant}");
var request = new RestRequest();
request.Credentials = CredentialCache.DefaultCredentials;
client.ExecuteAsync(request, null);
});
var response = request.GetResponse();
// var serverUrl = BeWoApp.GetChatServerURL();
// if (!string.IsNullOrEmpty(serverUrl))
// {
//#if DEBUG
// var endurl = serverUrl + "/api/ownchat/sync/schedule/" + BeWoApp.Mandator.Apikey + "/5473568546";
//#else
// var endurl = serverUrl + "/api/ownchat/sync/schedule/" + BeWoApp.Mandator.Apikey + "/" + BeWoApp.Tenant;
//#endif
// WebRequest request = WebRequest.Create(endurl);
// request.Credentials = CredentialCache.DefaultCredentials;
// var response = request.GetResponse();
response.Close();
response.Dispose();
}
// response.Close();
// response.Dispose();
//}
}
catch (Exception e)
catch (Exception exception)
{
// MessageBox.Show("Die Verbindung konnte nicht aufgebaut werden.", "ownChat Fehler ", MessageBoxButton.OK);

View File

@@ -6,6 +6,7 @@ using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Security;
using System.Text;
using System.Threading;
using System.Windows;
@@ -415,24 +416,24 @@ namespace BeWo.View
// ServiceChatView.Show();
//#else
if (ServiceChatView == null)
if(ServiceChatView == null)
{
#if DEBUG
if (true)
if(true)
{
const string chatCode = "8ycX9-ZWbyJ";
const string tenant = "5473568546";
const string userName = "cb";
const string password = "bewo";
string apiKey;
string _Code = "8ycX9-ZWbyJ";
string _kundennummer = "5473568546";
string _benutzername = "cb";
string _passwort = "bewo";
string _apikey;
#else
var empAppCodes = ServiceFacade.DoEmployeeServiceSync(r=>r.GetAllEmployeeAppCodes(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
var empAppCodes = ServiceFacade.DoEmployeeServiceSync(r => r.GetAllEmployeeAppCodes(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
if (empAppCodes != null && empAppCodes.Count > 0)
if(empAppCodes != null && empAppCodes.Count > 0)
{
string _Code = "";
foreach (var item in empAppCodes)
foreach(var item in empAppCodes)
{
if(item.EmployeeCode != null && !item.EmployeeCode.Equals(""))
_Code = item.EmployeeCode;
@@ -452,11 +453,11 @@ namespace BeWo.View
// _ChatCode = xxx.EmployeeCode;
//}
apiKey = BeWoApp.Mandator.Apikey ?? "0000";
_apikey = BeWoApp.Mandator.Apikey ?? "0000";
if (!chatCode.Equals(""))
if(!_Code.Equals(""))
{
var login = new Login(tenant, chatCode, userName, password, apiKey);
var login = new Login(_kundennummer, _Code, _benutzername, _passwort, _apikey);
var x = login.AnmeldevorgangDurchFuehren();

View File

@@ -257,7 +257,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string LoadGoalTreeItems()
{
if ((!Model.CostBearer2SupportConceptOid.HasValue || Model.CostBearer2SupportConceptOid.Value > 0) || Model.SelectedSupportConcept == null)
if (!Model.CostBearer2SupportConceptOid.HasValue || Model.CostBearer2SupportConceptOid.Value > 0 || Model.SelectedSupportConcept == null)
{
return null;
}
@@ -309,7 +309,7 @@ namespace BeWoPlanerMobil.Controllers
goalTreeDic[ziel.ParentOid.Value].nodes.Add(node);
}
}
// TODO: SelectedGoals beachten -> Neue GoalState-Objekt im GoalDisplayItem hinzufügen mit dem Namen state { checked: true|false, disabled: false, expanded: false, selected: false }
return JsonConvert.SerializeObject(goalTree, Formatting.None, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
@@ -455,9 +455,6 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string SaveUnterschrift(string blob, string timeStamp, long? serviceRecordOid)
{
var watch = new Stopwatch();
watch.Start();
try
{
if (Model == null)
@@ -492,10 +489,6 @@ namespace BeWoPlanerMobil.Controllers
Log.Error(e.Message, e);
return SerializeObject("Fehler 540");
}
finally
{
watch.Stop();
}
}
private void ApplyWatermark()

View File

@@ -12,7 +12,6 @@ using BS.Shared.Extensions;
using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.Compatibility;
using static BeWoPlanerMobil.Util.MobileUtils;
namespace BeWoPlanerMobil.Controllers
@@ -167,40 +166,6 @@ namespace BeWoPlanerMobil.Controllers
Model.Appointments = holySweetFlyingFuck;
}
[Authorize]
public string UpdateAppointment(long oid, string betreff, string notice, string startZeit, string endZeit, string day, string endDate, string pLocation)
{
try
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return _LeerzeichenFuerGetMethoden;
}
var date = DateTime.Parse(day);
var end = DateTime.Parse(endDate);
var zeit = ConvertRecordTimesWithEndDate(startZeit, endZeit, date, end, 0);
var b1 = KalenderService.GetSchedulerAppointmentByid(oid);
b1.EndDate = zeit[1];
b1.StartDate = zeit[0];
b1.Subject = betreff;
b1.Description = notice;
b1.Location = pLocation;
KalenderService.UpdateSchedulerAppointments(new List<SchedulerAppointmentDC> { b1 });
return _LeerzeichenFuerGetMethoden;
}
catch (Exception e)
{
Log.Error(e.Message, e);
return SerializeObject("Fehler 550: Internal Server Error");
}
}
[Authorize]
[HttpPost]
public ActionResult InsertOrUpdateAppointment(FormCollection formCollection)
@@ -279,6 +244,11 @@ namespace BeWoPlanerMobil.Controllers
Model.SelectedDate = Model.SelectedDate.AddDays(-1);
if(Model != null)
{
Model.SelectedAppointment = null;
}
return RedirectToActionPermanent("Scheduler");
}
@@ -293,6 +263,11 @@ namespace BeWoPlanerMobil.Controllers
Model.SelectedDate = Model.SelectedDate.AddDays(1);
if(Model != null)
{
Model.SelectedAppointment = null;
}
return RedirectToActionPermanent("Scheduler");
}
@@ -310,6 +285,11 @@ namespace BeWoPlanerMobil.Controllers
Model.SelectedDate = schedulerDate;
if(Model != null)
{
Model.SelectedAppointment = null;
}
return RedirectToActionPermanent("Scheduler");
}
@@ -329,6 +309,7 @@ namespace BeWoPlanerMobil.Controllers
return RedirectToActionPermanent("Scheduler");
}
[Authorize]
public JsonResult ResetSelectedAppointment()
{
if (Model != null)
@@ -336,7 +317,43 @@ namespace BeWoPlanerMobil.Controllers
Model.SelectedAppointment = null;
}
return Json(null);
return Json(null, JsonRequestBehavior.AllowGet);
}
[Authorize]
public JsonResult CheckForOverlappingAppointments(string startDateRaw, string endDateRaw, string startTimeRaw, string endTimeRaw)
{
if (Model == null)
{
return null;
}
var isOverlapping = false;
var oid = Model.SelectedAppointment?.SchedulerAppointmentOid;
var isSuccessfulStartDate = DateTime.TryParseExact(startDateRaw, "dd.MM.yyyy", null, DateTimeStyles.None, out var startDate);
var isSuccessfulStartTime = DateTime.TryParseExact(startTimeRaw, "HH:mm", null, DateTimeStyles.None, out var startTime);
var isSuccessfulEndDate = DateTime.TryParseExact(endDateRaw, "dd.MM.yyyy", null, DateTimeStyles.None, out var endDate);
var isSuccessfulEndTime = DateTime.TryParseExact(endTimeRaw, "HH:mm", null, DateTimeStyles.None, out var endTime);
if (isSuccessfulStartDate && isSuccessfulStartTime && isSuccessfulEndDate && isSuccessfulEndTime)
{
startDate = startDate.MergeDatesByDate(startTime);
endDate = endDate.MergeDatesByDate(endTime);
var customerList = Model.SelectedAppointment?.CustomerList?.Select(customer => customer.CustomerOid).ToList() ?? new List<long>();
var employeeList = Model.SelectedAppointment?.EmployeeList?.Select(employee2Appointment => employee2Appointment.Employee.EmployeeOid).ToList() ?? new List<long>();
var resourceList = Model.SelectedAppointment?.ResourceList?.Select(resource => resource.ResourceOid.Value).ToList() ?? new List<long>();
var originator = Model.SelectedAppointment?.Originator ?? MobileSessionFacade.LoggedInCompactEmployee;
var recurrenceId = Model.SelectedAppointment?.RecurrenceId ?? string.Empty;
var recurrenceIndex = Model.SelectedAppointment?.RecurrenceIndex ?? 0;
isOverlapping = KalenderService.OverlappingAppointmentsExist(startDate, endDate, employeeList, customerList, resourceList, originator.EmployeeOid, oid, recurrenceId, recurrenceIndex);
}
return Json(isOverlapping, JsonRequestBehavior.AllowGet);
}
}
}

View File

@@ -1,7 +1,9 @@
function resetInsertAppointmentForm() {
$.get(getResetSelectedAppointmentUrl());
$("#insert-appointment-form").trigger("reset");
$("#scheduler-start-time, #scheduler-end-time, #subject, #location, #notice").val("");
$("#scheduler-start-date, #scheduler-end-date").val(moment().format("DD.MM.YYYY"));
}
function submitInsertAppointmentForm() {
@@ -20,6 +22,23 @@ function validateAppointmentForm() {
var endTimePicker = $("#scheduler-end-time-picker");
var endDatePicker = $("#scheduler-end-date-picker");
var isStartTimeInputEmpty = isEmptyOrSpaces($("#scheduler-start-time").val());
var isEndTimeInputEmpty = isEmptyOrSpaces($("#scheduler-end-time").val());
var isStartDateInputEmpty = isEmptyOrSpaces($("#scheduler-start-date").val());
var isEndDateInputEmpty = isEmptyOrSpaces($("#scheduler-end-date").val());
startTimePicker.datetimepicker("show");
startTimePicker.datetimepicker("hide");
startDatePicker.datetimepicker("show");
startDatePicker.datetimepicker("hide");
endTimePicker.datetimepicker("show");
endTimePicker.datetimepicker("hide");
endDatePicker.datetimepicker("show");
endDatePicker.datetimepicker("hide");
var startTime = startTimePicker.datetimepicker("date");
var endTime = endTimePicker.datetimepicker("date");
var startDate = startDatePicker.datetimepicker("date");
@@ -30,10 +49,12 @@ function validateAppointmentForm() {
var c = startTime === undefined || startTime === null || !startTime.isValid();
var d = endTime === undefined || endTime === null || !endTime.isValid();
if(a || b || c || d) {
if(a || b || c || d || isStartDateInputEmpty || isStartTimeInputEmpty || isEndTimeInputEmpty || isEndDateInputEmpty) {
hideSpinner();
$("#messagePopup .modal-body").html('<div class="alert alert-danger" role="alert">Die Zeit- und/oder Datumsangaben sind nicht korrekt.</div>');
showMessagePopup("Fehler");
$("#scheduler-start-time, #scheduler-end-time").val("");
return;
}
@@ -54,5 +75,55 @@ function validateAppointmentForm() {
return;
}
$("#insert-appointment-form").submit();
$.get(
getCheckForOverlappingAppointmentsUrl(),
{
startDateRaw: startDate.format("DD.MM.YYYY"),
endDateRaw: endDate.format("DD.MM.YYYY"),
startTimeRaw: startDate.format("HH:mm"),
endTimeRaw: endDate.format("HH:mm")
}
).done(function(result) {
var isOverlapping = $.parseJSON(result);
if(isOverlapping === true) {
hideSpinner();
$("#messagePopup .modal-body").html('<div class="alert alert-warning" role="alert">Dieser Termin überschneidet sich mit einem anderen bereits existierenden Termin.<br/> Möchten Sie ihn wirklich speichern?</div>');
showMessagePopupWithCallback("Überschneidung",
null,
function() {
$("#messagePopup .modal-body").html();
showSpinner();
$("#insert-appointment-form").submit();
});
} else {
$("#insert-appointment-form").submit();
}
});
}
function toggleFormVisibility() {
if($("#form-toggle-button").css("display") === "none") {
showAppointmentForm();
} else {
hideAppointmentForm();
}
}
function hideAppointmentForm() {
$("#form-container").collapse("hide");
}
function showAppointmentForm() {
$("#form-container").collapse("show");
}
function toggleAppointmentForm() {
var isVisible = $("#form-container").css("display") === "block";
if (isVisible) {
hideAppointmentForm();
} else {
showAppointmentForm();
}
}

View File

@@ -138,9 +138,11 @@
if($("#sketch-pad").length !== 0) {
var rowWidth = $("#canvas-row").innerWidth();
var canvasWidth = $("#sketch-pad").innerWidth();
var newWidth = rowWidth;
if(rowWidth < canvasWidth) {
$("#sketch-pad").prop("width", rowWidth);
if (newWidth !== canvasWidth) {
$("#sketch-pad").prop("width", newWidth);
new Signature();
}
}
@@ -576,30 +578,34 @@
<div class="col col-12 col-md-7">
@if(Model != null)
{
<div class="container-fluid w-100 mt-3 p-0">
@using(Html.BeginForm("LoadServiceRecords", "Main", FormMethod.Post, new { id = "selectServiceRecordForm" }))
{
<select name="Records" class="form-control" onchange="showSpinner(); this.form.submit();" id="timeFrameSelect">
<option value="-1"></option>
<option value="7"
@{if(Model.Zeitraum == 7) { @Html.Raw("selected") }}>
Letzte 7 Tage
</option>
<option value="30"
@{if(Model.Zeitraum == 30) { @Html.Raw("selected") }}>
Letzte 30 Tage
</option>
<option value="90"
@{if(Model.Zeitraum == 90) { @Html.Raw("selected") }}>
Letzte 90 Tage
</option>
<option value="0"
@{if(Model.Zeitraum == 0) { @Html.Raw("selected") }}>
Alle
</option>
</select>
}
</div>
if (Model.SelectedSupportConcept != null)
{
<div class="container-fluid w-100 mt-3 p-0">
@using(Html.BeginForm("LoadServiceRecords", "Main", FormMethod.Post, new { id = "selectServiceRecordForm" }))
{
<select name="Records" class="form-control" onchange="showSpinner(); this.form.submit();" id="timeFrameSelect">
<option value="-1">Zeitraum wählen</option>
<option value="7"
@{if(Model.Zeitraum == 7) { @Html.Raw("selected") }}>
Letzte 7 Tage
</option>
<option value="30"
@{if(Model.Zeitraum == 30) { @Html.Raw("selected") }}>
Letzte 30 Tage
</option>
<option value="90"
@{if(Model.Zeitraum == 90) { @Html.Raw("selected") }}>
Letzte 90 Tage
</option>
<option value="0"
@{if(Model.Zeitraum == 0) { @Html.Raw("selected") }}>
Alle
</option>
</select>
}
</div>
}
<div class="container-fluid mt-3">
@{

View File

@@ -5,42 +5,62 @@
ViewBag.Title = "BeWoPlaner Mobil";
}
<script>
$(function() {
$("#scheduler-date-picker").datetimepicker({
locale: "de",
format: "L"
<script>
$(function() {
$("#scheduler-date-picker").datetimepicker({
locale: "de",
format: "L"
});
$("#scheduler-start-date-picker").datetimepicker({
locale: "de",
format: "L"
});
$("#scheduler-end-date-picker").datetimepicker({
locale: "de",
format: "L"
});
$("#scheduler-start-time-picker").datetimepicker({
locale: "de",
format: "LT"
});
$("#scheduler-end-time-picker").datetimepicker({
locale: "de",
format: "LT"
});
$("#scheduler-date-picker").on("change.datetimepicker", ({ date, oldDate }) => {
submitSchedulerDateForm();
});
});
$("#scheduler-start-date-picker").datetimepicker({
locale: "de",
format: "L"
function getResetSelectedAppointmentUrl() {
return "@Url.Action("ResetSelectedAppointment", "Scheduler")";
}
function getCheckForOverlappingAppointmentsUrl() {
return "@Url.Action("CheckForOverlappingAppointments", "Scheduler")";
}
$(document).ready(function() {
toggleFormVisibility();
@if (Model?.SelectedAppointment != null)
{
<text>
showAppointmentForm();
</text>
}
});
$("#scheduler-end-date-picker").datetimepicker({
locale: "de",
format: "L"
$(window).resize(function() {
toggleFormVisibility();
});
$("#scheduler-start-time-picker").datetimepicker({
locale: "de",
format: "LT"
});
$("#scheduler-end-time-picker").datetimepicker({
locale: "de",
format: "LT"
});
$("#scheduler-date-picker").on("change.datetimepicker", ({ date, oldDate }) => {
submitSchedulerDateForm();
});
});
function getResetSelectedAppointmentUrl() {
return "@Url.Action("ResetSelectedAppointment", "Scheduler")";
}
</script>
</script>
<div class="container mt-3">
<div class="row justify-content-center">
@@ -78,100 +98,103 @@
<hr/>
<div class="row">
<div class="col col-12 col-md-5">
@using (Html.BeginForm("InsertOrUpdateAppointment", "Scheduler", FormMethod.Post, new {id = "insert-appointment-form"}))
{
<div class="mt-3">
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="scheduler-start-date">Start</label>
<div class="input-group date" id="scheduler-start-date-picker" data-target-input="nearest">
<input type="text" id="scheduler-start-date" name="StartDate" class="form-control datetimepicker-input" data-target="#scheduler-start-date-picker" data-toggle="datetimepicker" value="@Model.StartDateToEdit" />
<div class="input-group-append" data-target="#scheduler-start-date-picker" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
<button class="btn btn-primary w-100 d-lg-none d-xl-none d-xs-block d-sm-block d-md-none mt-3" data-toggle="collapse" data-target="#form-container" id="form-toggle-button" onclick="toggleAppointmentForm()">Terminformular anzeigen / ausblenden</button>
<div id="form-container" class="collapse show">
@using(Html.BeginForm("InsertOrUpdateAppointment", "Scheduler", FormMethod.Post, new { id = "insert-appointment-form" }))
{
<div class="mt-3">
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="scheduler-start-date">Start</label>
<div class="input-group date" id="scheduler-start-date-picker" data-target-input="nearest">
<input type="text" id="scheduler-start-date" name="StartDate" class="form-control datetimepicker-input" data-target="#scheduler-start-date-picker" data-toggle="datetimepicker" value="@Model.StartDateToEdit" />
<div class="input-group-append" data-target="#scheduler-start-date-picker" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
</div>
</div>
</div>
</div>
<div class="col-md">
<div class="form-group mb-1">
<label for="scheduler-start-time">Von</label>
<div class="input-group date" id="scheduler-start-time-picker" data-target-input="nearest">
<input type="text" id="scheduler-start-time" name="StartTime" class="form-control datetimepicker-input" data-target="#scheduler-start-time-picker" value="@Model.StartTimeToEdit" />
<div class="input-group-append" data-target="#scheduler-start-time-picker" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fas fa-clock"></i></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md">
<div class="form-group mb-1">
<label for="scheduler-start-time">Von</label>
<div class="input-group date" id="scheduler-start-time-picker" data-target-input="nearest">
<input type="text" id="scheduler-start-time" name="StartTime" class="form-control datetimepicker-input" data-target="#scheduler-start-time-picker" value="@Model.StartTimeToEdit" />
<div class="input-group-append" data-target="#scheduler-start-time-picker" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fas fa-clock"></i></div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="scheduler-end-date">Ende</label>
<div class="input-group date" id="scheduler-end-date-picker" data-target-input="nearest">
<input type="text" id="scheduler-end-date" name="EndDate" class="form-control datetimepicker-input" data-target="#scheduler-end-date-picker" data-toggle="datetimepicker" value="@Model.EndDateToEdit" />
<div class="input-group-append" data-target="#scheduler-end-date-picker" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
</div>
</div>
</div>
</div>
<div class="col-md">
<div class="form-group mb-1">
<label for="scheduler-end-time">Bis</label>
<div class="input-group date" id="scheduler-end-time-picker" data-target-input="nearest">
<input type="text" id="scheduler-end-time" name="EndTime" class="form-control datetimepicker-input" data-target="#scheduler-end-time-picker" value="@Model.EndTimeToEdit" />
<div class="input-group-append" data-target="#scheduler-end-time-picker" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fas fa-clock"></i></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="scheduler-end-date">Ende</label>
<div class="input-group date" id="scheduler-end-date-picker" data-target-input="nearest">
<input type="text" id="scheduler-end-date" name="EndDate" class="form-control datetimepicker-input" data-target="#scheduler-end-date-picker" data-toggle="datetimepicker" value="@Model.EndDateToEdit" />
<div class="input-group-append" data-target="#scheduler-end-date-picker" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
</div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="subject">Betreff</label>
<input type="text" id="subject" name="Subject" class="form-control" value="@Model.SubjectToEdit" />
</div>
</div>
</div>
<div class="col-md">
<div class="form-group mb-1">
<label for="scheduler-end-time">Bis</label>
<div class="input-group date" id="scheduler-end-time-picker" data-target-input="nearest">
<input type="text" id="scheduler-end-time" name="EndTime" class="form-control datetimepicker-input" data-target="#scheduler-end-time-picker" value="@Model.EndTimeToEdit" />
<div class="input-group-append" data-target="#scheduler-end-time-picker" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fas fa-clock"></i></div>
</div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="location">Ort</label>
<input type="text" id="location" name="Location" class="form-control" value="@Model.LocationToEdit" />
</div>
</div>
</div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="notice">Notiz</label>
<textarea class="form-control" id="notice" name="Notice">@Model.DescriptionToEdit</textarea>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="subject">Betreff</label>
<input type="text" id="subject" name="Subject" class="form-control" value="@Model.SubjectToEdit" />
</div>
</div>
</div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="location">Ort</label>
<input type="text" id="location" name="Location" class="form-control" value="@Model.LocationToEdit" />
</div>
</div>
</div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="notice">Notiz</label>
<textarea class="form-control" id="notice" name="Notice">@Model.DescriptionToEdit</textarea>
</div>
</div>
</div>
</div>
}
}
<div class="d-flex bd-highlight mt-3">
<div class="mr-auto bd-highlight">
<!-- Abstandshalter -->
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="reset-button" onclick="resetInsertAppointmentForm()">Abbrechen</button>
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="create-button" onclick="submitInsertAppointmentForm()">Speichern</button>
<div class="d-flex bd-highlight mt-3">
<div class="mr-auto bd-highlight">
<!-- Abstandshalter -->
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="reset-button" onclick="resetInsertAppointmentForm()">Abbrechen</button>
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="create-button" onclick="submitInsertAppointmentForm()">Speichern</button>
</div>
</div>
</div>
</div>
<!-- Terminliste -->
<div class="col col-12 col-md-7">
<div class="container-fluid mt-3 px-0">
<div class="col col-12 col-md-7 mt-3">
<div class="container-fluid px-0">
@foreach (var appointment in Model.AppointmentListItems)
{
<div class="card w-100 mb-3">

View File

@@ -17,10 +17,10 @@ namespace BeWo.Service.Plugins
{
#if DEBUG
var t = "demo";
t = "irgendwaswasesnichtgibt";
//t = "irgendwaswasesnichtgibt";
//t = "2356097460"; // Lebenshilfe Würzburg
//t = "1234567890"; // Präsentationsdatenbank
t = "5687373602"; // LH Duisburg
//t = "5687373602"; // LH Duisburg
//t = "5509064354"; // LH Duisburg Service Plus
//t = "5620636022"; // GPZ Biberach
//t = "8562233401"; // Sozialwirkstatt Schmitz