Bugs gefixt
This commit is contained in:
@@ -1617,7 +1617,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
long? oldCatOid = null;
|
||||
long? oldDescOid = null;
|
||||
|
||||
if (!Model.IsInEditingMode)
|
||||
if(!Model.IsInEditingMode)
|
||||
{
|
||||
oldCatOid = Model.SelectedServiceCategoryOid;
|
||||
oldDescOid = Model.SelectedServiceDescriptionOid;
|
||||
@@ -1627,7 +1627,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var result = ResetEditingMode();
|
||||
|
||||
if (oldCatOid.HasValue && oldDescOid.HasValue)
|
||||
if(oldCatOid.HasValue && oldDescOid.HasValue)
|
||||
{
|
||||
Model.SelectedServiceCategoryOid = oldCatOid;
|
||||
Model.SelectedServiceDescriptionOid = oldDescOid;
|
||||
@@ -4314,7 +4314,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return View("Main", Model);
|
||||
}
|
||||
|
||||
private ServiceRecordDC CreateServiceRecordFromScratch(DateTime start, DateTime end, CompactCustomerDC customer, CompactEmployeeDC employee, string notice)
|
||||
private ServiceRecordDC CreateServiceRecordFromScratch(DateTime start, DateTime end, CompactCustomerDC customer, CompactEmployeeDC employee, string notice)
|
||||
{
|
||||
var serviceRecord = new ServiceRecordDC
|
||||
{
|
||||
@@ -4820,6 +4820,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
private void LoadPaginatedServiceRecordsToModel(int selectedPage)
|
||||
{
|
||||
if(Model.IsInGroupBookingMode || Model.IsInMultiBookingMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var records = new List<ServiceRecordDC>();
|
||||
|
||||
if(selectedPage < 1)
|
||||
|
||||
@@ -854,7 +854,28 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string BookingModePrefix
|
||||
{
|
||||
get
|
||||
{
|
||||
var result = "sb";
|
||||
|
||||
switch(CurrentBookingMode)
|
||||
{
|
||||
case BookingMode.GroupBookingMode:
|
||||
result = "gb";
|
||||
break;
|
||||
case BookingMode.MultiBookingMode:
|
||||
result = "mb";
|
||||
break;
|
||||
default:
|
||||
result = "sb";
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomSelectListItem
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
function showPieChart() {
|
||||
var cb2ScRelOid = parseInt($("#CostBearer2SupportConceptOid").val(), 10);
|
||||
const cb2ScRelOid = parseInt($("#sb-cb2ScRelOid").val(), 10);
|
||||
|
||||
if (cb2ScRelOid === null || cb2ScRelOid === undefined) {
|
||||
if(cb2ScRelOid === null || cb2ScRelOid === undefined) {
|
||||
showMessagePopup("Hilfeplanstatistik", "Es wurde kein Hilfeplan ausgewählt");
|
||||
return;
|
||||
}
|
||||
|
||||
var customerInfo = $("#selectedSupportConceptCustomerInfo").html();
|
||||
var selectedSupportConceptInfo = $("#selectedSupportConceptInfo").html();
|
||||
const customerInfo = $("#selectedSupportConceptCustomerInfo").html();
|
||||
const selectedSupportConceptInfo = $("#selectedSupportConceptInfo").html();
|
||||
|
||||
$("#statistics-header").html("Hilfeplanstatistik: " + customerInfo + " | " + selectedSupportConceptInfo);
|
||||
$("#statistics-header").html(`Hilfeplanstatistik: ${customerInfo} | ${selectedSupportConceptInfo}`);
|
||||
getSupportConceptStatistics(cb2ScRelOid);
|
||||
}
|
||||
|
||||
function getSupportConceptStatistics(cb2ScRRelOid) {
|
||||
var url = getLoadStatisticsUrl();
|
||||
const url = getLoadStatisticsUrl();
|
||||
|
||||
$.get(url, { oid: cb2ScRRelOid }).done(function(jsonObject) {
|
||||
try {
|
||||
@@ -31,10 +31,7 @@ function getSupportConceptStatistics(cb2ScRRelOid) {
|
||||
$.each(scStatistics.statisticPeriods, function(index, period) {
|
||||
$.each(period.header2values, function(index, header2Values) {
|
||||
$("#period-statistics-container").append(
|
||||
'<div class="row">' +
|
||||
'<div class="col text-secondary">' + header2Values.header + "</div>" +
|
||||
'<div class="col-auto">' + header2Values.value + "</div>" +
|
||||
"</div>");
|
||||
`<div class="row"><div class="col text-secondary">${header2Values.header}</div><div class="col-auto">${header2Values.value}</div></div>`);
|
||||
});
|
||||
|
||||
if(index < (scStatistics.statisticPeriods.length - 1)) {
|
||||
@@ -58,7 +55,7 @@ function getSupportConceptStatistics(cb2ScRRelOid) {
|
||||
}
|
||||
|
||||
function drawPieChart(v1, v2, free, used) {
|
||||
var data = [
|
||||
const data = [
|
||||
{
|
||||
value: v1,
|
||||
color: "#00FF00",
|
||||
@@ -73,7 +70,7 @@ function drawPieChart(v1, v2, free, used) {
|
||||
}
|
||||
];
|
||||
|
||||
var options = {
|
||||
const options = {
|
||||
scaleShowLabelBackdrop: true,
|
||||
scaleBackdropColor: "rgba(255,255,255,0.75)",
|
||||
scaleBeginAtZero: true,
|
||||
@@ -97,7 +94,7 @@ function drawPieChart(v1, v2, free, used) {
|
||||
"</ul>"
|
||||
};
|
||||
|
||||
var context = $("#statistic-canvas").get(0).getContext("2d");
|
||||
const context = $("#statistic-canvas").get(0).getContext("2d");
|
||||
|
||||
new Chart(context).Pie(data, options);
|
||||
}
|
||||
@@ -6,59 +6,6 @@
|
||||
return [hours, minutes];
|
||||
}
|
||||
|
||||
function getDateFromPicker(pickerId) {
|
||||
try {
|
||||
const picker = $(`#${pickerId}`);
|
||||
|
||||
if(picker.length > 0) {
|
||||
picker.datetimepicker("show");
|
||||
picker.datetimepicker("hide");
|
||||
|
||||
const unixTime = picker.datetimepicker("date");
|
||||
const targetDate = new Date(unixTime);
|
||||
|
||||
if(isValidDate(targetDate)) {
|
||||
return targetDate;
|
||||
}
|
||||
}
|
||||
|
||||
return new Date();
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
} finally {
|
||||
return new Date();
|
||||
}
|
||||
}
|
||||
|
||||
function getTimeFromPicker(pickerId) {
|
||||
const result = new Date();
|
||||
|
||||
try {
|
||||
const picker = $(`#${pickerId}`);
|
||||
|
||||
if (picker.length > 0) {
|
||||
const timeString = picker.val();
|
||||
if (timeString.length === 5) {
|
||||
const hours = timeString.substring(0, 2);
|
||||
const minutes = timeString.substring(3);
|
||||
|
||||
result.setHours(hours);
|
||||
result.setMinutes(minutes);
|
||||
|
||||
const date = result.getDate();
|
||||
const month = result.getMonth();
|
||||
const year = result.getYear();
|
||||
|
||||
return new Date(year, month, date, hours, minutes, 0, 0);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
window.showErrorPopup(error);
|
||||
} finally {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
function dateToShortDateString(date) {
|
||||
try {
|
||||
logInfo2(`Konvertiere Datum zu kurzem Datum: ${date}`);
|
||||
|
||||
@@ -7,7 +7,7 @@ function logWarning(message) {
|
||||
}
|
||||
|
||||
function logError(message) {
|
||||
console.error("%c" + message, "font-size: 14px; font-family: monospace; color: red");
|
||||
console.error(`%c${message}`, "font-size: 14px; font-family: monospace; color: red");
|
||||
}
|
||||
|
||||
function logDebug(message) {
|
||||
@@ -15,7 +15,7 @@ function logDebug(message) {
|
||||
}
|
||||
|
||||
function logColorfulMessage(message, color) {
|
||||
console.log("%c" + message, "font-size: 14px; font-family: monospace; color: " + color);
|
||||
console.log(`%c${message}`, `font-size: 14px; font-family: monospace; color: ${color}`);
|
||||
}
|
||||
|
||||
function logInfo2(message) {
|
||||
|
||||
@@ -1,220 +1,11 @@
|
||||
function calculateTimeWithDuration(timeInputValue, timeElement, startDate, duration, hoursMinutesDropdownBtnId) {
|
||||
var isInMin = window.getIsZeiterfassungseinheitInMinutes();
|
||||
|
||||
const hoursToMinutes = parseTimeInputToIntegerArray(timeInputValue);
|
||||
const hours = parseInt(hoursToMinutes[0]);
|
||||
const minutes = parseInt(hoursToMinutes[1]);
|
||||
const stdMinDropdown = $(`#${hoursMinutesDropdownBtnId}`);
|
||||
|
||||
startDate.hours(hours);
|
||||
startDate.minutes(minutes);
|
||||
|
||||
if(stdMinDropdown.length) {
|
||||
isInMin = stdMinDropdown.text().replaceAll(/\s/g, "") === "Minuten";
|
||||
}
|
||||
|
||||
const durationFormat = isInMin ? "m" : "h";
|
||||
|
||||
startDate.add(duration, durationFormat);
|
||||
|
||||
timeInputValue = startDate.format("HH:mm");
|
||||
|
||||
timeElement.val(timeInputValue);
|
||||
}
|
||||
|
||||
function onDurationChange(startTimeId, endTimeId, startDateId, endDateId, durationId, hoursMinutesDropdownBtnId, startDatePickerId, endDatePickerId) {
|
||||
try {
|
||||
var isInMin = getIsZeiterfassungseinheitInMinutes();
|
||||
|
||||
var startTime = $(`#${startTimeId}`).val();
|
||||
var endTime = $(`#${endTimeId}`).val();
|
||||
var duration = $(`#${durationId}`).val();
|
||||
var hoursMinutesDropdownButton = $(`#${hoursMinutesDropdownBtnId}`);
|
||||
|
||||
var startTimeCondition = startTime !== undefined && startTime !== null && startTime.length > 0;
|
||||
var endTimeCondition = endTime !== undefined && endTime !== null && endTime.length > 0;
|
||||
var durationNumber = parseFloat(duration.replace(",", "."));
|
||||
var durationCondition = !isNaN(durationNumber);
|
||||
|
||||
if((false === startTimeCondition && false === endTimeCondition) || durationCondition === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
var startDateString = $(`#${startDatePickerId}`).datetimepicker("date");
|
||||
var endDate = moment(new Date());
|
||||
var startDate = moment(new Date());
|
||||
|
||||
if(startDateString.length !== 0) {
|
||||
startDate = moment(startDateString);
|
||||
endDate = startDate.clone();
|
||||
}
|
||||
|
||||
if($(`#${endDatePickerId}`).length !== 0) {
|
||||
var endDateString = $(`#${endDatePickerId}`).datetimepicker("date");
|
||||
endDate = moment(endDateString);
|
||||
}
|
||||
|
||||
var h2m = [0, 0];
|
||||
|
||||
if(hoursMinutesDropdownButton.length) {
|
||||
isInMin = hoursMinutesDropdownButton.text().replaceAll(/\s/g, "") === "Minuten";
|
||||
}
|
||||
|
||||
var durationFormat = isInMin ? "m" : "h";
|
||||
|
||||
if(startTimeCondition === true) {
|
||||
h2m = parseTimeInputToIntegerArray(startTime);
|
||||
|
||||
startDate = startDate.hours(h2m[0]).minutes(h2m[1]);
|
||||
endDate = startDate.clone().add(durationNumber, durationFormat);
|
||||
|
||||
$(`#${endTimeId}`).val(endDate.format("HH:mm"));
|
||||
$(`#${endDateId}`).val(endDate.format("DD.MM.yyyy"));
|
||||
} else {
|
||||
h2m = parseTimeInputToIntegerArray(endTime);
|
||||
|
||||
endDate = endDate.hours(h2m[0]).minutes(h2m[1]);
|
||||
startDate = endDate.clone().add(durationNumber * -1, durationFormat);
|
||||
|
||||
$(`#${startTimeId}`).val(startDate.format("HH:mm"));
|
||||
$(`#${startDateId}`).val(startDate.format("DD.MM.yyyy"));
|
||||
}
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
// ToDo: VERALTET (14.05.2025); Erst Dauer, dann Start- oder Endzeit führt dazu, dass die Dauer in Stunden benutzt wird!
|
||||
function calculateDuration(isInvocatedByHoursMinutesButton, startTimeId, endTimeId, durationId, hoursMinutesDropdownBtnId, startDatePickerId, endDatePickerId, isInvokedByStartElement, isInvokedByEndElement) {
|
||||
var startTime = $(`#${startTimeId}`).val();
|
||||
var endTime = $(`#${endTimeId}`).val();
|
||||
var duration = $(`#${durationId}`).val();
|
||||
|
||||
var hoursMinutesDropdownButton = $(`#${hoursMinutesDropdownBtnId}`);
|
||||
|
||||
var isInMin = window.getIsZeiterfassungseinheitInMinutes();
|
||||
|
||||
if(hoursMinutesDropdownButton.length) {
|
||||
isInMin = hoursMinutesDropdownButton.text().replaceAll(/\s/g, "") === "Minuten";
|
||||
}
|
||||
|
||||
var durationFormat = isInMin ? "m" : "h";
|
||||
|
||||
if((startTime.length > 0 && startTime.length < 5) || (endTime.length > 0 && endTime.length < 5)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var isStartTimeValid = startTime !== undefined && startTime !== null && startTime.length > 0;
|
||||
var isEndTimeValid = endTime !== undefined && endTime !== null && endTime.length > 0;
|
||||
|
||||
var durationNumber = parseFloat(duration.replace(",", "."));
|
||||
var isDurationValid = !isNaN(durationNumber);
|
||||
|
||||
var startDateString = $("#" + startDatePickerId).datetimepicker("date");
|
||||
|
||||
var endDate = moment(new Date());
|
||||
var startDate = moment(new Date());
|
||||
|
||||
// Das Startdatum hat einen Wert
|
||||
if(startDateString !== null && startDateString.length !== 0) {
|
||||
startDate = moment(startDateString);
|
||||
endDate = startDate.clone();
|
||||
}
|
||||
|
||||
// Es gibt ein Enddatumsfeld
|
||||
if($(`#${endDatePickerId}`).length !== 0) {
|
||||
var endDateString = $(`#${endDatePickerId}`).datetimepicker("date");
|
||||
// Das Enddatum hat einen Wert
|
||||
if(endDateString !== null && endDateString.length !== 0) {
|
||||
endDate = moment(endDateString);
|
||||
}
|
||||
}
|
||||
|
||||
var newDurationValue = 0;
|
||||
|
||||
// Start- und Enddatum sind vorhanden und das Event wurde nicht vom Stunden/Minuten-Dropdown aufgerufen
|
||||
if(isStartTimeValid && isEndTimeValid && isInvocatedByHoursMinutesButton === false) {
|
||||
var startHHmm = parseTimeInputToIntegerArray(startTime);
|
||||
var endHHmm = parseTimeInputToIntegerArray(endTime);
|
||||
|
||||
startDate.hours(startHHmm[0]);
|
||||
startDate.minutes(startHHmm[1]);
|
||||
endDate.hours(endHHmm[0]);
|
||||
endDate.minutes(endHHmm[1]);
|
||||
|
||||
var momentDuration = moment.duration(endDate.diff(startDate));
|
||||
|
||||
if(durationNumber > 0 && isInvokedByStartElement && startDate >= endDate) {
|
||||
endDate = startDate.clone().add(durationNumber, durationFormat);
|
||||
|
||||
$(`#${endTimeId}`).val(endDate.format("HH:mm"));
|
||||
$(`#${endDatePickerId}`).val(endDate.format("DD.MM.yyyy"));
|
||||
|
||||
momentDuration = moment.duration(endDate.diff(startDate));
|
||||
}
|
||||
|
||||
if(durationNumber > 0 && isInvokedByEndElement && startDate >= endDate) {
|
||||
startDate = endDate.clone().subtract(durationNumber, durationFormat);
|
||||
|
||||
$(`#${startTimeId}`).val(startDate.format("HH:mm"));
|
||||
$(`#${startDatePickerId}`).val(startDate.format("DD.MM.yyyy"));
|
||||
|
||||
momentDuration = moment.duration(endDate.diff(startDate));
|
||||
}
|
||||
|
||||
newDurationValue = isInMin ? momentDuration.asMinutes() : momentDuration.asHours();
|
||||
|
||||
$(`#${durationId}`).val(newDurationValue);
|
||||
// Startdatum und Dauer sind vorhanden
|
||||
} else if(isStartTimeValid && isDurationValid) {
|
||||
if(isInvocatedByHoursMinutesButton) {
|
||||
durationNumber = isInMin ? durationNumber *= 60 : durationNumber /= 60;
|
||||
$(`#${durationId}`).val(durationNumber);
|
||||
}
|
||||
|
||||
calculateTimeWithDuration(startTime, $(`#${endTimeId}`), startDate, durationNumber, hoursMinutesDropdownBtnId);
|
||||
// Enddatum und Dauer sind vorhanden
|
||||
} else if(isEndTimeValid && isDurationValid) {
|
||||
if(isInvocatedByHoursMinutesButton) {
|
||||
durationNumber = isInMin ? durationNumber *= 60 : durationNumber /= 60;
|
||||
$(`#${durationId}`).val(durationNumber);
|
||||
}
|
||||
|
||||
calculateTimeWithDuration(endTime, $(`#${startTimeId}`), startDate, durationNumber * -1, hoursMinutesDropdownBtnId);
|
||||
} else if(isInvocatedByHoursMinutesButton) {
|
||||
// Wurde von Min zu Std oder Std zu Min
|
||||
if(isInvocatedByHoursMinutesButton && isDurationValid) {
|
||||
durationNumber = isInMin ? durationNumber * 60 : durationNumber / 60;
|
||||
$(`#${durationId}`).val(durationNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function calcDuration(idPrefix, isFormatChange, isInvokedByStart, isInvokedByEnd) {
|
||||
function calcDuration(idPrefix, isFormatChange, isInvokedByStart, isInvokedByEnd) {
|
||||
const endDateInput = $(`#${idPrefix}-end-date-input`);
|
||||
const startDateInput = $(`#${idPrefix}-start-date-input`);
|
||||
const endTimeInput = $(`#${idPrefix}-end-time-input`);
|
||||
const startTimeInput = $(`#${idPrefix}-start-time-input`);
|
||||
const durationInput = $(`#${idPrefix}-duration-input`);
|
||||
const hoursMinutesBtn = $(`#${idPrefix}-hours-minutes-dropdown-btn`);
|
||||
const durationLabel = $(`#${idPrefix}-duration-label`);
|
||||
|
||||
const startDateValue = startDateInput.val();
|
||||
const startTimeValue = startTimeInput.val();
|
||||
@@ -222,12 +13,14 @@ function calcDuration(idPrefix, isFormatChange, isInvokedByStart, isInvokedByEnd
|
||||
const endTimeValue = endTimeInput.val();
|
||||
const durationValue = durationInput.val();
|
||||
|
||||
//alert(hoursMinutesBtn.text());
|
||||
const isInMin = hoursMinutesBtn.length === 0 || hoursMinutesBtn.length > 0 && hoursMinutesBtn.text().replaceAll(/\s/g, "") === "Minuten";
|
||||
//alert(isInMin);
|
||||
const hasMinutesHoursDropdown = hoursMinutesBtn.length > 0;
|
||||
|
||||
const isInMin = (false === hasMinutesHoursDropdown && false === durationLabel.text().includes("(h)")) ||
|
||||
hasMinutesHoursDropdown === true && hoursMinutesBtn.text().replaceAll(/\s/g, "") === "Minuten";
|
||||
|
||||
const hasEndDate = endDateInput.length;
|
||||
|
||||
if (startDateValue.length === 0) {
|
||||
if(startDateValue.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -239,46 +32,39 @@ function calcDuration(idPrefix, isFormatChange, isInvokedByStart, isInvokedByEnd
|
||||
let start = new Date(startDateValue);
|
||||
let end = hasEndDate ? new Date(endDateValue) : start;
|
||||
|
||||
if (true === isStartTimeValid && true === isEndTimeValid && false === isFormatChange) {
|
||||
if(true === isStartTimeValid && true === isEndTimeValid && false === isFormatChange) {
|
||||
start = combineDateAndTime(start, startTimeValue);
|
||||
end = combineDateAndTime(end, endTimeValue);
|
||||
|
||||
let dauer = (end.getTime() - start.getTime()) / 60000;
|
||||
|
||||
if (duration > 0 && start >= end) {
|
||||
if(duration > 0 && start >= end) {
|
||||
dauer = (false === isInMin ? duration * 60 : duration);
|
||||
|
||||
if (true === isInvokedByStart) {
|
||||
if(true === isInvokedByStart) {
|
||||
end = new Date(start.getTime() + dauer * 60000);
|
||||
|
||||
endTimeInput.val(getTimeAsString(end));
|
||||
endDateInput.val(getDateAsString(end));
|
||||
}
|
||||
else if (true === isInvokedByEnd) {
|
||||
else if(true === isInvokedByEnd) {
|
||||
end.setDate(end.getDate() + 1);
|
||||
|
||||
var test = new Date(2025, 1, 31);
|
||||
test.setDate(test.getDate() + 1);
|
||||
//start = new Date(end.getTime() - dauer * 60000);
|
||||
|
||||
endTimeInput.val(getTimeAsString(end));
|
||||
endDateInput.val(getDateAsString(end));
|
||||
|
||||
//startTimeInput.val(getTimeAsString(start));
|
||||
//startDateInput.val(getDateAsString(start));
|
||||
}
|
||||
|
||||
dauer = (end.getTime() - start.getTime()) / 60000;
|
||||
}
|
||||
|
||||
if (false === isInMin) {
|
||||
if(false === isInMin) {
|
||||
dauer /= 60.0;
|
||||
}
|
||||
|
||||
durationInput.val(dauer);
|
||||
} else if (true === isStartTimeValid && true === isDurationValid) {
|
||||
} else if(true === isStartTimeValid && true === isDurationValid) {
|
||||
var newDuration = duration;
|
||||
if (true === isFormatChange) {
|
||||
if(true === isFormatChange) {
|
||||
let newDurationValue = true === isInMin ? duration * 60.0 : duration / 60.0;
|
||||
|
||||
if(isNaN(newDurationValue)) {
|
||||
@@ -286,7 +72,7 @@ function calcDuration(idPrefix, isFormatChange, isInvokedByStart, isInvokedByEnd
|
||||
} else {
|
||||
durationInput.val(newDurationValue);
|
||||
}
|
||||
if (true === isInMin)
|
||||
if(true === isInMin)
|
||||
{
|
||||
newDuration = newDurationValue;
|
||||
}
|
||||
@@ -334,7 +120,7 @@ function calcTimeWithDuration(timeAsString, timeElement, start, duration, isForm
|
||||
start = combineDateAndTime(start, timeAsString);
|
||||
|
||||
const x = new Date(start.getTime() + duration * 60000);
|
||||
var timeString = `${x.getHours().toString().padStart(2, "0")}:${x.getMinutes().toString().padStart(2, "0")}`;
|
||||
const timeString = `${x.getHours().toString().padStart(2, "0")}:${x.getMinutes().toString().padStart(2, "0")}`;
|
||||
timeElement.val(timeString);
|
||||
}
|
||||
|
||||
@@ -346,7 +132,11 @@ function beiDaueraenderung(idPrefix) {
|
||||
const durationInput = $(`#${idPrefix}-duration-input`);
|
||||
const startDateInput = $(`#${idPrefix}-start-date-input`);
|
||||
const endDateInput = $(`#${idPrefix}-end-date-input`);
|
||||
const isInMin = hoursMinutesDropdown.length === 0 || hoursMinutesDropdown.length > 0 && hoursMinutesDropdown.text().replaceAll(/\s/g, "") === "Minuten";
|
||||
const hoursMinutesBtn = $(`#${idPrefix}-hours-minutes-dropdown-btn`);
|
||||
const durationLabel = $(`#${idPrefix}-duration-label`);
|
||||
const hasMinutesHoursDropdown = hoursMinutesDropdown.length > 0;
|
||||
const isInMin = (false === hasMinutesHoursDropdown && false === durationLabel.text().includes("(h)")) ||
|
||||
hasMinutesHoursDropdown === true && hoursMinutesBtn.text().replaceAll(/\s/g, "") === "Minuten";
|
||||
|
||||
const startTimeCondition = startTimeInput.val().length > 0;
|
||||
const endTimeCondition = endTimeInput.val().length > 0;
|
||||
@@ -417,12 +207,4 @@ function getDateAsString(dateObject) {
|
||||
const month = (dateObject.getMonth() + 1).toString().padStart(2, "0");
|
||||
|
||||
return `${year}-${month}-${date}`;
|
||||
}
|
||||
|
||||
function dateToDateMonthFullYearStr(date) {
|
||||
const dayOfMonth = date.getDate();
|
||||
const month = date.getMonth() + 1;
|
||||
const fullYear = date.getFullYear();
|
||||
|
||||
return `${dayOfMonth}.${month}.${fullYear}`;
|
||||
}
|
||||
@@ -509,7 +509,11 @@ function setServiceDescription(id) {
|
||||
try {
|
||||
const url = window.getSetServiceDescriptionUrl();
|
||||
|
||||
const selectedServiceDescription = $(`#${id}`).find(":selected").val();
|
||||
const selectedOption = $(`#${id}`).find(":selected");
|
||||
|
||||
const selectedServiceDescription = selectedOption.val();
|
||||
|
||||
window.saveServiceDescriptionLocally(selectedServiceDescription);
|
||||
|
||||
$.get(url, {pServiceDescriptionOid: selectedServiceDescription});
|
||||
} catch(error) {
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
public static string SelectedGoalOids => "service-record-selected-goal-oids";
|
||||
public static string GroupBookingSelectedGroupOidsKey => "service-record-group-booking-employee-oids";
|
||||
public static string MultiBookingSelectedGroupOidsKey => "service-record-multi-booking-employee-oids";
|
||||
public static string BookingModeKey => "BookingMode";
|
||||
|
||||
|
||||
// Kalender
|
||||
@@ -95,5 +96,6 @@
|
||||
public static string AppointmentOidKey => "AppointmentOid";
|
||||
public static string AfterRestoreKey => "AfterRestore";
|
||||
public static string SaveSupportConceptDependenciesKey => "SaveSupportConceptDependencies";
|
||||
public static string DeleteLocalInputsKey => "DeleteLocalInputsKey";
|
||||
}
|
||||
}
|
||||
@@ -18,13 +18,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$("#date-of-birth-picker").datetimepicker({
|
||||
locale: "de",
|
||||
format: "L"
|
||||
});
|
||||
});
|
||||
|
||||
function resizeCustomerPrependElements() {
|
||||
try {
|
||||
let width = window.getMaxWidth("customer-prepend-text-eigenschaften");
|
||||
|
||||
@@ -4,18 +4,6 @@
|
||||
@model CustomerModel
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#customer-absence-time-start-date-picker, #customer-absence-time-end-date-picker").datetimepicker({
|
||||
locale: "de",
|
||||
format: "L"
|
||||
});
|
||||
|
||||
$("#customer-absence-time-start-time-picker, #customer-absence-time-end-time-picker").datetimepicker({
|
||||
locale: "de",
|
||||
format: "LT"
|
||||
});
|
||||
});
|
||||
|
||||
var initialDatePrependWidth = 0;
|
||||
function calcAbsenceTimePrependWidth() {
|
||||
try {
|
||||
|
||||
@@ -5,104 +5,72 @@
|
||||
@model BeWoPlanerMobil.Models.CustomerModel
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(".ownSoft-date-picker").datetimepicker({
|
||||
locale: "de",
|
||||
format: "L"
|
||||
});
|
||||
});
|
||||
|
||||
function resizeButtons() {
|
||||
try {
|
||||
const btnGroupMaxWidth = getMaxWidth("bk-btn-group");
|
||||
const btnGroupMaxWidth = getMaxWidth("bk-btn-group");
|
||||
|
||||
if(btnGroupMaxWidth > 0) {
|
||||
$(".bk-btn-group").width(btnGroupMaxWidth);
|
||||
}
|
||||
if(btnGroupMaxWidth > 0) {
|
||||
$(".bk-btn-group").width(btnGroupMaxWidth);
|
||||
}
|
||||
|
||||
const dateInputMaxWidth = getMaxWidth("date-input-prepend-group");
|
||||
const dateInputMaxWidth = getMaxWidth("date-input-prepend-group");
|
||||
|
||||
if(dateInputMaxWidth > 0) {
|
||||
$(".date-input-prepend-group").width(dateInputMaxWidth);
|
||||
}
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
if(dateInputMaxWidth > 0) {
|
||||
$(".date-input-prepend-group").width(dateInputMaxWidth);
|
||||
}
|
||||
}
|
||||
|
||||
function deselectBargeldkasse() {
|
||||
try {
|
||||
$.get("@Url.Action("DeselectBargeldkasse")");
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
}
|
||||
$.get("@Url.Action("DeselectBargeldkasse")");
|
||||
}
|
||||
|
||||
function editBtnClickTest(bargeldkassenOid, bargeldkassenname) {
|
||||
try {
|
||||
showSpinner();
|
||||
showSpinner();
|
||||
|
||||
$("#customer-bargeldkassen-modal-body").load("@Url.Action("LoadEditFormPartial")", {bargeldkassenOid: bargeldkassenOid}, function () {
|
||||
hideSpinner();
|
||||
$("#customer-bargeldkassen-form-popup-title").text(`${bargeldkassenname} bearbeiten`);
|
||||
$("#customer-bargeldkassen-form-popup").modal("show");
|
||||
window.calcBargeldkassenFormPrependWidth();
|
||||
});
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
}
|
||||
$("#customer-bargeldkassen-modal-body").load("@Url.Action("LoadEditFormPartial")", {bargeldkassenOid: bargeldkassenOid}, function () {
|
||||
hideSpinner();
|
||||
$("#customer-bargeldkassen-form-popup-title").text(`${bargeldkassenname} bearbeiten`);
|
||||
$("#customer-bargeldkassen-form-popup").modal("show");
|
||||
window.calcBargeldkassenFormPrependWidth();
|
||||
});
|
||||
}
|
||||
|
||||
function deleteBtnClickTest(bargeldkassenOid, bargeldkassenname) {
|
||||
try {
|
||||
|
||||
showMessagePopupWithHtmlAndCallback(`Bargeldkasse löschen`, `Möchten Sie die Bargeldkasse "${bargeldkassenname}" wirklich löschen?`, true, function () {
|
||||
showSpinner();
|
||||
$("#bk-to-delete-oid").val(bargeldkassenOid);
|
||||
document.getElementById("bargeldkassendeleteform").submit();
|
||||
}, false);
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
}
|
||||
showMessagePopupWithHtmlAndCallback(`Bargeldkasse löschen`, `Möchten Sie die Bargeldkasse "${bargeldkassenname}" wirklich löschen?`, true, function () {
|
||||
showSpinner();
|
||||
$("#bk-to-delete-oid").val(bargeldkassenOid);
|
||||
document.getElementById("bargeldkassendeleteform").submit();
|
||||
}, false);
|
||||
}
|
||||
|
||||
function addNewBargeldkasse() {
|
||||
try {
|
||||
showSpinner();
|
||||
$("#customer-bargeldkassen-modal-body").load("@Url.Action("LoadFormPartial")",
|
||||
function () {
|
||||
hideSpinner();
|
||||
$("#customer-bargeldkassen-form-popup-title").text("Bargeldkasse hinzufügen");
|
||||
$("#customer-bargeldkassen-form-popup").modal("show");
|
||||
window.calcBargeldkassenFormPrependWidth();
|
||||
});
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
}
|
||||
showSpinner();
|
||||
$("#customer-bargeldkassen-modal-body").load("@Url.Action("LoadFormPartial")",
|
||||
function () {
|
||||
hideSpinner();
|
||||
$("#customer-bargeldkassen-form-popup-title").text("Bargeldkasse hinzufügen");
|
||||
$("#customer-bargeldkassen-form-popup").modal("show");
|
||||
window.calcBargeldkassenFormPrependWidth();
|
||||
});
|
||||
}
|
||||
|
||||
function previewBargeldkassenReport(bargeldkassenOid) {
|
||||
try {
|
||||
showSpinner();
|
||||
showSpinner();
|
||||
|
||||
const start = $(`#customer-bargeldkasse-start-date-${bargeldkassenOid}`).val();
|
||||
const end = $(`#customer-bargeldkasse-end-date-${bargeldkassenOid}`).val();
|
||||
const start = $(`#customer-bargeldkasse-start-date-${bargeldkassenOid}`).val();
|
||||
const end = $(`#customer-bargeldkasse-end-date-${bargeldkassenOid}`).val();
|
||||
|
||||
$("#customer-report-popup-container").load("@Url.Action("PrintBargeldkasse")",
|
||||
{
|
||||
kassenbuchOid: bargeldkassenOid,
|
||||
reportStartDate: start,
|
||||
reportEndDate: end
|
||||
},
|
||||
function () {
|
||||
hideSpinner();
|
||||
$("#customer-report-popup-container").load("@Url.Action("PrintBargeldkasse")",
|
||||
{
|
||||
kassenbuchOid: bargeldkassenOid,
|
||||
reportStartDate: start,
|
||||
reportEndDate: end
|
||||
},
|
||||
function () {
|
||||
hideSpinner();
|
||||
|
||||
$("#bewo-report-popup").modal("show");
|
||||
}
|
||||
);
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
}
|
||||
$("#bewo-report-popup").modal("show");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$(window).on("load", function () {
|
||||
@@ -111,45 +79,37 @@
|
||||
|
||||
var initialDateInputWidth = 0;
|
||||
function calculateDateInputWidth() {
|
||||
try {
|
||||
const bargeldkassenDateInputMaxWidth = getMaxWidth("customer-bargeldkassen-date-prepend");
|
||||
const bargeldkassenDateInputMaxWidth = getMaxWidth("customer-bargeldkassen-date-prepend");
|
||||
|
||||
if(initialDateInputWidth <= 0 && $.isNumeric(bargeldkassenDateInputMaxWidth)) {
|
||||
initialDateInputWidth = bargeldkassenDateInputMaxWidth;
|
||||
}
|
||||
|
||||
if (initialDateInputWidth <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(".customer-bargeldkassen-date-prepend").width(bargeldkassenDateInputMaxWidth);
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
if(initialDateInputWidth <= 0 && $.isNumeric(bargeldkassenDateInputMaxWidth)) {
|
||||
initialDateInputWidth = bargeldkassenDateInputMaxWidth;
|
||||
}
|
||||
|
||||
if (initialDateInputWidth <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(".customer-bargeldkassen-date-prepend").width(bargeldkassenDateInputMaxWidth);
|
||||
}
|
||||
|
||||
function deleteBargeldransaktion(transaktionsOid) {
|
||||
try {
|
||||
if(false === $.isNumeric(transaktionsOid)) {
|
||||
window.showErrorMessagePopup("Es ist ein Fehler beim Löschen einer Transaktion gekommen. Bitte wenden Sie sich an Ihren Administrator");
|
||||
}
|
||||
|
||||
showMessagePopupWithCallback("Transaktion löschen",
|
||||
"Möchten Sie den Eintrag wirklich löschen?",
|
||||
function () {
|
||||
showSpinner();
|
||||
$("#bargeldkassen-container").load("@Url.Action("DeleteBargeldtransaktion")",
|
||||
{
|
||||
bargeldtransaktionsOid: transaktionsOid
|
||||
},
|
||||
function() {
|
||||
hideSpinner();
|
||||
});
|
||||
},
|
||||
false);
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
if(false === $.isNumeric(transaktionsOid)) {
|
||||
window.showErrorMessagePopup("Es ist ein Fehler beim Löschen einer Transaktion gekommen. Bitte wenden Sie sich an Ihren Administrator");
|
||||
}
|
||||
|
||||
showMessagePopupWithCallback("Transaktion löschen",
|
||||
"Möchten Sie den Eintrag wirklich löschen?",
|
||||
function () {
|
||||
showSpinner();
|
||||
$("#bargeldkassen-container").load("@Url.Action("DeleteBargeldtransaktion")",
|
||||
{
|
||||
bargeldtransaktionsOid: transaktionsOid
|
||||
},
|
||||
function() {
|
||||
hideSpinner();
|
||||
});
|
||||
},
|
||||
false);
|
||||
}
|
||||
|
||||
function signZahlungsbeleg(transaktionsOid, zahlungsdatum, zahlungsart, zahlungsbetrag, zahlungsbelegnummer) {
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
var initialBargeldtransaktionsFormPrependWidth = 0;
|
||||
function calcBargeldtransaktionsFormPrependWidth() {
|
||||
try {
|
||||
var maxWidth = getMaxWidth("customer-bargeldtransaktion-prepend");
|
||||
const maxWidth = getMaxWidth("customer-bargeldtransaktion-prepend");
|
||||
if(initialBargeldtransaktionsFormPrependWidth <= 0 && $.isNumeric(maxWidth)) {
|
||||
initialBargeldtransaktionsFormPrependWidth = maxWidth;
|
||||
}
|
||||
|
||||
if (initialBargeldtransaktionsFormPrependWidth <= 0) {
|
||||
if(initialBargeldtransaktionsFormPrependWidth <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,15 +96,6 @@ namespace BeWoPlanerMobil.Views.DevExpressScheduler
|
||||
settings.Views.MonthView.AppointmentDisplayOptions.ShowRecurrence = true;
|
||||
settings.Views.MonthView.MonthViewStyles.DateCellBody.Height = Unit.Pixel(170);
|
||||
|
||||
settings.Views.FullWeekView.Enabled = true;
|
||||
settings.Views.WeekView.Enabled = false;
|
||||
settings.Views.MonthView.ResourcesPerPage = 1;
|
||||
settings.Views.MonthView.AppointmentDisplayOptions.StartTimeVisibility = AppointmentTimeVisibility.Never;
|
||||
settings.Views.MonthView.AppointmentDisplayOptions.EndTimeVisibility = AppointmentTimeVisibility.Never;
|
||||
settings.Views.MonthView.AppointmentDisplayOptions.StatusDisplayType = AppointmentStatusDisplayType.Bounds;
|
||||
settings.Views.MonthView.AppointmentDisplayOptions.ShowRecurrence = true;
|
||||
settings.Views.MonthView.MonthViewStyles.DateCellBody.Height = Unit.Pixel(170);
|
||||
|
||||
TimeScale[] timeScales =
|
||||
{
|
||||
new TimeScaleYear { Enabled = false },
|
||||
@@ -122,9 +113,6 @@ namespace BeWoPlanerMobil.Views.DevExpressScheduler
|
||||
settings.Storage.Resources.Assign(DefaultResourceStorage);
|
||||
settings.Storage.Appointments.Assign(DefaultAppointmentStorage);
|
||||
|
||||
settings.Storage.Appointments.Assign(DefaultAppointmentStorage);
|
||||
settings.Storage.Resources.Assign(DefaultResourceStorage);
|
||||
|
||||
settings.Views.DayView.Styles.ScrollAreaHeight = new Unit(500);
|
||||
|
||||
return settings;
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
settings.Storage.Appointments.Mappings.Description = nameof(SchedulerAppointmentDC.Description);
|
||||
settings.Storage.Appointments.Mappings.Status = nameof(SchedulerAppointmentDC.Status);
|
||||
settings.Storage.Appointments.Mappings.Label = nameof(SchedulerAppointmentDC.LabelKey);
|
||||
settings.Storage.Appointments.Mappings.Type = nameof(SchedulerAppointmentDC.Type);
|
||||
|
||||
settings.Views.DayView.Styles.ScrollAreaHeight = new Unit(500);
|
||||
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
{
|
||||
<div class="form-group">
|
||||
<label for="tenantFormControl">Kundennummer</label>
|
||||
<input id="tenantFormControl" name="tb_tenant" type="text" class="form-control" placeholder="Kundennummer" value="@LoginModel.Tenant" required>
|
||||
<input id="tenantFormControl" autocapitalize="false" name="tb_tenant" type="text" class="form-control" placeholder="Kundennummer" value="@LoginModel.Tenant" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="userNameFormControl">Benutzername</label>
|
||||
<input id="userNameFormControl" name="tb_login" type="text" class="form-control" placeholder="Benutzername" value="@userName" required>
|
||||
<input id="userNameFormControl" autocapitalize="false" name="tb_login" type="text" class="form-control" placeholder="Benutzername" value="@userName" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="passwordFormControl">Passwort</label>
|
||||
|
||||
@@ -39,9 +39,12 @@
|
||||
}
|
||||
|
||||
function setSelectedServiceCategory() {
|
||||
const selectedCategoryOid = $("#@prefix-category-select").find(":selected").val();
|
||||
const selectedCategoryOid = $("#@(Model.BookingModePrefix)-category-select").find(":selected").val();
|
||||
|
||||
$("#category-to-description-container").load("@Url.Action("SetSelectedServiceCategory")", {categoryOidStr: selectedCategoryOid}, function() {
|
||||
window.saveServiceCategoryLocally($("#@prefix-category-select").find(":selected").val());
|
||||
window.saveServiceDescriptionLocally($("#@prefix-leistung-select").find(":selected").val());
|
||||
|
||||
$("#category-to-description-container").load("@Url.Action("SetSelectedServiceCategory")", {categoryOidStr: selectedCategoryOid}, function() {
|
||||
$("#tree").load("@Url.Action("LoadUpToDateTextModules")");
|
||||
});
|
||||
}
|
||||
@@ -50,8 +53,12 @@
|
||||
window.calcPrependWidth();
|
||||
|
||||
window.addEventListener("load", function() {
|
||||
$("#@prefix-category-select, #@prefix-leistung-select").on("change", function() {
|
||||
saveItemValueLocally(this);
|
||||
$("#@prefix-category-select").on("change", function() {
|
||||
window.saveServiceCategoryLocally($("#@prefix-category-select").find(":selected").val());
|
||||
});
|
||||
|
||||
$("#@prefix-leistung-select").on("change", function() {
|
||||
window.saveServiceDescriptionLocally($("#@prefix-leistung-select").find(":selected").val());
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -112,7 +119,7 @@
|
||||
var oid = serviceDescription.ServiceDescriptionOid;
|
||||
|
||||
var selected = selectedServiceDescription.Equals(serviceDescription) ? " selected" : string.Empty;
|
||||
<option id="@prefix-service-description-@oid" value="@serviceDescription.ServiceDescriptionOid"@selected>@serviceDescription.Name</option>
|
||||
<option id="@prefix-service-description-@oid" value="@serviceDescription.ServiceDescriptionOid" @selected>@serviceDescription.Name</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
<button id="gb-hours-minutes-dropdown-btn" class="btn btn-outline-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
@Model.SelectedDurationUnit
|
||||
</button>
|
||||
<div class="dropdown-menu w-100">
|
||||
<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>
|
||||
@@ -293,7 +293,7 @@
|
||||
{
|
||||
<div class="form-group">
|
||||
<label for="gb-dokufeld-textarea">Dokumentation</label>
|
||||
<textarea class="form-control" autocomplete="on" name="Dokumentation6" id="gb-dokufeld-textarea">@notice0</textarea>
|
||||
<textarea class="form-control" autocomplete="on" name="Dokumentation6" id="gb-doku-textarea">@notice0</textarea>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
|
||||
@@ -272,8 +272,8 @@
|
||||
@if(Model.NumberOfDokuTypes == 0)
|
||||
{
|
||||
<div class="form-group mt-2">
|
||||
<label for="mb-dokufeld-textarea">Dokumentation</label>
|
||||
<textarea class="form-control" autocomplete="on" name="Dokumentation6" id="mb-dokufeld-textarea">@notice0</textarea>
|
||||
<label for="mb-doku-textarea">Dokumentation</label>
|
||||
<textarea class="form-control" autocomplete="on" name="Dokumentation6" id="mb-doku-textarea">@notice0</textarea>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
multiBookingGroupOids;
|
||||
groupBookingEmployeeOids;
|
||||
multiBookingEmployeeOids;
|
||||
selectedServiceDescription;
|
||||
selectedServiceCategory;
|
||||
|
||||
constructor(id, inputList) {
|
||||
this.id = id;
|
||||
@@ -41,7 +43,7 @@
|
||||
}
|
||||
|
||||
clearInputList() {
|
||||
if (this.inputList === null || this.inputList === undefined) {
|
||||
if(this.inputList === null || this.inputList === undefined) {
|
||||
this.inputList = [];
|
||||
}
|
||||
|
||||
@@ -53,10 +55,10 @@
|
||||
removeItemById(id) {
|
||||
const newInputList = [];
|
||||
|
||||
for (let i = 0; i < this.inputList.length; i++) {
|
||||
for(let i = 0; i < this.inputList.length; i++) {
|
||||
const input = this.inputList[i];
|
||||
|
||||
if (input.inputId !== id) {
|
||||
if(input.inputId !== id) {
|
||||
newInputList.push(input);
|
||||
}
|
||||
}
|
||||
@@ -69,10 +71,10 @@
|
||||
removeItemByName(name) {
|
||||
const newInputList = [];
|
||||
|
||||
for (let i = 0; i < this.inputList.length; i++) {
|
||||
for(let i = 0; i < this.inputList.length; i++) {
|
||||
const input = this.inputList[i];
|
||||
|
||||
if (input.inputName !== name) {
|
||||
if(input.inputName !== name) {
|
||||
newInputList.push(input);
|
||||
}
|
||||
}
|
||||
@@ -83,7 +85,7 @@
|
||||
}
|
||||
|
||||
addInputValue(inputId, inputName, inputType, inputValue, timeStamp) {
|
||||
if (inputType === "radio") {
|
||||
if(inputType === "radio") {
|
||||
this.removeItemByName(inputName);
|
||||
}
|
||||
|
||||
@@ -112,7 +114,7 @@
|
||||
const result = [];
|
||||
|
||||
this.inputList.map((item) => {
|
||||
if (item.inputName === name) {
|
||||
if(item.inputName === name) {
|
||||
result.push(item);
|
||||
}
|
||||
});
|
||||
@@ -232,6 +234,80 @@
|
||||
|
||||
localStorage.setItem(this.id, JSON.stringify(this));
|
||||
}
|
||||
|
||||
updateServiceDescription(serviceDescriptionOid) {
|
||||
this.selectedServiceDescription = serviceDescriptionOid;
|
||||
logInfo3(`Leistung ${this.selectedServiceDescription} lokal gespeichert`);
|
||||
localStorage.setItem(this.id, JSON.stringify(this));
|
||||
}
|
||||
|
||||
updateServiceCategory(serviceCategoryOid) {
|
||||
this.selectedServiceCategory = serviceCategoryOid;
|
||||
|
||||
localStorage.setItem(this.id, JSON.stringify(this));
|
||||
}
|
||||
|
||||
print() {
|
||||
let gbCb2ScOids = "";
|
||||
for(let i = 0; i < this.groupBookingCb2ScRelOids; i++) {
|
||||
gbCb2ScOids += `${this.groupBookingCb2ScRelOids[i]}, `;
|
||||
}
|
||||
gbCb2ScOids = gbCb2ScOids.trim();
|
||||
|
||||
let gbGroupOids = "";
|
||||
for(let i = 0; i < this.groupBookingGroupOids; i++) {
|
||||
gbGroupOids += `${this.groupBookingGroupOids[i]}, `;
|
||||
}
|
||||
gbGroupOids = gbGroupOids.trim();
|
||||
|
||||
let gbEmployeeOids = "";
|
||||
for(let i = 0; i < this.groupBookingEmployeeOids; i++) {
|
||||
gbEmployeeOids += `${this.groupBookingEmployeeOids[i]}, `;
|
||||
}
|
||||
gbEmployeeOids = gbEmployeeOids.trim();
|
||||
|
||||
let mbCb2ScOids = "";
|
||||
for(let i = 0; i < this.multiBookingCb2ScRelOids; i++) {
|
||||
mbCb2ScOids += `${this.multiBookingCb2ScRelOids[i]}, `;
|
||||
}
|
||||
mbCb2ScOids = mbCb2ScOids.trim();
|
||||
|
||||
let mbGroupOids = "";
|
||||
for(let i = 0; i < this.multiBookingGroupOids; i++) {
|
||||
mbGroupOids += `${this.multiBookingGroupOids[i]}, `;
|
||||
}
|
||||
mbGroupOids = mbGroupOids.trim();
|
||||
|
||||
let mbEmployeeOids = "";
|
||||
for(let i = 0; i < this.multiBookingEmployeeOids; i++) {
|
||||
mbEmployeeOids = `${this.multiBookingEmployeeOids[i]}, `;
|
||||
}
|
||||
mbEmployeeOids = mbEmployeeOids.trim();
|
||||
|
||||
let output =
|
||||
"Lese lokalen BeWo-Speicher aus:\r\n" +
|
||||
"----------------------------------------------\r\n" +
|
||||
`Id: ${this.id}\r\n` +
|
||||
"----------------------------------------------\r\n" +
|
||||
`HPs Gruppenbuchung: ${gbCb2ScOids}\r\n` +
|
||||
`Gruppen Gruppenbuchung: ${gbGroupOids}\r\n` +
|
||||
`MAs Gruppenbuchung: ${gbEmployeeOids}\r\n` +
|
||||
"----------------------------------------------\r\n" +
|
||||
`HPs Mehrfachbuchung: ${mbCb2ScOids}\r\n` +
|
||||
`Gruppen Mehrfachbuchung: ${mbGroupOids}\r\n` +
|
||||
`MAs Mehrfachbuchung: ${mbEmployeeOids}\r\n` +
|
||||
"----------------------------------------------\r\n" +
|
||||
`Leistung: ${this.selectedServiceDescription}\r\n` +
|
||||
"----------------------------------------------\r\n";
|
||||
|
||||
for(let i = 0; i < this.inputList.length; i++) {
|
||||
const input = this.inputList[i];
|
||||
|
||||
output += `${input.inputId}; ${input.inputValue}; ${input.inputType}; ${input.inputName}; ${input.timeStamp}\r\n`;
|
||||
}
|
||||
|
||||
logColorfulMessage(output, "#FF5A00");
|
||||
}
|
||||
}
|
||||
|
||||
function getLocalStorageKey() {
|
||||
@@ -305,14 +381,28 @@
|
||||
toggleRestoreButton();
|
||||
}
|
||||
|
||||
function saveServiceDescriptionLocally(serviceDescriptionOid) {
|
||||
const beWoStorage = getBeWoStorage();
|
||||
|
||||
beWoStorage.updateServiceDescription(serviceDescriptionOid);
|
||||
|
||||
const storage = getBeWoStorage();
|
||||
logInfo2(`Leistungs-Oid: ${storage.selectedServiceDescription}`);
|
||||
}
|
||||
|
||||
function saveServiceCategoryLocally(serviceCategoryOid) {
|
||||
const beWoStorage = getBeWoStorage();
|
||||
|
||||
beWoStorage.updateServiceCategory(serviceCategoryOid);
|
||||
}
|
||||
|
||||
function restoreAllFields() {
|
||||
const beWoStorage = getBeWoStorage();
|
||||
|
||||
$.each(beWoStorage.inputList, (index, item) => {
|
||||
logInfo3(`Id: ${item.inputId}; Wert: ${item.inputValue};`);
|
||||
});
|
||||
//$.each(beWoStorage.inputList, (index, item) => {
|
||||
// logInfo3(`Id: ${item.inputId}; Wert: ${item.inputValue};`);
|
||||
//});
|
||||
|
||||
// ToDo: die versteckten Felder ausfüllen und das Formular an den Server schicken, wo ein neues ServiceRecord-Objekt mithilfe des versteckten Formulars erzeugt wird.
|
||||
$("#srr-gb-cb2sc-oids").val(beWoStorage.groupBookingCb2ScRelOids);
|
||||
$("#srr-gb-group-oids").val(beWoStorage.groupBookingGroupOids);
|
||||
$("#srr-gb-emp-oids").val(beWoStorage.groupBookingEmployeeOids);
|
||||
@@ -321,38 +411,40 @@
|
||||
$("#srr-mb-group-oids").val(beWoStorage.multiBookingGroupOids);
|
||||
$("#srr-mb-emp-oids").val(beWoStorage.multiBookingEmployeeOids);
|
||||
|
||||
window.saveItemValueLocally(document.getElementById("sb-start-date-input"));
|
||||
window.saveItemValueLocally(document.getElementById("gb-start-date-input"));
|
||||
window.saveItemValueLocally(document.getElementById("mb-start-date-input"));
|
||||
|
||||
window.saveItemValueLocally(document.getElementById("sb-end-date-input"));
|
||||
window.saveItemValueLocally(document.getElementById("gb-end-date-input"));
|
||||
window.saveItemValueLocally(document.getElementById("mb-end-date-input"));
|
||||
|
||||
$.each(beWoStorage.inputList, (index, item) => {
|
||||
if (item.inputType === "checkbox") {
|
||||
$(`#${item.inputId}`).prop("checked", item.inputValue);
|
||||
} else {
|
||||
$(`#${item.inputId}`).val(item.inputValue);
|
||||
}
|
||||
|
||||
let inputId = item.inputId;
|
||||
if(item.inputId.startsWith("sb-") || item.inputId.startsWith("gb-") || item.inputId.startsWith("mb-")) {
|
||||
inputId = item.inputId.slice(3);
|
||||
}
|
||||
|
||||
if(inputId === "doku-textarea") {
|
||||
inputId += "-6";
|
||||
}
|
||||
|
||||
logInfo(`Id: ${inputId}; Wert: ${item.inputValue};`);
|
||||
//$(`#srr-${inputId}`).val(item.inputValue);
|
||||
|
||||
//$(`#${item.inputId}`).trigger("change");
|
||||
});
|
||||
|
||||
$("#restore-service-record-form").submit();
|
||||
const gbStartDateInput = $("#gb-start-date-input");
|
||||
const mbStartDateInput = $("#mb-start-date-input");
|
||||
|
||||
let bookingMode = 0;
|
||||
|
||||
if(gbStartDateInput.length) {
|
||||
bookingMode = 1;
|
||||
} else if(mbStartDateInput.length) {
|
||||
bookingMode = 2;
|
||||
}
|
||||
|
||||
beWoStorage.print();
|
||||
|
||||
//$("#srr-booking-mode").val(bookingMode);
|
||||
|
||||
|
||||
//$("#restore-service-record-form").submit();
|
||||
}
|
||||
|
||||
$(window).ready(function() {
|
||||
const sbDate = $("#sb-start-date-input").val();
|
||||
const gbDate = $("#gb-start-date-input").val();
|
||||
const mbDate = $("#mb-start-date-input").val();
|
||||
|
||||
logInfo(`Einzelbuchung: ${sbDate}\r\nGruppenbuchung: ${gbDate}\r\nMehrfachbuchung: ${mbDate}`);
|
||||
});
|
||||
</script>
|
||||
|
||||
@using(Html.BeginForm("RestoreServiceRecordForm", "Main", FormMethod.Post, new {id="restore-service-record-form"}))
|
||||
@@ -368,7 +460,6 @@
|
||||
<input type="hidden" id="srr-doku-textarea-5" name="@FormCollectionConstants.Dokumentation5Key" />
|
||||
<input type="hidden" id="srr-doku-textarea-6" name="@FormCollectionConstants.Dokumentation6Key" />
|
||||
<input type="hidden" id="srr-distance-input" name="@FormCollectionConstants.DistanceKey" />
|
||||
<input type="hidden" id="srr-form-id" name="@FormCollectionConstants.FormIdKey" />
|
||||
<input type="hidden" id="srr-marker-cb" name="@FormCollectionConstants.MarkerKey" />
|
||||
<input type="hidden" id="srr-leistung-select" name="@FormCollectionConstants.ServiceDescriptionKey" />
|
||||
<input type="hidden" id="srr-duration-input" name="@FormCollectionConstants.DurationKey" />
|
||||
@@ -384,6 +475,8 @@
|
||||
<input type="hidden" id="srr-mb-emp-oids" name="@FormCollectionConstants.MultiBookingSelectedEmployeeOidsKey" />
|
||||
<input type="hidden" id="srr-mb-group-oids" name="@FormCollectionConstants.MultiBookingSelectedGroupOidsKey" />
|
||||
|
||||
<input type="hidden" id="srr-booking-mode" name="@FormCollectionConstants.BookingModeKey"/>
|
||||
|
||||
<button type="button" class="btn btn-bewo-dev bewo-restore-btn" onclick="window.restoreAllFields()">
|
||||
<i class="fas fa-recycle"></i>
|
||||
</button>
|
||||
|
||||
@@ -282,7 +282,6 @@
|
||||
@* ----- Einzelbuchung: Ziele ----- *@
|
||||
@if(Model.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
|
||||
{
|
||||
<!-- Einzelbuchung: Ziele -->
|
||||
<div class="form-row">
|
||||
<div class="col-md mt-2">
|
||||
<button type="button" class="btn btn-primary form-control" data-toggle="modal" data-target="#goal-popup" id="goals-button">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
@using BeWoPlanerMobil.Models
|
||||
@using BeWoPlanerMobil.Service
|
||||
@using BeWoPlanerMobil.Util
|
||||
@using DevExpress.XtraReports.Web
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -50,15 +51,15 @@
|
||||
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/moment/moment.min.js")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/moment/locale/de.js")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/mobileUtils.js?v=1.3")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/mobileUtils.js?v=1.4")"></script>
|
||||
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/view-scripts/main.js?v=1.6")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/signature.js?v=1.4")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/view-scripts/main.js?v=1.7")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/signature.js?v=1.5")"></script>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="@Url.Content("~/Scripts/bootstrap/bootstrap4-modal-fullscreen.min.css")" />
|
||||
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/support-concept-statistics.js?v=1.4")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/view-scripts/customer.js?v=1.4")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/support-concept-statistics.js?v=1.5")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/view-scripts/customer.js?v=1.5")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/view-scripts/scheduler.js?v=1.4")"></script>
|
||||
|
||||
<script type="text/javascript" src="@Url.Content("~/Scripts/ownSoft-Scripts/view-scripts/report.js?v=1.4")"></script>
|
||||
@@ -66,7 +67,7 @@
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/trimCanvas.js?v=1.4")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/resources-list-utils.js?v=1.4")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/list-utils.js?v=1.4")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js?v=1.43")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js?v=1.6")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/js-helper.js?v=1.4")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/logging.js?v=1.4")"></script>
|
||||
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/MoKPasswordSecurity.js?v=1.4")"></script>
|
||||
@@ -79,16 +80,19 @@
|
||||
<link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/dx.light.css")" />
|
||||
|
||||
@Html.DevExpress().GetStyleSheets(
|
||||
ASPxWebClientUIControl.ColorSchemeLight,
|
||||
new StyleSheet { ExtensionSuite = ExtensionSuite.NavigationAndLayout, Theme = "Default" },
|
||||
new StyleSheet { ExtensionSuite = ExtensionSuite.Report },
|
||||
new StyleSheet { ExtensionType = ExtensionType.WebDocumentViewer }
|
||||
ASPxWebClientUIControl.ColorSchemeLight,
|
||||
new StyleSheet { ExtensionSuite = ExtensionSuite.NavigationAndLayout, Theme = "Default" },
|
||||
new StyleSheet { ExtensionSuite = ExtensionSuite.Report },
|
||||
new StyleSheet { ExtensionType = ExtensionType.WebDocumentViewer },
|
||||
new StyleSheet { ExtensionSuite = ExtensionSuite.Scheduler }
|
||||
)
|
||||
|
||||
@Html.DevExpress().GetScripts(
|
||||
new Script { ExtensionSuite = ExtensionSuite.NavigationAndLayout },
|
||||
new Script { ExtensionSuite = ExtensionSuite.Icons },
|
||||
new Script { ExtensionType = ExtensionType.WebDocumentViewer }
|
||||
new Script { ExtensionType = ExtensionType.WebDocumentViewer },
|
||||
new Script { ExtensionType= ExtensionType.AppointmentRecurrenceForm},
|
||||
new Script { ExtensionSuite = ExtensionSuite.Scheduler }
|
||||
)
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
Reference in New Issue
Block a user