Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo into feature_rene_13_dakota

This commit is contained in:
2024-06-26 13:22:53 +02:00
111 changed files with 8572 additions and 3831 deletions

View File

@@ -0,0 +1,45 @@
using BeWo.AI.View;
using BeWo.View;
using BS.Shared;
using BS.Shared.Translation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.AI
{
class AiChatController
{
private static void CreateAiChatWindow(AiChatView view, double height, double width)
{
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Frage unsere KI"), view, height, width);
view.CloseButtonClicked += () => beWoWindow.Close();
beWoWindow.ShowDialog();
}
public static void ShowAiChatViewForServiceRecords(long c2sOid, DateTime start, DateTime end, double height, double width)
{
var ctrl = new AiChatView();
ctrl.InitServiceRecordQuery(c2sOid, start, end);
CreateAiChatWindow(ctrl, height, width);
}
public static void ShowAiChatViewForSingleCustomer(long customerOid, double height, double width)
{
var ctrl = new AiChatView();
ctrl.InitSingleCustomerQuery(customerOid);
CreateAiChatWindow(ctrl, height, width);
}
public static void ShowAiChatViewForObjects(TableID tableId, double height, double width)
{
var ctrl = new AiChatView();
ctrl.InitObjectQuery(tableId);
CreateAiChatWindow(ctrl, height, width);
}
}
}

View File

@@ -31,21 +31,41 @@ namespace BeWo.AI.View
{
public partial class AiChatView : BeWoView
{
public event Action CloseButtonClicked;
int type = 0; //0 = ServiceRecordQuery, 1 = SingleCustomerQuery, 2 = AllCustomerQuery
private long cb2scOid;
private long customerOid;
private TableID tableID;
private DateTime startDate;
private DateTime endDate;
public AiChatView(long c2sOid, DateTime start, DateTime end)
public AiChatView()
{
InitializeComponent();
}
public void InitServiceRecordQuery(long c2sOid, DateTime start, DateTime end)
{
type = 0;
this.cb2scOid = c2sOid;
this.startDate = start;
this.endDate = end;
}
public void InitSingleCustomerQuery(long customerOid)
{
type = 1;
this.customerOid = customerOid;
}
public void InitObjectQuery(TableID tableId)
{
type = 2;
tableID = tableId;
}
private void ReloadViewModel(AiChatDC dc)
{
@@ -57,14 +77,39 @@ namespace BeWo.AI.View
var acdc = new AiChatDC();
acdc.Prompt = TextBoxAnfrage.Text;
ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate),
dc =>
{
this.Dispatch(delegate
if (type == 1)
{
ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForSingleCustomer(acdc, customerOid),
dc =>
{
ReloadViewModel(dc);
this.Dispatch(delegate
{
ReloadViewModel(dc);
});
});
});
}
else if (type == 2)
{
ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForObjects(acdc, (int)tableID),
dc =>
{
this.Dispatch(delegate
{
ReloadViewModel(dc);
});
});
}
else
{
ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate),
dc =>
{
this.Dispatch(delegate
{
ReloadViewModel(dc);
});
});
}
}
private void btnClose_Click(object sender, RoutedEventArgs e)
{

View File

@@ -39,16 +39,16 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>true</UpdateRequired>
<MapFileExtensions>false</MapFileExtensions>
<InstallUrl>https://app.ownsoft.de/</InstallUrl>
<InstallUrl>https://app.ownsoft.de/test/</InstallUrl>
<TargetCulture>de-DE</TargetCulture>
<ProductName>BeWoPlaner</ProductName>
<PublisherName>ownSoft GmbH</PublisherName>
<MinimumRequiredVersion>2.0.1.240</MinimumRequiredVersion>
<MinimumRequiredVersion>2.0.1.243</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<TrustUrlParameters>true</TrustUrlParameters>
<ApplicationRevision>241</ApplicationRevision>
<ApplicationRevision>244</ApplicationRevision>
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
@@ -826,6 +826,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="AI\AiChatController.cs" />
<Compile Include="AI\View\AiChatView.xaml.cs">
<DependentUpon>AiChatView.xaml</DependentUpon>
</Compile>

View File

@@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>D:\Projects\beyondsoft\BeWoPlaner\Publish\|publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\</PublishUrlHistory>
<InstallUrlHistory>https://app.ownsoft.de/|https://app.ownsoft.de/test/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/</InstallUrlHistory>
<InstallUrlHistory>https://app.ownsoft.de/test/|https://app.ownsoft.de/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/</InstallUrlHistory>
<SupportUrlHistory />
<UpdateUrlHistory>https://app.ownsoft.de/|https://app.ownsoft.de/bewoplaner.application/</UpdateUrlHistory>
<BootstrapperUrlHistory />

View File

@@ -50,7 +50,7 @@ namespace BeWo
public static MainControl MainControl;
public static string ShortVersion = "3.21";
public static string Version = "Version 3.21";
public static string Version = "Version 3.21 (GKV Test)";
public static int RenderTier = 0;
@@ -368,10 +368,10 @@ namespace BeWo
showDienstplanung = true;
}
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.Arbeitszeiterfassung);
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowWorktime);
if (val != null && val.Equals("1"))
{
AppSettings.Arbeitszeiterfassung = true;
AppSettings.ShowWorktime = true;
}
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.EnableArbeitszeiterfassung);
if (val != null && val.Equals("1"))
@@ -508,6 +508,9 @@ namespace BeWo
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAI);
AppSettings.ShowAI = val != null && val.Equals("1");
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAIInternal);
AppSettings.ShowAIInternal = val != null && val.Equals("1");
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.MoKSessionTimeout);
if(int.TryParse(val, out var sessionTimeout))
{
@@ -592,6 +595,7 @@ namespace BeWo
showHilfeplanBezeichnung = true;
AppSettings.AllowStorno = true;
AppSettings.ShowAI = true;
AppSettings.ShowAIInternal = true;
//showInfoButtonInCalender = true;
#endif

View File

@@ -425,7 +425,7 @@ namespace BeWo.Core.Config
public bool DontShowSpitzabrechnung { get; set; }
public bool ShowDienstplanung { get; set; }
public bool Arbeitszeiterfassung { get; set; }
public bool ShowWorktime { get; set; }
public bool EnableArbeitszeiterfassung { get; set; }
public bool EnableAutomaticPauses { get; set; }
public bool EnableRestTimeWarning { get; set; }
@@ -447,6 +447,8 @@ namespace BeWo.Core.Config
public bool ShowAI { get; set; }
public bool ShowAIInternal { get; set; }
public bool AllowGkvAbrechnung { get; set; }
public bool ShowImportAbschlagszahlungen { get; set; }

View File

@@ -924,6 +924,8 @@ namespace BeWo
{
if (result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded)
{
Translator t = new Translator(new MultiLanguage.ServiceTranslator());
grid_root.Children.Remove(lWaitLayer);
var dlg = new TwoFactorAuthMessageDialog(lUserName, lPassword);
var message = Translator.Translate("Zwei Faktor Authentifizierung erforderlich");

View File

@@ -5465,6 +5465,15 @@ namespace BeWo.ServiceProxy
"t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.AiChatDC CreateAiQueryForServiceRecords(BS.Shared.DataContracts.AiChatDC acdc, long cb2scOid, System.DateTime startdate, System.DateTime enddate);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomer", ReplyAction="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomerResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomerBeWoFaultFaul" +
"t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.AiChatDC CreateAiQueryForSingleCustomer(BS.Shared.DataContracts.AiChatDC acdc, long customerOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateAiQueryForObjects", ReplyAction="http://tempuri.org/IOperationsService/CreateAiQueryForObjectsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateAiQueryForObjectsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.AiChatDC CreateAiQueryForObjects(BS.Shared.DataContracts.AiChatDC acdc, long objectTid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTable", ReplyAction="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableRespons" +
"e")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableBeWoFau" +
@@ -7475,6 +7484,16 @@ namespace BeWo.ServiceProxy
return base.Channel.CreateAiQueryForServiceRecords(acdc, cb2scOid, startdate, enddate);
}
public BS.Shared.DataContracts.AiChatDC CreateAiQueryForSingleCustomer(BS.Shared.DataContracts.AiChatDC acdc, long customerOid)
{
return base.Channel.CreateAiQueryForSingleCustomer(acdc, customerOid);
}
public BS.Shared.DataContracts.AiChatDC CreateAiQueryForObjects(BS.Shared.DataContracts.AiChatDC acdc, long objectTid)
{
return base.Channel.CreateAiQueryForObjects(acdc, objectTid);
}
public void DeleteCertainDienstEintragOutOfTable(long dienstEintragOid)
{
base.Channel.DeleteCertainDienstEintragOutOfTable(dienstEintragOid);

View File

@@ -137,10 +137,13 @@ namespace BeWo.View.Detail.Accounting
if (checked_invoice_bases.Count == 0)
{
#if DEBUG
if (MessageBox.Show("Sie haben keine Rechnung hinzugefügt. Wollen Sie fortfahren?", "GKV-Abrechnung erstellen", MessageBoxButton.YesNo, MessageBoxImage.Warning) != MessageBoxResult.Yes)
{
return;
}
#else
MessageBox.Show("Sie haben keine Rechnung hinzugefügt.", "GKV-Abrechnung erstellen", MessageBoxButton.OK, MessageBoxImage.Warning);
return;
#endif
}
MainControl.CloseCurrentPopUp();

View File

@@ -68,8 +68,11 @@
</dxg:GridControl.View>
</dxg:GridControl>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2">
<Button Content="Erstellen" x:Name="btn_create" Click="btn_create_Click" Padding="5 0" Margin="3" />
<Button Content="Abbrechen" x:Name="btn_cancel" Click="btn_cancel_Click" Margin="3" Padding="5 0" />
<Button Content=" Für alle neu erstellen auswählen " Click="btn_SelectAllNeu" Margin="3" />
<Button Content=" Für alle Diff-Rg erstellen auswählen " Click="btn_SelectAllDiff" Margin="3" />
<Button Content=" Alle abwählen " Click="btn_DeselectAll" Padding="5 0" Margin="3" />
<Button Content=" Erstellen " x:Name="btn_create" Click="btn_create_Click" Margin="20,3,3,3" />
<Button Content=" Abbrechen " x:Name="btn_cancel" Click="btn_cancel_Click" Margin="3" />
</StackPanel>
</Grid>
</GroupBox>

View File

@@ -55,6 +55,35 @@ namespace BeWo.View.Detail.Accounting
}
}
private void btn_SelectAllNeu(object sender, RoutedEventArgs e)
{
SetAllRowsSelection(true, false);
}
private void btn_SelectAllDiff(object sender, RoutedEventArgs e)
{
SetAllRowsSelection(false, true);
}
private void btn_DeselectAll(object sender, RoutedEventArgs e)
{
SetAllRowsSelection(false, false);
}
private void SetAllRowsSelection(bool selectNew, bool selectDiff)
{
var list = this.grid_newInvoices.ItemsSource as BindingList<ServiceInvoiceDC>;
if (list != null)
{
foreach (var item in list)
{
item.InvoiceBase.NeuErstellen = selectNew;
item.InvoiceBase.DiffErstellen = selectDiff;
}
grid_newInvoices.RefreshData();
}
}
private void Fire()
{
if (this.Closed != null)

View File

@@ -517,7 +517,17 @@
Grid.Column="1" Grid.Row="4"
Height="23" Margin="3"/>
</Grid>
<TextBlock x:Name="ButtonOpenAiChat" HorizontalAlignment="Left" Width="Auto" Margin="5,2,0,0" Grid.Column="0" Grid.Row="5" PreviewMouseLeftButtonDown="OpenAiChat">
<Hyperlink NavigateUri="https://www.bewoplaner.de" TargetName="newWindow" Foreground="Transparent" >
<Image HorizontalAlignment="Left" Source="..\..\Ressources\Icons\chatbot.png" Width="48" Height="48"
Style="{StaticResource toolbarImageStyle}" >
</Image>
</Hyperlink>
</TextBlock>
</Grid>
</GroupBox>
<GroupBox Grid.Column="1" Grid.Row="1" Margin="8 8 0 0" Header="Rechnungsadresse"
Style="{StaticResource ObjectEditGroupBox}">

View File

@@ -49,7 +49,7 @@ using HorizontalAlignment = System.Windows.HorizontalAlignment;
using Hyperlink = System.Windows.Documents.Hyperlink;
using MessageBox = System.Windows.MessageBox;
using VerticalAlignment = System.Windows.VerticalAlignment;
using BeWo.AI;
namespace BeWo.View.Detail
{
@@ -160,6 +160,14 @@ namespace BeWo.View.Detail
}
if (BeWoApp.AppSettings.ShowAIInternal)
{
ButtonOpenAiChat.Visibility = Visibility.Visible;
}
else
{
ButtonOpenAiChat.Visibility = Visibility.Collapsed;
}
#if DEBUG
tabitem_stundenplan.Visibility = Visibility.Visible;
#endif
@@ -1845,6 +1853,13 @@ namespace BeWo.View.Detail
BeWoUtils.ShowImageForm(Img.Source);
}
private void OpenAiChat(object sender, MouseButtonEventArgs e)
{
AiChatController.ShowAiChatViewForSingleCustomer(ViewModel.DataContract.CustomerOid.Value, Math.Min(800, this.ActualHeight), Math.Min(1200, this.ActualWidth));
}
public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator]

View File

@@ -30,7 +30,7 @@ namespace BeWo.View.Detail
GroupOwnChatSettings.Visibility = Visibility.Collapsed;
}
if (!BeWoApp.AppSettings.Arbeitszeiterfassung)
if (!BeWoApp.AppSettings.ShowWorktime)
{
EnableArbeitszeiterfassung.Visibility = Visibility.Collapsed;
EnableAutomaticPauses.Visibility = Visibility.Collapsed;

View File

@@ -1410,7 +1410,7 @@
<TextBlock Grid.Column="2" Grid.Row="5" Text="{Binding Path=InsUser}" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type zeit:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" />
<TextBlock Grid.Column="2" Grid.Row="6" Text="{Binding Path=InsertedOn}" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type zeit:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" />
<TextBox Grid.Column="4" Grid.Row="1" Grid.RowSpan="7"
HorizontalAlignment="Stretch" Text="{Binding Path=Notice}"
HorizontalAlignment="Stretch" Text="{Binding Path=AllNotices}"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Auto" Margin="0,0,0,15"
BorderThickness="0" BorderBrush="{x:Null}" Style="{StaticResource ListBoxNoticeTextBoxStyle}"

View File

@@ -51,6 +51,7 @@ using SupportConceptService = BeWo.Core.Service.SupportConceptService;
using VerticalAlignment = System.Windows.VerticalAlignment;
using DependencyObject = System.Windows.DependencyObject;
using BeWo.AI.View;
using BeWo.AI;
namespace BeWo.View.Detail.Zeiterfassung
{
@@ -5043,13 +5044,7 @@ namespace BeWo.View.Detail.Zeiterfassung
latestEndDate = latestEndDate.AddMinutes(59);
}
var ctrl = new AiChatView(c2sOid, earliestStartDate, latestEndDate);
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Frage unsere KI"), ctrl, Math.Min(800, this.ActualHeight), Math.Min(1200, this.ActualWidth));
ctrl.CloseButtonClicked += () => beWoWindow.Close();
beWoWindow.ShowDialog();
AiChatController.ShowAiChatViewForServiceRecords(c2sOid, earliestStartDate, latestEndDate, Math.Min(800, this.ActualHeight), Math.Min(1200, this.ActualWidth));
}
private void multiSupportConceptControl_ListChanged(object sender, EventArgs<IList<CompactSupportConceptDC>> e)

View File

@@ -167,6 +167,7 @@
OpenObject="mainNavigationView_OpenObject"
DeleteObject="mainNavigationView_DeleteObject"
ArchiveObject="mainNavigationView_ArchiveObject"
OpenAiChat="MainNavigationView_OpenAiChat"
ExcelExport="mainNavigationView_ExcelExport"
Print="mainNavigationView_Print"
DeleteDemands="DeleteAll, CustomerView_Delete"

View File

@@ -23,7 +23,7 @@ using BS.Shared.Extensions;
using BS.Shared.Translation;
using Microsoft.Win32;
using BeWo.AI;
namespace BeWo.View.Navigation
{
@@ -59,9 +59,13 @@ namespace BeWo.View.Navigation
//supportConceptFilterComboBox.DisplayMemberPath = "DisplayName";
//supportConceptFilterComboBox.SelectionChanged = "sortCombo_SelectionChanged";
supportConceptFilterComboBox.Style = FindResource("SortComboBox") as Style;
if(BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
if (BeWoApp.AppSettings.ShowAIInternal)
{
mainNavigationView.btnOpenAi.Visibility = Visibility.Visible;
}
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
{
supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.All));
}
@@ -467,5 +471,10 @@ namespace BeWo.View.Navigation
});
});
}
private void MainNavigationView_OpenAiChat()
{
AiChatController.ShowAiChatViewForObjects(TableID.Customer, 800, 1200);
}
}
}

View File

@@ -103,6 +103,7 @@
<Button x:Name="btnEdit" Content="Öffnen" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnEdit_Click" />
<Button x:Name="btnArchive" Content="Archivieren" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnArchive_Click" />
<Button x:Name="btnDelete" Content="Löschen" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnDelete_Click" />
<Button x:Name="btnOpenAi" Visibility="Collapsed" Content="KI" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnOpenAi_Click" />
<TextBlock x:Name="textblock_link" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="16">
<Hyperlink x:Name="linkExcelExport" TargetName="newWindow" Foreground="White" RequestNavigate="linkExcelExport_RequestNavigate">Excel Export</Hyperlink>
</TextBlock>

View File

@@ -92,6 +92,8 @@ namespace BeWo.View.Navigation
public delegate void ImportObjectsDelegate();
public delegate void OpenAiChatDelegate();
public delegate bool DeleteObjectDelegate(IFilterableDC obj);
public delegate void OpenObjectDelegate(IFilterableDC obj);
@@ -108,6 +110,8 @@ namespace BeWo.View.Navigation
public event ImportObjectsDelegate ImportObjects;
public event OpenAiChatDelegate OpenAiChat;
public event DeleteObjectDelegate DeleteObject;
public event EventHandler<EventArgs<IEnumerable<IFilterableDC>>> ExcelExport;
@@ -214,6 +218,19 @@ namespace BeWo.View.Navigation
}
}
public bool OpenAiButtonVisible
{
get
{
return btnOpenAi.Visibility == Visibility.Visible;
}
set
{
btnOpenAi.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
}
}
//[TypeConverter(typeof(UserRightTypeArrayConverter))]
//public UserRightType[] ImportDemands
//{
@@ -601,6 +618,14 @@ namespace BeWo.View.Navigation
}
}
private void btnOpenAi_Click(object sender, RoutedEventArgs e)
{
if (OpenAiChat != null)
{
OpenAiChat();
}
}
private void btnCopy_Click(object sender, RoutedEventArgs e)
{
if (CopyObject != null)

View File

@@ -62,7 +62,7 @@ namespace BeWo.View
private void OkayButton_OnClick(object sender, RoutedEventArgs e)
{
var result = ServiceFacade.DoUserServiceSync(u => u.IsUserValidTwoFactor(this.username, this.password, null, textbox.Text));
var result = ServiceFacade.DoUserServiceSync(u => u.IsUserValidTwoFactor(this.username, this.password, textbox.Text, null));
if (result == UserValidationResult.UserValid)
{
BeWoApp.TwoFactorPin = textbox.Text;

View File

@@ -736,7 +736,7 @@ namespace BeWo.ViewModel.ListViewModel
else
{
var newVM = new ServiceRecordVM(dc, _Category2Services, goalCats, goals);
SetDocTypes(newVM);
// newVM.RoundedDuration = newVM.GroupRoundedDuration.Value;
groupVMs.Add(key, newVM);
@@ -752,7 +752,7 @@ namespace BeWo.ViewModel.ListViewModel
{
// ###AddServiceRecord
var newVM = new ServiceRecordVM(dc, _Category2Services, goalCats, goals);
SetDocTypes(newVM);
if (dc.GroupOid != null)
{
// newVM.RoundedDuration = newVM.GroupRoundedDuration.Value;
@@ -763,6 +763,33 @@ namespace BeWo.ViewModel.ListViewModel
}
}
private void SetDocTypes(ServiceRecordVM newVM)
{
if (AllDocTypes != null)
{
if (AllDocTypes.Count > 0)
{
newVM.DocField1 = AllDocTypes[0].TypeDescription;
}
if (AllDocTypes.Count > 1)
{
newVM.DocField2 = AllDocTypes[1].TypeDescription;
}
if (AllDocTypes.Count > 2)
{
newVM.DocField3 = AllDocTypes[2].TypeDescription;
}
if (AllDocTypes.Count > 3)
{
newVM.DocField4 = AllDocTypes[3].TypeDescription;
}
if (AllDocTypes.Count > 4)
{
newVM.DocField5 = AllDocTypes[4].TypeDescription;
}
}
}
private static void InitNewDC(ServiceRecordDC newDc, FlatSupportConceptTreeNodeDC selectedCustomerNode)
{
if (selectedCustomerNode != null && selectedCustomerNode.SupportConceptTreeNodeDC != null)

View File

@@ -1417,6 +1417,66 @@ namespace BeWo.ViewModel
}
}
public string DocField1 { get; set; }
public string DocField2 { get; set; }
public string DocField3 { get; set; }
public string DocField4 { get; set; }
public string DocField5 { get; set; }
public string AllNotices
{
get
{
if (String.IsNullOrEmpty(DocField2)) // Nur ein Dokufeld vorhanden
{
return Notice;
}
String all = "";
if (!String.IsNullOrEmpty(Notice))
{
all = String.Format("{0}:\n{1}", DocField1, Notice);
}
if (!String.IsNullOrEmpty(Notice2))
{
if (all.Length > 0)
{
all += "\n\n";
}
all += String.Format("{0}:\n{1}", DocField2, Notice2);
}
if (!String.IsNullOrEmpty(Notice3))
{
if (all.Length > 0)
{
all += "\n\n";
}
all += String.Format("{0}:\n{1}", DocField3, Notice3);
}
if (!String.IsNullOrEmpty(Notice4))
{
if (all.Length > 0)
{
all += "\n\n";
}
all += String.Format("{0}:\n{1}", DocField4, Notice4);
}
if (!String.IsNullOrEmpty(Notice5))
{
if (all.Length > 0)
{
all += "\n\n";
}
all += String.Format("{0}:\n{1}", DocField5, Notice5);
}
return all;
}
set { }
}
public string RTFNotice
{
get { return _RTFNotice; }
@@ -1718,6 +1778,7 @@ namespace BeWo.ViewModel
return name;
}
public ObservableSortCollection<ValueListEntryDC> SelectedGoals
{
get

View File

@@ -484,7 +484,6 @@
<None Include="Scripts\jquery\jquery-3.7.1.intellisense.js" />
<Content Include="Scripts\jquery\jquery-3.7.1.min.js" />
<Content Include="Scripts\knockout-3.5.1.js" />
<Content Include="Scripts\ownSoft-Scripts\group-booking.js" />
<Content Include="Content\style.css.map" />
<Content Include="Content\style.scss" />
<Content Include="Content\fonts\signika-negative.regular.ttf" />
@@ -542,7 +541,7 @@
<Content Include="Scripts\ownSoft-Scripts\utils\js-helper.js" />
<Content Include="Scripts\ownSoft-Scripts\utils\list-utils.js" />
<Content Include="Scripts\ownSoft-Scripts\utils\logging.js" />
<Content Include="Scripts\ownSoft-Scripts\utils\password-security.js" />
<Content Include="Scripts\ownSoft-Scripts\utils\MoKPasswordSecurity.js" />
<Content Include="Scripts\ownSoft-Scripts\utils\resources-list-utils.js" />
<Content Include="Scripts\ownSoft-Scripts\utils\service-record-time-calc.js" />
<Content Include="Scripts\ownSoft-Scripts\utils\trimCanvas.js" />
@@ -603,6 +602,11 @@
<Content Include="Views\Main\GroupBookingScCbRelList.cshtml" />
<Content Include="Views\Main\GroupBookingFormPartial.cshtml" />
<Content Include="Views\Main\Category2ServiceDescriptionPartial.cshtml" />
<Content Include="Views\Main\GroupBookingSelectionPartial.cshtml" />
<Content Include="Views\Main\MultiBookingFormPartial.cshtml" />
<Content Include="Views\Main\MultiBookingSelectionPartial.cshtml" />
<Content Include="Views\Main\MultiBookingScCbRelList.cshtml" />
<Content Include="Views\Main\GoalRatingPopupContentPartial.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
@@ -691,7 +695,7 @@
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<UseIIS>True</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort>8808</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>

View File

@@ -5,6 +5,7 @@ using System.Web.Security;
using BeWo.Service.ServiceContracts;
using BeWoPlanerMobil.Models;
using BeWoPlanerMobil.Service;
using BeWoPlanerMobil.Util;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;

View File

@@ -49,7 +49,7 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if (!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
if(!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
{
return Logout();
}
@@ -130,6 +130,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -155,6 +156,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -175,7 +177,7 @@ namespace BeWoPlanerMobil.Controllers
{
if (Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
{
Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return null;
}
@@ -211,6 +213,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -318,7 +321,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeMedikamentenliste)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerReportPartial", Model);
}
var selectedReportType = (CustomerReportType)reportType;
@@ -333,7 +337,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeMedikamentenliste)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerReportPartial", Model);
}
Model.SelectedReportType = CustomerReportType.Historie;
@@ -348,7 +353,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeMedikamentenliste)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerMedListPartial", Model);
}
Model.SelectedReportType = CustomerReportType.Historie;
@@ -490,6 +496,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult LoadFormPartial()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerBargeldkassenFormPartial", Model);
}
Model.SelectedBargeldkasse = null;
Model.SelectedAuszahlungsintervall = 0;
@@ -499,6 +511,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult LoadEditFormPartial(long bargeldkassenOid)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerBargeldkassenFormPartial", Model);
}
Model.SelectedBargeldkasse = Model.Bargeldkassen.FirstOrDefault(bargeldkasse => bargeldkasse.BargeldkassenOid.HasValue && bargeldkasse.BargeldkassenOid.Value.Equals(bargeldkassenOid));
if(Model.SelectedBargeldkasse != null)
@@ -515,6 +533,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null || !long.TryParse(formCollection["bk-to-delete-oid"], out var bargeldkassenOid) || Model.SelectedCustomerOid is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -540,6 +559,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -591,6 +611,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult PrintBargeldkasse(long kassenbuchOid, string reportStartDate, string reportEndDate)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerReportPartial", Model);
}
var bargeldkasse = Model.Bargeldkassen.FirstOrDefault(f => f.BargeldkassenOid.HasValue && f.BargeldkassenOid.Value.Equals(kassenbuchOid));
var startDate = DateTime.TryParse(reportStartDate, out var parsedStartDate) ? parsedStartDate : DateTime.Today.GetFirstOfMonth();
@@ -630,6 +656,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult DownloadZahlungsbeleg(long transaktionsOid)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerReportPartial", Model);
}
var kassenbuch = Model.Bargeldkassen.FirstOrDefault(bargeldkasse => bargeldkasse.Bargeldtransaktionen.Any(transaktion => transaktion.BargeldtransaktionOid.Equals(transaktionsOid)));
var zahlung = kassenbuch?.Bargeldtransaktionen.FirstOrDefault(bargeldtransaktion => bargeldtransaktion.BargeldtransaktionOid.Equals(transaktionsOid));
@@ -652,6 +684,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult LoadBargeldtransaktionsEditForm(long transaktionsOid)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerBargeldtransaktionenFormPartial");
}
var kassenbuch = GetBargeldkasseByTransaktionsOid(transaktionsOid);
var zahlung = kassenbuch?.Bargeldtransaktionen.FirstOrDefault(bargeldtransaktion => bargeldtransaktion.BargeldtransaktionOid.Equals(transaktionsOid));
@@ -684,6 +722,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult LoadBargeldtransaktionsForm(long bargeldkassenOid)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerBargeldtransaktionenFormPartial");
}
Model.SelectedBargeldtransaktion = null;
Model.SelectedTransaktionsart = 0;
@@ -695,6 +739,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult CreateOrUpdateBargeldTransaktion2(string rawDate, string rawArt, string rawBetrag, string belegnummer, string notice)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerBargeldkassen");
}
var transaktion2Edit = Model.SelectedBargeldtransaktion;
var bargeldkasse = Model.SelectedBargeldkasse;
@@ -759,7 +809,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerBargeldkassen");
}
if(bargeldtransaktionsOid is null)
@@ -798,7 +849,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerBargeldkassen");
}
var bargeldkasse = GetBargeldkasseByTransaktionsOid(transaktionsOid);
@@ -853,7 +905,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerBargeldkassen");
}
BargeldkassenDC bargeldkasse = null;
@@ -898,11 +951,10 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerBargeldtransaktionshistorienPartial");
}
var historyEntries = OperationsService.LoadBargeldtransaktionshistoryEntries(transactionOid);
Model.BargeldtransaktionshistoryEntries = historyEntries.OrderByDescending(he => he.InsertedOn).ToList();
@@ -931,6 +983,12 @@ namespace BeWoPlanerMobil.Controllers
[HttpPost]
public ActionResult CreateOrUpdateAbsenceTime(FormCollection formCollection)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
var selectedAbsenceTime = Model.SelectedAbsenceTime;
var oid = selectedAbsenceTime?.AbsenceTimeOid;
@@ -999,6 +1057,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -1042,6 +1101,11 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult LoadAbsenceTimeToForm()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
}
return PartialView("CustomerAbsenceTimeFormPartial", Model);
}
@@ -1057,6 +1121,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult DeleteAbsenceTime(long absenceTimeOid)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("CustomerAbsenceTimePartial");
}
var absenceTime2Delete = Model.SelectedCustomer.AbsenceTimes.FirstOrDefault(absenceTime => absenceTime.AbsenceTimeOid.HasValue && absenceTime.AbsenceTimeOid.Equals(absenceTimeOid));
if(absenceTime2Delete is null)

