Die Zeit- und/oder Datumsangaben sind nicht korrekt.
');
showMessagePopup("Fehler");
+ $("#scheduler-start-time, #scheduler-end-time").val("");
return;
}
@@ -54,5 +75,55 @@ function validateAppointmentForm() {
return;
}
- $("#insert-appointment-form").submit();
+ $.get(
+ getCheckForOverlappingAppointmentsUrl(),
+ {
+ startDateRaw: startDate.format("DD.MM.YYYY"),
+ endDateRaw: endDate.format("DD.MM.YYYY"),
+ startTimeRaw: startDate.format("HH:mm"),
+ endTimeRaw: endDate.format("HH:mm")
+ }
+ ).done(function(result) {
+ var isOverlapping = $.parseJSON(result);
+
+ if(isOverlapping === true) {
+ hideSpinner();
+ $("#messagePopup .modal-body").html('Dieser Termin überschneidet sich mit einem anderen bereits existierenden Termin.
Möchten Sie ihn wirklich speichern?
');
+ showMessagePopupWithCallback("Überschneidung",
+ null,
+ function() {
+ $("#messagePopup .modal-body").html();
+ showSpinner();
+ $("#insert-appointment-form").submit();
+ });
+ } else {
+ $("#insert-appointment-form").submit();
+ }
+ });
+}
+
+function toggleFormVisibility() {
+ if($("#form-toggle-button").css("display") === "none") {
+ showAppointmentForm();
+ } else {
+ hideAppointmentForm();
+ }
+}
+
+function hideAppointmentForm() {
+ $("#form-container").collapse("hide");
+}
+
+function showAppointmentForm() {
+ $("#form-container").collapse("show");
+}
+
+function toggleAppointmentForm() {
+ var isVisible = $("#form-container").css("display") === "block";
+
+ if (isVisible) {
+ hideAppointmentForm();
+ } else {
+ showAppointmentForm();
+ }
}
\ No newline at end of file
diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml
index 22e76bd50..26c8b12c5 100644
--- a/BeWoPlanerMobil/Views/Main/Main.cshtml
+++ b/BeWoPlanerMobil/Views/Main/Main.cshtml
@@ -138,9 +138,11 @@
if($("#sketch-pad").length !== 0) {
var rowWidth = $("#canvas-row").innerWidth();
var canvasWidth = $("#sketch-pad").innerWidth();
+
+ var newWidth = rowWidth;
- if(rowWidth < canvasWidth) {
- $("#sketch-pad").prop("width", rowWidth);
+ if (newWidth !== canvasWidth) {
+ $("#sketch-pad").prop("width", newWidth);
new Signature();
}
}
@@ -576,30 +578,34 @@
@if(Model != null)
{
-
- @using(Html.BeginForm("LoadServiceRecords", "Main", FormMethod.Post, new { id = "selectServiceRecordForm" }))
- {
-
- }
-
+ if (Model.SelectedSupportConcept != null)
+ {
+
+ @using(Html.BeginForm("LoadServiceRecords", "Main", FormMethod.Post, new { id = "selectServiceRecordForm" }))
+ {
+
+ }
+
+ }
+
@{
diff --git a/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml b/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml
index 418a7341a..27398dabd 100644
--- a/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml
+++ b/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml
@@ -5,42 +5,62 @@
ViewBag.Title = "BeWoPlaner Mobil";
}
-
+
@@ -78,100 +98,103 @@
- @using (Html.BeginForm("InsertOrUpdateAppointment", "Scheduler", FormMethod.Post, new {id = "insert-appointment-form"}))
- {
-