123
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_0058b22e-bf9c-4341-b180-8a805ee21d6f",
|
||||
"id": "Sitzplätze__$Bff$_Bff",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff",
|
||||
"unpublishedCollection": {
|
||||
"contextType": "PAGE",
|
||||
"name": "_$Bff$_Bff",
|
||||
"pageId": "Sitzplätze",
|
||||
"pluginId": "js-plugin",
|
||||
"pluginType": "JS"
|
||||
}
|
||||
}
|
||||
@@ -4,84 +4,77 @@ export default {
|
||||
const selection = calendarModel.calendarSelection || null;
|
||||
|
||||
if (!selection) {
|
||||
showAlert(
|
||||
"Bitte zuerst einen Tag oder Zeitraum auswählen.",
|
||||
"warning"
|
||||
);
|
||||
showAlert("Bitte zuerst einen Tag oder Zeitraum auswählen.", "warning");
|
||||
return;
|
||||
}
|
||||
|
||||
function pad(value) {
|
||||
return String(value).padStart(2, "0");
|
||||
}
|
||||
const pad = (value) => String(value).padStart(2, "0");
|
||||
|
||||
function parseLocalDateTime(value) {
|
||||
const parseLocalDateTime = (value) => {
|
||||
if (!value) return null;
|
||||
|
||||
const text = String(value).trim();
|
||||
const parts = text.split(/[-T:]/g);
|
||||
const match = text.match(
|
||||
/^(\d{4})-(\d{2})-(\d{2})(?:T|\s)?(\d{2})?:?(\d{2})?:?(\d{2})?$/
|
||||
);
|
||||
|
||||
if (parts.length < 3) return null;
|
||||
if (!match) return null;
|
||||
|
||||
const date = new Date(
|
||||
Number(parts[0]),
|
||||
Number(parts[1]) - 1,
|
||||
Number(parts[2]),
|
||||
Number(parts[3] || 0),
|
||||
Number(parts[4] || 0),
|
||||
Number(parts[5] || 0)
|
||||
Number(match[1]),
|
||||
Number(match[2]) - 1,
|
||||
Number(match[3]),
|
||||
Number(match[4] || 0),
|
||||
Number(match[5] || 0),
|
||||
Number(match[6] || 0)
|
||||
);
|
||||
|
||||
return Number.isNaN(date.getTime()) ? null : date;
|
||||
}
|
||||
};
|
||||
|
||||
function formatDate(date) {
|
||||
return [
|
||||
const formatDate = (date) => [
|
||||
date.getFullYear(),
|
||||
pad(date.getMonth() + 1),
|
||||
pad(date.getDate())
|
||||
].join("-");
|
||||
}
|
||||
|
||||
function formatTime(date) {
|
||||
return [
|
||||
const formatTime = (date) => [
|
||||
pad(date.getHours()),
|
||||
pad(date.getMinutes())
|
||||
].join(":");
|
||||
}
|
||||
|
||||
function formatDateTimeForSql(date) {
|
||||
return `${formatDate(date)} ${formatTime(date)}:00`;
|
||||
}
|
||||
const formatDateTimeForSql = (date) =>
|
||||
`${formatDate(date)} ${formatTime(date)}:00`;
|
||||
|
||||
const start = parseLocalDateTime(selection.start);
|
||||
const end = parseLocalDateTime(selection.end);
|
||||
|
||||
if (!start || !end) {
|
||||
if (!start || !end || end <= start) {
|
||||
showAlert(
|
||||
"Die Kalenderauswahl enthält kein gültiges Datum.",
|
||||
"Die Kalenderauswahl enthält kein gültiges Datum oder Zeitintervall.",
|
||||
"error"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const seatModel = Custom4.model || {};
|
||||
|
||||
const seatId = String(
|
||||
Custom4.model?.seatId ||
|
||||
seatModel.seatId ||
|
||||
seatModel.selectedSeat?.id ||
|
||||
appsmith.store.selectedSeatId ||
|
||||
""
|
||||
).trim();
|
||||
|
||||
const seatName = String(
|
||||
Custom4.model?.seatName ||
|
||||
seatModel.seatName ||
|
||||
seatModel.selectedSeat?.name ||
|
||||
appsmith.store.selectedSeatName ||
|
||||
""
|
||||
).trim();
|
||||
|
||||
if (!seatId) {
|
||||
showAlert(
|
||||
"Es wurde kein Sitzplatz ausgewählt.",
|
||||
"error"
|
||||
);
|
||||
showAlert("Es wurde kein Sitzplatz ausgewählt.", "error");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,58 +91,86 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
const isAllDay =
|
||||
selection.allDay === true ||
|
||||
selection.type === "day" ||
|
||||
selection.type === "days";
|
||||
const isTimeSelection =
|
||||
selection.type === "time" &&
|
||||
selection.allDay !== true;
|
||||
|
||||
const isAllDay = !isTimeSelection;
|
||||
|
||||
let startDate;
|
||||
let endDate;
|
||||
let startTime = null;
|
||||
let endTime = null;
|
||||
let endDateTime = end;
|
||||
let startDateTime;
|
||||
let endDateTime;
|
||||
|
||||
if (isAllDay) {
|
||||
const startOfDay = new Date(start);
|
||||
startOfDay.setHours(0, 0, 0, 0);
|
||||
|
||||
const lastSelectedDay = new Date(end);
|
||||
lastSelectedDay.setDate(lastSelectedDay.getDate() - 1);
|
||||
endDate = formatDate(lastSelectedDay);
|
||||
endDateTime = new Date(lastSelectedDay);
|
||||
endDateTime.setHours(23, 59, 59, 0);
|
||||
} else {
|
||||
endDate = formatDate(end);
|
||||
startTime = formatTime(start);
|
||||
endTime = formatTime(end);
|
||||
|
||||
// FullCalendar liefert bei Ganztagsauswahl ein exklusives Ende.
|
||||
// Nur wenn end tatsächlich 00:00 Uhr ist, wird ein Tag abgezogen.
|
||||
const endIsMidnight =
|
||||
lastSelectedDay.getHours() === 0 &&
|
||||
lastSelectedDay.getMinutes() === 0 &&
|
||||
lastSelectedDay.getSeconds() === 0;
|
||||
|
||||
if (endIsMidnight) {
|
||||
lastSelectedDay.setDate(
|
||||
lastSelectedDay.getDate() - 1
|
||||
);
|
||||
}
|
||||
|
||||
const recurringCheckbox =
|
||||
typeof RecurringCheckbox !== "undefined"
|
||||
? RecurringCheckbox
|
||||
: null;
|
||||
lastSelectedDay.setHours(0, 0, 0, 0);
|
||||
|
||||
startDate = formatDate(startOfDay);
|
||||
endDate = formatDate(lastSelectedDay);
|
||||
startDateTime = `${startDate} 00:00:00`;
|
||||
endDateTime = `${endDate} 23:59:59`;
|
||||
} else {
|
||||
// Bei einem Timeslot bleiben Start- und Enddatum gleich.
|
||||
startDate = formatDate(start);
|
||||
endDate = formatDate(start);
|
||||
startTime = formatTime(start);
|
||||
endTime = formatTime(end);
|
||||
startDateTime = formatDateTimeForSql(start);
|
||||
endDateTime = formatDateTimeForSql(end);
|
||||
}
|
||||
|
||||
const recurring =
|
||||
typeof RecurringCheckbox !== "undefined" &&
|
||||
RecurringCheckbox.isChecked === true;
|
||||
|
||||
const recurringWeeks =
|
||||
typeof RecurringWeeksSelect !== "undefined"
|
||||
? Number(RecurringWeeksSelect.selectedOptionValue || 1)
|
||||
: 1;
|
||||
|
||||
const recurringDays = appsmith.store.recurringDays || {};
|
||||
|
||||
const bookingFormData = {
|
||||
...(appsmith.store.bookingFormData || {}),
|
||||
seatId,
|
||||
seatName,
|
||||
bookedBy,
|
||||
title: "Platzbuchung",
|
||||
type: selection.type || null,
|
||||
startDate: formatDate(start),
|
||||
startDate,
|
||||
endDate,
|
||||
startTime,
|
||||
endTime,
|
||||
startDateTime: formatDateTimeForSql(start),
|
||||
endDateTime: formatDateTimeForSql(endDateTime),
|
||||
allDay: Boolean(isAllDay),
|
||||
recurring: Boolean(
|
||||
recurringCheckbox?.isChecked || false
|
||||
)
|
||||
startDateTime,
|
||||
endDateTime,
|
||||
allDay: isAllDay,
|
||||
recurring,
|
||||
recurringWeeks,
|
||||
recurringDays
|
||||
};
|
||||
|
||||
try {
|
||||
await storeValue(
|
||||
"bookingFormData",
|
||||
bookingFormData,
|
||||
false
|
||||
);
|
||||
|
||||
await storeValue("bookingFormData", bookingFormData, false);
|
||||
await showModal("Platzbuchung");
|
||||
} catch (error) {
|
||||
console.error(
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_59995a0e-1676-4d89-a2aa-cdb55c2ba464",
|
||||
"id": "Sitzplätze_Bff",
|
||||
"moduleUUID": "b0d6dbe1-9ee5-486f-9f93-4baa17986ccf",
|
||||
"packageUUID": "35174735-e12c-426f-9f2f-fe12a068c3ba",
|
||||
"type": "JS_MODULE",
|
||||
"unpublishedModuleInstance": {
|
||||
"contextType": "PAGE",
|
||||
"inputs": {
|
||||
"checkReturningFromLogin": "[\"\"]",
|
||||
"clearSession": "[]",
|
||||
"guardPage": "[\"Login\"]",
|
||||
"isLoggedIn": "[]",
|
||||
"login": "[\"\"]",
|
||||
"logout": "[]"
|
||||
},
|
||||
"moduleInputs": {
|
||||
"fkpwwxqbyo": {
|
||||
"controlType": "INPUT_TEXT",
|
||||
"defaultValue": "[]",
|
||||
"id": "fkpwwxqbyo",
|
||||
"label": "clearSession",
|
||||
"propertyName": "inputs.clearSession"
|
||||
},
|
||||
"igfxnkxgzx": {
|
||||
"controlType": "INPUT_TEXT",
|
||||
"defaultValue": "[]",
|
||||
"id": "igfxnkxgzx",
|
||||
"label": "isLoggedIn",
|
||||
"propertyName": "inputs.isLoggedIn"
|
||||
},
|
||||
"narkupnajw": {
|
||||
"controlType": "INPUT_TEXT",
|
||||
"defaultValue": "[]",
|
||||
"id": "narkupnajw",
|
||||
"label": "guardPage",
|
||||
"propertyName": "inputs.guardPage"
|
||||
},
|
||||
"qqzhfbnjmf": {
|
||||
"controlType": "INPUT_TEXT",
|
||||
"defaultValue": "[]",
|
||||
"id": "qqzhfbnjmf",
|
||||
"label": "checkReturningFromLogin",
|
||||
"propertyName": "inputs.checkReturningFromLogin"
|
||||
},
|
||||
"tlfzzixvrw": {
|
||||
"controlType": "INPUT_TEXT",
|
||||
"defaultValue": "[]",
|
||||
"id": "tlfzzixvrw",
|
||||
"label": "login",
|
||||
"propertyName": "inputs.login"
|
||||
},
|
||||
"yjtnrwqqzm": {
|
||||
"controlType": "INPUT_TEXT",
|
||||
"defaultValue": "[]",
|
||||
"id": "yjtnrwqqzm",
|
||||
"label": "logout",
|
||||
"propertyName": "inputs.logout"
|
||||
}
|
||||
},
|
||||
"name": "Bff",
|
||||
"pageId": "Sitzplätze"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_304a61c8-9fde-47e4-85a7-2056cd88ae28",
|
||||
"id": "Sitzplätze_Bff_Logout",
|
||||
"moduleUUID": "68741899-715d-4e34-a614-51281446403a",
|
||||
"packageUUID": "35174735-e12c-426f-9f2f-fe12a068c3ba",
|
||||
"type": "QUERY_MODULE",
|
||||
"unpublishedModuleInstance": {
|
||||
"contextType": "PAGE",
|
||||
"inputs": {},
|
||||
"moduleInputs": {},
|
||||
"name": "Bff_Logout",
|
||||
"pageId": "Sitzplätze"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_9e11ced6-24d2-4acb-9bfd-1969c6062191",
|
||||
"id": "Sitzplätze_Bff_Me",
|
||||
"moduleUUID": "809cd1d6-7b41-4561-bea0-2ac0794e1ac4",
|
||||
"packageUUID": "35174735-e12c-426f-9f2f-fe12a068c3ba",
|
||||
"type": "QUERY_MODULE",
|
||||
"unpublishedModuleInstance": {
|
||||
"contextType": "PAGE",
|
||||
"inputs": {},
|
||||
"moduleInputs": {},
|
||||
"name": "Bff_Me",
|
||||
"pageId": "Sitzplätze"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_060325a4-606f-44b7-817f-5d7e47cc8528",
|
||||
"id": "Sitzplätze_Bff_Verify",
|
||||
"moduleUUID": "83e73170-c955-4fa2-9414-3dec1f07d47c",
|
||||
"packageUUID": "35174735-e12c-426f-9f2f-fe12a068c3ba",
|
||||
"type": "QUERY_MODULE",
|
||||
"unpublishedModuleInstance": {
|
||||
"contextType": "PAGE",
|
||||
"inputs": {},
|
||||
"moduleInputs": {},
|
||||
"name": "Bff_Verify",
|
||||
"pageId": "Sitzplätze"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_74de03ae-1d33-4e5c-8a1f-e27cbfc9b2a7",
|
||||
"id": "Sitzplätze__$Bff$_Bff.checkReturningFromLogin",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff",
|
||||
"pluginId": "js-plugin",
|
||||
"pluginType": "JS",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff",
|
||||
"unpublishedAction": {
|
||||
"collectionId": "Sitzplätze__$Bff$_Bff",
|
||||
"confirmBeforeExecute": false,
|
||||
"contextType": "PAGE",
|
||||
"datasource": {
|
||||
"isAutoGenerated": false,
|
||||
"name": "UNUSED_DATASOURCE",
|
||||
"pluginId": "js-plugin"
|
||||
},
|
||||
"fullyQualifiedName": "_$Bff$_Bff.checkReturningFromLogin",
|
||||
"name": "checkReturningFromLogin",
|
||||
"pageId": "Sitzplätze",
|
||||
"runBehaviour": "MANUAL",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_0062be59-1821-4fd7-8cfe-c862f5883fa6",
|
||||
"id": "Sitzplätze__$Bff$_Bff.clearSession",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff",
|
||||
"pluginId": "js-plugin",
|
||||
"pluginType": "JS",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff",
|
||||
"unpublishedAction": {
|
||||
"collectionId": "Sitzplätze__$Bff$_Bff",
|
||||
"confirmBeforeExecute": false,
|
||||
"contextType": "PAGE",
|
||||
"datasource": {
|
||||
"isAutoGenerated": false,
|
||||
"name": "UNUSED_DATASOURCE",
|
||||
"pluginId": "js-plugin"
|
||||
},
|
||||
"fullyQualifiedName": "_$Bff$_Bff.clearSession",
|
||||
"name": "clearSession",
|
||||
"pageId": "Sitzplätze",
|
||||
"runBehaviour": "MANUAL",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_bd00bbf2-3f8b-4cf2-9e75-b279493bc9ee",
|
||||
"id": "Sitzplätze__$Bff$_Bff.guardPage",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff",
|
||||
"pluginId": "js-plugin",
|
||||
"pluginType": "JS",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff",
|
||||
"unpublishedAction": {
|
||||
"collectionId": "Sitzplätze__$Bff$_Bff",
|
||||
"confirmBeforeExecute": false,
|
||||
"contextType": "PAGE",
|
||||
"datasource": {
|
||||
"isAutoGenerated": false,
|
||||
"name": "UNUSED_DATASOURCE",
|
||||
"pluginId": "js-plugin"
|
||||
},
|
||||
"fullyQualifiedName": "_$Bff$_Bff.guardPage",
|
||||
"name": "guardPage",
|
||||
"pageId": "Sitzplätze",
|
||||
"runBehaviour": "MANUAL",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_01d53c11-6aca-429b-92b2-8e32e561f69a",
|
||||
"id": "Sitzplätze__$Bff$_Bff.isLoggedIn",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff",
|
||||
"pluginId": "js-plugin",
|
||||
"pluginType": "JS",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff",
|
||||
"unpublishedAction": {
|
||||
"collectionId": "Sitzplätze__$Bff$_Bff",
|
||||
"confirmBeforeExecute": false,
|
||||
"contextType": "PAGE",
|
||||
"datasource": {
|
||||
"isAutoGenerated": false,
|
||||
"name": "UNUSED_DATASOURCE",
|
||||
"pluginId": "js-plugin"
|
||||
},
|
||||
"fullyQualifiedName": "_$Bff$_Bff.isLoggedIn",
|
||||
"name": "isLoggedIn",
|
||||
"pageId": "Sitzplätze",
|
||||
"runBehaviour": "MANUAL",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_cdad9604-64d3-4e80-9421-bab54d7453e5",
|
||||
"id": "Sitzplätze__$Bff$_Bff.login",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff",
|
||||
"pluginId": "js-plugin",
|
||||
"pluginType": "JS",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff",
|
||||
"unpublishedAction": {
|
||||
"collectionId": "Sitzplätze__$Bff$_Bff",
|
||||
"confirmBeforeExecute": false,
|
||||
"contextType": "PAGE",
|
||||
"datasource": {
|
||||
"isAutoGenerated": false,
|
||||
"name": "UNUSED_DATASOURCE",
|
||||
"pluginId": "js-plugin"
|
||||
},
|
||||
"fullyQualifiedName": "_$Bff$_Bff.login",
|
||||
"name": "login",
|
||||
"pageId": "Sitzplätze",
|
||||
"runBehaviour": "MANUAL",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_6c21e962-214e-40cc-8f51-c5921ccbad10",
|
||||
"id": "Sitzplätze__$Bff$_Bff.logout",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff",
|
||||
"pluginId": "js-plugin",
|
||||
"pluginType": "JS",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff",
|
||||
"unpublishedAction": {
|
||||
"collectionId": "Sitzplätze__$Bff$_Bff",
|
||||
"confirmBeforeExecute": false,
|
||||
"contextType": "PAGE",
|
||||
"datasource": {
|
||||
"isAutoGenerated": false,
|
||||
"name": "UNUSED_DATASOURCE",
|
||||
"pluginId": "js-plugin"
|
||||
},
|
||||
"fullyQualifiedName": "_$Bff$_Bff.logout",
|
||||
"name": "logout",
|
||||
"pageId": "Sitzplätze",
|
||||
"runBehaviour": "MANUAL",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_df303cec-969d-4d02-bd28-9dd94884c95d",
|
||||
"id": "Sitzplätze__$Bff_Logout$_Bff_Logout",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff_Logout",
|
||||
"pluginId": "restapi-plugin",
|
||||
"pluginType": "API",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff_Logout",
|
||||
"unpublishedAction": {
|
||||
"confirmBeforeExecute": false,
|
||||
"contextType": "PAGE",
|
||||
"datasource": {
|
||||
"datasourceConfiguration": {
|
||||
"url": "https://bff.ep-reisen.net"
|
||||
},
|
||||
"isAutoGenerated": false,
|
||||
"name": "DEFAULT_REST_DATASOURCE",
|
||||
"pluginId": "restapi-plugin"
|
||||
},
|
||||
"name": "_$Bff_Logout$_Bff_Logout",
|
||||
"pageId": "Sitzplätze",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_bf1c83a9-9049-4779-abc2-393f2db249ca",
|
||||
"id": "Sitzplätze__$Bff_Me$_Bff_Me",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff_Me",
|
||||
"pluginId": "restapi-plugin",
|
||||
"pluginType": "API",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff_Me",
|
||||
"unpublishedAction": {
|
||||
"confirmBeforeExecute": false,
|
||||
"contextType": "PAGE",
|
||||
"datasource": {
|
||||
"datasourceConfiguration": {
|
||||
"url": "https://bff.ep-reisen.net"
|
||||
},
|
||||
"isAutoGenerated": false,
|
||||
"name": "DEFAULT_REST_DATASOURCE",
|
||||
"pluginId": "restapi-plugin"
|
||||
},
|
||||
"name": "_$Bff_Me$_Bff_Me",
|
||||
"pageId": "Sitzplätze",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitSyncId": "6a6b5b477ebc9edeca96e2f8_0eaeb4b0-2fed-4629-8648-b369b6d5f223",
|
||||
"id": "Sitzplätze__$Bff_Verify$_Bff_Verify",
|
||||
"isPublic": true,
|
||||
"moduleInstanceId": "Sitzplätze_Bff_Verify",
|
||||
"pluginId": "restapi-plugin",
|
||||
"pluginType": "API",
|
||||
"rootModuleInstanceId": "Sitzplätze_Bff_Verify",
|
||||
"unpublishedAction": {
|
||||
"confirmBeforeExecute": false,
|
||||
"contextType": "PAGE",
|
||||
"datasource": {
|
||||
"datasourceConfiguration": {
|
||||
"url": "https://bff.ep-reisen.net"
|
||||
},
|
||||
"isAutoGenerated": false,
|
||||
"name": "DEFAULT_REST_DATASOURCE",
|
||||
"pluginId": "restapi-plugin"
|
||||
},
|
||||
"name": "_$Bff_Verify$_Bff_Verify",
|
||||
"pageId": "Sitzplätze",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,29 @@ INSERT INTO `buchungen`
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
{{ appsmith.store.bookingFormData.seatId }},
|
||||
{{ appsmith.store.bookingFormData.title }},
|
||||
{{ appsmith.store.bookingFormData.startDateTime }},
|
||||
{{ appsmith.store.bookingFormData.endDateTime }},
|
||||
{{ appsmith.store.bookingFormData.bookedBy }}
|
||||
{{
|
||||
appsmith.store.bookingFormData?.seatId ||
|
||||
appsmith.store.selectedSeatId
|
||||
}},
|
||||
|
||||
{{
|
||||
appsmith.store.bookingFormData?.title ||
|
||||
"Platzbuchung"
|
||||
}},
|
||||
|
||||
{{
|
||||
appsmith.store.bookingFormData?.allDay === true
|
||||
? appsmith.store.bookingFormData.startDate + " 00:00:00"
|
||||
: appsmith.store.bookingFormData.startDateTime
|
||||
}},
|
||||
|
||||
{{
|
||||
appsmith.store.bookingFormData?.allDay === true
|
||||
? appsmith.store.bookingFormData.endDate + " 23:59:59"
|
||||
: appsmith.store.bookingFormData.endDateTime
|
||||
}},
|
||||
|
||||
{{
|
||||
appsmith.store.bookingFormData?.bookedBy
|
||||
}}
|
||||
);
|
||||
@@ -5,7 +5,7 @@
|
||||
"pluginType": "DB",
|
||||
"unpublishedAction": {
|
||||
"actionConfiguration": {
|
||||
"body": "INSERT INTO `buchungen`\n(\n `platz_id`,\n `titel`,\n `startzeit`,\n `endzeit`,\n `gebucht_von`\n)\nVALUES\n(\n {{ appsmith.store.bookingFormData.seatId }},\n {{ appsmith.store.bookingFormData.title }},\n {{ appsmith.store.bookingFormData.startDateTime }},\n {{ appsmith.store.bookingFormData.endDateTime }},\n {{ appsmith.store.bookingFormData.bookedBy }}\n);",
|
||||
"body": "INSERT INTO `buchungen`\n(\n `platz_id`,\n `titel`,\n `startzeit`,\n `endzeit`,\n `gebucht_von`\n)\nVALUES\n(\n {{\n appsmith.store.bookingFormData?.seatId ||\n appsmith.store.selectedSeatId\n }},\n\n {{\n appsmith.store.bookingFormData?.title ||\n \"Platzbuchung\"\n }},\n\n {{\n appsmith.store.bookingFormData?.allDay === true\n ? appsmith.store.bookingFormData.startDate + \" 00:00:00\"\n : appsmith.store.bookingFormData.startDateTime\n }},\n\n {{\n appsmith.store.bookingFormData?.allDay === true\n ? appsmith.store.bookingFormData.endDate + \" 23:59:59\"\n : appsmith.store.bookingFormData.endDateTime\n }},\n\n {{\n appsmith.store.bookingFormData?.bookedBy\n }}\n);",
|
||||
"encodeParamsToggle": true,
|
||||
"paginationType": "NONE",
|
||||
"pluginSpecifiedTemplates": [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
DELETE FROM `buchungen`
|
||||
WHERE id =
|
||||
{{ this.params.bookingId }}
|
||||
AND gebucht_von =
|
||||
{{ this.params.bookedBy }};
|
||||
WHERE `id` =
|
||||
{{ appsmith.store.selectedBooking.id }}
|
||||
AND `gebucht_von` =
|
||||
{{ appsmith.user.email }};
|
||||
@@ -5,7 +5,7 @@
|
||||
"pluginType": "DB",
|
||||
"unpublishedAction": {
|
||||
"actionConfiguration": {
|
||||
"body": "DELETE FROM `buchungen`\nWHERE id =\n {{ this.params.bookingId }}\n AND gebucht_von =\n {{ this.params.bookedBy }};",
|
||||
"body": "DELETE FROM `buchungen`\nWHERE `id` =\n {{ appsmith.store.selectedBooking.id }}\n AND `gebucht_von` =\n {{ appsmith.user.email }};",
|
||||
"encodeParamsToggle": true,
|
||||
"paginationType": "NONE",
|
||||
"pluginSpecifiedTemplates": [
|
||||
|
||||
@@ -2,11 +2,17 @@ SELECT
|
||||
id,
|
||||
platz_id,
|
||||
titel AS title,
|
||||
startzeit AS start,
|
||||
endzeit AS end,
|
||||
DATE_FORMAT(
|
||||
startzeit,
|
||||
'%Y-%m-%d %H:%i:%s'
|
||||
) AS start,
|
||||
DATE_FORMAT(
|
||||
endzeit,
|
||||
'%Y-%m-%d %H:%i:%s'
|
||||
) AS end,
|
||||
gebucht_von,
|
||||
erstellt_am
|
||||
FROM `buchungen`
|
||||
WHERE platz_id =
|
||||
{{ appsmith.store.selectedSeatId }}
|
||||
WHERE `platz_id` =
|
||||
'{{ appsmith.store.selectedSeatId }}'
|
||||
ORDER BY startzeit;
|
||||
@@ -5,7 +5,7 @@
|
||||
"pluginType": "DB",
|
||||
"unpublishedAction": {
|
||||
"actionConfiguration": {
|
||||
"body": "SELECT\n id,\n platz_id,\n titel AS title,\n startzeit AS start,\n endzeit AS end,\n gebucht_von,\n erstellt_am\nFROM `buchungen`\nWHERE platz_id =\n {{ appsmith.store.selectedSeatId }}\nORDER BY startzeit;",
|
||||
"body": "SELECT\n id,\n platz_id,\n titel AS title,\n DATE_FORMAT(\n startzeit,\n '%Y-%m-%d %H:%i:%s'\n ) AS start,\n DATE_FORMAT(\n endzeit,\n '%Y-%m-%d %H:%i:%s'\n ) AS end,\n gebucht_von,\n erstellt_am\nFROM `buchungen`\nWHERE `platz_id` =\n '{{ appsmith.store.selectedSeatId }}'\nORDER BY startzeit;",
|
||||
"encodeParamsToggle": true,
|
||||
"paginationType": "NONE",
|
||||
"pluginSpecifiedTemplates": [
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"parentRowSpace": 10,
|
||||
"renderMode": "CANVAS",
|
||||
"rightColumn": 64,
|
||||
"seatSelected": "{{\n storeValue(\n \"selectedSeatId\",\n Custom4.model.seatId ||\n Custom4.model.selectedSeat?.id ||\n \"\",\n false\n )\n .then(() =>\n storeValue(\n \"selectedSeatName\",\n Custom4.model.seatName ||\n Custom4.model.selectedSeat?.name ||\n \"\",\n false\n )\n )\n .then(() =>\n GetSeatBookings.run()\n )\n .then(() =>\n showModal(\n SeatCalendar.name\n )\n )\n}}",
|
||||
"seatSelected": "{{\n storeValue(\n \"selectedSeatId\",\n Custom4.model?.selectedSeat?.id ||\n Custom4.model?.seatId ||\n null\n )\n .then(() =>\n storeValue(\n \"selectedSeatName\",\n Custom4.model?.selectedSeat?.name ||\n Custom4.model?.seatName ||\n null\n )\n )\n .then(() =>\n showModal(\n SeatCalendar.name\n )\n )\n}}",
|
||||
"srcDoc": {
|
||||
"css": "@charset \"UTF-8\";\nhtml,\nbody {\n margin: 0;\n width: 100%;\n height: 100%;\n overflow: auto;\n font-family: Arial, sans-serif;\n}\n\n/* Bild + Overlay */\n#imgHolder {\n position: relative;\n width: 100%;\n height: 700px; /* feste Höhe, damit sicher nicht 0 */\n overflow: hidden;\n border-radius: 6px;\n background: #f3f4f6;\n}\n\n#floorplanImage {\n position: absolute;\n inset: 0;\n z-index: 1;\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n\n#seatLayer {\n position: absolute;\n inset: 0;\n z-index: 2;\n width: 100%;\n height: 100%;\n pointer-events: none; /* Punkte bekommen später pointer-events:auto */\n}\n\n/* Sitzpunkte */\n.seat {\n position: absolute;\n z-index: 3;\n display: block;\n width: 18px;\n height: 18px;\n padding: 0;\n transform: translate(-50%, -50%);\n border: 2px solid #ffffff;\n border-radius: 50%;\n background: #22c55e;\n color: #22c55e;\n cursor: pointer;\n pointer-events: auto;\n appearance: none;\n box-sizing: border-box;\n box-shadow: 0 0 5px currentColor, 0 0 10px currentColor;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n}\n\n.seat:hover {\n z-index: 10;\n transform: translate(-50%, -50%) scale(1.45);\n box-shadow: 0 0 8px currentColor, 0 0 16px currentColor;\n}\n\n/* Farben nach Status */\n.seat.frei {\n background: #22c55e; /* Grün */\n color: #22c55e;\n}\n\n.seat.belegt {\n background: #ef4444; /* Rot */\n color: #ef4444;\n}\n\n.seat.selected {\n outline: 3px solid #2563eb;\n outline-offset: 3px;\n}\n\n/* Legende */\n#legend {\n display: flex;\n flex-wrap: wrap;\n gap: 14px;\n margin-top: 8px;\n color: #374151;\n font-size: 13px;\n}\n\n.legendItem {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n}\n\n.legendColor {\n display: inline-block;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n}\n\n.legendColor.frei {\n background: #22c55e;\n}\n\n.legendColor.belegt {\n background: #ef4444;\n}",
|
||||
"html": "<div id=\"seatPlan\">\n\n <div id=\"imgHolder\">\n <!-- Kein src hier, das Bild kommt über JavaScript -->\n <img id=\"floorplanImage\" alt=\"Büroplan\">\n\t\t<div id=\"seatLayer\"></div>\n\t\t\n\t\t\n </div>\n</div>",
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"animateLoading": true,
|
||||
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
||||
"bottomRow": 289,
|
||||
"bottomRow": 309,
|
||||
"boxShadow": "none",
|
||||
"canEscapeKeyClose": true,
|
||||
"canOutsideClickClose": true,
|
||||
"children": [
|
||||
{
|
||||
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
||||
"bottomRow": 260,
|
||||
"bottomRow": 280,
|
||||
"boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}",
|
||||
"canExtend": true,
|
||||
"detachFromLayout": true,
|
||||
@@ -57,14 +57,14 @@
|
||||
}
|
||||
],
|
||||
"dynamicHeight": "AUTO_HEIGHT",
|
||||
"height": 260,
|
||||
"height": 280,
|
||||
"isCanvas": true,
|
||||
"isLoading": false,
|
||||
"key": "jc8yhgzuwd",
|
||||
"leftColumn": 20,
|
||||
"maxDynamicHeight": 9000,
|
||||
"minDynamicHeight": 24,
|
||||
"minHeight": 260,
|
||||
"minHeight": 280,
|
||||
"mobileBottomRow": 53,
|
||||
"mobileLeftColumn": 20,
|
||||
"mobileRightColumn": 44,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"animateLoading": true,
|
||||
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
||||
"bottomRow": 24,
|
||||
"bottomRow": 26,
|
||||
"dynamicBindingPathList": [
|
||||
{
|
||||
"key": "truncateButtonColor"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"animateLoading": true,
|
||||
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
||||
"bottomRow": 27,
|
||||
"dynamicBindingPathList": [
|
||||
{
|
||||
"key": "truncateButtonColor"
|
||||
},
|
||||
{
|
||||
"key": "fontFamily"
|
||||
},
|
||||
{
|
||||
"key": "borderRadius"
|
||||
},
|
||||
{
|
||||
"key": "text"
|
||||
}
|
||||
],
|
||||
"dynamicHeight": "AUTO_HEIGHT",
|
||||
"dynamicTriggerPathList": [],
|
||||
"fontFamily": "{{appsmith.theme.fontFamily.appFont}}",
|
||||
"fontSize": "1rem",
|
||||
"fontStyle": "BOLD",
|
||||
"isLoading": false,
|
||||
"isVisible": true,
|
||||
"key": "u9yq2qfrlw",
|
||||
"leftColumn": 0,
|
||||
"maxDynamicHeight": 9000,
|
||||
"minDynamicHeight": 4,
|
||||
"minWidth": 450,
|
||||
"mobileBottomRow": 27,
|
||||
"mobileLeftColumn": 0,
|
||||
"mobileRightColumn": 13,
|
||||
"mobileTopRow": 23,
|
||||
"needsErrorInfo": false,
|
||||
"originalBottomRow": 27,
|
||||
"originalTopRow": 23,
|
||||
"overflow": "NONE",
|
||||
"parentColumnSpace": 25.390625,
|
||||
"parentId": "0",
|
||||
"parentRowSpace": 10,
|
||||
"renderMode": "CANVAS",
|
||||
"responsiveBehavior": "fill",
|
||||
"rightColumn": 13,
|
||||
"shouldTruncate": false,
|
||||
"text": "{{appsmith.store.sid, appsmith.store.permissions, appsmith.store.user}}\n",
|
||||
"textAlign": "LEFT",
|
||||
"textColor": "#231F20",
|
||||
"topRow": 23,
|
||||
"truncateButtonColor": "{{appsmith.theme.colors.primaryColor}}",
|
||||
"type": "TEXT_WIDGET",
|
||||
"version": 1,
|
||||
"widgetId": "m3zjevyiib",
|
||||
"widgetName": "Text7"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"moduleName": "Bff",
|
||||
"moduleUUID": "b0d6dbe1-9ee5-486f-9f93-4baa17986ccf",
|
||||
"packageName": "Bff",
|
||||
"packageUUID": "35174735-e12c-426f-9f2f-fe12a068c3ba"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"moduleName": "Bff_Logout",
|
||||
"moduleUUID": "68741899-715d-4e34-a614-51281446403a",
|
||||
"packageName": "Bff",
|
||||
"packageUUID": "35174735-e12c-426f-9f2f-fe12a068c3ba"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"moduleName": "Bff_Me",
|
||||
"moduleUUID": "809cd1d6-7b41-4561-bea0-2ac0794e1ac4",
|
||||
"packageName": "Bff",
|
||||
"packageUUID": "35174735-e12c-426f-9f2f-fe12a068c3ba"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"moduleName": "Bff_Verify",
|
||||
"moduleUUID": "83e73170-c955-4fa2-9414-3dec1f07d47c",
|
||||
"packageName": "Bff",
|
||||
"packageUUID": "35174735-e12c-426f-9f2f-fe12a068c3ba"
|
||||
}
|
||||
Reference in New Issue
Block a user