View File

@@ -154,6 +154,8 @@ namespace BeWoPlanerMobil.Controllers
ViewData[IsSessionTimedOut] = "Sie wurden automatisch abgemeldet, da Ihre Session abgelaufen ist.";
}
var errorMessage = TempData[TempDataConstants.ErrorMessageKey];
if(tenant is null)
{
var keks = HttpContext.Request.Cookies.Get(MobileSessionFacade.CookieName);

File diff suppressed because it is too large Load Diff

View File

@@ -92,6 +92,12 @@ namespace BeWoPlanerMobil.Controllers
return RedirectToActionPermanent("Main", "Main");
}
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
var month = DateTime.Today.Month;
var year = DateTime.Today.Year;
var first = new DateTime(year, month, 1).AddMonths(-1);
@@ -832,7 +838,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("QuittierungsbelegsResultPartial");
}
if(Model.SelectedFilterItem is null)
@@ -1110,6 +1117,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -1131,6 +1139,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model?.ConfirmationReceiptObject is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -1183,7 +1192,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
PartialView("ConfirmationReceiptSignaturePartial");
}
if(!Guid.TryParse(identifier, out var resultIdentifier))
@@ -1228,6 +1238,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult LoadReportToModel()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("QuittierungsbelegsPreviewPartial");
}
var month = Model.SelectedMonth ?? DateTime.Now.AddMonths(-1).Month;
var year = Model.SelectedYear ?? DateTime.Now.Year;
var customerOid = Model.SelectedCustomerOid;
@@ -1261,6 +1277,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}

View File

@@ -42,11 +42,12 @@ namespace BeWoPlanerMobil.Controllers
}
}
[Authorize]
public ActionResult ReportViewer()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -107,6 +108,11 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult DocumentWebViewerPartial()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
}
return PartialView("DocumentWebViewerPartial", Model);
}
@@ -117,7 +123,8 @@ namespace BeWoPlanerMobil.Controllers
{
if (Model?.Employee?.EmployeeOid is null || reportOid is null)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("DocumentWebViewerPartial");
}
var selectedQuery = Model.Queries.FirstOrDefault(query => query.Oid.Equals(reportOid.Value));
@@ -152,7 +159,7 @@ namespace BeWoPlanerMobil.Controllers
return PartialView("DocumentWebViewerPartial", Model);
}
[Authorize]
//[Authorize]
//private string GetQueryReportUrl(QueryDC query)
//{
// var url = Request?.Url;
@@ -192,7 +199,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("ReportViewerFormPartial");
}
Model.SelectedReportType = reportType == "0" ? ReportType.Berichte : ReportType.Mitarbeiterstundenkonto;
@@ -205,7 +213,8 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model?.Employee?.EmployeeOid is null)
{
return Logout();
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("DocumentWebViewerPartial");
}
if(!string.IsNullOrWhiteSpace(parameters))

View File

@@ -49,7 +49,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult Scheduler()
{
if(!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeScheduler)
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeScheduler)
{
return Logout();
}
@@ -267,6 +267,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -393,6 +394,7 @@ namespace BeWoPlanerMobil.Controllers
{
if (Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -413,6 +415,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -432,6 +435,7 @@ namespace BeWoPlanerMobil.Controllers
public ActionResult SelectSchedulerDate(FormCollection formCollection) {
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -453,6 +457,10 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
#if DEBUG
TempData[TempDataConstants.ErrorMessageKey] = "Model war null";
#endif
return Logout();
}
@@ -596,7 +604,6 @@ namespace BeWoPlanerMobil.Controllers
return JsonConvert.SerializeObject(Model.SelectedCustomers.OrderBy(o => o.LastNameFirstName));
}
// ToDo: AUSFÜHRLICH TESTEN!
[Authorize]
public string CheckResourcesAvailability(string start, string end, string resourceOids, bool allDay)
{
@@ -660,6 +667,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -676,6 +684,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -759,6 +768,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -782,6 +792,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -845,6 +856,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult FetchAppointments()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return PartialView("OneDaySchedulerPartial");
}
LoadAppointmentsForDate();
return PartialView("OneDaySchedulerPartial", Model);
@@ -905,12 +922,22 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult FetchSelectedEmployeesForPopup()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
}
return PartialView("EmployeeForFilteringPartial", Model);
}
[Authorize]
public ActionResult FetchEmployeeFilteringModalBody()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
}
return PartialView("EmployeeFilteringModalContentPartial", Model);
}
@@ -963,12 +990,22 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult FetchCustomersForFiltering()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
}
return PartialView("CustomerFilterSelectionPartial", Model);
}
[Authorize]
public ActionResult FetchCustomerFilteringModalBody()
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
}
return PartialView("CustomerFilteringModalContentPartial", Model);
}
@@ -1138,6 +1175,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}

View File

@@ -775,6 +775,23 @@ namespace BeWoPlanerMobil.Models
public ServiceCategoryDC SelectedServiceCategory { get; set; }
public ServiceDescriptionDC SelectedServiceDescription { get; set; }
public ServiceDescriptionDC GetSelectedOrFirstServiceDescription()
{
if(!(SelectedServiceDescription is null) || Categories2Descriptions is null)
{
return SelectedServiceDescription;
}
var firstServiceCategory2ServiceDescriptions = Categories2Descriptions.OrderBy(c2d => c2d.Key.Position).ThenBy(c2d => c2d.Key.ServiceCategoryOid).FirstOrDefault(c2d => c2d.Value.Any());
if(firstServiceCategory2ServiceDescriptions.Key != null && (firstServiceCategory2ServiceDescriptions.Value?.Any() ?? false))
{
return firstServiceCategory2ServiceDescriptions.Value.OrderBy(sd => sd.Position).ThenBy(sd => sd.ServiceDescriptionOid).First();
}
return SelectedServiceDescription;
}
}
public class CustomSelectListItem
@@ -783,13 +800,17 @@ namespace BeWoPlanerMobil.Models
public string Text2 { get; }
public string Value { get; }
public string TextColor { get; }
public long? SupportConceptOid { get; }
public long? CostBearer2SupportConceptOid { get; }
public CustomSelectListItem(string pText1, string pText2, string pValue, string pTextColor)
public CustomSelectListItem(string pText1, string pText2, string pValue, string pTextColor, long? supportConceptOid, long? costBearer2SupportConceptOid)
{
Text1 = pText1;
Text2 = pText2;
Value = pValue;
TextColor = pTextColor;
SupportConceptOid = supportConceptOid;
CostBearer2SupportConceptOid = costBearer2SupportConceptOid;
}
}

View File

@@ -1,123 +0,0 @@
function updateGroupBookingCb2ScList(result) {
try {
var list = $("#selected-cb2sc-list");
if(isEmptyOrSpaces(result) || result === "SessionTimeout") {
window.location.href = getRedirectLink();
return;
}
var groupBookingSelectionObject = $.parseJSON(result);
var resultList = groupBookingSelectionObject.SelectedRelations;
list.empty();
$.each(resultList,
function (index, customListItem) {
var html = '<div class="list-group-item" id="relation-item-' + customListItem.Value + '"><div class="row"><div class="col"><span>' + customListItem.Text1 + '<br /><span class="' + customListItem.TextColor + '">' + customListItem.Text2 + '</span></span></div><div class="col-auto my-auto"><button type="button" class="btn btn-primary" onclick="removeCb2ScRelation(' + customListItem.Value + ')"><span class="fas fa-times-circle"></span></button></div></div>';
list.append(html);
});
updateGroupBookingGroupList(groupBookingSelectionObject);
} catch (error) {
if (stringContainsDoctype(result)) {
showErrorPopup(error, result);
} else {
showErrorPopup(error);
}
}
}
function removeCb2ScRelation(relOid) {
try {
$("#relation-item-" + relOid).remove();
if($("#cb2sc-checkbox-" + relOid).length) {
$("#cb2sc-checkbox-" + relOid).prop("checked", false);
}
if($("#selected-cb2sc-list").find(".list-group-item").length === 0) {
deactivateGroupBookingForm();
$("#group-booking-supportconcepts input:checked").each(function () {
$(this).prop("checked", false);
});
}
$.get(getRemoveCb2ScRelFromGroupBookingUrl(), {pRelOid: relOid}).done(function (result) {
try {
updateGroupBookingGroupList($.parseJSON(result));
} catch (error) {
if(stringContainsDoctype(result)) {
showErrorPopup(error, result);
} else {
showErrorPopup(error);
}
}
});
} catch (error) {
showErrorPopup(error);
}
}
function updateGroupBookingGroupList(groupBookingSelectionObject) {
var groupOids = groupBookingSelectionObject.GroupOids === undefined ? [] : groupBookingSelectionObject.GroupOids;
var relOids = [];
if(groupBookingSelectionObject.SelectedRelations !== undefined){
for(var i = 0; i < groupBookingSelectionObject.SelectedRelations.length; i++) {
var oidStringValue = groupBookingSelectionObject.SelectedRelations[i].Value;
var oidIntValue = parseInt(oidStringValue, 10);
relOids.push(oidIntValue);
}
}
$("#group-booking-supportconcepts input").each(function() {
var value = $(this).val();
$(this).prop("checked", isInArray(value, relOids));
});
$("#group-booking-groups input").each(function() {
var value = $(this).val();
$(this).prop("checked", isInArray(value, groupOids));
});
if(relOids.length === 0 && groupOids.length === 0) {
deactivateGroupBookingForm();
} else {
activateGroupBookingForm();
}
}
function addEmployeeToGroupBooking() {
var url = getAddEmployeesToGroupBookingUrl();
var selectedEmployees = [];
var oidString = "";
$("#group-booking-employee-selection-popup input:checked").each(function() {
var oid = $(this).val();
selectedEmployees.push(oid);
});
for(var i = 0; i < selectedEmployees.length; i++) {
oidString += selectedEmployees[i];
if(i < selectedEmployees.length - 1) {
oidString += ",";
}
}
$.get(url, { pEmployeeOids: oidString }).done(function(numberOfSelectedEmployees) {
$("#selected-employees-count-badge").text(numberOfSelectedEmployees);
$("#create-button").prop("disabled", numberOfSelectedEmployees === "0" ? true : false);
});
}

View File

