diff --git a/Android/BewoMitarbeiterApp/.idea/inspectionProfiles/Project_Default.xml b/Android/BewoMitarbeiterApp/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 382942f1d..000000000
--- a/Android/BewoMitarbeiterApp/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Android/BewoMitarbeiterApp/.idea/inspectionProfiles/profiles_settings.xml b/Android/BewoMitarbeiterApp/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 3b312839b..000000000
--- a/Android/BewoMitarbeiterApp/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Android/BewoMitarbeiterApp/.idea/vcs.xml b/Android/BewoMitarbeiterApp/.idea/vcs.xml
deleted file mode 100644
index b2bdec2d7..000000000
--- a/Android/BewoMitarbeiterApp/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Android/BewoMitarbeiterApp/BewoMitarbeiterApp.iml b/Android/BewoMitarbeiterApp/BewoMitarbeiterApp.iml
index fb3ed83ef..1e4a40047 100644
--- a/Android/BewoMitarbeiterApp/BewoMitarbeiterApp.iml
+++ b/Android/BewoMitarbeiterApp/BewoMitarbeiterApp.iml
@@ -13,7 +13,7 @@
-
+
\ No newline at end of file
diff --git a/Android/BewoMitarbeiterApp/app/app.iml b/Android/BewoMitarbeiterApp/app/app.iml
index 7ec9dbda5..96a41f48a 100644
--- a/Android/BewoMitarbeiterApp/app/app.iml
+++ b/Android/BewoMitarbeiterApp/app/app.iml
@@ -66,14 +66,6 @@
-
-
-
-
-
-
-
-
@@ -82,34 +74,25 @@
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Android/BewoMitarbeiterApp/build.gradle b/Android/BewoMitarbeiterApp/build.gradle
index eb6bdaa34..0b3adfcc1 100644
--- a/Android/BewoMitarbeiterApp/build.gradle
+++ b/Android/BewoMitarbeiterApp/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.2'
+ classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml b/BeWo/Scheduler/View/NewSchedulerView.xaml
index 9ee721a31..41857b4b8 100644
--- a/BeWo/Scheduler/View/NewSchedulerView.xaml
+++ b/BeWo/Scheduler/View/NewSchedulerView.xaml
@@ -964,10 +964,10 @@
this.Dispatch(() =>
{
- var erg = ((!BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen)) ? liste.Where(c => c.IsRelatedToEmployee).ToList() : liste).Where(c => c.IsArchived == false).ToList();
+ var erg = (!BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen) ? liste.Where(c => c.IsRelatedToEmployee).ToList() : liste).Where(c => c.IsArchived == false).ToList();
AllCustomers = erg;
CustomerList = AllCustomers;
@@ -829,10 +829,41 @@ namespace BeWo.Scheduler.View
private void UpdateRequestString()
{
ServiceFacade.DoResourceServiceSync(r => Liste = r.GetAllOpenAppointmentsForEmployee(BeWoApp.LoggedOnEmployee.EmployeeOid.Value));
- var summe = Liste.Count;
- Enabled = Liste.Count > 0;
- Requests = string.Format("{0} Benachrichtigung{1}", summe == 0 ? "keine" : summe.ToString(), summe == 1 ? "" : "en");
+ var count = 0;
+ var oidList = new List();
+ foreach (var termin in Liste)
+ {
+ if (termin.Originator.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value)
+ {
+ foreach (var status in termin.EmployeeList.Where(w => w.Employee.EmployeeOid != BeWoApp.LoggedOnEmployee.EmployeeOid.Value))
+ {
+ if (status.IsPChanged && status.ParticipationAnswer != ParticipationAnswer.Offen && status.ParticipationAnswer != ParticipationAnswer.Verstrichen && !oidList.Contains(status.Employee2SchedulerAppointmentOid.Value))
+ {
+ oidList.Add(status.Employee2SchedulerAppointmentOid.Value);
+ count++;
+ }
+ }
+ }
+ else
+ {
+ if (termin.EmployeeList.Any(a => a.Employee.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value))
+ {
+ foreach (var status in termin.EmployeeList.Where(w => w.Employee.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value))
+ {
+ if (!status.IsPChanged && status.ParticipationAnswer != ParticipationAnswer.Offen && status.ParticipationAnswer != ParticipationAnswer.Verstrichen && !oidList.Contains(status.Employee2SchedulerAppointmentOid.Value))
+ {
+ oidList.Add(status.Employee2SchedulerAppointmentOid.Value);
+ count++;
+ }
+ }
+ }
+ }
+ }
+
+
+ Enabled = count > 0;
+ Requests = $"{(count == 0 ? "keine" : count.ToString())} Benachrichtigung{(count == 1 ? "" : "en")}";
}
private List Liste = new List();
@@ -938,9 +969,9 @@ namespace BeWo.Scheduler.View
//Synchronize();
}
- private void scheduler_EditAppointmentFormShowing(object sender, EditAppointmentFormEventArgs e)
+ private void Scheduler_EditAppointmentFormShowing(object sender, EditAppointmentFormEventArgs e)
{
- var control = (DevExpress.Xpf.Scheduler.SchedulerControl) sender;
+ var control = (SchedulerControl) sender;
if (istNeu)
{
@@ -967,7 +998,7 @@ namespace BeWo.Scheduler.View
private void SchedulerControl_EditRecurrentAppointmentFormShowing(object sender, EditAppointmentFormEventArgs e) { }
- private void scheduler_PopupMenuShowing(object sender, SchedulerMenuEventArgs e)
+ private void Scheduler_PopupMenuShowing(object sender, SchedulerMenuEventArgs e)
{
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen) ||
!BeWoApp.LoggedOnUser.HasRight(UserRightType.Mitarbeiterstundenkonto_ViewAll))
@@ -993,13 +1024,13 @@ namespace BeWo.Scheduler.View
}
private bool istNeu;
- private void scheduler_InitNewAppointment(object sender, AppointmentEventArgs e)
+ private void Scheduler_InitNewAppointment(object sender, AppointmentEventArgs e)
{
istNeu = true;
ViewModel.InitNewAppointment(e.Appointment);
}
- private void scheduler_AppointmentViewInfoCustomizing(object sender, DevExpress.Xpf.Scheduler.AppointmentViewInfoCustomizingEventArgs e)
+ private void Scheduler_AppointmentViewInfoCustomizing(object sender, DevExpress.Xpf.Scheduler.AppointmentViewInfoCustomizingEventArgs e)
{
e.ViewInfo.CustomViewInfo = e.ViewInfo.Appointment.CustomFields;
}
@@ -1008,14 +1039,12 @@ namespace BeWo.Scheduler.View
{
var darfTerminDetailsSehen = true;
var appointment = e.Appointment;
- var ersteller = (CompactEmployeeDC) appointment.CustomFields["Originator"];
+ var ersteller = (CompactEmployeeDC) appointment.CustomFields["Originator"];
var mitarbeiterliste = (List)appointment.CustomFields["EmployeeList"];
var hatNurAndereMitarbeiter = mitarbeiterliste.Count > 0 && !(mitarbeiterliste.Count == 1 && mitarbeiterliste.ElementAt(0).Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid));
var hatKlienten = ((List) appointment.CustomFields["CustomerList"]).Count > 0;
- bool istErsteller = ersteller.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid);
-
- //var hatRessourcen = ((List) apt.CustomFields["ResourceList"]).Count > 0;
+ var istErsteller = ersteller.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid);
if (hatNurAndereMitarbeiter || !istErsteller)
{
@@ -1139,7 +1168,9 @@ namespace BeWo.Scheduler.View
var zuBestaetigen = vm.Appointments.Where(app =>
{
- if (!app.CustomFields.ContainsKey("EmployeeList"))
+ var originator = (CompactEmployeeDC) app.CustomFields["Originator"];
+
+ if (!app.CustomFields.ContainsKey("EmployeeList") || originator.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value)
{
return false;
}
@@ -1159,7 +1190,7 @@ namespace BeWo.Scheduler.View
var empList = (List) app.CustomFields["EmployeeList"];
var or = (CompactEmployeeDC) app.CustomFields["Originator"];
- return or.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) && empList.Any(a => a.IsPChanged && a.ParticipationAnswer != ParticipationAnswer.Offen && !a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid));
+ return or.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) && empList.Any(a => a.IsPChanged && a.ParticipationAnswer != ParticipationAnswer.Offen && a.ParticipationAnswer != ParticipationAnswer.Verstrichen && !a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid));
}).ToList();
if (!zuBestaetigen.Any() && !updates.Any())
@@ -1167,13 +1198,13 @@ namespace BeWo.Scheduler.View
return;
}
- var x = new RequestAnswerView(zuBestaetigen, updates);
+ var requestAnswerView = new RequestAnswerView(zuBestaetigen, updates);
- x.Closed += RequestAnswerViewClosedEvent;
- x.ParticipationChanged += UpdateRequestStringEvent;
- x.ParticipationChanged += UpdateBeiParticipationChanged;
-
- x.Show();
+ requestAnswerView.Closed += RequestAnswerViewClosedEvent;
+ requestAnswerView.ParticipationChanged += UpdateRequestStringEvent;
+ requestAnswerView.ParticipationChanged += UpdateBeiParticipationChanged;
+
+ requestAnswerView.Show();
}
private void RequestAnswerViewClosedEvent(object sender, EventArgs e)
diff --git a/BeWo/Scheduler/View/RequestAnswerView.xaml b/BeWo/Scheduler/View/RequestAnswerView.xaml
index 86c00a756..beec41c81 100644
--- a/BeWo/Scheduler/View/RequestAnswerView.xaml
+++ b/BeWo/Scheduler/View/RequestAnswerView.xaml
@@ -34,7 +34,7 @@
-
+