|
|
@@ -998,6 +998,8 @@ namespace PRSDesktop
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private HashSet<Assignment> _savingAssignments = new();
|
|
|
|
|
|
private void LoadAssignment(Assignment assignment, IList<ICalendarAppointment> appointments)
|
|
|
{
|
|
|
@@ -1007,7 +1009,14 @@ namespace PRSDesktop
|
|
|
var model = new AssignmentAppointment(assignment, employee, AssignmentType);
|
|
|
model.OnUpdate += () =>
|
|
|
{
|
|
|
- Client.Save(assignment, "Edited by user");
|
|
|
+ if (_savingAssignments.Add(assignment))
|
|
|
+ {
|
|
|
+ Dispatcher.BeginInvoke(() =>
|
|
|
+ {
|
|
|
+ _savingAssignments.Remove(assignment);
|
|
|
+ Client.SaveAsync(assignment, "Edited by user").LogIfFail();
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
model.EmployeeChanged += (o, e) =>
|
|
|
{
|