@@ -77,6 +77,12 @@ function initializeSignature(selectedServiceRecordOid) {
return;
}
if(false === checkJson(jsonServiceRecord2Monatsunterschrift)) {
logWarning("initializeSignature: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
var serviceRecord2Monatsunterschrift = parseJason(jsonServiceRecord2Monatsunterschrift);
var hasMonatsunterschrift = serviceRecord2Monatsunterschrift.HasMonatsunterschrift;

View File

@@ -18,6 +18,12 @@ function getSupportConceptStatistics(cb2ScRRelOid) {
$.get(url, { oid: cb2ScRRelOid }).done(function(jsonObject) {
try {
if(false === checkJson(jsonObject)) {
logWarning("getSupportConceptStatistics: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
var scStatistics = parseJason(jsonObject);
$("#period-statistics-container").empty();

View File

@@ -67,4 +67,13 @@ function checkArraysForEquality(a1, a2) {
} finally {
return false;
}
}
function checkJson(jsonToParse) {
try {
$.parseJSON(jsonToParse);
return true;
} catch(parsingError) {
return false;
}
}

View File

@@ -28,7 +28,9 @@ function changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer,
// Wird aufgerufen, um die Liste mit den ausgewählten Objekten zu aktualisieren
function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url, filterAppointmentsUrl, allItemsCheckBoxSuffix, teamMemberOids, allItemsCheckBoxId) {
try {
if(isEmptyOrSpaces(jsonResult)) {
if(false === checkJson(jsonResult)) {
logWarning("updateSelectedList: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}

View File

@@ -34,7 +34,9 @@ function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupI
list.empty();
if(isEmptyOrSpaces(jsonResult)) {
if(false === checkJson(jsonResult)) {
logWarning("updateSelectedResourceList: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}

View File

@@ -91,11 +91,18 @@ function deleteServiceRecord(serviceRecordOid) {
var url = getValidateServiceRecordDeletionUrl();
$.get(url, { serviceRecordOidString: serviceRecordOid }).done(function(result) {
if (result === "Error") {
if(result === "Error") {
hideSpinner();
showAlertMessageBox("Fehler", "Es ist ein Fehler aufgetreten", null, false);
return;
}
if(false === checkJson(result)) {
logWarning("deleteServiceRecord: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
var form = $("#deletion-form");
if(result.length === 0) {
@@ -291,26 +298,7 @@ function hideGoalRatingPopup() {
}
}
function rateGoal(ratingTypeOid) {
try {
var url = getRateSelectedGoalUrl();
var goalOid = $("#goal-to-rate-oid").val();
$.get(url, { ratingTypeOid: ratingTypeOid, goalOid: goalOid }).done(
function (result) {
var obj = parseJason(result);
$("#goal-rating-" + goalOid).text(obj.RatingName);
hideGoalRatingPopup();
$("#goal-to-rate-oid").val("");
}
);
} catch(error) {
showErrorPopup(error);
}
}
function checkChildNodes(parentOid) {
var rootElement = $("#c-" + parentOid);

View File

@@ -191,6 +191,11 @@ function insertOrUpdateAppointment(formattedStartDate, formattedEndDate, formatt
endTimeRaw: formattedEndTime
}
).done(function(result) {
if(false === checkJson(result)) {
logWarning("insertOrUpdateAppointment: Der zurückgegebene Wert ist kein gültiges JSON!");
return;
}
var isOverlapping = parseJason(result);
if(isOverlapping === true) {

View File

@@ -75,5 +75,6 @@
public static string AutoEndOfSessionLogoutMessageKey => "ein_schluessel";
public static string HasWarningMessageKey => "HasWarningMessage";
public static string ErrorMessageKey => "ErrorMessage";
public static string DoLogoutKey => "DoLogout";
}
}

View File

@@ -8,6 +8,7 @@ namespace BeWoPlanerMobil.Util
{
public List<CustomSelectListItem> SelectedRelations { get; set; } = new List<CustomSelectListItem>();
public IEnumerable<long> GroupOids { get; set; }
public GroupBookingSelectionObject(IEnumerable<SupportConceptCostBearerRelDC> selectedConceptCostBearerRelations, IEnumerable<long> groupOids)
{
@@ -26,7 +27,7 @@ namespace BeWoPlanerMobil.Util
"text-bewo-expires-in-three-months" :
"text-dark";
var listItem = new CustomSelectListItem(text1, text2, value, textColor);
var listItem = new CustomSelectListItem(text1, text2, value, textColor, rel.SupportConcept?.SupportConceptOid, rel.CostBearer2SupportConceptOid);
SelectedRelations.Add(listItem);
}

View File

@@ -80,4 +80,20 @@
$("#login-btn").click();
}
});
</script>
</script>
@if(Html.IsInDebugMode())
{
if(!(TempData[TempDataConstants.ErrorMessageKey] is null))
{
<div class="container-fluid mt-3">
<div class="row d-flex justify-content-center">
<div class="col-md-3 col-lg-4">
<div class="alert alert-danger" role="alert">
@TempData[TempDataConstants.ErrorMessageKey]
</div>
</div>
</div>
</div>
}
}

View File

@@ -1,4 +1,16 @@
@model BeWoPlanerMobil.Models.MainModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
function setSelectedServiceDescription(serviceDescriptionOid) {
@@ -21,15 +33,20 @@
}
}
function loadServiceDescriptions(categoryOid) {
$(document).ready(function() {
try {
// ToDo: Benötigt?
calcPrependWidth();
} catch(error) {
showErrorPopup(error);
}
}
});
</script>
@{
var selectedServiceDescription = Model.GetSelectedOrFirstServiceDescription();
var selectedCategory = selectedServiceDescription?.Category;
}
<!-- Kategorie -->
<div class="form-row">
<div class="col-md">
@@ -45,9 +62,14 @@
{
var category = serviceCategory2ServiceDescriptions.Key;
var selected = Model.SelectedServiceCategory?.Equals(category) ?? false ? "selected" : string.Empty;
if(category is null)
{
continue;
}
<option value="@category.ServiceCategoryOid" @selected>@category.Name</option>
var selected = selectedCategory != null && selectedCategory.Equals(category) ? " selected" : string.Empty;
<option value="@category.ServiceCategoryOid"@selected>@category.Name</option>
}
</select>
</div>
@@ -66,16 +88,17 @@
</div>
</div>
<select class="custom-select" id="leistung-select" name="ServiceDescription" onchange="setServiceDescription('leistung-select')">
@{
var selectedCategory = Model.SelectedServiceCategory ?? Model.Categories2Descriptions.FirstOrDefault().Key;
}
@if(selectedCategory != null && Model.Categories2Descriptions.ContainsKey(selectedCategory))
{
foreach(var serviceDescription in Model.Categories2Descriptions[selectedCategory])
{
var selected = Model.SelectedServiceDescription?.Equals(serviceDescription) ?? false ? "selected" : string.Empty;
<option value="@serviceDescription.ServiceDescriptionOid" @selected>@serviceDescription.Name</option>
if(serviceDescription is null)
{
continue;
}
var selected = selectedServiceDescription != null && selectedServiceDescription.Equals(serviceDescription) ? " selected" : string.Empty;
<option value="@serviceDescription.ServiceDescriptionOid"@selected>@serviceDescription.Name</option>
}
}
</select>

View File

@@ -0,0 +1,51 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
function rateGoal(ratingTypeOid) {
try {
var goalOid = $("#goal-to-rate-oid").val();
$.get("@Url.Action("RateSelectedGoal")", { ratingTypeOid: ratingTypeOid, goalOid: goalOid }).done(
function (result) {
if(false === checkJson(result)) {
logWarning("rateGoal: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
var obj = parseJason(result);
$(`#goal-rating-${goalOid}`).text(obj.RatingName);
$(`#${goalOid}`).prop("checked", true);
hideGoalRatingPopup();
$("#goal-to-rate-oid").val("");
}
);
} catch(error) {
showErrorPopup(error);
}
}
</script>
@if(AbstractModel.HasRightToRateGoals)
{
<ul class="list-group">
@foreach(var ratingType in Model.GoalRatingTypes)
{
<li class="list-group-item" id="grt-@ratingType.RatingTypeOid" onclick="rateGoal(@ratingType.RatingTypeOid)">@ratingType.DisplayName</li>
}
</ul>
}

View File

@@ -3,22 +3,82 @@
@using BS.Shared
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
function addScCbRelsToGroupBooking() {
try {
var selectedGroups = [];
var selectedSupportConcepts = [];
$("#group-booking-supportconcepts input:checked").each(function () {
selectedSupportConcepts.push($(this).attr("value"));
});
$("#group-booking-groups input:checked").each(function () {
selectedGroups.push($(this).attr("value"));
});
$("#group-booking-sc-cb-rel-tab-content").load("@Url.Action("AddScCbRelsToGroupBooking")", {relOids: selectedSupportConcepts, groupOids: selectedGroups}, function() {
$("#groupbooking-selection-container").load("@Url.Action("ReloadGroupBookingForm")", function () {
var checkedCheckboxes = $(".cb2sc-input:checkbox:checked");
$("#employees-button, #category-select, #leistung-select, " +
"#start-date, #end-date, #start-time, #end-time, #duration, " +
"#distance, textarea, #reset-button, #create-button, #textbausteine-button, #hours-minutes-dropdown-btn, #marker-cb")
.prop("disabled", (checkedCheckboxes.length > 0 ? false : true));
$("#goals-tree").load("@Url.Action("ReloadGoals")", function () {
$("#goal-ratings-container").load("@Url.Action("ReloadGoalRatings")", function() {
try {
$("#tree").load("@Url.Action("LoadUpToDateTextModules")");
} catch (error) {
showErrorPopup(error);
}
});
});
});
});
} catch(blubb) {
showErrorPopup(blubb);
}
}
function removeSupportConceptCostBearerRel(relOid) {
try {
$(`#cb2sc-checkbox-${relOid}`).prop("checked", false);
$("#group-booking-form-container").load("@Url.Action("RemoveSupportConceptCostbearerRel")", {relOid: relOid}, function () {
$("#goals-tree").load("@Url.Action("ReloadGoals")", function() {
var checkedCheckboxes = $(".cb2sc-input:checkbox:checked");
$("#groupbooking-selection-container").load("@Url.Action("RemoveSupportConceptCostbearerRel")", {relOid: relOid}
, function () {
$("#goals-tree").load("@Url.Action("ReloadGoals")"
, function () {
$("#goal-ratings-container").load("@Url.Action("ReloadGoalRatings")", function() {
try {
var checkedCheckboxes = $(".cb2sc-input:checkbox:checked");
$("#employees-button, #category-select, #leistung-select, " +
"#start-date, #end-date, #start-time, #end-time, #duration, " +
"#distance, textarea, #reset-button, #create-button, #textbausteine-button, #hours-minutes-dropdown-btn, #marker-cb").prop("disabled", (checkedCheckboxes.length > 0 ? false : true));
$("#employees-button, #category-select, #leistung-select, " +
"#start-date, #end-date, #start-time, #end-time, #duration, " +
"#distance, textarea, #reset-button, #create-button, #textbausteine-button, #hours-minutes-dropdown-btn, #marker-cb")
.prop("disabled", (checkedCheckboxes.length > 0 ? false : true));
$("#category-to-description-container").load("@Url.Action("UpdateServiceCategories")");
});
});
$("#tree").load("@Url.Action("LoadUpToDateTextModules")");
} catch (error) {
showErrorPopup(error);
}
});
}
);
}
);
} catch (error) {
showErrorPopup(error);
}
@@ -29,15 +89,11 @@
{
var submitButtonText = Model.IsInEditingMode ? "Speichern" : "Anlegen";
using(Html.BeginForm("CreateOrUpdateGroupBooking", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset('category-select', 'leistung-select', 'textmodule-container', 'tree')", id = "groupBookingForm" }))
using(Html.BeginForm("CreateOrUpdateGroupBooking", "Main", FormMethod.Post, new { id = "groupBookingForm" }))
{
var startDate = Model.SelectedServiceRecord?.Start?.ToShortDateString() ?? DateTime.Today.ToShortDateString();
var endDate = Model.SelectedServiceRecord?.End?.ToShortDateString() ?? DateTime.Today.ToShortDateString();
var startTime = Model.SelectedServiceRecord?.Start?.ToShortTimeString() ?? string.Empty;
var endTime = Model.SelectedServiceRecord?.End?.ToShortTimeString() ?? string.Empty;
var duration = Model.SelectedServiceRecord?.GroupRoundedDuration?.ToString() ?? string.Empty;
var distance = Model.SelectedServiceRecord?.DistanceInMeter?.ToString() ?? string.Empty;
var notice0 = Model.SelectedServiceRecord?.Notice ?? string.Empty;
@@ -52,343 +108,248 @@
}
}
<div class="mt-3">
<div class="form-row">
<div class="col-md">
<div class="alert alert-danger collapse" role="alert" id="form-alert">
</div>
</div>
</div>
<div class="form-row">
<div class="col-md">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#group-booking-popup" id="support-concepts-and-groups-button">Hilfepläne und Gruppen hinzufügen</button>
</div>
</div>
<!-- Hilfeplanauswahl -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-1">
<div class="list-group" id="selected-cb2sc-list">
@foreach(var selectedCb2ScRelation in Model.GroupBookingSelectionObject.SelectedRelations)
{
<div class="list-group-item" id="relation-item-@selectedCb2ScRelation.Value">
<div class="row">
<div class="col">
<span>
@selectedCb2ScRelation.Text1
<br />
<span class="@selectedCb2ScRelation.TextColor">
@selectedCb2ScRelation.Text2
</span>
</span>
</div>
<div class="col-auto my-auto">
<button type="button" class="btn btn-primary" onclick="removeSupportConceptCostBearerRel(@selectedCb2ScRelation.Value)">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
</div>
}
</div>
</div>
</div>
</div>
<!-- Mitarbeiter -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#group-booking-employee-selection-popup" id="employees-button">
Mitarbeiter hinzufügen <span class="badge badge-light text-primary" id="selected-employees-count-badge">@Model.GroupBookingSelectedEmployees.Count</span>
</button>
</div>
</div>
</div>
<!-- Ziele -->
@if((Model.GroupBookingSelectedSupportConcepts?.Any() ?? false) && Model.GroupBookingSelectedSupportConcepts.Any(sc => sc.Goals.Any()))
{
<div class="mt-3">
<div class="form-row">
<div class="col-md">
<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">
<div class="col-md">
<div class="collapse w-100 mt-1 max-vw-50" id="goals-container"></div>
</div>
</div>
}
<div class="alert alert-danger collapse" role="alert" id="form-alert">
<!-- Kategorie -->
<!--<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Kategorie
</div>
</div>
@*
@Html.DropDownListFor(m => m.SelectedServiceCategoryOid, Model.ServiceCategoryListItems, new { onchange = "loadServiceDescriptions('category-select', 'leistung-select', 'textmodule-container', 'tree')", @class = "custom-select", Id = "category-select" })
*@
</div>
</div>
</div>
</div>-->
<!-- Leistung -->
<!--<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Leistung
</div>
</div>
<select class="custom-select" id="leistung-select" name="ServiceDescription" onchange="setServiceDescription('leistung-select')"></select>
</div>
@* Hilfepläne und Mitarbeiter *@
<div id="groupbooking-selection-container">
@Html.Partial("GroupBookingSelectionPartial", Model)
</div>
</div>
</div>-->
@* Kategorie und Leistungen *@
<div id="category-to-description-container">
@Html.Partial("Category2ServiceDescriptionPartial", Model)
</div>
<!-- Marker -->
@if(Model.ShowMarker)
{
var markerCheckedValue = Model.SelectedServiceRecord?.ServiceRecordType == ServiceRecordTypeId.Content ? "checked" : string.Empty;
<div class="form-row">
<div class="col-md">
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" name="marker-cb" id="marker-cb" @markerCheckedValue />
<label class="custom-control-label" for="marker-cb">Marker</label>
</div>
</div>
</div>
}
<div class="form-row">
<div class="col-md">
<hr />
</div>
</div>
<!-- Start- und Enddatum -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="start-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Startdatum
</div>
</div>
<input type="text" id="start-date" name="Datum" class="form-control datetimepicker-input" data-target="#start-date-picker" data-toggle="datetimepicker" value="@startDate" />
<div class="input-group-append" data-target="#start-date-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
@if(Model.IsEndDateVisible)
{
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="end-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Enddatum
</div>
</div>
<input type="text" id="end-date" name="Enddatum" class="form-control datetimepicker-input" data-target="#end-date-picker" data-toggle="datetimepicker" value="@endDate" />
<div class="input-group-append" data-target="#end-date-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
}
</div>
<div class="form-row">
@{
var startTimeValue = Model.StartTimeToEdit;
var endTimeValue = Model.EndTimeToEdit;
var divisor = Model.SelectedDurationUnit == "Stunden" ? 60 : 1;
var durationValue = string.Empty;
if(!(Model.SelectedServiceRecord is null))
<!-- Marker -->
@if(Model.ShowMarker)
{
durationValue = (Model.SelectedServiceRecord?.RoundedDuration / divisor).ToString();
var markerCheckedValue = Model.SelectedServiceRecord?.ServiceRecordType == ServiceRecordTypeId.Content ? "checked" : string.Empty;
<div class="form-row">
<div class="col-md">
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" name="marker-cb" id="marker-cb" @markerCheckedValue />
<label class="custom-control-label" for="marker-cb">Marker</label>
</div>
</div>
</div>
}
@* Trennstrich *@
<div class="form-row">
<div class="col-md">
<hr />
</div>
</div>
var afterValidationState = TempData[TempDataConstants.AfterValidationStateKey];
@* Start- und Enddatum *@
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="start-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Startdatum
</div>
</div>
<input type="text" id="start-date" name="Datum" class="form-control datetimepicker-input" data-target="#start-date-picker" data-toggle="datetimepicker" value="@startDate" />
<div class="input-group-append" data-target="#start-date-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
if(Model.SetStartTimeToEndTimeAfterSave && !Model.IsInEditingMode && afterValidationState is bool isAfterValidation && isAfterValidation == false)
{
startTimeValue = Model.NewStartTime;
endTimeValue = Model.NewEndTime;
if(Model.NewDuration.HasValue)
@if(Model.IsEndDateVisible)
{
durationValue = (Model.NewDuration / divisor).ToString();
}
}
}
<!-- Von -->
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="start-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text sm-prepend-input-group-text">
Von
</div>
</div>
<input type="text" id="start-time" name="Start" class="form-control datetimepicker-input" data-target="#start-time-picker" value="@startTimeValue" />
<div class="input-group-append" data-target="#start-time-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
<!-- Bis -->
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="end-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text sm-prepend-input-group-text">
Bis
</div>
</div>
<input type="text" id="end-time" name="Ende" class="form-control datetimepicker-input" data-target="#end-time-picker" value="@endTimeValue" />
<div class="input-group-append" data-target="#end-time-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Dauer und Stunden/Minuten-Auswahl -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
@{
var labelText = Model.EinheitZeiterfassung == 1 ? "Dauer (h)" : "Dauer";
}
<div class="input-group-text prepend-input-group-text">
@labelText
</div>
</div>
<input type="text" class="form-control" id="duration" name="Dauer" onchange="onDurationChange('start-time', 'end-time', 'start-date', 'end-date', 'duration', 'hours-minutes-dropdown-btn', 'start-date-picker', 'end-date-picker')" value="@durationValue">
@if(Model.IsZeiterfassungInStdMin)
{
<div class="input-group-append">
<button id="hours-minutes-dropdown-btn" class="btn btn-outline-primary dropdown-toggle w-100" type="button" data-toggle="dropdown">
@Model.SelectedDurationUnit
</button>
<div class="dropdown-menu w-100">
<a class="dropdown-item hours-minutes-link" href="#">Minuten</a>
<a class="dropdown-item hours-minutes-link" href="#">Stunden</a>
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="end-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Enddatum
</div>
</div>
<input type="text" id="end-date" name="Enddatum" class="form-control datetimepicker-input" data-target="#end-date-picker" data-toggle="datetimepicker" value="@endDate" />
<div class="input-group-append" data-target="#end-date-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
}
</div>
</div>
}
</div>
</div>
</div>
@* Von und Bis *@
<div class="form-row">
@{
var startTimeValue = Model.StartTimeToEdit;
var endTimeValue = Model.EndTimeToEdit;
var divisor = Model.SelectedDurationUnit == "Stunden" ? 60 : 1;
var durationValue = string.Empty;
@if(Model.ShowDistanceField)
{
<!-- Gefahrene Kilomter -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">Gefahrene Kilometer</div>
if(!(Model.SelectedServiceRecord is null))
{
durationValue = (Model.SelectedServiceRecord?.RoundedDuration / divisor).ToString();
}
var afterValidationState = TempData[TempDataConstants.AfterValidationStateKey];
if(Model.SetStartTimeToEndTimeAfterSave && !Model.IsInEditingMode && afterValidationState is bool isAfterValidation && isAfterValidation == false)
{
startTimeValue = Model.NewStartTime;
endTimeValue = Model.NewEndTime;
if(Model.NewDuration.HasValue)
{
durationValue = (Model.NewDuration / divisor).ToString();
}
}
}
@* Von *@
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="start-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text sm-prepend-input-group-text">
Von
</div>
</div>
<input type="text" id="start-time" name="Start" class="form-control datetimepicker-input" data-target="#start-time-picker" value="@startTimeValue" />
<div class="input-group-append" data-target="#start-time-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
@* Bis *@
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="end-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text sm-prepend-input-group-text">
Bis
</div>
</div>
<input type="text" id="end-time" name="Ende" class="form-control datetimepicker-input" data-target="#end-time-picker" value="@endTimeValue" />
<div class="input-group-append" data-target="#end-time-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
<input type="text" class="form-control" id="distance" name="Distanz" onchange="validateDistanceInput()" value="@distance">
</div>
</div>
</div>
</div>
}
@if(AbstractModel.HasRightToSeeTextModules)
{
<!-- Textbausteine -->
<div class="form-row" id="textmodule-container">
<div class="col-md">
<button type="button" class="btn btn-primary form-control mt-3" data-toggle="modal" data-target="#textbausteine-popup" id="textbausteine-button">Textbausteine</button>
@* Dauer und Stunden/Minuten-Auswahl *@
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
@{
var labelText = Model.EinheitZeiterfassung == 1 ? "Dauer (h)" : "Dauer";
}
<div class="input-group-text prepend-input-group-text">
@labelText
</div>
</div>
<input type="text" class="form-control" id="duration" name="Dauer" onchange="onDurationChange('start-time', 'end-time', 'start-date', 'end-date', 'duration', 'hours-minutes-dropdown-btn', 'start-date-picker', 'end-date-picker')" value="@durationValue">
@if(Model.IsZeiterfassungInStdMin)
{
<div class="input-group-append">
<button id="hours-minutes-dropdown-btn" class="btn btn-outline-primary dropdown-toggle w-100" type="button" data-toggle="dropdown">
@Model.SelectedDurationUnit
</button>
<div class="dropdown-menu w-100">
<a class="dropdown-item hours-minutes-link" href="#">Minuten</a>
<a class="dropdown-item hours-minutes-link" href="#">Stunden</a>
</div>
</div>
}
</div>
</div>
</div>
</div>
</div>
}
<!-- Dokumentation -->
<div class="form-row">
<div class="col-md mt-3">
@if(Model.NumberOfDokuTypes == 0)
@* Gefahrene Kilometer *@
@if(Model.ShowDistanceField)
{
<div class="form-group">
<label for="dokufeld">Dokumentation</label>
<textarea class="form-control" name="Dokumentation6" id="dokufeld">@notice0</textarea>
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">Gefahrene Kilometer</div>
</div>
<input type="text" class="form-control" id="distance" name="Distanz" onchange="validateDistanceInput()" value="@distance">
</div>
</div>
</div>
</div>
}
else
@* Textbausteine *@
@if(AbstractModel.HasRightToSeeTextModules)
{
<ul class="nav nav-tabs" role="tab-list">
@for(var i = 0; i < Model.Dokutypes.Length; i++)
{
var currentDokuType = Model.Dokutypes[i];
<div class="form-row" id="textmodule-container">
<div class="col-md">
<button type="button" class="btn btn-primary form-control mt-3" data-toggle="modal" data-target="#textbausteine-popup" id="textbausteine-button">Textbausteine</button>
</div>
</div>
}
<li class="nav-item">
<a href="#doku_@i" id="doku_@i-tab" data-toggle="tab" role="tab" aria-controls="doku_@i" class="nav-link@(i == 0 ? " active" : string.Empty)" aria-selected="true">
@currentDokuType.DisplayName
</a>
</li>
@* Dokumentation *@
<div class="form-row">
<div class="col-md mt-3">
@if(Model.NumberOfDokuTypes == 0)
{
<div class="form-group">
<label for="dokufeld">Dokumentation</label>
<textarea class="form-control" name="Dokumentation6" id="dokufeld">@notice0</textarea>
</div>
}
</ul>
<div class="tab-content" id="dokufelderTab">
@for(var i = 0; i < Model.Dokutypes.Length; i++)
else
{
var textareaName = i + 1 < 1 ? "Dokumentation" : "Dokumentation" + (i + 1);
<ul class="nav nav-tabs" role="tab-list">
@for(var i = 0; i < Model.Dokutypes.Length; i++)
{
var currentDokuType = Model.Dokutypes[i];
<div class="tab-pane show@(i == 0 ? " active" : string.Empty)" id="doku_@i" role="tabpanel" aria-labelledby="doku_@i-tab">
<textarea class="form-control doku-form-control" id="doku-textarea-@i" name="@textareaName">@noticeList[i]</textarea>
<li class="nav-item">
<a href="#doku_@i" id="doku_@i-tab" data-toggle="tab" role="tab" aria-controls="doku_@i" class="nav-link@(i == 0 ? " active" : string.Empty)" aria-selected="true">
@currentDokuType.DisplayName
</a>
</li>
}
</ul>
<div class="tab-content" id="dokufelderTab">
@for(var i = 0; i < Model.Dokutypes.Length; i++)
{
var textareaName = i + 1 < 1 ? "Dokumentation" : "Dokumentation" + (i + 1);
<div class="tab-pane show@(i == 0 ? " active" : string.Empty)" id="doku_@i" role="tabpanel" aria-labelledby="doku_@i-tab">
<textarea class="form-control doku-form-control" id="doku-textarea-@i" name="@textareaName">@noticeList[i]</textarea>
</div>
}
</div>
}
</div>
}
</div>
</div>
</div>
</div>
}
<div class="d-flex bd-highlight mt-3">
<div class="mr-auto bd-highlight">
<!-- dient nur als Abstandshalter-->
@* dient nur als Abstandshalter *@
</div>
<div class="ml-3 bd-highlight">
@if(TempData[TempDataConstants.IsInTransferModeKey] is bool isInTransferMode && isInTransferMode)

View File

@@ -1,4 +1,16 @@
@model BeWoPlanerMobil.Models.MainModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>
$(document).ready(function () {
@@ -23,6 +35,8 @@
calculateDuration(true, 'start-time', 'end-time', 'duration', 'hours-minutes-dropdown-btn', 'start-date-picker', 'end-date-picker', false, false);
});
calcPrependWidth();
});
function resetGroupBookingForm() {
@@ -33,6 +47,32 @@
showErrorPopup(error);
}
}
function addEmployeeToGroupBooking() {
var selectedEmployees = [];
var oidString = "";
$("#group-booking-employee-selection-popup input:checked").each(function() {
var oid = $(this).val();
selectedEmployees.push(oid);
});
for(var i = 0; i < selectedEmployees.length; i++) {
oidString += selectedEmployees[i];
if(i < selectedEmployees.length - 1) {
oidString += ",";
}
}
$.get("@Url.Action("AddEmployeesToGroupBooking")", { pEmployeeOids: oidString }).done(function(numberOfSelectedEmployees) {
$("#selected-employees-count-badge").text(numberOfSelectedEmployees);
$("#create-button").prop("disabled", numberOfSelectedEmployees === "0" ? true : false);
});
}
</script>
@using(Html.BeginForm("ResetGroupBookingForm", "Main", FormMethod.Post, new { Id = "reset-group-booking-form-form" }))

View File

@@ -1,31 +1,16 @@
@model BeWoPlanerMobil.Models.MainModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
<script type="text/javascript">
function addScCbRelsToGroupBooking() {
try {
var selectedGroups = [];
var selectedSupportConcepts = [];
$("#group-booking-supportconcepts input:checked").each(function () {
selectedSupportConcepts.push($(this).attr("value"));
});
$("#group-booking-groups input:checked").each(function () {
selectedGroups.push($(this).attr("value"));
});
$("#group-booking-sc-cb-rel-tab-content").load("@Url.Action("AddScCbRelsToGroupBooking")", {relOids: selectedSupportConcepts, groupOids: selectedGroups}, function() {
$("#group-booking-form-container").load("@Url.Action("ReloadGroupBookingForm")", function () {
$("#goals-tree").load("@Url.Action("ReloadGoals")", function() {
$("#category-to-description-container").load("@Url.Action("UpdateServiceCategories")");
});
});
});
} catch(error) {
showErrorPopup(error);
}
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
</script>
}
<div class="tab-pane show active" role="tabpanel" id="group-booking-supportconcepts">
<ul class="list-group">
@@ -42,7 +27,7 @@
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox"
@{ if(checkedValue) { @Html.Raw("checked=\"checked\"") ; } }
@{ if(checkedValue) { @Html.Raw("checked=\"checked\"") } }
class="custom-control-input cb2sc-input" id="cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" onchange="addScCbRelsToGroupBooking()" name="cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" value="@cb2Sc.CostBearer2SupportConceptOid">
<label for="cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" class="custom-control-label">
<span class="justify-content-between mb-1 text-dark text-left">

View File

@@ -0,0 +1,82 @@
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
@* Hilfeplanauswahl-Button *@
<div class="form-row">
<div class="col-md">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#group-booking-popup" id="support-concepts-and-groups-button">Hilfepläne und Gruppen hinzufügen</button>
</div>
</div>
@* (Gruppenbuchung) Ausgewählte Hilfepläne *@
<div class="form-row">
<div class="col-md">
<div class="form-group my-1">
<div class="list-group" id="selected-cb2sc-list">
@foreach(var selectedCb2ScRelation in Model.GroupBookingSelectionObject.SelectedRelations)
{
<div class="list-group-item" id="relation-item-@selectedCb2ScRelation.Value">
<div class="row">
<div class="col">
<span>
@selectedCb2ScRelation.Text1
<br />
<span class="@selectedCb2ScRelation.TextColor">
@selectedCb2ScRelation.Text2
</span>
</span>
</div>
<div class="col-auto my-auto">
<button type="button" class="btn btn-primary" onclick="removeSupportConceptCostBearerRel(@selectedCb2ScRelation.Value)">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
</div>
}
</div>
</div>
</div>
</div>
@* Mitarbeiterauswahl-Button *@
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#group-booking-employee-selection-popup" id="employees-button">
Mitarbeiter hinzufügen <span class="badge badge-light text-primary" id="selected-employees-count-badge">@Model.GroupBookingSelectedEmployees.Count</span>
</button>
</div>
</div>
</div>
@* Ziele *@
@if((Model.GroupBookingSelectedSupportConcepts?.Any() ?? false) && Model.GroupBookingSelectedSupportConcepts.Any(sc => sc.Goals.Any()))
{
<div class="form-row">
<div class="col-md">
<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">
<div class="col-md">
<div class="collapse w-100 mt-1 max-vw-50" id="goals-container"></div>
</div>
</div>
}
@* Kategorie und Leistungen *@
<div id="category-to-description-container">
@Html.Partial("Category2ServiceDescriptionPartial", Model)
</div>

View File

@@ -9,15 +9,22 @@
{
var loginStateMessage = new HtmlString(loginState.Message.Replace("\n", "<br/>").Replace("\"", "\\"));
<script>
<script type="text/javascript">
showMessagePopupWithHtml("Warnung", "@loginStateMessage");
</script>
}
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>
//var passwortsicherheit = new MoKPasswordSecurity("pw-strength-feedback");
<script type="text/javascript">
function validatePasswordStrength() {
try {
(new MoKPasswordSecurity("pw-strength-feedback")).validatePassword($("#new-password").val());
@@ -114,7 +121,11 @@
$.get("@Url.Action("LoadServiceCategories")", { pServiceCategoryOid: selectedCategoryOid })
.done(function (data) {
if(false === checkJson(data)) {
logWarning("loadServiceDescriptions: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
var serviceDescriptions = parseJason(data);
var serviceDescriptionsSelect = $(`#${leistungSelectId}`);
@@ -134,8 +145,6 @@
serviceDescriptionToEdit = parseFloat("@Model.SelectedServiceDescriptionOid");
}
logInfo3(`Leistungen geladen... ${serviceDescriptionToEdit}`);
var selectedOid = 0;
if(serviceDescriptionToEdit > 0) {
@@ -260,24 +269,23 @@
$("#fehlerdetail-textarea").prop("disabled", false);
if ("@Model.IsInMultiBookingMode".toLowerCase() === "true") {
var isMultiBookingFormEnabeld = "@Model.MultiBookingSelectedConceptCostBearerRelations.Any()".toLowerCase() === "true";
var isMultiBookingFormDisabled = "@Model.MultiBookingSelectedConceptCostBearerRelations.Any()".toLowerCase() === "false";
if(isMultiBookingFormEnabeld) {
activateMultiBookingForm();
} else {
deactivateMultiBookingForm();
}
toggleMultiBookingForm(isMultiBookingFormDisabled);
}
var categorySelectId = "category-select";
var leistungSelectId = "leistung-select";
//var categorySelectId = "category-select";
//var leistungSelectId = "leistung-select";
if("@Model.IsInMultiBookingMode".toLowerCase() === "true") {
@*if("@Model.IsInMultiBookingMode".toLowerCase() === "true") {
categorySelectId = "mb-category-select";
leistungSelectId = "mb-leistung-select";
}
}*@
loadServiceDescriptions(categorySelectId, leistungSelectId, 'textmodule-container', 'tree');
if("@Model.IsInGroupBookingMode".toLowerCase() === "false") {
loadServiceDescriptions("category-select", "leistung-select", 'textmodule-container', 'tree');
}
initializeTimeInputs();
@@ -503,18 +511,10 @@
return '@Url.Action("Index", "Login")';
}
function getRemoveCb2ScRelFromGroupBookingUrl() {
return '@Url.Action("RemoveSupportConceptCostBearerRelationFromGroupBooking")';
}
function getLoadStatisticsUrl() {
return '@Url.Action("LoadStatistics")';
}
function getAddEmployeesToGroupBookingUrl() {
return '@Url.Action("AddEmployeesToGroupBooking")';
}
function getSelectedRecordInformationUrlWithOid() {
return '@Url.Action("GetSelectedRecordInformationWithOid")';
}
@@ -572,10 +572,6 @@
function getGetSignatureImageUrl() {
return "@Url.Action("GetSignatureImage")";
}
function getRateSelectedGoalUrl() {
return "@Url.Action("RateSelectedGoal")";
}
</script>
<div class="container mt-3" id="checkbox-container">
@@ -802,9 +798,10 @@
</div>
@* ----- Bewertungspopup für Ziele ----- *@
@* ToDo: In PartialView verschieben und dann bei Gruppenbuchungen neuladen, wenn Hilfepläne entfernt oder hinzugefügt werden *@
@if(AbstractModel.HasRightToRateGoals)
{
<div id="goal-rating-popup" class="modal" tabindex="-1" role="dialog">
<div id="goal-rating-popup" class="modal" tabindex="-1" role="dialog" style="z-index: 9999 !important">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
@@ -814,11 +811,8 @@
</button>
</div>
<div class="modal-body">
<ul class="list-group">
@foreach(var ratingType in Model.GoalRatingTypes)
{
<li class="list-group-item" id="grt-@ratingType.RatingTypeOid" onclick="rateGoal(@ratingType.RatingTypeOid)">@ratingType.DisplayName</li>
}
<ul class="list-group" id="goal-ratings-container">
@Html.Partial("GoalRatingPopupContentPartial", Model)
</ul>
<input type="hidden" id="goal-to-rate-oid" />
</div>

View File

@@ -0,0 +1,326 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
function addScCbRelsToMultiBooking() {
try {
var selectedGroups = [];
var selectedSupportConcepts = [];
$("#multi-booking-supportconcepts input:checked").each(function () {
selectedSupportConcepts.push($(this).attr("value"));
});
$("#multi-booking-groups input:checked").each(function () {
selectedGroups.push($(this).attr("value"));
});
$("#multi-booking-sc-cb-rel-tab-content").load("@Url.Action("AddScCbRelsToMultiBooking")", {relOids: selectedSupportConcepts, groupOids: selectedGroups}, function() {
$("#multibooking-selection-container").load("@Url.Action("ReloadMultiBookingForm")", function () {
toggleMultiBookingForm($(".mb-cb2sc-input:checkbox:checked").length > 0 ? false : true);
$("#tree").load("@Url.Action("LoadUpToDateTextModules")");
});
});
} catch(blubb) {
showErrorPopup(blubb);
}
}
function removeSupportConceptCostBearerRel(relOid) {
try {
$(`#mb-cb2sc-checkbox-${relOid}`).prop("checked", false);
$("#multibooking-selection-container").load("@Url.Action("RemoveSupportConceptCostbearerRelFromMultiBooking")", {relOid: relOid}
, function () {
$("#goals-tree").load("@Url.Action("ReloadGoals")"
, function () {
toggleMultiBookingForm($(".mb-cb2sc-input:checkbox:checked").length > 0 ? false : true);
$("#tree").load("@Url.Action("LoadUpToDateTextModules")");
}
);
}
);
} catch (error) {
showErrorPopup(error);
}
}
</script>
@if(!(Model is null))
{
using(Html.BeginForm("CreateMultiBooking", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset('mb-category-select', 'mb-leistung-select', 'textmodule-container', 'tree')", id = "multiBookingForm" }))
{
var startDate = Model.SelectedServiceRecord?.Start?.ToShortDateString() ?? DateTime.Today.ToShortDateString();
var endDate = Model.SelectedServiceRecord?.End?.ToShortDateString() ?? DateTime.Today.ToShortDateString();
var distance = Model.SelectedServiceRecord?.DistanceInMeter?.ToString() ?? string.Empty;
var notice0 = Model.SelectedServiceRecord?.Notice ?? string.Empty;
var noticeList = new[] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
if(Model.SelectedServiceRecord?.NoticeList != null)
{
var selectedNoticeList = Model.SelectedServiceRecord.NoticeList;
for(var i = 0; i < selectedNoticeList.Count; i++)
{
noticeList[i] = selectedNoticeList[i] ?? string.Empty;
}
}
<div class="mt-3">
<div id="multibooking-selection-container">
@Html.Partial("MultiBookingSelectionPartial", Model)
</div>
@* Marker *@
@if(Model.ShowMarker)
{
<div class="form-row">
<div class="col-md">
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" name="marker-cb" id="mb-marker-cb" />
<label class="custom-control-label" for="mb-marker-cb">Marker</label>
</div>
</div>
</div>
}
@* Trennlinie *@
<div class="form-row">
<div class="col-md">
<hr />
</div>
</div>
@* Start- und Enddatum *@
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="mb-start-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Startdatum
</div>
</div>
<input type="text" id="mb-start-date" name="Datum" class="form-control datetimepicker-input" data-target="#mb-start-date-picker" data-toggle="datetimepicker" value="@startDate" />
<div class="input-group-append" data-target="#mb-start-date-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
@if(Model.IsEndDateVisible)
{
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="mb-end-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Enddatum
</div>
</div>
<input type="text" id="mb-end-date" name="Enddatum" class="form-control datetimepicker-input" data-target="#mb-end-date-picker" data-toggle="datetimepicker" value="@endDate" />
<div class="input-group-append" data-target="#mb-end-date-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
}
</div>
@* Start- und Endzeit *@
<div class="form-row">
@{
var startTimeValue = Model.StartTimeToEdit;
var endTimeValue = Model.EndTimeToEdit;
var divisor = Model.SelectedDurationUnit == "Stunden" ? 60 : 1;
var durationValue = string.Empty;
if(!(Model.SelectedServiceRecord is null))
{
durationValue = (Model.SelectedServiceRecord?.RoundedDuration / divisor).ToString();
}
var afterValidationState = TempData[TempDataConstants.AfterValidationStateKey];
if(Model.SetStartTimeToEndTimeAfterSave && !Model.IsInEditingMode && afterValidationState is bool isAfterValidation && isAfterValidation == false)
{
startTimeValue = Model.NewStartTime;
endTimeValue = Model.NewEndTime;
if(Model.NewDuration.HasValue)
{
durationValue = (Model.NewDuration / divisor).ToString();
}
}
}
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="mb-start-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text sm-prepend-input-group-text">
Von
</div>
</div>
<input type="text" id="mb-start-time" name="Start" class="form-control datetimepicker-input" data-target="#mb-start-time-picker" value="@startTimeValue" />
<div class="input-group-append" data-target="#mb-start-time-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="mb-end-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text sm-prepend-input-group-text">
Bis
</div>
</div>
<input type="text" id="mb-end-time" name="Ende" class="form-control datetimepicker-input" data-target="#mb-end-time-picker" value="@endTimeValue" />
<div class="input-group-append" data-target="#mb-end-time-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
</div>
@* Dauer und Stunden/Minuten-Auswahl *@
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
@{
var labelText = Model.EinheitZeiterfassung == 1 ? "Dauer (h)" : "Dauer";
}
<div class="input-group-text prepend-input-group-text">
@labelText
</div>
</div>
<input type="text" class="form-control" id="mb-duration" name="Dauer" onchange="onDurationChange('mb-start-time', 'mb-end-time', 'mb-start-date', 'mb-end-date', 'mb-duration', 'mb-hours-minutes-dropdown-btn', 'mb-start-date-picker', 'mb-end-date-picker')" value="@durationValue">
@if(Model.IsZeiterfassungInStdMin)
{
<div class="input-group-append">
<button id="mb-hours-minutes-dropdown-btn" class="btn btn-outline-primary dropdown-toggle" type="button" data-toggle="dropdown">
@Model.SelectedDurationUnit
</button>
<div class="dropdown-menu">
<a class="dropdown-item hours-minutes-link" href="#">Minuten</a>
<a class="dropdown-item hours-minutes-link" href="#">Stunden</a>
</div>
</div>
}
</div>
</div>
</div>
</div>
@* Gefahrene Kilometer *@
@if(Model.ShowDistanceField)
{
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
Gefahrene Kilometer
</div>
</div>
<input type="text" class="form-control" id="mb-distance" name="Distanz" onchange="validateDistanceInput()" value="@distance">
</div>
</div>
</div>
</div>
}
@* Textbausteinebutton *@
@if(AbstractModel.HasRightToSeeTextModules)
{
<div class="form-row" id="textmodule-container">
<div class="col-md">
<button type="button" class="btn btn-primary form-control mt-3" data-toggle="modal" data-target="#textbausteine-popup" id="mb-textbausteine-button">Textbausteine</button>
</div>
</div>
}
@* Dokumentationsfelder *@
<div class="form-row">
<div class="col-md mt-3">
@if(Model.NumberOfDokuTypes == 0)
{
<div class="form-group">
<label for="mb-dokufeld">Dokumentation</label>
<textarea class="form-control" name="Dokumentation6" id="mb-dokufeld">@notice0</textarea>
</div>
}
else
{
<ul class="nav nav-tabs" role="tab-list">
@for(var i = 0; i < Model.Dokutypes.Length; i++)
{
var currentDokuType = Model.Dokutypes[i];
<li class="nav-item">
<a href="#mb-doku_@i" id="mb-doku_@i-tab" data-toggle="tab" role="tab" aria-controls="mb-doku_@i" class="nav-link@(i == 0 ? " active" : string.Empty)" aria-selected="true">
@currentDokuType.DisplayName
</a>
</li>
}
</ul>
<div class="tab-content" id="mb-dokufelderTab">
@for(var i = 0; i < Model.Dokutypes.Length; i++)
{
var textareaName = i + 1 < 1 ? "Dokumentation" : "Dokumentation" + (i + 1);
<div class="tab-pane show@(i == 0 ? " active" : string.Empty)" id="mb-doku_@i" role="tabpanel" aria-labelledby="mb-doku_@i-tab">
<textarea class="form-control doku-form-control" id="mb-doku-textarea-@i" name="@textareaName">@noticeList[i]</textarea>
</div>
}
</div>
}
</div>
</div>
</div>
}
<div class="d-flex bd-highlight mt-3">
<div class="mr-auto bd-highlight">
<!-- dient nur als Abstandshalter-->
</div>
<div class="ml-3 bd-highlight">
@using(Html.BeginForm("ResetMultiBookingForm", "Main", FormMethod.Post))
{
<button type="submit" class="btn btn-primary" onclick="showSpinner()">Abbrechen</button>
}
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="mb-create-button" onclick="submitMultiBookingForm()">Anlegen</button>
</div>
</div>
}

View File

@@ -1,8 +1,17 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@using BS.Shared
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>
$(document).ready(function () {
try {
@@ -34,145 +43,6 @@
}
});
function addCostBearer2SupportConceptsToMultiBooking() {
try {
var selectedGroups = [];
var selectedSupportConcepts = [];
var scOidString = "";
var groupOidString = "";
$("#multi-booking-supportconcepts input:checked").each(function () {
selectedSupportConcepts.push($(this).attr("value"));
});
$("#multi-booking-groups input:checked").each(function () {
selectedGroups.push($(this).attr("value"));
});
for(var i = 0; i < selectedSupportConcepts.length; i++) {
scOidString += selectedSupportConcepts[i];
if(i < selectedSupportConcepts.length - 1) {
scOidString += ",";
}
}
for(var j = 0; j < selectedGroups.length; j++) {
groupOidString += selectedGroups[j];
if(j < selectedGroups.length - 1) {
groupOidString += ",";
}
}
$.get("@Url.Action("AddSupportConceptCostBearerRelationsToMultiBooking")", { pRelOids: scOidString, pGroupOids: groupOidString }).done(updateMultiBookingCb2ScList);
} catch(error) {
showErrorPopup(error);
}
}
function updateMultiBookingCb2ScList(result) {
try {
var list = $("#mb-selected-cb2sc-list");
if (isEmptyOrSpaces(result) || result === "SessionTimeout") {
window.location.href = getRedirectLink();
return;
}
var multiBookingSelectionObject = parseJason(result);
var resultList = multiBookingSelectionObject.SelectedRelations;
list.empty();
$.each(resultList,
function (index, customListItem) {
var html =
'<div class="list-group-item" id="mb-relation-item-' + customListItem.Value + '">' +
'<div class="row">' +
'<div class="col">' +
'<span>' + customListItem.Text1 + '<br />' +
'<span class="' + customListItem.TextColor + '">' + customListItem.Text2 + '</span>' +
'</span>' +
'</div>' +
'<div class="col-auto my-auto">' +
'<button type="button" class="btn btn-primary" onclick="removeMultiBookingCb2ScRelation(' + customListItem.Value + ')">' +
'<span class="fas fa-times-circle"></span>' +
'</button>' +
'</div>' +
'</div>';
list.append(html);
});
updateMultiBookingGroupList(multiBookingSelectionObject);
} catch (error) {
showErrorPopup(error);
}
}
function updateMultiBookingGroupList(multiBookingSelectionObject) {
try {
var groupOids = multiBookingSelectionObject.GroupOids === undefined ? [] : multiBookingSelectionObject.GroupOids;
var relOids = [];
if (multiBookingSelectionObject.SelectedRelations !== undefined) {
for (var i = 0; i < multiBookingSelectionObject.SelectedRelations.length; i++) {
var oidStringValue = multiBookingSelectionObject.SelectedRelations[i].Value;
var oidIntValue = parseInt(oidStringValue, 10);
relOids.push(oidIntValue);
}
}
$("#multi-booking-supportconcepts input").each(function () {
var value = $(this).val();
$(this).prop("checked", isInArray(value, relOids));
});
$("#multi-booking-groups input").each(function () {
var value = $(this).val();
$(this).prop("checked", isInArray(value, groupOids));
});
if (relOids.length === 0 && groupOids.length === 0) {
deactivateMultiBookingForm();
} else {
activateMultiBookingForm();
}
} catch (error) {
showErrorPopup(error);
}
}
function removeMultiBookingCb2ScRelation(selectedCb2ScRelOid) {
try {
$("#mb-relation-item-" + selectedCb2ScRelOid).remove();
if ($("#mb-cb2sc-checkbox-" + selectedCb2ScRelOid).length) {
$("#mb-cb2sc-checkbox-" + selectedCb2ScRelOid).prop("checked", false);
}
if ($("#mb-selected-cb2sc-list").find(".list-group-item").length === 0) {
deactivateMultiBookingForm();
$("#multi-booking-supportconcepts input:checked").each(function () {
$(this).prop("checked", false);
});
}
$.get("@Url.Action("RemoveSupportConceptCostBearerRelationFromMultiBooking")", { pRelOid: selectedCb2ScRelOid }).done(function(result) {
updateMultiBookingGroupList(parseJason(result));
});
} catch (error) {
showErrorPopup(error);
}
}
function addEmployeeToMultiBooking() {
try {
var selectedEmployees = [];
@@ -203,29 +73,24 @@
}
}
function deactivateMultiBookingForm() {
try {
$("#multi-booking-employees-button, #mb-category-select, #mb-leistung-select, #mb-start-date, #mb-end-date, #mb-start-time, #mb-end-time, #mb-duration, #mb-distance, textarea, #mb-reset-button, #mb-create-button, #mb-textbausteine-button, #mb-hours-minutes-dropdown-btn, #mb-marker-cb").prop("disabled", true);
} catch (error) {
showErrorPopup(error);
}
}
function activateMultiBookingForm() {
try {
$("#multi-booking-employees-button, #mb-category-select, #mb-leistung-select, #mb-start-date, #mb-end-date, #mb-start-time, #mb-end-time, #mb-duration, #mb-distance, textarea, #mb-reset-button, #mb-create-button, #mb-textbausteine-button, #mb-hours-minutes-dropdown-btn, #mb-marker-cb").prop("disabled", false);
} catch (error) {
showErrorPopup(error);
}
}
function submitMultiBookingForm() {
try {
showSpinner();
$.get("@Url.Action("MultiBookingHasSelectedSupportConcepts")").done(function(result1) {
$.get("@Url.Action("MultiBookingHasSelectedSupportConcepts")").done(function (result1) {
if(false === checkJson(result1)) {
logWarning("submitMultiBookingForm: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
$.get("@Url.Action("MultiBookingHasSelectedEmployees")").done(function (result2) {
if(false === checkJson(result2)) {
logWarning("submitMultiBookingForm: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
var hasSupportConcepts = parseJason(result1);
var hasEmployees = parseJason(result2);
@@ -255,345 +120,9 @@
<div class="row">
<div class="col col-12">
@if(!(Model is null))
@if(Model != null)
{
using(Html.BeginForm("CreateMultiBooking", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset('mb-category-select', 'mb-leistung-select', 'textmodule-container', 'tree')", id = "multiBookingForm" }))
{
var startDate = Model.SelectedServiceRecord?.Start?.ToShortDateString() ?? DateTime.Today.ToShortDateString();
var endDate = Model.SelectedServiceRecord?.End?.ToShortDateString() ?? DateTime.Today.ToShortDateString();
var distance = Model.SelectedServiceRecord?.DistanceInMeter?.ToString() ?? string.Empty;
var notice0 = Model.SelectedServiceRecord?.Notice ?? string.Empty;
var noticeList = new[] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
if(Model.SelectedServiceRecord?.NoticeList != null)
{
var selectedNoticeList = Model.SelectedServiceRecord.NoticeList;
for(var i = 0; i < selectedNoticeList.Count; i++)
{
noticeList[i] = selectedNoticeList[i] ?? string.Empty;
}
}
<div class="mt-3">
<!-- Hilfeplanauswahlbutton -->
<div class="form-row">
<div class="col-md">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#multi-booking-popup" id="support-concepts-and-groups-button">Hilfepläne und Gruppen hinzufügen</button>
</div>
</div>
<!-- Hilfeplanauswahl -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-1">
<div class="list-group" id="mb-selected-cb2sc-list">
@foreach(var selectedCb2ScRelation in Model.MultiBookingSelectionObject.SelectedRelations)
{
<div class="list-group-item" id="mb-relation-item-@selectedCb2ScRelation.Value">
<div class="row">
<div class="col">
<span>
@selectedCb2ScRelation.Text1
<br />
<span class="@selectedCb2ScRelation.TextColor">
@selectedCb2ScRelation.Text2
</span>
</span>
</div>
<div class="col-auto my-auto">
<button type="button" class="btn btn-primary" onclick="removeMultiBookingCb2ScRelation(@selectedCb2ScRelation.Value)">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
</div>
}
</div>
</div>
</div>
</div>
<!-- Mitarbeiterauswahl -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#multi-booking-employee-selection-popup" id="multi-booking-employees-button">
Mitarbeiter hinzufügen <span class="badge badge-light text-primary" id="multi-booking-selected-employees-count-badge">@Model.MultiBookingSelectedEmployees.Count</span>
</button>
</div>
</div>
</div>
<!-- Kategorie -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Kategorie
</div>
</div>
@Html.DropDownListFor(m => m.SelectedServiceCategoryOid, Model.ServiceCategoryListItems, new { onchange = "loadServiceDescriptions('mb-category-select', 'mb-leistung-select', 'textmodule-container', 'tree')", @class = "custom-select", Id = "mb-category-select" })
</div>
</div>
</div>
</div>
<!-- Leistung -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Leistung
</div>
</div>
<select class="custom-select" id="mb-leistung-select" name="ServiceDescription" onchange="setServiceDescription('mb-leistung-select')"></select>
</div>
</div>
</div>
</div>
<!-- Marker -->
@if(Model.ShowMarker)
{
<div class="form-row">
<div class="col-md">
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" name="marker-cb" id="mb-marker-cb" />
<label class="custom-control-label" for="mb-marker-cb">Marker</label>
</div>
</div>
</div>
}
<div class="form-row">
<div class="col-md">
<hr/>
</div>
</div>
<!-- Start- und Enddatum -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="mb-start-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Startdatum
</div>
</div>
<input type="text" id="mb-start-date" name="Datum" class="form-control datetimepicker-input" data-target="#mb-start-date-picker" data-toggle="datetimepicker" value="@startDate" />
<div class="input-group-append" data-target="#mb-start-date-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
@if(Model.IsEndDateVisible)
{
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="mb-end-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-input-group-text">
Enddatum
</div>
</div>
<input type="text" id="mb-end-date" name="Enddatum" class="form-control datetimepicker-input" data-target="#mb-end-date-picker" data-toggle="datetimepicker" value="@endDate" />
<div class="input-group-append" data-target="#mb-end-date-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
}
</div>
<!-- Start- und Endzeit -->
<div class="form-row">
@{
var startTimeValue = Model.StartTimeToEdit;
var endTimeValue = Model.EndTimeToEdit;
var divisor = Model.SelectedDurationUnit == "Stunden" ? 60 : 1;
var durationValue = string.Empty;
if(!(Model.SelectedServiceRecord is null))
{
durationValue = (Model.SelectedServiceRecord?.RoundedDuration / divisor).ToString();
}
var afterValidationState = TempData[TempDataConstants.AfterValidationStateKey];
if(Model.SetStartTimeToEndTimeAfterSave && !Model.IsInEditingMode && afterValidationState is bool isAfterValidation && isAfterValidation == false)
{
startTimeValue = Model.NewStartTime;
endTimeValue = Model.NewEndTime;
if(Model.NewDuration.HasValue)
{
durationValue = (Model.NewDuration / divisor).ToString();
}
}
}
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="mb-start-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text sm-prepend-input-group-text">
Von
</div>
</div>
<input type="text" id="mb-start-time" name="Start" class="form-control datetimepicker-input" data-target="#mb-start-time-picker" value="@startTimeValue" />
<div class="input-group-append" data-target="#mb-start-time-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-md">
<div class="form-group my-2">
<div class="input-group date" id="mb-end-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text sm-prepend-input-group-text">
Bis
</div>
</div>
<input type="text" id="mb-end-time" name="Ende" class="form-control datetimepicker-input" data-target="#mb-end-time-picker" value="@endTimeValue" />
<div class="input-group-append" data-target="#mb-end-time-picker" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Dauer und Stunden/Minuten-Auswahl -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
@{
var labelText = Model.EinheitZeiterfassung == 1 ? "Dauer (h)" : "Dauer";
}
<div class="input-group-text prepend-input-group-text">
@labelText
</div>
</div>
<input type="text" class="form-control" id="mb-duration" name="Dauer" onchange="onDurationChange('mb-start-time', 'mb-end-time', 'mb-start-date', 'mb-end-date', 'mb-duration', 'mb-hours-minutes-dropdown-btn', 'mb-start-date-picker', 'mb-end-date-picker')" value="@durationValue">
@if(Model.IsZeiterfassungInStdMin)
{
<div class="input-group-append">
<button id="mb-hours-minutes-dropdown-btn" class="btn btn-outline-primary dropdown-toggle" type="button" data-toggle="dropdown">
@Model.SelectedDurationUnit
</button>
<div class="dropdown-menu">
<a class="dropdown-item hours-minutes-link" href="#">Minuten</a>
<a class="dropdown-item hours-minutes-link" href="#">Stunden</a>
</div>
</div>
}
</div>
</div>
</div>
</div>
<!-- Gefahrene Kilometer -->
@if(Model.ShowDistanceField)
{
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
Gefahrene Kilometer
</div>
</div>
<input type="text" class="form-control" id="mb-distance" name="Distanz" onchange="validateDistanceInput()" value="@distance">
</div>
</div>
</div>
</div>
}
<!-- Textbausteinebutton -->
@if(AbstractModel.HasRightToSeeTextModules)
{
<div class="form-row" id="textmodule-container">
<div class="col-md">
<button type="button" class="btn btn-primary form-control mt-3" data-toggle="modal" data-target="#textbausteine-popup" id="mb-textbausteine-button">Textbausteine</button>
</div>
</div>
}
<!-- Dokumentationsfelder -->
<div class="form-row">
<div class="col-md mt-3">
@if(Model.NumberOfDokuTypes == 0)
{
<div class="form-group">
<label for="mb-dokufeld">Dokumentation</label>
<textarea class="form-control" name="Dokumentation6" id="mb-dokufeld">@notice0</textarea>
</div>
}
else
{
<ul class="nav nav-tabs" role="tab-list">
@for(var i = 0; i < Model.Dokutypes.Length; i++)
{
var currentDokuType = Model.Dokutypes[i];
<li class="nav-item">
<a href="#mb-doku_@i" id="mb-doku_@i-tab" data-toggle="tab" role="tab" aria-controls="mb-doku_@i" class="nav-link@(i == 0 ? " active" : string.Empty)" aria-selected="true">
@currentDokuType.DisplayName
</a>
</li>
}
</ul>
<div class="tab-content" id="mb-dokufelderTab">
@for(var i = 0; i < Model.Dokutypes.Length; i++)
{
var textareaName = i + 1 < 1 ? "Dokumentation" : "Dokumentation" + (i + 1);
<div class="tab-pane show@(i == 0 ? " active" : string.Empty)" id="mb-doku_@i" role="tabpanel" aria-labelledby="mb-doku_@i-tab">
<textarea class="form-control doku-form-control" id="mb-doku-textarea-@i" name="@textareaName">@noticeList[i]</textarea>
</div>
}
</div>
}
</div>
</div>
</div>
}
<div class="d-flex bd-highlight mt-3">
<div class="mr-auto bd-highlight">
<!-- dient nur als Abstandshalter-->
</div>
<div class="ml-3 bd-highlight">
@using(Html.BeginForm("ResetMultiBookingForm", "Main", FormMethod.Post))
{
<button type="submit" class="btn btn-primary" onclick="showSpinner()">Abbrechen</button>
}
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="mb-create-button" onclick="submitMultiBookingForm()">Anlegen</button>
</div>
</div>
@Html.Partial("MultiBookingFormPartial", Model);
}
</div>
</div>
@@ -613,61 +142,8 @@
<a class="nav-item nav-link active" href="#multi-booking-supportconcepts" data-toggle="tab" role="tab">Hilfepläne</a>
<a class="nav-item nav-link" href="#multi-booking-groups" data-toggle="tab" role="tab">Gruppen</a>
</nav>
<div class="tab-content">
<div class="tab-pane show active" role="tabpanel" id="multi-booking-supportconcepts">
<ul class="list-group">
@foreach(var cb2Sc in Model.MultiBookingSupportConceptListObjects)
{
<li class="list-group-item">
@{
var timeSpanColorClass2 = cb2Sc.IsAboutToExpire ? "text-bewo-is-about-to-expire" : cb2Sc.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
var wasSuccessful = long.TryParse(cb2Sc.CostBearer2SupportConceptOid, out var cb2ScOid);
var checkedValue = wasSuccessful ? Model.MultiBookingSelectedConceptCostBearerRelations.Any(a => a.CostBearer2SupportConceptOid.Equals(cb2ScOid)) : wasSuccessful;
}
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox"
@{ if(checkedValue) { @Html.Raw("checked=\"checked\"") ; } }
class="custom-control-input" id="mb-cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" onchange="addCostBearer2SupportConceptsToMultiBooking()" name="mb-cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" value="@cb2Sc.CostBearer2SupportConceptOid">
<label for="mb-cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" class="custom-control-label">
<span class="justify-content-between mb-1 text-dark text-left">
@cb2Sc.NameAndDateOfBirth
</span>
<br />
<span class="mb-1 text-left @timeSpanColorClass2">
@cb2Sc.SupportConceptTimeSpan
</span>
</label>
</div>
</li>
}
</ul>
</div>
<div class="tab-pane show" role="tabpanel" id="multi-booking-groups">
<ul class="list-group">
@foreach(var group in Model.GroupOfPeopleListItems)
{
<li class="list-group-item">
@{
long groupOid;
var wasSuccessful = long.TryParse(group.Value, out groupOid);
var shouldBeChecked = wasSuccessful ? Model.MultiBookingSelectedGroupOfPeopleOids.Contains(groupOid) : wasSuccessful;
var attribute = shouldBeChecked ? "checked=\"checked\"" : string.Empty;
}
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" @attribute class="custom-control-input" id="mb-group-checkbox-@group.Value" value="@group.Value" onchange="addCostBearer2SupportConceptsToMultiBooking()" />
<label for="mb-group-checkbox-@group.Value" class="custom-control-label">
@group.Text
</label>
</div>
</li>
}
</ul>
</div>
<div class="tab-content" id="multi-booking-sc-cb-rel-tab-content">
@Html.Partial("MultiBookingScCbRelList", Model)
</div>
</div>
</div>

View File

@@ -0,0 +1,68 @@
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<div class="tab-pane show active" role="tabpanel" id="multi-booking-supportconcepts">
<ul class="list-group">
@foreach(var cb2Sc in Model.MultiBookingSupportConceptListObjects)
{
<li class="list-group-item">
@{
var timeSpanColorClass2 = cb2Sc.IsAboutToExpire ? "text-bewo-is-about-to-expire" : cb2Sc.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
var wasSuccessful = long.TryParse(cb2Sc.CostBearer2SupportConceptOid, out var cb2ScOid);
var checkedValue = wasSuccessful ? Model.MultiBookingSelectedConceptCostBearerRelations.Any(a => a.CostBearer2SupportConceptOid.Equals(cb2ScOid)) : wasSuccessful;
}
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox"
@{ if(checkedValue) { @Html.Raw("checked=\"checked\"") ; } }
class="custom-control-input mb-cb2sc-input" id="mb-cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" onchange="addScCbRelsToMultiBooking()" name="mb-cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" value="@cb2Sc.CostBearer2SupportConceptOid">
<label for="mb-cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" class="custom-control-label">
<span class="justify-content-between mb-1 text-dark text-left">
@cb2Sc.NameAndDateOfBirth
</span>
<br />
<span class="mb-1 text-left @timeSpanColorClass2">
@cb2Sc.SupportConceptTimeSpan
</span>
</label>
</div>
</li>
}
</ul>
</div>
<div class="tab-pane show" role="tabpanel" id="multi-booking-groups">
<ul class="list-group">
@foreach(var group in Model.GroupOfPeopleListItems)
{
<li class="list-group-item">
@{
long groupOid;
var wasSuccessful = long.TryParse(group.Value, out groupOid);
var shouldBeChecked = wasSuccessful ? Model.MultiBookingSelectedGroupOfPeopleOids.Contains(groupOid) : wasSuccessful;
var attribute = shouldBeChecked ? "checked=\"checked\"" : string.Empty;
}
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" @attribute class="custom-control-input" id="mb-group-checkbox-@group.Value" value="@group.Value" onchange="addScCbRelsToMultiBooking()" />
<label for="mb-group-checkbox-@group.Value" class="custom-control-label">
@group.Text
</label>
</div>
</li>
}
</ul>
</div>

View File

@@ -0,0 +1,67 @@
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
@* (Mehrfachbuchung) Hilfeplanauswahl-Button *@
<div class="form-row">
<div class="col-md">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#multi-booking-popup" id="support-concepts-and-groups-button">Hilfepläne und Gruppen hinzufügen</button>
</div>
</div>
@* (Mehrfachbuchung) Ausgewählte Hilfepläne *@
<div class="form-row">
<div class="col-md">
<div class="form-group my-1">
<div class="list-group" id="mb-selected-cb2sc-list">
@foreach(var selectedCb2ScRelation in Model.MultiBookingSelectionObject.SelectedRelations)
{
<div class="list-group-item" id="mb-relation-item-@selectedCb2ScRelation.Value">
<div class="row">
<div class="col">
<span>
@selectedCb2ScRelation.Text1
<br />
<span class="@selectedCb2ScRelation.TextColor">
@selectedCb2ScRelation.Text2
</span>
</span>
</div>
<div class="col-auto my-auto">
<button type="button" class="btn btn-primary" onclick="removeSupportConceptCostBearerRel(@selectedCb2ScRelation.Value)">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
</div>
}
</div>
</div>
</div>
</div>
@* (Mehrfachbuchung) Mitarbeiterauswahl-Button *@
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#multi-booking-employee-selection-popup" id="multi-booking-employees-button">
Mitarbeiter hinzufügen <span class="badge badge-light text-primary" id="multi-booking-selected-employees-count-badge">@Model.MultiBookingSelectedEmployees.Count</span>
</button>
</div>
</div>
</div>
@* Kategorie und Leistungen *@
<div id="category-to-description-container">
@Html.Partial("Category2ServiceDescriptionPartial", Model)
</div>

View File

@@ -1,13 +1,23 @@
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
@if(Model.OneTimeLink != null)
{
<script type="text/javascript">
$(document).ready(function () {
<script type="text/javascript">
$(document).ready(function () {
try {
$(function() {
$(function () {
$('[data-toggle="popover"]').popover();
});
@@ -35,7 +45,7 @@
showErrorPopup(error);
}
}
</script>
</script>
@Html.Raw(Model.OneTimeLinkText)
<a class="text-break" href="@Model.OneTimeLink" id="one-time-link">@Model.OneTimeLink</a>

View File

@@ -3,6 +3,17 @@
@using BS.Shared
@model MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
function generateExternalLink(serviceRecordOid) {
try {
@@ -62,7 +73,7 @@
}
}
</script>
@{
@@ -188,6 +199,18 @@
goalsString += goal.TypeDescription;
}
#if DEBUG
if(goal.RatingTypeOid.HasValue)
{
var goalRating = Model.GoalRatingTypes.FirstOrDefault(g => g.RatingTypeOid.HasValue && g.RatingTypeOid.Equals(goal.RatingTypeOid.Value));
if(goalRating?.DisplayName != null && goalRating.DisplayName.Length > 0)
{
goalsString += $"<strong>({goalRating.DisplayName})</strong>";
}
}
#endif
if(serviceRecord.Goals.IndexOf(goal) < serviceRecord.Goals.Count - 1)
{
goalsString += ", ";
@@ -314,7 +337,8 @@
Maßnahmen:
</div>
<div class="col">
@goalsString
@*@Html.Raw(goalsString)*@
@(new HtmlString(goalsString))
</div>
</div>
}

View File

@@ -4,6 +4,17 @@
@using BS.Shared.Extensions
@model MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>
$(document).ready(function () {
$("#hours-minutes-dropdown-btn").on("click", function() {
@@ -22,7 +33,7 @@
$("#hours-minutes-dropdown-btn").text(buttonText);
setInputFilter('duration', 'distance', 'hours-minutes-dropdown-btn');
$.get('@Url.Action("ToggleDurationUnit")', { isInHoursMode: buttonText === "Stunden" });
calculateDuration(true, 'start-time', 'end-time', 'duration', 'hours-minutes-dropdown-btn', 'start-date-picker', 'end-date-picker', false, false);
@@ -796,10 +807,10 @@
</div>
@*----- /Liste mit den Einträgen und dem Auswahl-Select ----- *@
</div>
@using(Html.BeginForm("DeleteSignature", "Main", FormMethod.Post, new { id = "delete-signature-form"}))
@using(Html.BeginForm("DeleteSignature", "Main", FormMethod.Post, new { id = "delete-signature-form" }))
{
<input type="hidden" name="sr-signature-to-del-oid" id="sr-signature-to-del-oid-input" />
<input type="hidden" name="sr-sig-to-del-record-oid" id="sr-sig-to-del-record-oid-input" />

View File

@@ -1,6 +1,17 @@
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.MainModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
@helper BuildTextModuleTree(TextbausteinDisplayItem textModule)
{
if(textModule.IsParent)

View File

@@ -1,29 +1,39 @@
@using BeWoPlanerMobil.Util.ReportUtils
@using BeWoPlanerMobil.Util
@using BeWoPlanerMobil.Util.ReportUtils
@model BeWoPlanerMobil.Models.ReportModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
var plural = Model.ConfirmationReceiptObject.NumberOfServiceRecords > 1 ? "en" : string.Empty;
var leistungsplurarl = Model.ConfirmationReceiptObject.NumberOfServiceRecords > 1 ? "en" : string.Empty;
var sigInfo = $"Unterschrift{plural} von {Model.Quittierungsbelegsunterschriftenobjekt.PersonName} für {Model.Quittierungsbelegsunterschriftenobjekt.ServiceRecordCount} erbrachte Leistung{leistungsplurarl} von {Model.Quittierungsbelegsunterschriftenobjekt.CustomerName} ({Model.Quittierungsbelegsunterschriftenobjekt.TimeSpanInfo})";
}
<script>
$(document).ready(function() {
$(document).ready(function () {
try {
$(".left-col").width(getMaxWidth("left-col"));
} catch (error) {
} catch(error) {
showErrorPopup(error);
}
});
$(".signature-card").ready(function () {
try {
setTimeout(function() {
setTimeout(function () {
$(".signature-card").height(getMaxElementHeight("signature-card"));
}, 100);
} catch (error) {
} catch(error) {
showErrorPopup(error);
}
});
@@ -151,7 +161,7 @@
<div class="@GetColumnClass()">
<div class="card signature-card mt-4">
<div class="justify-content-center">
<img style="display: block; margin-left: auto; margin-right: auto; max-width: 100% !important;" src="@signature.ImageStr" alt="Unterschrift von @signature.PersonName geleistet am @signature.InsTsStr"/>
<img style="display: block; margin-left: auto; margin-right: auto; max-width: 100% !important;" src="@signature.ImageStr" alt="Unterschrift von @signature.PersonName geleistet am @signature.InsTsStr" />
</div>
<div class="card-body m-0 p-0" style="height: 0 !important;"></div>
<div class="card-footer">

View File

@@ -1,4 +1,16 @@
@model BeWoPlanerMobil.Models.ReportModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.ReportModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
function quittierungsbelegsViewerInit(s, e) {
@@ -7,7 +19,7 @@
'Page': 'Seite',
'of': 'von'
});
} catch (error) {
} catch(error) {
showErrorPopup(error);
}
}

View File

@@ -2,7 +2,18 @@
@using BeWoPlanerMobil.Util
@using BeWoPlanerMobil.Util.ReportUtils
@model BeWoPlanerMobil.Models.ReportModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
function deleteCustomerSignatures(cardBodyId, resultIdentifier, customerName, timeSpan) {
try {
@@ -143,186 +154,186 @@
foreach(var result in Model.ConfirmationReceiptObject.ConfirmationReceiptResultList)
{
<div class="card w-100 mb-3">
<div class="card-header" onclick="cardHeaderClick2(this)">
@{
var employeeSignatureState = result.EmployeeSignatureState;
var customerSignatureState = result.CustomerSignatureState;
<div class="card w-100 mb-3">
<div class="card-header" onclick="cardHeaderClick2(this)">
@{
var employeeSignatureState = result.EmployeeSignatureState;
var customerSignatureState = result.CustomerSignatureState;
var canCustomerSign = customerSignatureState != SignatureState.All;
var canEmployeeSign = employeeSignatureState != SignatureState.All && employeeSignatureState != SignatureState.AllOwnServiceRecords; // || (employeeSignatureState != SignatureState.AllOwnServiceRecords);
var canCustomerSign = customerSignatureState != SignatureState.All;
var canEmployeeSign = employeeSignatureState != SignatureState.All && employeeSignatureState != SignatureState.AllOwnServiceRecords; // || (employeeSignatureState != SignatureState.AllOwnServiceRecords);
var employeeName = Model.Employee.ToString();
var employeeName = Model.Employee.ToString();
var overwrite_ssp = (employeeSignatureState == SignatureState.All).ToString().ToLower();
var cardBodyId_ssp = $"#collapse-result-{result.Identifier}";
var timeSpan_ssp = Model.ConfirmationReceiptObject.TimeSpanString;
var overwrite_ssp = (employeeSignatureState == SignatureState.All).ToString().ToLower();
var cardBodyId_ssp = $"#collapse-result-{result.Identifier}";
var timeSpan_ssp = Model.ConfirmationReceiptObject.TimeSpanString;
var hasNoOwnEntries = !AbstractModel.HasRightToProvideEmployeeSignatureForOthers && result.Items.All(item => !item.EmployeeOid.Equals(Model.Employee.EmployeeOid));
var disabledString = hasNoOwnEntries ? "disabled" : string.Empty;
}
<div class="row">
<div class="col-sm-auto mr-auto">
<div class="input-group">
<div class="input-group-prepend">
<i class="fas fa-chevron-down text-primary h-100" id="chevron-@result.Identifier"></i>
</div>
<p class="form-control text-primary border-0 bg-transparent" style="user-select: none !important;">
@result.CustomerName
</p>
</div>
</div>
<div class="col-sm-auto">
@using(Html.BeginForm("DeleteCustomerSignature", "Report", FormMethod.Post, new { id = "delCSigForm-" + result.Identifier }))
{
<input type="hidden" name="deleteCustomerSignaturesInfo" value="@result.Identifier" />
var hasNoOwnEntries = !AbstractModel.HasRightToProvideEmployeeSignatureForOthers && result.Items.All(item => !item.EmployeeOid.Equals(Model.Employee.EmployeeOid));
var disabledString = hasNoOwnEntries ? "disabled" : string.Empty;
}
@using(Html.BeginForm("DeleteEmployeeSignature", "Report", FormMethod.Post, new { id = "delESigForm-" + result.Identifier }))
{
<input type="hidden" name="deleteEmployeeSignatureInfo" value="@result.Identifier" />
}
<div class="btn-toolbar">
<!-- w-auto -->
<div class="btn-group pr-1" role="group" style="width: 150px !important;">
@if(AbstractModel.HasRightToDeleteReceiptSignatures && result.CustomerSignatureOids.Any())
{
<button class="btn btn-danger mx-0" type="button" onclick="deleteCustomerSignatures('#collapse-result-@result.Identifier', '@result.Identifier', '@result.CustomerName', '@timeSpan_ssp')">
<span class="fas fa-trash"></span>
</button>
}
<button class="btn btn-bewo-customers" type="button" onclick="loadConfirmationReceiptSignatures('@cardBodyId_ssp', '@result.Identifier', false, @result.HasCustomerSignature.ToString().ToLower(), @canCustomerSign.ToString().ToLower(), @result.CustomerOid)">
<span class="fas fa-signature mr-0 pr-0"></span>
@if(customerSignatureState != SignatureState.All)
{
<span class="fa-stack align-middle mx-0 px-0" style="height: auto !important">
<i class="fas fa-check fa-stack-1x mx-0 px-0"></i>
<i class="fas fa-slash fa-stack-1x mx-0 px-0" style="color: tomato;"></i>
</span>
}
else
{
<span class="fas fa-check-double" style="color: yellowgreen !important"></span>
}
K
</button>
</div>
<!-- w-auto -->
<div class="btn-group role="group" style="width: 150px !important;">
@if(AbstractModel.HasRightToDeleteReceiptSignatures && result.EmployeeSignatureOids.Any())
{
<button class="btn btn-danger mx-0" type="button" onclick="deleteEmployeeSignature('#collapse-result-@result.Identifier', '@result.Identifier', '@employeeName', '@result.CustomerName', '@timeSpan_ssp')">
<span class="fas fa-trash"></span>
</button>
}
<button class="btn btn-bewo-employee" @disabledString type="button" onclick="loadConfirmationReceiptSignatures('@cardBodyId_ssp', '@result.Identifier', true, @overwrite_ssp, @canEmployeeSign.ToString().ToLower(), @result.CustomerOid)">
<span class="fas fa-signature mr-0 pr-0"></span>
@if(employeeSignatureState == SignatureState.Some || employeeSignatureState == SignatureState.None)
{
<span class="fa-stack align-middle mx-0 px-0" style="height: auto !important">
<i class="fas fa-check fa-stack-1x mx-0 px-0"></i>
<i class="fas fa-slash fa-stack-1x mx-0 px-0" style="color: tomato;"></i>
</span>
}
else if(employeeSignatureState == SignatureState.AllOwnServiceRecords && !AbstractModel.HasRightToProvideEmployeeSignatureForOthers)
{
<span class="fas fa-ban" style="color: tomato;"></span>
}
else
{
<span class="fas fa-check-double" style="color: yellowgreen !important"></span>
}
M
</button>
</div>
</div>
</div>
</div>
</div>
<div class="collapse" id="collapse-result-@result.Identifier">
<div class="card-body mx-0 px-0">
<div class="container-fluid">
@foreach(var item in result.Items)
{
var isNotOwnEntry = !AbstractModel.HasRightToProvideEmployeeSignatureForOthers && !item.EmployeeOid.Equals(Model.Employee.EmployeeOid);
var headerTextColorClass = isNotOwnEntry ? "text-secondary" : "text-primary";
<div class="card w-100 mb-3">
<div class="card-header" onclick="cardHeaderClick('#chevron-@item.Identifier', '#collapse-item-@item.Identifier')">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 @headerTextColorClass" id="chevron-@item.Identifier"></i>
<div class="row">
<div class="col-sm-auto mr-auto">
<div class="input-group">
<div class="input-group-prepend">
<i class="fas fa-chevron-down text-primary h-100" id="chevron-@result.Identifier"></i>
</div>
<div class="p2 d-inline-flex @headerTextColorClass h-100">
<button type="button" class="btn btn-link @headerTextColorClass">
@item.DateTimeString
</button>
@if(isNotOwnEntry)
{
<span class="fa-stack fa-1x text-secondary mt-1">
<i class="fas fa-signature fa-stack-1x"></i>
<i class="fas fa-ban fa-stack-2x"></i>
</span>
}
</div>
@{
var hasEmployeeSignatureTextColorClass = item.HasEmployeeSignature ? "text-bewo-employee" : "text-light";
}
<span class="fas fa-check h-100 @hasEmployeeSignatureTextColorClass float-right pt-2"></span>
<span class="float-right pt-2 text-light">m</span>
@if(item.HasCustomerSignature)
{
<span class="fas fa-check h-100 text-bewo-customers float-right pt-2"></span>
}
<p class="form-control text-primary border-0 bg-transparent" style="user-select: none !important;">
@result.CustomerName
</p>
</div>
<div class="collapse" id="collapse-item-@item.Identifier">
<div class="card-body">
<div class="container-fluid">
<div class="row">
<div class="col text-secondary">
Kontaktart:
</div>
<div class="col">
@item.Kontaktart
</div>
</div>
<div class="col-sm-auto">
@using(Html.BeginForm("DeleteCustomerSignature", "Report", FormMethod.Post, new { id = "delCSigForm-" + result.Identifier }))
{
<input type="hidden" name="deleteCustomerSignaturesInfo" value="@result.Identifier" />
}
@using(Html.BeginForm("DeleteEmployeeSignature", "Report", FormMethod.Post, new { id = "delESigForm-" + result.Identifier }))
{
<input type="hidden" name="deleteEmployeeSignatureInfo" value="@result.Identifier" />
}
<div class="btn-toolbar">
<!-- w-auto -->
<div class="btn-group pr-1" role="group" style="width: 150px !important;">
@if(AbstractModel.HasRightToDeleteReceiptSignatures && result.CustomerSignatureOids.Any())
{
<button class="btn btn-danger mx-0" type="button" onclick="deleteCustomerSignatures('#collapse-result-@result.Identifier', '@result.Identifier', '@result.CustomerName', '@timeSpan_ssp')">
<span class="fas fa-trash"></span>
</button>
}
<button class="btn btn-bewo-customers" type="button" onclick="loadConfirmationReceiptSignatures('@cardBodyId_ssp', '@result.Identifier', false, @result.HasCustomerSignature.ToString().ToLower(), @canCustomerSign.ToString().ToLower(), @result.CustomerOid)">
<span class="fas fa-signature mr-0 pr-0"></span>
@if(customerSignatureState != SignatureState.All)
{
<span class="fa-stack align-middle mx-0 px-0" style="height: auto !important">
<i class="fas fa-check fa-stack-1x mx-0 px-0"></i>
<i class="fas fa-slash fa-stack-1x mx-0 px-0" style="color: tomato;"></i>
</span>
}
else
{
<span class="fas fa-check-double" style="color: yellowgreen !important"></span>
}
K
</button>
</div>
<!-- w-auto -->
<div class="btn-group role="group" style="width: 150px !important;">
@if(AbstractModel.HasRightToDeleteReceiptSignatures && result.EmployeeSignatureOids.Any())
{
<button class="btn btn-danger mx-0" type="button" onclick="deleteEmployeeSignature('#collapse-result-@result.Identifier', '@result.Identifier', '@employeeName', '@result.CustomerName', '@timeSpan_ssp')">
<span class="fas fa-trash"></span>
</button>
}
<button class="btn btn-bewo-employee" @disabledString type="button" onclick="loadConfirmationReceiptSignatures('@cardBodyId_ssp', '@result.Identifier', true, @overwrite_ssp, @canEmployeeSign.ToString().ToLower(), @result.CustomerOid)">
<span class="fas fa-signature mr-0 pr-0"></span>
@if(employeeSignatureState == SignatureState.Some || employeeSignatureState == SignatureState.None)
{
<span class="fa-stack align-middle mx-0 px-0" style="height: auto !important">
<i class="fas fa-check fa-stack-1x mx-0 px-0"></i>
<i class="fas fa-slash fa-stack-1x mx-0 px-0" style="color: tomato;"></i>
</span>
}
else if(employeeSignatureState == SignatureState.AllOwnServiceRecords && !AbstractModel.HasRightToProvideEmployeeSignatureForOthers)
{
<span class="fas fa-ban" style="color: tomato;"></span>
}
else
{
<span class="fas fa-check-double" style="color: yellowgreen !important"></span>
}
M
</button>
</div>
</div>
</div>
</div>
</div>
<div class="collapse" id="collapse-result-@result.Identifier">
<div class="card-body mx-0 px-0">
<div class="container-fluid">
@foreach(var item in result.Items)
{
var isNotOwnEntry = !AbstractModel.HasRightToProvideEmployeeSignatureForOthers && !item.EmployeeOid.Equals(Model.Employee.EmployeeOid);
var headerTextColorClass = isNotOwnEntry ? "text-secondary" : "text-primary";
<div class="card w-100 mb-3">
<div class="card-header" onclick="cardHeaderClick('#chevron-@item.Identifier', '#collapse-item-@item.Identifier')">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 @headerTextColorClass" id="chevron-@item.Identifier"></i>
</div>
<div class="row">
<div class="col text-secondary">
Anzahl Klienten:
</div>
<div class="col">
@item.CustomersCount
</div>
<div class="p2 d-inline-flex @headerTextColorClass h-100">
<button type="button" class="btn btn-link @headerTextColorClass">
@item.DateTimeString
</button>
@if(isNotOwnEntry)
{
<span class="fa-stack fa-1x text-secondary mt-1">
<i class="fas fa-signature fa-stack-1x"></i>
<i class="fas fa-ban fa-stack-2x"></i>
</span>
}
</div>
<div class="row">
<div class="col text-secondary">
FLS in Minuten (ohne 1,2):
</div>
<div class="col">
@item.Minutes
</div>
</div>
<div class="row">
<div class="col text-secondary">
Mitarbeiter:
</div>
<div class="col">
@item.Employees
@{
var hasEmployeeSignatureTextColorClass = item.HasEmployeeSignature ? "text-bewo-employee" : "text-light";
}
<span class="fas fa-check h-100 @hasEmployeeSignatureTextColorClass float-right pt-2"></span>
<span class="float-right pt-2 text-light">m</span>
@if(item.HasCustomerSignature)
{
<span class="fas fa-check h-100 text-bewo-customers float-right pt-2"></span>
}
</div>
<div class="collapse" id="collapse-item-@item.Identifier">
<div class="card-body">
<div class="container-fluid">
<div class="row">
<div class="col text-secondary">
Kontaktart:
</div>
<div class="col">
@item.Kontaktart
</div>
</div>
<div class="row">
<div class="col text-secondary">
Anzahl Klienten:
</div>
<div class="col">
@item.CustomersCount
</div>
</div>
<div class="row">
<div class="col text-secondary">
FLS in Minuten (ohne 1,2):
</div>
<div class="col">
@item.Minutes
</div>
</div>
<div class="row">
<div class="col text-secondary">
Mitarbeiter:
</div>
<div class="col">
@item.Employees
</div>
</div>
</div>
</div>
</div>
</div>
</div>
}
</div>
}
</div>
</div>
</div>
</div>
</div>
}
}
</div>

View File

@@ -1,7 +1,17 @@
@model BeWoPlanerMobil.Models.ReportModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.ReportModel
@{
ViewBag.Title = "Quittierungsbeleg";
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<style type="text/css">

View File

@@ -1,6 +1,18 @@
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.ReportViewerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
function initEvent(s, e) {
var viewer = $("#webDocumentViewer1");

View File

@@ -1,4 +1,16 @@
@model BeWoPlanerMobil.Models.ReportViewerModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.ReportViewerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>
$(window).ready(function () {

View File

@@ -1,6 +1,18 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.ReportViewerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
function reportFilterOnChange() {
try {
@@ -114,9 +126,9 @@
@*ToDo: Bis auf weiteres nur Mitarbeiterstundenkonto anzeigen!*@
@*@if(Model.SelectedReportType == ReportType.Berichte)
{
@Html.DropDownListFor(model => model.SelectedCustomReport, Model.CustomReports, new { @class = "custom-select", id = "msk-customReportSelect", onchange = "loadCustomReport()" })
}*@
{
@Html.DropDownListFor(model => model.SelectedCustomReport, Model.CustomReports, new { @class = "custom-select", id = "msk-customReportSelect", onchange = "loadCustomReport()" })
}*@
@if(Model.SelectedReportType == ReportType.Mitarbeiterstundenkonto && AbstractModel.HasRightToViewMitarbeiterstundenkonto)
{
@@ -133,7 +145,7 @@
<div class="form-row">
<div class="col">
<div class="form-check">
<input class="form-check-input" type="radio" name="filterRadio" id="msk-filterForEmployeesRadio" onchange="reportFilterOnChange()" checked/>
<input class="form-check-input" type="radio" name="filterRadio" id="msk-filterForEmployeesRadio" onchange="reportFilterOnChange()" checked />
<label for="msk-filterForEmployeesRadio">Nach Mitarbeiter filtern</label>
</div>
</div>
@@ -141,7 +153,7 @@
<div class="form-row">
<div class="col">
<div class="form-check">
<input class="form-check-input" type="radio" name="filterRadio" id="msk-filterForTeamsRadio" onchange="reportFilterOnChange()"/>
<input class="form-check-input" type="radio" name="filterRadio" id="msk-filterForTeamsRadio" onchange="reportFilterOnChange()" />
<label for="msk-filterForTeamsRadio">Nach Teams filtern</label>
</div>
</div>
@@ -154,7 +166,7 @@
<div class="form-row">
<div class="col">
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="msk-all-employees-cb"/>
<input type="checkbox" class="form-check-input" id="msk-all-employees-cb" />
<label class="form-check-label" for="msk-all-employees-cb" onclick="allEmployeesCbOnClick()">Alle Mitarbeiter</label>
</div>
</div>
@@ -172,7 +184,7 @@
<div class="form-row">
<div class="col">
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="msk-all-teams-cb"/>
<input type="checkbox" class="form-check-input" id="msk-all-teams-cb" />
<label class="form-check-label" for="msk-all-teams-cb" onclick="allTeamsCbOnClick()">Alle Teams</label>
</div>
</div>
@@ -203,19 +215,19 @@
{
<div class="col-4">
<div class="form-check">
<input class="form-check-input" type="radio" name="msk-ansichtsradio" id="msk-tagesansichtsradio"/>
<input class="form-check-input" type="radio" name="msk-ansichtsradio" id="msk-tagesansichtsradio" />
<label for="msk-tagesansichtsradio">Tag</label>
</div>
</div>
<div class="col-4">
<div class="form-check">
<input class="form-check-input" type="radio" name="msk-ansichtsradio" id="msk-monatsansichtsradio" checked/>
<input class="form-check-input" type="radio" name="msk-ansichtsradio" id="msk-monatsansichtsradio" checked />
<label for="msk-monatsansichtsradio">Monat</label>
</div>
</div>
<div class="col-4">
<div class="form-check">
<input class="form-check-input" type="radio" name="msk-ansichtsradio" id="msk-jahresansichtsradio"/>
<input class="form-check-input" type="radio" name="msk-ansichtsradio" id="msk-jahresansichtsradio" />
<label for="msk-jahresansichtsradio">Jahr</label>
</div>
</div>
@@ -224,7 +236,7 @@
{
<div class="col">
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="msk-tagesansicht-cb"/>
<input type="checkbox" class="form-check-input" id="msk-tagesansicht-cb" />
<label class="form-check-label" for="msk-tagesansicht-cb">@str</label>
</div>
</div>

View File

@@ -1,16 +1,29 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@using BS.Shared.Extensions
@model SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>
function alldayChange() {
try {
$("#scheduler-start-time, #scheduler-end-time").attr("disabled", $("#IsAllDay").prop("checked"));
} catch (error) {
} catch(error) {
showErrorPopup(error);
}
}
$("#insert-appointment-form").ready(function() {
$("#insert-appointment-form").ready(function () {
calcPrependTextSizes();
});
@@ -42,7 +55,7 @@
Start
</div>
</div>
<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"/>
<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 px-2">
<i class="fas fa-calendar-alt"></i>
@@ -73,7 +86,7 @@
Ende
</div>
</div>
<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"/>
<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 px-2">
<i class="fas fa-calendar-alt"></i>
@@ -138,7 +151,7 @@
</div>
}
</div>
<div class="form-row">
@if(AbstractModel.HasRightToViewEmployeeAppointments && AbstractModel.HasRightToInsertEmployeeAppointments)
{
@@ -276,7 +289,7 @@
Notiz
</div>
</div>
<textarea class="form-control" id="notice" name="Notice" maxlength="1024" >@Model.DescriptionToEdit</textarea>
<textarea class="form-control" id="notice" name="Notice" maxlength="1024">@Model.DescriptionToEdit</textarea>
</div>
</div>
</div>
@@ -365,7 +378,7 @@
@if(AbstractModel.HasRightToViewEmployeeAppointments && AbstractModel.HasRightToInsertEmployeeAppointments && Model.AllEmployees.Any())
{
<script type="text/javascript">
<script type="text/javascript">
function resetEmployeeSearch() {
try {
$("#employee-search-input").val("");
@@ -430,6 +443,12 @@
function updateSelectedEmployees(jsonResult) {
try {
if(false === checkJson(jsonResult)) {
logWarning("updateSelectedEmployees: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
var listItems = parseJason(jsonResult);
var list = $("#selected-employees-list");
@@ -483,7 +502,13 @@
function selectTeamForAppointment(teamOid) {
try {
$.get('@Url.Action("SelectTeamForAppointment")', { teamOidString: teamOid }).done(function(jsonResult) {
$.get('@Url.Action("SelectTeamForAppointment")', {teamOidString: teamOid}).done(function (jsonResult) {
if(false === checkJson(jsonResult)) {
logWarning("selectTeamForAppointment: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
var oids = parseJason(jsonResult);
$("#employees-popup .employee-input-container input[type=checkbox]").each(function () {
@@ -504,83 +529,83 @@
showErrorPopup(error);
}
}
</script>
</script>
<div class="modal" tabindex="-1" role="dialog" id="employees-popup">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title text-center w-100">Mitarbeiter</h6>
<button type="button" class="close" data-dismiss="modal" onclick="resetEmployeeSearch()">
<span>&times;</span>
</button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="input-group mb-3">
<div class="input-group-prepend">
<div class="input-group-text">
<div class="custom-control custom-checkbox custom-control-inline mx-auto">
@{
var allEmployeesCheckedVal = Model.AllEmployees.AreListEqual(Model.SelectedEmployees) ? "checked" : string.Empty;
}
<div class="modal" tabindex="-1" role="dialog" id="employees-popup">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title text-center w-100">Mitarbeiter</h6>
<button type="button" class="close" data-dismiss="modal" onclick="resetEmployeeSearch()">
<span>&times;</span>
</button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="input-group mb-3">
<div class="input-group-prepend">
<div class="input-group-text">
<div class="custom-control custom-checkbox custom-control-inline mx-auto">
@{
var allEmployeesCheckedVal = Model.AllEmployees.AreListEqual(Model.SelectedEmployees) ? "checked" : string.Empty;
}
<input type="checkbox" class="custom-control-input" id="all-employees-checkbox" @allEmployeesCheckedVal onchange="selectAllEmployeesOnChange()" />
<label class="custom-control-label" for="all-employees-checkbox">Alle</label>
</div>
</div>
</div>
<input class="form-control w-100" type="text" placeholder="Suchen..." oninput="employeeListSearchOnChange()" id="employee-search-input" />
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" onclick="resetEmployeeSearch()">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
@if(AbstractModel.HasRightToViewTeams)
{
<div class="card w-100 mb-3">
<div class="card-header" data-toggle="collapse" data-target="#collapsable-teams-selection">
<div class="d-flex align-items-center">
<h5 class="mr-auto">Meine Teams</h5>
<div class="btn-group" role="group">
<span class="fas fa-chevron-down text-primary"></span>
<input type="checkbox" class="custom-control-input" id="all-employees-checkbox" @allEmployeesCheckedVal onchange="selectAllEmployeesOnChange()" />
<label class="custom-control-label" for="all-employees-checkbox">Alle</label>
</div>
</div>
</div>
<div class="collapse" id="collapsable-teams-selection">
<div class="card-body">
@foreach(var team in Model.MyTeams)
{
<button type="button" class="btn btn-bewo-teams w-100 my-2" onclick="selectTeamForAppointment(@team.TeamOid)">@team.Name</button>
}
</div>
<input class="form-control w-100" type="text" placeholder="Suchen..." oninput="employeeListSearchOnChange()" id="employee-search-input" />
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" onclick="resetEmployeeSearch()">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
<hr />
}
<div class="employee-input-container">
@foreach(var employee in Model.AllEmployees)
@if(AbstractModel.HasRightToViewTeams)
{
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="changeEmployeeListSelection()" />
<label class="custom-control-label employee-name-label" for="employee-@employee.EmployeeOid-checkbox">@employee.DetailDescription</label>
<div class="card w-100 mb-3">
<div class="card-header" data-toggle="collapse" data-target="#collapsable-teams-selection">
<div class="d-flex align-items-center">
<h5 class="mr-auto">Meine Teams</h5>
<div class="btn-group" role="group">
<span class="fas fa-chevron-down text-primary"></span>
</div>
</div>
</div>
<div class="collapse" id="collapsable-teams-selection">
<div class="card-body">
@foreach(var team in Model.MyTeams)
{
<button type="button" class="btn btn-bewo-teams w-100 my-2" onclick="selectTeamForAppointment(@team.TeamOid)">@team.Name</button>
}
</div>
</div>
</div>
<hr />
}
<div class="employee-input-container">
@foreach(var employee in Model.AllEmployees)
{
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="changeEmployeeListSelection()" />
<label class="custom-control-label employee-name-label" for="employee-@employee.EmployeeOid-checkbox">@employee.DetailDescription</label>
</div>
}
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Übernehmen</button>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Übernehmen</button>
</div>
</div>
</div>
</div>
</div>
}
@if(AbstractModel.HasRightToViewCustomerSelectionInScheduler && AbstractModel.HasRightToInsertCustomerAppointments && Model.AllCustomers.Any())
@@ -616,7 +641,7 @@
</button>
</div>
</div>
<div class="popup-list-item-container">
@foreach(var customer in Model.AllCustomers)
{
@@ -628,7 +653,7 @@
</div>
}
</div>
</div>
</div>
<div class="modal-footer">

View File

@@ -1,7 +1,19 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@using BS.Shared.Extensions
@model BeWoPlanerMobil.Models.SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script type="text/javascript">
$(function () {
$("#scheduler-interval-start-picker").datetimepicker({
@@ -144,7 +156,13 @@
function selectTeamForIntervalFinder(teamOid) {
try {
$.get('@Url.Action("SelectTeamForIntervalFinder")', { teamOidString: teamOid }).done(
function(jsonResult) {
function (jsonResult) {
if(false === checkJson(jsonResult)) {
logWarning("selectTeamForIntervalFinder: Der zurückgegebene Wert ist kein gültiges JSON!");
hideSpinner();
return;
}
var employeeOids = parseJason(jsonResult);
$("#employees-interval-finder-popup .popup-list-item-container input[type=checkbox]").map(function() {
@@ -170,240 +188,241 @@
</script>
<div id="interval-form-container">
<div class="alert alert-danger collapse" role="alert" id="interval-finder-validation-alert"></div>
@using(Html.BeginForm("FindFreeIntervals", "Scheduler", FormMethod.Post, new { id = "find-appointment-intervals-form", @class = "needs-validation", novalidate = true }))
{
<div class="mt-3">
<div class="form-row">
<div class="col-7 mx-0 pr-1">
<div class="form-group mb-1 mr-0 pr-0">
<div class="input-group date" id="scheduler-interval-start-picker" data-target-input="nearest">
<div class="input-group-prepend">
<span class="input-group-text prepend-text px-2">
Von
</span>
</div>
<input value="@Model.IntervalStartDateStr" type="text" id="scheduler-interval-start" name="IntervalStart" class="form-control datetimepicker-input" data-target="#scheduler-interval-start-picker" data-toggle="datetimepicker"/>
<div class="input-group-append" data-target="#scheduler-interval-start-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-5 mx-0 pl-0">
<div class="form-group mb-1 ml-0 pl-0">
<div class="input-group date" id="scheduler-interval-start-time-picker" data-target-input="nearest">
<input value="@Model.IntervalStartTimeStr" type="text" id="scheduler-interval-start-time" name="IntervalStartTime" class="form-control datetimepicker-input" data-target="#scheduler-interval-start-time-picker"/>
<div class="input-group-append" data-target="#scheduler-interval-start-time-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-7 mx-0 pr-1">
<div class="form-group mb-1 ml-0 pl-0">
<div class="input-group date" id="scheduler-interval-end-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-text px-2">
Bis
</div>
</div>
<input value="@Model.IntervalEndDateStr" type="text" id="scheduler-interval-end" name="IntervalEnd" class="form-control datetimepicker-input" data-target="#scheduler-interval-end-picker" data-toggle="datetimepicker"/>
<div class="input-group-append" data-target="#scheduler-interval-end-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-5 mx-0 pl-0">
<div class="form-group mb-1 ml-0 pl-0">
<div class="input-group date" id="scheduler-interval-end-time-picker" data-target-input="nearest">
<input value="@Model.IntervalEndTimeStr" type="text" id="scheduler-interval-end-time" name="IntervalEndTime" class="form-control datetimepicker-input" data-target="#scheduler-interval-end-time-picker"/>
<div class="input-group-append" data-target="#scheduler-interval-end-time-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text prepend-text px-2">
Dauer
</div>
</div>
<input value="@Model.IntervalDurationStr" type="number" min="10" id="interval-duration" name="Duration" class="form-control"/>
</div>
</div>
</div>
</div>
@if(Model.HasResourcesEmployeesOrCustomers)
<div class="alert alert-danger collapse" role="alert" id="interval-finder-validation-alert"></div>
@using(Html.BeginForm("FindFreeIntervals", "Scheduler", FormMethod.Post, new { id = "find-appointment-intervals-form", @class = "needs-validation", novalidate = true }))
{
<!-- Hinzufügen-Buttons -->
<div class="form-row">
@if(AbstractModel.HasRightToViewEmployeeAppointments)
{
<div class="col-md">
<div class="form-group my-1">
<button type="button" class="btn btn-bewo-employee w-100" data-toggle="modal" data-target="#employees-interval-finder-popup">Mitarbeiter</button>
<div class="mt-3">
<div class="form-row">
<div class="col-7 mx-0 pr-1">
<div class="form-group mb-1 mr-0 pr-0">
<div class="input-group date" id="scheduler-interval-start-picker" data-target-input="nearest">
<div class="input-group-prepend">
<span class="input-group-text prepend-text px-2">
Von
</span>
</div>
<input value="@Model.IntervalStartDateStr" type="text" id="scheduler-interval-start" name="IntervalStart" class="form-control datetimepicker-input" data-target="#scheduler-interval-start-picker" data-toggle="datetimepicker" />
<div class="input-group-append" data-target="#scheduler-interval-start-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
}
@if(AbstractModel.HasRightToViewCustomerAppointments)
{
<div class="col-md">
<div class="form-group my-1">
<button type="button" class="btn btn-bewo-customers w-100" data-toggle="modal" data-target="#customers-interval-finder-popup">Klienten</button>
<div class="col-5 mx-0 pl-0">
<div class="form-group mb-1 ml-0 pl-0">
<div class="input-group date" id="scheduler-interval-start-time-picker" data-target-input="nearest">
<input value="@Model.IntervalStartTimeStr" type="text" id="scheduler-interval-start-time" name="IntervalStartTime" class="form-control datetimepicker-input" data-target="#scheduler-interval-start-time-picker" />
<div class="input-group-append" data-target="#scheduler-interval-start-time-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
}
@if(AbstractModel.HasRightToViewAllResourceAppointments && Model.ResourceCategories2Resources.Any())
{
<div class="col-md">
<div class="form-group my-1">
<button type="button" class="btn btn-bewo-resource w-100" data-toggle="modal" data-target="#resources-interval-finder-popup">Ressourcen</button>
</div>
</div>
}
</div>
<div class="form-row">
@if(AbstractModel.HasRightToViewEmployeeAppointments)
{
<div class="col-12">
<div class="form-group my-1">
<div class="list-group" id="selected-employees-interval-finder-list">
@foreach(var selectedEmployee in Model.SelectedEmployeesForIntervalFinder)
{
<div class="list-group-item my-auto" id="related-employee-interval-finder-@selectedEmployee.EmployeeOid">
<div class="row">
<div class="input-group">
<div class="input-group-prepend">
<i class="fas fa-user text-bewo-employee h-100"></i>
</div>
<p class="form-control border-0 bg-transparent text-truncate">
@selectedEmployee.DetailDescription
</p>
<div class="input-group-append">
@{
var url = Url.Action("SelectEmployeesForIntervalFinder", "Scheduler");
var oid = selectedEmployee.EmployeeOid;
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)">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
</div>
</div>
}
</div>
</div>
</div>
}
@if(AbstractModel.HasRightToViewCustomerAppointments)
{
<div class="col-12">
<div class="form-group my-1">
<div class="list-group" id="selected-customers-interval-finder-list">
@foreach(var selectedCustomer in Model.SelectedCustomersForIntervalFinder)
{
<div class="list-group-item my-auto" id="related-customer-interval-finder-@selectedCustomer.CustomerOid">
<div class="row">
<div class="input-group">
<div class="input-group-prepend">
<i class="fas fa-user text-bewo-customers h-100"></i>
</div>
<p class="form-control border-0 bg-transparent text-truncate">
@selectedCustomer.DetailDescription
</p>
<div class="input-group-append">
@{
var url = Url.Action("SelectCustomersForIntervalFinder", "Scheduler");
var oid = selectedCustomer.CustomerOid;
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>
</button>
</div>
</div>
</div>
</div>
}
</div>
</div>
</div>
}
@if(AbstractModel.HasRightToViewAllResourceAppointments && Model.ResourceCategories2Resources.Any())
{
<div class="col-12">
<div class="form-group my-1">
<div class="list-group" id="selected-resources-interval-finder-list">
@foreach(var selectedResource in Model.SelectedResourcesForIntervalFinder)
{
<div class="list-group-item my-auto" id="related-resource-interval-finder-item-@selectedResource.ResourceOid">
<div class="row">
<div class="input-group">
<div class="input-group-prepend">
<i class="fas fa-cubes text-bewo-resource h-100"></i>
</div>
<p class="form-control border-0 bg-transparent text-truncate">
@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', '@Url.Action("FetchAppointments", "Scheduler")', 'related-resource-interval-finder-item-', '-interval-finder-checkbox', 'all-resources-for-interval-finder-checkbox')"><span class="fas fa-times-circle"></span>
</button>
</div>
</div>
</div>
</div>
}
</div>
</div>
<div class="form-row">
<div class="col-7 mx-0 pr-1">
<div class="form-group mb-1 ml-0 pl-0">
<div class="input-group date" id="scheduler-interval-end-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text prepend-text px-2">
Bis
</div>
</div>
<input value="@Model.IntervalEndDateStr" type="text" id="scheduler-interval-end" name="IntervalEnd" class="form-control datetimepicker-input" data-target="#scheduler-interval-end-picker" data-toggle="datetimepicker" />
<div class="input-group-append" data-target="#scheduler-interval-end-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-5 mx-0 pl-0">
<div class="form-group mb-1 ml-0 pl-0">
<div class="input-group date" id="scheduler-interval-end-time-picker" data-target-input="nearest">
<input value="@Model.IntervalEndTimeStr" type="text" id="scheduler-interval-end-time" name="IntervalEndTime" class="form-control datetimepicker-input" data-target="#scheduler-interval-end-time-picker" />
<div class="input-group-append" data-target="#scheduler-interval-end-time-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text prepend-text px-2">
Dauer
</div>
</div>
<input value="@Model.IntervalDurationStr" type="number" min="10" id="interval-duration" name="Duration" class="form-control" />
</div>
</div>
</div>
</div>
@if(Model.HasResourcesEmployeesOrCustomers)
{
<!-- Hinzufügen-Buttons -->
<div class="form-row">
@if(AbstractModel.HasRightToViewEmployeeAppointments)
{
<div class="col-md">
<div class="form-group my-1">
<button type="button" class="btn btn-bewo-employee w-100" data-toggle="modal" data-target="#employees-interval-finder-popup">Mitarbeiter</button>
</div>
</div>
}
@if(AbstractModel.HasRightToViewCustomerAppointments)
{
<div class="col-md">
<div class="form-group my-1">
<button type="button" class="btn btn-bewo-customers w-100" data-toggle="modal" data-target="#customers-interval-finder-popup">Klienten</button>
</div>
</div>
}
@if(AbstractModel.HasRightToViewAllResourceAppointments && Model.ResourceCategories2Resources.Any())
{
<div class="col-md">
<div class="form-group my-1">
<button type="button" class="btn btn-bewo-resource w-100" data-toggle="modal" data-target="#resources-interval-finder-popup">Ressourcen</button>
</div>
</div>
}
</div>
<div class="form-row">
@if(AbstractModel.HasRightToViewEmployeeAppointments)
{
<div class="col-12">
<div class="form-group my-1">
<div class="list-group" id="selected-employees-interval-finder-list">
@foreach(var selectedEmployee in Model.SelectedEmployeesForIntervalFinder)
{
<div class="list-group-item my-auto" id="related-employee-interval-finder-@selectedEmployee.EmployeeOid">
<div class="row">
<div class="input-group">
<div class="input-group-prepend">
<i class="fas fa-user text-bewo-employee h-100"></i>
</div>
<p class="form-control border-0 bg-transparent text-truncate">
@selectedEmployee.DetailDescription
</p>
<div class="input-group-append">
@{
var url = Url.Action("SelectEmployeesForIntervalFinder", "Scheduler");
var oid = selectedEmployee.EmployeeOid;
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)">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
</div>
</div>
}
</div>
</div>
</div>
}
@if(AbstractModel.HasRightToViewCustomerAppointments)
{
<div class="col-12">
<div class="form-group my-1">
<div class="list-group" id="selected-customers-interval-finder-list">
@foreach(var selectedCustomer in Model.SelectedCustomersForIntervalFinder)
{
<div class="list-group-item my-auto" id="related-customer-interval-finder-@selectedCustomer.CustomerOid">
<div class="row">
<div class="input-group">
<div class="input-group-prepend">
<i class="fas fa-user text-bewo-customers h-100"></i>
</div>
<p class="form-control border-0 bg-transparent text-truncate">
@selectedCustomer.DetailDescription
</p>
<div class="input-group-append">
@{
var url = Url.Action("SelectCustomersForIntervalFinder", "Scheduler");
var oid = selectedCustomer.CustomerOid;
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>
</button>
</div>
</div>
</div>
</div>
}
</div>
</div>
</div>
}
@if(AbstractModel.HasRightToViewAllResourceAppointments && Model.ResourceCategories2Resources.Any())
{
<div class="col-12">
<div class="form-group my-1">
<div class="list-group" id="selected-resources-interval-finder-list">
@foreach(var selectedResource in Model.SelectedResourcesForIntervalFinder)
{
<div class="list-group-item my-auto" id="related-resource-interval-finder-item-@selectedResource.ResourceOid">
<div class="row">
<div class="input-group">
<div class="input-group-prepend">
<i class="fas fa-cubes text-bewo-resource h-100"></i>
</div>
<p class="form-control border-0 bg-transparent text-truncate">
@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', '@Url.Action("FetchAppointments", "Scheduler")', 'related-resource-interval-finder-item-', '-interval-finder-checkbox', 'all-resources-for-interval-finder-checkbox')">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
</div>
</div>
}
</div>
</div>
</div>
}
</div>
}
</div>
<button type="submit" class="d-none" id="hidden-submit-btn"></button>
}
<div class="d-flex bd-highlight mt-3">
<div class="mr-auto bd-highlight">
@using(Html.BeginForm("SetIsInIntervalFinderMode", "Scheduler", FormMethod.Post))
{
<button type="submit" onclick="showSpinner()" class="btn btn-primary">Zurück</button>
}
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="reset-interval-finder-button" onclick="resetIntervalFinderForm()">Abbrechen</button>
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="find-interval-finder-button" onclick="submitIntervalFinderForm()">Intervalle Prüfen</button>
</div>
</div>
<button type="submit" class="d-none" id="hidden-submit-btn"></button>
}
<div class="d-flex bd-highlight mt-3">
<div class="mr-auto bd-highlight">
@using(Html.BeginForm("SetIsInIntervalFinderMode", "Scheduler", FormMethod.Post))
{
<button type="submit" onclick="showSpinner()" class="btn btn-primary">Zurück</button>
}
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="reset-interval-finder-button" onclick="resetIntervalFinderForm()">Abbrechen</button>
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="find-interval-finder-button" onclick="submitIntervalFinderForm()">Intervalle Prüfen</button>
</div>
</div>
</div>
@if(AbstractModel.HasRightToViewAllResourceAppointments && Model.ResourceCategories2Resources.Any())
@@ -457,10 +476,10 @@
{
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', '@Url.Action("FetchAppointments", "Scheduler")', 'all-resources-for-interval-finder-checkbox')" />
<label class="custom-control-label resource-name-label" for="resource-@resource.ResourceOid-interval-finder-checkbox">@resource.Name</label>
</div>
<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', '@Url.Action("FetchAppointments", "Scheduler")', 'all-resources-for-interval-finder-checkbox')" />
<label class="custom-control-label resource-name-label" for="resource-@resource.ResourceOid-interval-finder-checkbox">@resource.Name</label>
</div>
}
</div>
</div>
@@ -496,21 +515,21 @@
@{
var allEmployeesCheckedVal = Model.AllEmployees.AreListEqual(Model.SelectedEmployeesForIntervalFinder) ? "checked" : string.Empty;
}
<input type="checkbox" class="custom-control-input" id="all-employees-for-interval-finder-checkbox" @allEmployeesCheckedVal
<input type="checkbox" class="custom-control-input" id="all-employees-for-interval-finder-checkbox" @allEmployeesCheckedVal
onchange="selectAllCheckboxOnChange('all-employees-for-interval-finder-checkbox', '@Url.Action("SelectEmployeesForIntervalFinder", "Scheduler")', 'employees-interval-finder-popup', 'selected-employees-interval-finder-list', 'related-employee-interval-finder-', false, '-interval-finder-checkbox', '@Url.Action("FetchAppointments", "Scheduler")', '')" />
<label class="custom-control-label" for="all-employees-for-interval-finder-checkbox">Alle</label>
</div>
</div>
</div>
<input class="form-control w-100" type="text" placeholder="Suchen..." oninput="listSearchOnChange('interval-finder-employee-search-input', 'interval-finder-employee-text', 'interval-finder-employee-name-label')" id="interval-finder-employee-search-input"/>
<input class="form-control w-100" type="text" placeholder="Suchen..." oninput="listSearchOnChange('interval-finder-employee-search-input', 'interval-finder-employee-text', 'interval-finder-employee-name-label')" id="interval-finder-employee-search-input" />
<div class="input-group-append">
<button type="button" class="btn btn-outline-secondary" onclick="resetSearch('interval-finder-employee-search-input', 'interval-finder-employee-text')">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
@if(AbstractModel.HasRightToViewTeams)
{
<div class="card w-100 mb-3">
@@ -534,7 +553,7 @@
<hr />
}
<div class="popup-list-item-container">
@foreach(var employee in Model.AllEmployees)
{
@@ -543,7 +562,7 @@
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', '{filterAppointmentsUrl}', '', getTeamMemberOids(), 'all-employees-for-interval-finder-checkbox'";
<div class="custom-control custom-checkbox interval-finder-employee-text">
@@ -581,7 +600,7 @@
@{
var allCustomersCheckedVal = Model.AllCustomers.AreListEqual(Model.SelectedCustomersForIntervalFinder) ? "checked" : string.Empty;
}
<div class="custom-control custom-checkbox custom-control-inline mx-auto">
<input type="checkbox" class="custom-control-input" id="all-customers-for-interval-finder-checkbox" @allCustomersCheckedVal
onchange="selectAllCheckboxOnChange('all-customers-for-interval-finder-checkbox', '@Url.Action("SelectCustomersForIntervalFinder")', 'customers-interval-finder-popup', 'selected-customers-interval-finder-list', 'related-customer-interval-finder-', true, '-interval-finder-checkbox', '@Url.Action("FetchAppointments")', '')" />
@@ -589,14 +608,14 @@
</div>
</div>
</div>
<input class="form-control w-100" type="text" placeholder="Suchen..." oninput="listSearchOnChange('interval-finder-customer-search-input', 'interval-finder-customer-text', 'interval-finder-customer-name-label')" id="interval-finder-customer-search-input"/>
<input class="form-control w-100" type="text" placeholder="Suchen..." oninput="listSearchOnChange('interval-finder-customer-search-input', 'interval-finder-customer-text', 'interval-finder-customer-name-label')" id="interval-finder-customer-search-input" />
<div class="input-group-append">
<button type="button" class="btn btn-outline-secondary" onclick="resetSearch('interval-finder-customer-search-input', 'interval-finder-customer-text')">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
<div class="popup-list-item-container">
@foreach(var customer in Model.AllCustomers)
{
@@ -609,7 +628,7 @@
var onClickParams = $"'{url}', 'customers-interval-finder-popup', 'selected-customers-interval-finder-list', 'related-customer-interval-finder-', true, '-interval-finder-checkbox', '{filterAppointmentsUrl}', '', getTeamMemberOids(), 'all-customers-for-interval-finder-checkbox'";
<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)"/>
<input type="checkbox" class="custom-control-input" id="customer-@customer.CustomerOid-interval-finder-checkbox" @checkedValue onchange="changeItemListSelection(@onClickParams)" />
<label class="custom-control-label interval-finder-customer-name-label" for="customer-@customer.CustomerOid-interval-finder-checkbox">@customer.DetailDescription</label>
</div>
}

View File

@@ -1,4 +1,16 @@
@model BeWoPlanerMobil.Models.SchedulerModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
@if(Model.FreeIntervals.Count > 0)
{
@@ -23,22 +35,22 @@
@foreach(var dts in kv.Value)
{
<div class="list-group-item my-auto">
@using(Html.BeginForm("SelectIntervalForForm", "Scheduler", FormMethod.Post))
{
<div class="input-group">
<p class="form-control border-0 bg-transparent">
@dts.StartDate.ToString("HH:mm") - @dts.EndDate.ToString("HH:mm")
</p>
@using(Html.BeginForm("SelectIntervalForForm", "Scheduler", FormMethod.Post))
{
<div class="input-group">
<p class="form-control border-0 bg-transparent">
@dts.StartDate.ToString("HH:mm") - @dts.EndDate.ToString("HH:mm")
</p>
<div class="input-group-append">
<button class="btn btn-primary" type="submit" onclick="showSpinner()">
<span class="far fa-calendar-plus"></span>
</button>
</div>
<div class="input-group-append">
<button class="btn btn-primary" type="submit" onclick="showSpinner()">
<span class="far fa-calendar-plus"></span>
</button>
</div>
<input type="hidden" value="@dts.StartDate.ToString("dd.MM.yyyy HH:mm")" name="startDate"/>
<input type="hidden" value="@dts.EndDate.ToString("dd.MM.yyyy HH:mm")" name="endDate"/>
}
</div>
<input type="hidden" value="@dts.StartDate.ToString("dd.MM.yyyy HH:mm")" name="startDate" />
<input type="hidden" value="@dts.EndDate.ToString("dd.MM.yyyy HH:mm")" name="endDate" />
}
</div>
}
</div>

View File

@@ -1,7 +1,19 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@model SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>
function resetCustomerSearchForFiltering() {
try {

View File

@@ -1,6 +1,18 @@
@using BS.Shared.Extensions
@using BeWoPlanerMobil.Util
@using BS.Shared.Extensions
@model BeWoPlanerMobil.Models.SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<!-- Suche -->
<div class="input-group mb-3">
<div class="input-group-prepend">
@@ -27,8 +39,8 @@
<!-- !Suche -->
@foreach(var customer in Model.AllCustomers)
{
var customerNameWithAlias = string.IsNullOrEmpty(customer.CustomerAlias) ?
customer.DetailDescription :
var customerNameWithAlias = string.IsNullOrEmpty(customer.CustomerAlias) ?
customer.DetailDescription :
$"{customer.LastName}, {customer.FirstName} ({customer.CustomerAlias})";
var checkedValue = Model.SelectedCustomersForFiltering.Contains(customer) ? "checked" : string.Empty;

View File

@@ -1,7 +1,19 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@using BS.Shared.Extensions
@model BeWoPlanerMobil.Models.SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<!-- Suche -->
<div class="input-group mb-3">
<div class="input-group-prepend">
@@ -26,7 +38,6 @@
</div>
</div>
<!-- !Suche -->
<!-- Meine Teams -->
@if(AbstractModel.HasRightToViewTeams)
{

View File

@@ -1,7 +1,19 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@model SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>
function resetEmployeeSearchForFiltering() {
try {
@@ -82,9 +94,9 @@
$.get('@Url.Action("SelectEmployeesForAppointmentFiltering")', { oidString: oidStr }).done(function (employeeCount) {
updateEmployeeForFilteringPopup();
$("#one-day-scheduler-partial-container").load('@Url.Action("FetchAppointments")');
$("#employe-count2").text(employeeCount);
});
} catch (error) {

View File

@@ -1,4 +1,16 @@
@model BeWoPlanerMobil.Models.SchedulerModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<div class="row">
<div class="five-day-card py-1">
@@ -16,7 +28,7 @@
<div class="collapse show" id="collapse-calendar-monday">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.MondayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.MondayAppointments.Value)
{
<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')">
@@ -25,7 +37,7 @@
</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>
}
@@ -34,7 +46,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -44,24 +56,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>
@@ -72,9 +84,9 @@
<hr />
}
@if (Model.HasRightToEditAppointment(appointment.Identifier) && !appointment.IsTask && appointment.Oid.HasValue)
@if(Model.HasRightToEditAppointment(appointment.Identifier) && !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">
@@ -112,7 +124,7 @@
<div class="collapse show" id="collapse-calendar-tuesday">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.TuesdayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.TuesdayAppointments.Value)
{
<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')">
@@ -121,7 +133,7 @@
</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>
}
@@ -130,7 +142,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -140,24 +152,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>
@@ -168,9 +180,9 @@
<hr />
}
@if (Model.HasRightToEditAppointment(appointment.Identifier) && !appointment.IsTask && appointment.Oid.HasValue)
@if(Model.HasRightToEditAppointment(appointment.Identifier) && !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">
@@ -208,7 +220,7 @@
<div class="collapse show" id="collapse-calendar-wednesday">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.WednesdayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.WednesdayAppointments.Value)
{
<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')">
@@ -217,7 +229,7 @@
</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>
}
@@ -226,7 +238,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -236,24 +248,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>
@@ -264,9 +276,9 @@
<hr />
}
@if (Model.HasRightToEditAppointment(appointment.Identifier) && !appointment.IsTask && appointment.Oid.HasValue)
@if(Model.HasRightToEditAppointment(appointment.Identifier) && !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">
@@ -304,7 +316,7 @@
<div class="collapse show" id="collapse-calendar-thursday">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.ThursdayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.ThursdayAppointments.Value)
{
<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')">
@@ -313,7 +325,7 @@
</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>
}
@@ -322,7 +334,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -332,24 +344,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>
@@ -360,9 +372,9 @@
<hr />
}
@if (Model.HasRightToEditAppointment(appointment.Identifier) && !appointment.IsTask && appointment.Oid.HasValue)
@if(Model.HasRightToEditAppointment(appointment.Identifier) && !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">
@@ -400,7 +412,7 @@
<div class="collapse show" id="collapse-calendar-friday">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.FridayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.FridayAppointments.Value)
{
<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')">
@@ -409,7 +421,7 @@
</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>
}
@@ -418,7 +430,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -428,24 +440,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>
@@ -456,9 +468,9 @@
<hr />
}
@if (Model.HasRightToEditAppointment(appointment.Identifier) && !appointment.IsTask && appointment.Oid.HasValue)
@if(Model.HasRightToEditAppointment(appointment.Identifier) && !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">
@@ -482,4 +494,4 @@
</div>
</div>
</div>

View File

@@ -1,4 +1,16 @@
@model BeWoPlanerMobil.Models.SchedulerModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>
function deleteAppointment(appointmentOid, appointmentIdentifier, isException, subject) {
@@ -105,7 +117,7 @@
<i class="fas fa-slash fa-stack-1x text-secondary"></i>
</span>
}
@if(appointment.HasServiceRecord)
{
<i class="ml-2 fas fa-clock text-bewo-service-records"></i>
@@ -167,8 +179,8 @@
</span>
</button>
</div>
@using(Html.BeginForm("TransformAppointmentToServiceRecord", "Scheduler", FormMethod.Post, new {id="transformAppToServiceRecForm-" + appointment.Identifier}))
@using(Html.BeginForm("TransformAppointmentToServiceRecord", "Scheduler", FormMethod.Post, new { id = "transformAppToServiceRecForm-" + appointment.Identifier }))
{
<input type="hidden" value="@appointment.Identifier" name="appointment-id-input" />
}
@@ -214,7 +226,7 @@
<i class="fas fa-slash fa-stack-1x text-secondary"></i>
</span>
}
@if(appointment.HasServiceRecord)
{
<i class="ml-1 fas fa-clock text-bewo-service-records"></i>
@@ -269,7 +281,7 @@
</div>
}
}
<div class="col-auto">
<button type="button" class="btn btn-primary" onclick="deleteAppointment(@(appointment.Oid ?? 0), '@appointment.Identifier', @appointment.IsException.ToString().ToLower(), '@appointment.Subject')">
<span class="fas fa-trash-alt"></span>
@@ -284,8 +296,8 @@
</button>
</div>
</div>
using(Html.BeginForm("TransformAppointmentToServiceRecord", "Scheduler", FormMethod.Post, new {id="transformAppToServiceRecForm-" + appointment.Identifier}))
using(Html.BeginForm("TransformAppointmentToServiceRecord", "Scheduler", FormMethod.Post, new { id = "transformAppToServiceRecForm-" + appointment.Identifier }))
{
<input type="hidden" value="@appointment.Identifier" name="appointment-id-input" />
}

View File

@@ -1,9 +1,19 @@
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
@using BS.Shared.Extensions
@model SchedulerModel
@{
ViewBag.Title = "BeWoPlaner Mobil";
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<script>

View File

@@ -1,4 +1,16 @@
@model BeWoPlanerMobil.Models.SchedulerModel
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.SchedulerModel
@{
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
{
<text>
<script type="text/javascript">
$("#second-logout-form").submit();
</script>
</text>
}
}
<div class="row">
<div class="seven-day-card">
@@ -16,7 +28,7 @@
<div class="collapse week-view-show" id="collapse-calendar-monday-7">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.MondayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.MondayAppointments.Value)
{
<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')">
@@ -25,7 +37,7 @@
</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>
}
@@ -34,7 +46,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -44,24 +56,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>
@@ -72,9 +84,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">
@@ -112,7 +124,7 @@
<div class="collapse week-view-show" id="collapse-calendar-tuesday-7">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.TuesdayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.TuesdayAppointments.Value)
{
<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')">
@@ -121,7 +133,7 @@
</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>
}
@@ -130,7 +142,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -140,24 +152,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>
@@ -168,9 +180,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">
@@ -208,7 +220,7 @@
<div class="collapse week-view-show" id="collapse-calendar-wednesday-7">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.WednesdayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.WednesdayAppointments.Value)
{
<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')">
@@ -217,7 +229,7 @@
</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>
}
@@ -226,7 +238,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -236,24 +248,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>
@@ -264,9 +276,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">
@@ -304,7 +316,7 @@
<div class="collapse week-view-show" id="collapse-calendar-thursday-7">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.ThursdayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.ThursdayAppointments.Value)
{
<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')">
@@ -313,7 +325,7 @@
</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>
}
@@ -322,7 +334,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -332,24 +344,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>
@@ -360,9 +372,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">
@@ -400,7 +412,7 @@
<div class="collapse week-view-show" id="collapse-calendar-friday-7">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.FridayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.FridayAppointments.Value)
{
<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')">
@@ -409,7 +421,7 @@
</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>
}
@@ -418,7 +430,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -428,24 +440,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>
@@ -456,9 +468,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">
@@ -496,7 +508,7 @@
<div class="collapse week-view-show" id="collapse-calendar-saturday-7">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.SaturdayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.SaturdayAppointments.Value)
{
<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')">
@@ -505,7 +517,7 @@
</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>
}
@@ -514,7 +526,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -524,24 +536,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>
@@ -552,9 +564,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">
@@ -592,7 +604,7 @@
<div class="collapse week-view-show" id="collapse-calendar-sunday-7">
<div class="card-body">
<div class="container-fluid px-0">
@foreach (var appointment in Model.WeekViewObject.SundayAppointments.Value)
@foreach(var appointment in Model.WeekViewObject.SundayAppointments.Value)
{
<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')">
@@ -601,7 +613,7 @@
</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>
}
@@ -610,7 +622,7 @@
<span>@appointment.DateTimeInfo</span>
}
@if (appointment.Oid == null)
@if(appointment.Oid == null)
{
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
}
@@ -620,24 +632,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>
@@ -648,9 +660,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">

View File

@@ -54,7 +54,6 @@
<script src="@Scripts.Url("~/Scripts/tempusdominus-boostrap-4.min.js")" type="text/javascript"></script>
<script src="@Scripts.Url("~/Scripts/ownSoft-Scripts/mobileUtils.js")" type="text/javascript"></script>
<script src="@Scripts.Url("~/Scripts/ownSoft-Scripts/group-booking.js")" type="text/javascript"></script>
<script src="@Scripts.Url("~/Scripts/ownSoft-Scripts/view-scripts/main.js")" type="text/javascript"></script>
<script src="@Scripts.Url("~/Scripts/ownSoft-Scripts/signature.js")" type="text/javascript"></script>
@@ -72,7 +71,7 @@
<script src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js")" type="text/javascript"></script>
<script src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/js-helper.js")" type="text/javascript"></script>
<script src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/logging.js")" type="text/javascript"></script>
<script src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/password-security.js")" type="text/javascript"></script>
<script src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/MoKPasswordSecurity.js")" type="text/javascript"></script>
<script type="text/javascript" src="@Scripts.Url("~/Scripts/devexpress-dependencies/devextreme/dx.all.js")"></script>
@@ -113,8 +112,6 @@
return;
}
alert(`<<${event.message}>>`);
configureErrorPopup(textToShow);
});
@@ -188,7 +185,6 @@
return;
}
//this.setAttribute("style", "height:" + (this.scrollHeight) + "px;overflow-y:hidden;");
this.setAttribute("style", "height:"+(this.scrollHeight) + "px;overflow-y:scroll;");
}).on("input", function () {
this.style.height = 0;
@@ -315,10 +311,12 @@
var smallPrependInputGroupTextWidth = getMaxWidth("sm-prepend-input-group-text");
var documentWidth = $(document).width();
$(".prepend-input-group-text").width(getMaxWidth("prepend-input-group-text"));
var prependInputGroupTextWidth = getMaxWidth("prepend-input-group-text");
$(".prepend-input-group-text").width(prependInputGroupTextWidth);
if(documentWidth < 768 && $.isNumeric(smallPrependInputGroupTextWidth)) {
$(".sm-prepend-input-group-text").width(getMaxWidth("prepend-input-group-text"));
$(".sm-prepend-input-group-text").width(prependInputGroupTextWidth);
} else if($.isNumeric(smallPrependInputGroupTextWidth)) {
$(".sm-prepend-input-group-text").width(initialVonWidth);
}
@@ -329,7 +327,7 @@
function getMaxWidth(elementClassName) {
try {
return Math.max.apply(Math, $('.' + elementClassName).map(function () { return $(this).width(); }).get());
return Math.max.apply(Math, $(`.${elementClassName}`).map(function () { return $(this).width(); }).get());
} catch (error) {
showErrorPopup(error);
}
@@ -337,7 +335,15 @@
function getMaxElementHeight(elementClassName) {
try {
return Math.max.apply(Math, $('.' + elementClassName).map(function () { return $(this).height(); }).get());
return Math.max.apply(Math, $(`.${elementClassName}`).map(function () { return $(this).height(); }).get());
} catch (error) {
showErrorPopup(error);
}
}
function toggleMultiBookingForm(shouldDisable) {
try {
$("#multi-booking-employees-button, #category-select, #leistung-select, #mb-start-date, #mb-end-date, #mb-start-time, #mb-end-time, #mb-duration, #mb-distance, textarea, #mb-reset-button, #mb-create-button, #mb-textbausteine-button, #mb-hours-minutes-dropdown-btn, #mb-marker-cb").prop("disabled", shouldDisable);
} catch (error) {
showErrorPopup(error);
}
@@ -345,219 +351,224 @@
</script>
</head>
<body>
@if(MobileSessionFacade.IsUserLoggedIn())
{
using(Html.BeginForm("LogOutAfterSessionTimeout", "Main", FormMethod.Post, new { id = "logout-form", css = "display:none;" }))
@if(MobileSessionFacade.IsUserLoggedIn())
{
using(Html.BeginForm("LogOutAfterSessionTimeout", "Main", FormMethod.Post, new { id = "logout-form", css = "display:none;" }))
{
}
}
@if(Model != null)
{
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top justify-content-end">
<div class="container-fluid">
<a href="#" class="navbar-brand">
@Model.LoggedInEmplyeeFirstNameLastName
</a>
<span class="d-inline-block" data-toggle="tooltip" title="Zeit bis zur automatischen Abmeldung" id="countdown-tooltip">
<span class="navbar-text" id="countdown" onclick="countdownClick()"></span>
</span>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
@*
@if(Html.IsInDebugMode())
{
using(Html.BeginForm("RedirectToDevExpressScheduler", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-hand-middle-finger"></i>
Scheduler
</button>
</li>
}
}
*@
@if(AbstractModel.IsAllowedToSeeCustomers)
{
using(Html.BeginForm("RedirectToCustomer", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-user text-bewo-customers"></i>
Klienten
</button>
</li>
}
}
@using(Html.BeginForm("RedirectToMain", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-clock text-bewo-service-records"></i>
Zeiterfassung
</button>
</li>
}
@if(AbstractModel.IsAllowedToSeeScheduler)
{
using(Html.BeginForm("RedirectToScheduler", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-calendar-alt text-bewo-calendar"></i>
Kalender
</button>
</li>
}
}
@if(AbstractModel.HasRightToViewQuittierungsbelege)
{
using(Html.BeginForm("RedirectToReportView", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-chart-bar text-bewo-report">
</i>
Quittierungsbelege
</button>
</li>
}
}
@if(AbstractModel.HasRightToViewReports && AbstractModel.HasRightToViewMitarbeiterstundenkonto)
{
using(Html.BeginForm("RedirectToReportViewer", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-chart-bar text-bewo-report"></i>
Auswertungen
</button>
</li>
}
}
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showAboutPopup()">
<i class="fas fa-balance-scale text-primary"></i>
&Uuml;ber
</button>
</li>
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showChangePasswordPopup()">
<i class="fas fa-lock text-danger"></i>
Passwort &auml;ndern
</button>
</li>
<li class="nav-item">
@using(Html.BeginForm("Logout", "Main", FormMethod.Post, new { id = "normal-logout-form" }))
{
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-sign-out-alt text-primary"></i>
Abmelden
</button>
}
</li>
</ul>
</div>
</div>
</nav>
}
<div class="modal" role="dialog" tabindex="-1" id="mySpinner">
<div class="modal-dialog modal-dialog-centered text-center" role="document">
<div class="modal-content bg-transparent border-0">
<div class="d-flex justify-content-center">
<div class="spinner-border text-primary" role="status" style="width: 5rem; height: 5rem;">
<span class="sr-only"></span>
</div>
</div>
<p id="loading-info-p" class="text-white mt-4">Lade ...</p>
</div>
</div>
</div>
<div class="modal" tabindex="-1" role="dialog" id="messagePopup">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="popupTitle"></h5>
<button class="close" type="button" data-dismiss="modal" aria-label="close" id="message-popup-esc-btn">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body" id="modal-body">
<p id="popupMessage"></p>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" data-dismiss="modal" id="message-popup-ok-btn">OK</button>
<button class="btn btn-secondary" type="button" data-dismiss="modal" id="message-popup-close-btn">Schlie&szlig;en</button>
</div>
</div>
</div>
</div>
<div class="modal" tabindex="-1" role="dialog" id="error-message-popup">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title text-danger">Es ist ein Fehler aufgetreten</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>
Es ist leider ein unbekannter Fehler aufgetreten. Pr&uuml;fen Sie Ihre Internetverbindung oder versuchen Sie es sp&auml;ter erneut. Wir sind stets bem&uuml;ht, das Programm zu verbessern, daher freuen wir uns auch, wenn Sie die Fehlerdetails unten in einer Mail an <a href="mailto:support@bewoplaner.de" id="error-popup-mailto">support@bewoplaner.de</a> senden.
</p>
<hr />
<div class="form-group">
<label for="fehlerdetail-textarea">Fehlerdetails:</label>
<textarea class="form-control font-italic text-monospace" style="height: 20em !important; max-height: 20em !important; scroll-behavior: auto !important;" id="fehlerdetail-textarea"></textarea>
<div id="html-error-container"></div>
</div>
</div>
<div class="modal-footer">
<div class="clearfix w-100">
<button class="btn btn-primary float-left" type="button" onclick="copyErrorToClipboard()">Text kopieren</button>
<button class="btn btn-primary float-right" type="button" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
</div>
@if(!(TempData[TempDataConstants.ErrorMessageKey] is null))
{
<div class="container-fluid mt-3">
<div class="row d-flex justify-content-center">
<div class="col-md-3 col-lg-4">
<div class="alert alert-danger" role="alert">
@TempData[TempDataConstants.ErrorMessageKey]
</div>
</div>
</div>
</div>
}
@using(Html.BeginForm("ZombieLogout", "Main", FormMethod.Post, new { id = "second-logout-form", style="display:none;" }))
{
}
}
@if(Model != null)
{
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top justify-content-end">
<div class="container-fluid">
<a href="#" class="navbar-brand">
@Model.LoggedInEmplyeeFirstNameLastName
</a>
<span class="d-inline-block" data-toggle="tooltip" title="Zeit bis zur automatischen Abmeldung" id="countdown-tooltip">
<span class="navbar-text" id="countdown" onclick="countdownClick()"></span>
</span>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
@*
@if(Html.IsInDebugMode())
{
using(Html.BeginForm("RedirectToDevExpressScheduler", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-hand-middle-finger"></i>
Scheduler
</button>
</li>
}
}
*@
@if(AbstractModel.IsAllowedToSeeCustomers)
{
using(Html.BeginForm("RedirectToCustomer", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-user text-bewo-customers"></i>
Klienten
</button>
</li>
}
}
@using(Html.BeginForm("RedirectToMain", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-clock text-bewo-service-records"></i>
Zeiterfassung
</button>
</li>
}
@if(AbstractModel.IsAllowedToSeeScheduler)
{
using(Html.BeginForm("RedirectToScheduler", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-calendar-alt text-bewo-calendar"></i>
Kalender
</button>
</li>
}
}
@if(AbstractModel.HasRightToViewQuittierungsbelege)
{
using(Html.BeginForm("RedirectToReportView", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-chart-bar text-bewo-report">
</i>
Quittierungsbelege
</button>
</li>
}
}
@if(AbstractModel.HasRightToViewReports && AbstractModel.HasRightToViewMitarbeiterstundenkonto)
{
using(Html.BeginForm("RedirectToReportViewer", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-chart-bar text-bewo-report"></i>
Auswertungen
</button>
</li>
}
}
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showAboutPopup()">
<i class="fas fa-balance-scale text-primary"></i>
&Uuml;ber
</button>
</li>
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showChangePasswordPopup()">
<i class="fas fa-lock text-danger"></i>
Passwort &auml;ndern
</button>
</li>
<li class="nav-item">
@using(Html.BeginForm("Logout", "Main", FormMethod.Post))
{
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-sign-out-alt text-primary"></i>
Abmelden
</button>
}
</li>
</ul>
</div>
</div>
</nav>
}
<div class="modal" role="dialog" tabindex="-1" id="mySpinner">
<div class="modal-dialog modal-dialog-centered text-center" role="document">
<div class="modal-content bg-transparent border-0">
<div class="d-flex justify-content-center">
<div class="spinner-border text-primary" role="status" style="width: 5rem; height: 5rem;">
<span class="sr-only"></span>
</div>
</div>
<p id="loading-info-p" class="text-white mt-4">Lade ...</p>
</div>
</div>
</div>
<div class="modal" tabindex="-1" role="dialog" id="messagePopup">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="popupTitle"></h5>
<button class="close" type="button" data-dismiss="modal" aria-label="close" id="message-popup-esc-btn">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body" id="modal-body">
<p id="popupMessage"></p>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" data-dismiss="modal" id="message-popup-ok-btn">OK</button>
<button class="btn btn-secondary" type="button" data-dismiss="modal" id="message-popup-close-btn">Schlie&szlig;en</button>
</div>
</div>
</div>
</div>
<div class="modal" tabindex="-1" role="dialog" id="error-message-popup">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title text-danger">Es ist ein Fehler aufgetreten</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>
Es ist leider ein unbekannter Fehler aufgetreten. Pr&uuml;fen Sie Ihre Internetverbindung oder versuchen Sie es sp&auml;ter erneut. Wir sind stets bem&uuml;ht, das Programm zu verbessern, daher freuen wir uns auch, wenn Sie die Fehlerdetails unten in einer Mail an <a href="mailto:support@bewoplaner.de" id="error-popup-mailto">support@bewoplaner.de</a> senden.
</p>
<hr/>
<div class="form-group">
<label for="fehlerdetail-textarea">Fehlerdetails:</label>
<textarea class="form-control font-italic text-monospace" style="height: 20em !important; max-height: 20em !important; scroll-behavior: auto !important;" id="fehlerdetail-textarea"></textarea>
<div id="html-error-container"></div>
</div>
</div>
<div class="modal-footer">
<div class="clearfix w-100">
<button class="btn btn-primary float-left" type="button" onclick="copyErrorToClipboard()">Text kopieren</button>
<button class="btn btn-primary float-right" type="button" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
</div>
@if(!(TempData[TempDataConstants.ErrorMessageKey] is null))
{
<div class="container-fluid mt-3">
<div class="row d-flex justify-content-center">
<div class="col-md-3 col-lg-4">
<div class="alert alert-danger" role="alert">
@TempData[TempDataConstants.ErrorMessageKey]
</div>
</div>
</div>
</div>
}
@RenderBody()
@RenderBody()
</body>
</html>

View File

@@ -18,7 +18,7 @@
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<StartAction>NoStartPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
@@ -31,8 +31,8 @@
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
<EnableENC>False</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>

View File

@@ -1,2 +1,2 @@
ALTER TABLE `organisation`
ADD COLUMN `Leistungserbringergruppe` VARCHAR(16) NULL DEFAULT NULL AFTER `IKDatenannahmestelle`;
ADD COLUMN `Leistungserbringergruppe` VARCHAR(256) NULL DEFAULT NULL AFTER `IKDatenannahmestelle`;

View File

@@ -35,6 +35,15 @@ namespace BeWo.Report.ReportObjects
vacationService = PluginLoader.FindClass<VacationService>();
}
protected AppSettings Settings
{
get
{
return appSettings;
}
}
public MitarbeiterstundenkontoBerechnung(decimal maxWochenstunden) : this()
{
this.maxWochenstunden = maxWochenstunden;
@@ -951,6 +960,9 @@ namespace BeWo.Report.ReportObjects
protected virtual ServiceRecordSummary BerechneStunden(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, IList<ServiceRecord> groupFilteredRecords, DateTime berichtsAnfang, DateTime berichtsEnde)
{
decimal flsGesamt = 0;
decimal arbeitszeit = 0;
var sum = new ServiceRecordSummary();
sum.RecordsImBerichtszeitraum = new List<ServiceRecord>();
@@ -965,17 +977,33 @@ namespace BeWo.Report.ReportObjects
//String test = String.Format("{0:dd.MM.yyyy HH:mm}, {1:0} Minuten, {2}, {3}", item.Start, item.RoundedDuration, item.ServiceDescription.Name, item.Notice);
HandleServiceRecord(empDetail, item);
if (AddServiceRecordToDuration(item))
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
empDetail.ServiceRecordsInSelectedTimeSpan.Add(item);
String test = String.Format("{0:dd.MM. HH:mm} - {1:HH:mm}, {2}", item.Start, item.End, item.RoundedDuration);
decimal duration = GetDuration(item, empDetail);
if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
{
if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
{
arbeitszeit += duration;
}
else if (item.ServiceDescription.ServiceCategory.IsBillable)
{
flsGesamt += duration;
}
}
}
else if (AddServiceRecordToDuration(item))
{
empDetail.ServiceRecordsInSelectedTimeSpan.Add(item);
decimal duration = GetDuration(item, empDetail);
//System.Diagnostics.Debug.WriteLine("{0:0.##}", duration);
if (item.ServiceDescription != null &&
item.ServiceDescription.ServiceCategory != null &&
item.ServiceDescription.ServiceCategory.IsBillable)
@@ -988,7 +1016,11 @@ namespace BeWo.Report.ReportObjects
}
}
}
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
sum.IstAbrechenbar = flsGesamt;
sum.IstNichtAbrechenbar = arbeitszeit - flsGesamt;
}
return sum;
}
@@ -1290,6 +1322,10 @@ namespace BeWo.Report.ReportObjects
public virtual bool ShouldCreateDayDetails()
{
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
return true;
}
return false;
}
@@ -1670,16 +1706,11 @@ namespace BeWo.Report.ReportObjects
{
MitarbeiterstundenkontoRO.DayDetail dd = new MitarbeiterstundenkontoRO.DayDetail();
dd.ZusammenhaengendeZeitraeume = new List<DateTimeSpan>();
dd.Date = date.Date;
dd.NightStart = 20;
dd.NightEnd = 6;
dd.MaxHoursUntilBreak = 6;
dd.BreakMinutes = 30;
if (date.Year == 2022 && date.Month == 12 && date.Day == 27)
{
int test = 0;
}
ConfigurePauseSettings(dd);
CalculateAbsenceTimesForDay(dd, ed);
dd.Feiertag = vacationService.GetFeiertag(date);
@@ -1697,6 +1728,26 @@ namespace BeWo.Report.ReportObjects
return dd;
}
public virtual void ConfigurePauseSettings(MitarbeiterstundenkontoRO.DayDetail dd)
{
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
if (Settings.EnableAutomaticPauses)
{
dd.MaxHoursUntilBreak = 6;
dd.BreakMinutes = 30;
dd.MaxHoursUntilBreak2 = 9;
dd.BreakMinutes2 = 15;
}
}
else
{
//Alter Default
dd.MaxHoursUntilBreak = 6;
dd.BreakMinutes = 30;
}
}
public virtual void BerechneSollStundenFuerDayDetail(MitarbeiterstundenkontoRO.EmployeeDetail ed, MitarbeiterstundenkontoRO.DayDetail dd)
{
var sollMax = BerechneSollStundenFuerTag(ed, dd.Date);
@@ -2002,6 +2053,18 @@ namespace BeWo.Report.ReportObjects
public virtual bool AddServiceRecordToDuration(ServiceRecord item)
{
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
{
if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
{
return true;
}
}
return false;
}
return true;
}

View File

@@ -29,6 +29,7 @@ namespace BeWo.Report.ReportObjects
public override MitarbeiterstundenkontoRO.DayDetail CreateDayDetail(DateTime date, MitarbeiterstundenkontoRO.EmployeeDetail ed)
{
var dd = base.CreateDayDetail(date, ed);
dd.MaxHoursUntilBreak = null;
dd.MaxHoursUntilBreak2 = null;
dd.BreakMinutes = null;

View File

@@ -1,113 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4BEA749A-658F-410B-BD2E-C7177A8D415D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AachenerLaienhelfer</RootNamespace>
<AssemblyName>2663321234_Reports</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Office.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Export, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Invoicing\SettlementInvoiceCreation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="CollectiveBillingInvoice.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CollectiveBillingInvoice.Designer.cs">
<DependentUpon>CollectiveBillingInvoice.cs</DependentUpon>
</Compile>
<Compile Include="ServiceInvoiceReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ServiceInvoiceReport.Designer.cs">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport2.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SettlementReport2.Designer.cs">
<DependentUpon>SettlementReport2.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
<Name>Data</Name>
</ProjectReference>
<ProjectReference Include="..\..\Report\Report.csproj">
<Project>{40d8b312-ea64-49e3-a31a-5e57ed4d5654}</Project>
<Name>Report</Name>
</ProjectReference>
<ProjectReference Include="..\..\Service\Service.csproj">
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
<Name>Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\Shared\Shared.csproj">
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="CollectiveBillingInvoice.resx">
<DependentUpon>CollectiveBillingInvoice.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ServiceInvoiceReport.resx">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport2.resx">
<DependentUpon>SettlementReport2.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4BEA749A-658F-410B-BD2E-C7177A8D415D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AachenerLaienhelfer</RootNamespace>
<AssemblyName>2663321234_Reports</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Office.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Export, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CustomReportCreator.cs" />
<Compile Include="Invoicing\SettlementInvoiceCreation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="CollectiveBillingInvoice.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CollectiveBillingInvoice.Designer.cs">
<DependentUpon>CollectiveBillingInvoice.cs</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Quittierungsbeleg.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Quittierungsbeleg.Designer.cs">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
</Compile>
<Compile Include="QuittierungsbelegJugendamt.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="QuittierungsbelegJugendamt.Designer.cs">
<DependentUpon>QuittierungsbelegJugendamt.cs</DependentUpon>
</Compile>
<Compile Include="ServiceInvoiceReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ServiceInvoiceReport.Designer.cs">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport2.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SettlementReport2.Designer.cs">
<DependentUpon>SettlementReport2.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
<Name>Data</Name>
</ProjectReference>
<ProjectReference Include="..\..\Report\Report.csproj">
<Project>{40d8b312-ea64-49e3-a31a-5e57ed4d5654}</Project>
<Name>Report</Name>
</ProjectReference>
<ProjectReference Include="..\..\Service\Service.csproj">
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
<Name>Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\Shared\Shared.csproj">
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="CollectiveBillingInvoice.resx">
<DependentUpon>CollectiveBillingInvoice.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Quittierungsbeleg.resx">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="QuittierungsbelegJugendamt.resx">
<DependentUpon>QuittierungsbelegJugendamt.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ServiceInvoiceReport.resx">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport2.resx">
<DependentUpon>SettlementReport2.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
namespace AachenerLaienhelfer
{
public class CustomReportCreator : DefaultReportCreator
{
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
if (lROs.Count > 0)
{
var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid);
rootReport.CreateDocument();
for (int i = 1; i < lROs.Count; i++)
{
var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid);
lNext.CreateDocument();
rootReport.Pages.AddRange(lNext.Pages);
}
return rootReport;
}
return new XtraReport();
}
public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
return CreateServicesOverviewReportForRo(ro, serviceCategoryOid);
}
private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
{
IBeWoReport<ServicesOverviewRO> report = null;
if (!String.IsNullOrWhiteSpace(ro.Costbearer))
{
if (ro.Costbearer.ToLower().Contains("jugendamt"))
{
report = new QuittierungsbelegJugendamt();
}
}
if (report == null)
{
report = new Quittierungsbeleg();
}
report.SetReportDataSource(ro);
return report as XtraReport;
}
}
}

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AachenerLaienhelfer.Properties {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AachenerLaienhelfer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,137 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text.RegularExpressions;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace AachenerLaienhelfer
{
public partial class Quittierungsbeleg : XtraReport, IBeWoReport<ServicesOverviewRO>
{
public Quittierungsbeleg()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
bool hatGruppen = false;
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
foreach (var sd in pRO.Services)
{
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
{
ServicesOverviewRO.CreateSignatureString(sd);
sd.Notice5 = "E";
if (sd.IsGroup)
{
sd.Notice5 = "GR";
hatGruppen = true;
}
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
{
sd.Notice5 = "F";
}
servicesBillable.Add(sd);
}
}
pRO.Services = servicesBillable;
}
if (String.IsNullOrWhiteSpace(pRO.AbsenceTimes))
{
lblHatAbwesenheiten.Text = "X";
}
if (!hatGruppen)
{
lblHatGruppen.Text = "X";
}
ErstelleAbwesenheitenTabelle(pRO);
bindingSource1.DataSource = pRO;
}
private void ErstelleAbwesenheitenTabelle(ServicesOverviewRO pRo)
{
if (pRo.Abwesenheiten != null)
{
int newRows = 0;
int index = 1;
foreach (var at in pRo.Abwesenheiten)
{
DevExpress.XtraReports.UI.XRTableRow row = null;
if (index < xrTableAbwesenheiten.Rows.Count)
{
row = xrTableAbwesenheiten.Rows[index];
}
else
{
row = xrTableAbwesenheiten.InsertRowBelow(xrTableAbwesenheiten.Rows[xrTableAbwesenheiten.Rows.Count - 1]);
newRows++;
}
row.Cells[0].Text = String.Format("{0:dd.MM.yyyy}", at.Start);
int? days = null;
if (at.End.HasValue)
{
row.Cells[1].Text = String.Format("{0:dd.MM.yyyy}", at.End);
days = (int)at.End.Value.Subtract(at.Start.Value).TotalDays + 1;
}
else
{
row.Cells[1].Text = "unbekannt";
}
row.Cells[2].Text = String.Format("{0:0}", days);
index++;
}
if (newRows > 0)
{
lblUnterschriftKlient.Top += newRows * 20;
lblUnterschriftMitarbeiter.Top += newRows * 20;
}
}
}
private void picSignature_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e)
{
XRPictureBox xrBox = sender as XRPictureBox;
//var test = this.GetCurrent
string base64String = xrBox.Tag as string;
if (!String.IsNullOrWhiteSpace(base64String))
{
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
var binData = Convert.FromBase64String(base64Data);
Image img = ByteArrayToImage(binData);
xrBox.Image = Utils.CropImage(img);
}
else
{
xrBox.Image = null;
}
}
public Image ByteArrayToImage(byte[] byteArrayIn)
{
using(var memoryStream = new MemoryStream(byteArrayIn))
{
return Image.FromStream(memoryStream);
}
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text.RegularExpressions;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace AachenerLaienhelfer
{
public partial class QuittierungsbelegJugendamt : XtraReport, IBeWoReport<ServicesOverviewRO>
{
public QuittierungsbelegJugendamt()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
bool hatGruppen = false;
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
foreach (var sd in pRO.Services)
{
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
{
ServicesOverviewRO.CreateSignatureString(sd);
sd.Notice5 = "E";
if (sd.IsGroup)
{
sd.Notice5 = "GR";
hatGruppen = true;
}
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
{
sd.Notice5 = "F";
}
servicesBillable.Add(sd);
}
}
pRO.Services = servicesBillable;
}
if (!hatGruppen)
{
lblHatGruppen.Text = "X";
}
bindingSource1.DataSource = pRO;
}
private void picSignature_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e)
{
XRPictureBox xrBox = sender as XRPictureBox;
string base64String = xrBox.Tag as string;
if (!String.IsNullOrWhiteSpace(base64String))
{
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
var binData = Convert.FromBase64String(base64Data);
Image img = ByteArrayToImage(binData);
xrBox.Image = Utils.CropImage(img);
}
else
{
xrBox.Image = null;
}
}
public Image ByteArrayToImage(byte[] byteArrayIn)
{
using(var memoryStream = new MemoryStream(byteArrayIn))
{
return Image.FromStream(memoryStream);
}
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -197,49 +197,49 @@ namespace Fortis
//Stufe IST:
var durchschnittProWoche = ro.DurchschnittProWocheDirekt + ro.DurchschnittProWocheAbgesagt;
if (!ro.DokuzeitraumStart.HasValue)
{
ro.StufeIst = "-";
}
else if (ro.DurchschnittProWocheDirekt < 90)
else if (durchschnittProWoche < 90)
{
ro.StufeIst = "< 1";
}
else if (ro.DurchschnittProWocheDirekt >= 90 && ro.DurchschnittProWocheDirekt < 120)
else if (durchschnittProWoche >= 90 && durchschnittProWoche < 120)
{
ro.StufeIst = "2";
}
else if (ro.DurchschnittProWocheDirekt >= 121 && ro.DurchschnittProWocheDirekt < 165)
else if (durchschnittProWoche >= 121 && durchschnittProWoche < 165)
{
ro.StufeIst = "3";
}
else if (ro.DurchschnittProWocheDirekt >= 166 && ro.DurchschnittProWocheDirekt <= 225)
else if (durchschnittProWoche >= 166 && durchschnittProWoche <= 225)
{
ro.StufeIst = "4";
}
else if (ro.DurchschnittProWocheDirekt >= 226 && ro.DurchschnittProWocheDirekt <= 300)
else if (durchschnittProWoche >= 226 && durchschnittProWoche <= 300)
{
ro.StufeIst = "5";
}
else if (ro.DurchschnittProWocheDirekt >= 301 && ro.DurchschnittProWocheDirekt <= 420)
else if (durchschnittProWoche >= 301 && durchschnittProWoche <= 420)
{
ro.StufeIst = "6";
}
else if (ro.DurchschnittProWocheDirekt > 420)
else if (durchschnittProWoche > 420)
{
ro.StufeIst = "> 6";
}
//Unter STufe:
if (ro.DurchschnittProWocheDirekt < 90)
if (durchschnittProWoche < 90)
{
ro.MinutenProWocheUnterStufe = ro.DurchschnittProWocheDirekt - ro.KorridorVon;
ro.MinutenProWocheUnterStufe = durchschnittProWoche - ro.KorridorVon;
}
else if (ro.KorridorVon > ro.DurchschnittProWocheDirekt + 1)
else if (ro.KorridorVon > durchschnittProWoche + 1)
{
ro.MinutenProWocheUnterStufe = ro.DurchschnittProWocheDirekt + 1 - ro.KorridorVon;
ro.MinutenProWocheUnterStufe = durchschnittProWoche + 1 - ro.KorridorVon;
}
else
{
@@ -249,21 +249,21 @@ namespace Fortis
//Bis Ende Stufe:
if (ro.DurchschnittProWocheDirekt < 90)
if (durchschnittProWoche < 90)
{
ro.MinutenProWocheBisEndeStufe = 0;
}
else if (ro.DurchschnittProWocheDirekt + 1 >= ro.KorridorVon && ro.DurchschnittProWocheDirekt < ro.KorridorBis)
else if (durchschnittProWoche + 1 >= ro.KorridorVon && durchschnittProWoche < ro.KorridorBis)
{
ro.MinutenProWocheBisEndeStufe = ro.DurchschnittProWocheDirekt - ro.KorridorBis;
ro.MinutenProWocheBisEndeStufe = durchschnittProWoche - ro.KorridorBis;
}
//Über Stufe:
if (ro.KorridorBis < ro.DurchschnittProWocheDirekt)
if (ro.KorridorBis < durchschnittProWoche)
{
ro.MinutenProWocheUeberStufe = (ro.KorridorBis - ro.DurchschnittProWocheDirekt) * -1;
ro.MinutenProWocheUeberStufe = (ro.KorridorBis - durchschnittProWoche) * -1;
}
else
{

View File

@@ -14,7 +14,7 @@ namespace MobileEV.Service
public override void BeforeSaveServiceRecord(ServiceRecord sr)
{
if (sr.CostBearer2SupportConcept.CostBearer.Organisation.Function != null && !sr.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value.IsNullOrEmpty() && sr.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value == "Rundung Selbstzahler wie LWL")
if (sr.CostBearer2SupportConcept != null && sr.CostBearer2SupportConcept.CostBearer.Organisation.Function != null && !sr.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value.IsNullOrEmpty() && sr.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value == "Rundung Selbstzahler wie LWL")
{
// Nach LWL-Regeln runden

View File

@@ -37,6 +37,8 @@ namespace PariSozial
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.xrTable3 = new DevExpress.XtraReports.UI.XRTable();
@@ -45,6 +47,8 @@ namespace PariSozial
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.ruleRowVisible = new DevExpress.XtraReports.UI.FormattingRule();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
@@ -78,10 +82,6 @@ namespace PariSozial
this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -137,7 +137,7 @@ namespace PariSozial
this.xrTableCell3.StylePriority.UseFont = false;
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.Text = "Datum";
this.xrTableCell3.Weight = 0.20524816333368198D;
this.xrTableCell3.Weight = 0.2194732505113928D;
//
// xrTableCell4
//
@@ -147,7 +147,7 @@ namespace PariSozial
this.xrTableCell4.StylePriority.UseFont = false;
this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.Text = "Uhrzeit\r\nvon ..... bis";
this.xrTableCell4.Weight = 0.25401997956299693D;
this.xrTableCell4.Weight = 0.24873635183344678D;
//
// xrTableCell11
//
@@ -157,7 +157,7 @@ namespace PariSozial
this.xrTableCell11.StylePriority.UseFont = false;
this.xrTableCell11.StylePriority.UseTextAlignment = false;
this.xrTableCell11.Text = "Anzahl Minuten";
this.xrTableCell11.Weight = 0.21661999388924277D;
this.xrTableCell11.Weight = 0.20767853444108209D;
//
// xrTableCell1
//
@@ -166,6 +166,20 @@ namespace PariSozial
this.xrTableCell1.Text = "Tätigkeitszweck";
this.xrTableCell1.Weight = 0.365788748861114D;
//
// xrTableCell7
//
this.xrTableCell7.Multiline = true;
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Text = "Einsatzkraft";
this.xrTableCell7.Weight = 0.23166620596447055D;
//
// xrTableCell5
//
this.xrTableCell5.Multiline = true;
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Text = "Unterschrift\r\nKlient/in";
this.xrTableCell5.Weight = 0.31174150625791663D;
//
// DetailReport
//
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -222,39 +236,36 @@ namespace PariSozial
this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDate", "{0:dd.MM.yyyy}")});
this.xrTableCell13.Name = "xrTableCell13";
this.xrTableCell13.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell13.StylePriority.UseFont = false;
this.xrTableCell13.StylePriority.UsePadding = false;
this.xrTableCell13.StylePriority.UseTextAlignment = false;
this.xrTableCell13.Text = "xrTableCell13";
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell13.Weight = 0.10627102845134587D;
this.xrTableCell13.Weight = 0.11363633041512793D;
//
// xrTableCell14
//
this.xrTableCell14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.TimeRangeString")});
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell14.StylePriority.UseFont = false;
this.xrTableCell14.StylePriority.UsePadding = false;
this.xrTableCell14.StylePriority.UseTextAlignment = false;
this.xrTableCell14.Text = "xrTableCell14";
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell14.Weight = 0.13152356364414533D;
this.xrTableCell14.Weight = 0.1287878484060771D;
//
// xrTableCell15
//
this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Minutes", "{0:0.##}")});
this.xrTableCell15.Name = "xrTableCell15";
this.xrTableCell15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 5, 0, 0, 100F);
this.xrTableCell15.StylePriority.UseFont = false;
this.xrTableCell15.StylePriority.UsePadding = false;
this.xrTableCell15.StylePriority.UseTextAlignment = false;
this.xrTableCell15.Text = "xrTableCell15";
this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell15.Weight = 0.11215893165550706D;
this.xrTableCell15.Weight = 0.10752934492979321D;
//
// xrTableCell2
//
@@ -265,6 +276,23 @@ namespace PariSozial
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell2.Weight = 0.18939389467655621D;
//
// xrTableCell8
//
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.EmployeeAbbr")});
this.xrTableCell8.Multiline = true;
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "xrTableCell8";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell8.Weight = 0.11994946282466618D;
//
// xrTableCell6
//
this.xrTableCell6.Multiline = true;
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Weight = 0.16140998371105708D;
//
// ruleRowVisible
//
this.ruleRowVisible.Condition = "(Not Contains([ServiceCategory], \'Assistenz\')) And (Not Contains([ServiceDescript" +
@@ -559,10 +587,9 @@ namespace PariSozial
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.lblSummeMinuten.BorderWidth = 1F;
this.lblSummeMinuten.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.lblSummeMinuten.LocationFloat = new DevExpress.Utils.PointFloat(229.5001F, 0F);
this.lblSummeMinuten.LocationFloat = new DevExpress.Utils.PointFloat(232.0001F, 0F);
this.lblSummeMinuten.Name = "lblSummeMinuten";
this.lblSummeMinuten.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.lblSummeMinuten.SizeF = new System.Drawing.SizeF(88.83F, 30F);
this.lblSummeMinuten.SizeF = new System.Drawing.SizeF(86.32974F, 30F);
this.lblSummeMinuten.StylePriority.UseBorders = false;
this.lblSummeMinuten.StylePriority.UseBorderWidth = false;
this.lblSummeMinuten.StylePriority.UseFont = false;
@@ -581,7 +608,7 @@ namespace PariSozial
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
this.xrLabel3.Text = "Summe";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
//
// fieldAbrechenbareMinuten
//
@@ -602,37 +629,6 @@ namespace PariSozial
this.fieldAbrechenbareFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldAbrechenbareFLS.Name = "fieldAbrechenbareFLS";
//
// xrTableCell5
//
this.xrTableCell5.Multiline = true;
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Text = "Unterschrift\r\nKlient/in";
this.xrTableCell5.Weight = 0.31174150625791663D;
//
// xrTableCell6
//
this.xrTableCell6.Multiline = true;
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Weight = 0.16140998371105708D;
//
// xrTableCell7
//
this.xrTableCell7.Multiline = true;
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Text = "Einsatzkraft";
this.xrTableCell7.Weight = 0.23166620596447055D;
//
// xrTableCell8
//
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.EmployeeAbbr")});
this.xrTableCell8.Multiline = true;
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "xrTableCell8";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell8.Weight = 0.11994946282466618D;
//
// AssistenzstundenReport
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -647,6 +643,7 @@ namespace PariSozial
this.fieldBillableFLS,
this.fieldAbrechenbareFLS});
this.DataSource = this.bindingSource1;
this.DisplayName = "AssistenzstundenBeleg";
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.formattingRuleStartDate,
this.formattingRuleServiceDesc,

View File

@@ -10,8 +10,8 @@ using System.Collections.Generic;
namespace PariSozial
{
public partial class AssistenzstundenReport : XtraReport
{
public partial class AssistenzstundenReport : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public AssistenzstundenReport()
{
InitializeComponent();
@@ -23,15 +23,10 @@ namespace PariSozial
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
{
if (s.ServiceCategory.Contains("Assistenz") || s.ServiceDescription.Contains("Assistenz"))
{
minTotal += s.Minutes;
}
minTotal += s.Minutes;
}
@@ -41,44 +36,32 @@ namespace PariSozial
lblSummeMinuten.Text = string.Format("{0:0.##}", minTotal);
var approved = pRO.ApprovedFLSPerWeek;
SetApprovedPerWeek(pRO);
//var stats = GetStatistics(pRO);
//if (stats != null)
//{
// approved = stats.MinutesApprovedPerWeek / 60;
//}
}
private SupportConceptPeriodStatisticsDC GetStatistics(ServicesOverviewRO ro)
private void SetApprovedPerWeek(ServicesOverviewRO ro)
{
if (ro.CostBearer2SupportConceptList != null && ro.CostBearer2SupportConceptList.Count > 0)
{
var service = new OperationsServiceImp();
foreach (var cb2sc in ro.CostBearer2SupportConceptList)
{
long cb2scOid = cb2sc.Oid.Value;
var stats = service.CreateSupportConceptStatistics(cb2scOid, ro.EndDate);
if (stats.PeriodStatistics != null && stats.PeriodStatistics.Count > 0)
{
foreach (var ps in stats.PeriodStatistics)
{
if (ps.SupportConceptApprovalPeriod != null && ps.SupportConceptApprovalPeriod.ServiceCategory != null &&
ps.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("Assistenz"))
{
return ps;
}
}
}
}
foreach (var scap in cb2sc.ApprovalPeriodList)
{
if (scap.ServiceCategory != null && scap.ServiceCategory.Name.Contains("Assistenz"))
{
if (scap.ApprovedBEPerInterval.HasValue)
{
ro.ApprovedFLSPerWeek = scap.ApprovedBEPerInterval.Value;
}
}
}
}
}
return null;
}
}
}

View File

@@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.DataContracts;
using DevExpress.XtraReports.UI;
namespace PariSozial
{
public class CustomReportCreator : DefaultReportCreator
{
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
if (lROs.Count > 0)
{
var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid);
rootReport.CreateDocument();
for (int i = 1; i < lROs.Count; i++)
{
var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid);
lNext.CreateDocument();
rootReport.Pages.AddRange(lNext.Pages);
}
return rootReport;
}
return new XtraReport();
}
public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
return CreateServicesOverviewReportForRo(ro, serviceCategoryOid);
}
public override XtraReport CreateReportForServicesOverviewRo(ServicesOverviewRO ro, string reportId)
{
return CreateServicesOverviewReportForRo(ro, null);
}
private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
{
XtraReport report = null;
ServicesOverviewRO defaultRo = ServicesOverviewRO.CopyFromRO(ro);
ServicesOverviewRO assiRo = ServicesOverviewRO.CopyFromRO(ro);
if (ro.Services != null)
{
foreach (ServicesOverviewRO.ServiceDetail s in ro.Services)
{
if (s.ServiceCategory.ToLower().Contains("assistenz") )
{
assiRo.Services.Add(s);
}
else
{
defaultRo.Services.Add(s);
}
}
}
report = AddSubServicesOverviewReportToReport(report, new Quittierungsbeleg(), defaultRo);
report = AddSubServicesOverviewReportToReport(report, new AssistenzstundenReport(), assiRo);
if (report == null)
report = new XtraReport();
return report;
}
}
}

View File

@@ -61,6 +61,7 @@
<Compile Include="AssistenzstundenReport.Designer.cs">
<DependentUpon>AssistenzstundenReport.cs</DependentUpon>
</Compile>
<Compile Include="CustomReportCreator.cs" />
<Compile Include="Invoicing\AssistenzInvoiceCreation.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Invoicing\CustomSettlementInvoiceCreation.cs" />

Some files were not shown because too many files have changed in this diff Show More