@attraccess/plugin-reservations 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +32 -0
- package/dist/index.js +1134 -860
- package/frontend/{__federation_expose_Plugin-DAM66N0j.js → __federation_expose_Plugin-BDJ5Eff3.js} +1056 -860
- package/frontend/__federation_fn_import-BHGw2mzr.js +1 -0
- package/frontend/{_virtual___federation_fn_import-BXODRNto.js → _virtual___federation_fn_import-D2E5es2p.js} +2 -4
- package/frontend/remoteEntry.js +3 -71
- package/frontend/style.css +13 -3
- package/package.json +26 -13
- package/dist/migrations.js +0 -161
- package/frontend/__federation_fn_import-DAGm_xmC.js +0 -2
package/frontend/{__federation_expose_Plugin-DAM66N0j.js → __federation_expose_Plugin-BDJ5Eff3.js}
RENAMED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { r as importShared } from "./_virtual___federation_fn_import-
|
|
2
|
-
|
|
3
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
4
|
-
|
|
5
|
-
//#region ../../../libs/plugins-frontend-sdk/src/lib/frontend.api-client.ts
|
|
1
|
+
import { r as importShared } from "./_virtual___federation_fn_import-D2E5es2p.js";
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
4
|
+
// ../../../libs/plugins-frontend-sdk/src/lib/frontend.api-client.ts
|
|
6
5
|
var BASE_URL_GLOBAL = "__ATTRACCESS_API_BASE_URL__";
|
|
7
6
|
/** The API origin the host is talking to. Falls back to the current origin. */
|
|
8
7
|
function getApiBaseUrl() {
|
|
@@ -61,8 +60,9 @@ function createPluginApiClient(basePath = "") {
|
|
|
61
60
|
}
|
|
62
61
|
};
|
|
63
62
|
}
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
// ../../../libs/plugins-frontend-sdk/src/lib/frontend.license.ts
|
|
64
|
+
var { useCallback: useCallback$2, useEffect: useEffect$9, useState: useState$13 } = await importShared("react");
|
|
65
|
+
// ../../../node_modules/.pnpm/react@19.3.1/node_modules/react/cjs/react-jsx-runtime.production.js
|
|
66
66
|
/**
|
|
67
67
|
* @license React
|
|
68
68
|
* react-jsx-runtime.production.js
|
|
@@ -96,32 +96,27 @@ var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((expor
|
|
|
96
96
|
exports.jsx = jsxProd;
|
|
97
97
|
exports.jsxs = jsxProd;
|
|
98
98
|
}));
|
|
99
|
-
|
|
100
|
-
//#region ../../../libs/plugins-frontend-sdk/src/lib/frontend.live-updates.tsx
|
|
99
|
+
// ../../../libs/plugins-frontend-sdk/src/lib/frontend.live-updates.tsx
|
|
101
100
|
var import_jsx_runtime = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
102
101
|
module.exports = require_react_jsx_runtime_production();
|
|
103
102
|
})))();
|
|
104
|
-
var { createContext, useCallback: useCallback$1, useContext, useEffect: useEffect$
|
|
103
|
+
var { createContext, useCallback: useCallback$1, useContext, useEffect: useEffect$8, useRef: useRef$1 } = await importShared("react");
|
|
105
104
|
var contextKey = Symbol.for("attraccess.plugin.live-updates.context");
|
|
106
105
|
var contexts = globalThis;
|
|
107
106
|
contexts[contextKey] ??= createContext(null);
|
|
108
107
|
var identityKey = Symbol.for("attraccess.plugin.live-updates.identity");
|
|
109
108
|
var identities = globalThis;
|
|
110
109
|
identities[identityKey] ??= createContext(null);
|
|
111
|
-
|
|
112
|
-
//#region ../../../libs/plugins-frontend-sdk/src/lib/frontend.slots.ts
|
|
110
|
+
// ../../../libs/plugins-frontend-sdk/src/lib/frontend.slots.ts
|
|
113
111
|
var RESOURCE_OVERVIEW_SLOT = "resource.overview";
|
|
114
112
|
var RESOURCE_SETTINGS_SLOT = "resource.settings";
|
|
115
113
|
var USER_ACCOUNT_SLOT = "user.account";
|
|
116
114
|
var ADMIN_SETTINGS_SLOT = "admin.settings";
|
|
117
|
-
|
|
118
|
-
//#region ../../../libs/plugins-frontend-sdk/src/lib/frontend.standard-drawer.tsx
|
|
115
|
+
// ../../../libs/plugins-frontend-sdk/src/lib/frontend.standard-drawer.tsx
|
|
119
116
|
var { StandardDrawer: SharedStandardDrawer } = await importShared("@attraccess/plugins-frontend-ui");
|
|
120
|
-
|
|
121
|
-
//#region ../../../libs/plugins-frontend-sdk/src/lib/frontend.standard-modal.tsx
|
|
117
|
+
// ../../../libs/plugins-frontend-sdk/src/lib/frontend.standard-modal.tsx
|
|
122
118
|
var { StandardModal: SharedStandardModal } = await importShared("@attraccess/plugins-frontend-ui");
|
|
123
|
-
|
|
124
|
-
//#region frontend/src/api.ts
|
|
119
|
+
// frontend/src/api.ts
|
|
125
120
|
var api = createPluginApiClient("/api/reservations");
|
|
126
121
|
var hostApi$1 = createPluginApiClient("");
|
|
127
122
|
var ReservationsApiError = class extends Error {
|
|
@@ -150,7 +145,7 @@ async function call(client, path, options) {
|
|
|
150
145
|
body: options.body === void 0 ? void 0 : JSON.stringify(options.body)
|
|
151
146
|
});
|
|
152
147
|
const text = await response.text();
|
|
153
|
-
let parsed
|
|
148
|
+
let parsed;
|
|
154
149
|
try {
|
|
155
150
|
parsed = text ? JSON.parse(text) : null;
|
|
156
151
|
} catch {
|
|
@@ -230,785 +225,767 @@ async function searchHostResources(search) {
|
|
|
230
225
|
} })).data;
|
|
231
226
|
}
|
|
232
227
|
var listHostGroups = () => call(hostApi$1, "/api/resource-groups", {});
|
|
233
|
-
var
|
|
234
|
-
title: "
|
|
228
|
+
var en_default = {
|
|
229
|
+
title: "Reservations",
|
|
235
230
|
sidebar: {
|
|
236
|
-
"my": "
|
|
237
|
-
"manage": "
|
|
231
|
+
"my": "My reservations",
|
|
232
|
+
"manage": "Manage reservations"
|
|
238
233
|
},
|
|
239
234
|
slots: {
|
|
240
|
-
"settings": "
|
|
241
|
-
"admin": "
|
|
242
|
-
"account": "
|
|
235
|
+
"settings": "Reservations",
|
|
236
|
+
"admin": "Reservations",
|
|
237
|
+
"account": "Calendar feeds (iCal)"
|
|
243
238
|
},
|
|
244
239
|
common: {
|
|
245
|
-
"cancel": "
|
|
246
|
-
"close": "
|
|
247
|
-
"back": "
|
|
248
|
-
"save": "
|
|
249
|
-
"edit": "
|
|
250
|
-
"done": "
|
|
251
|
-
"retry": "
|
|
252
|
-
"loading": "
|
|
253
|
-
"timesIn": "
|
|
254
|
-
"pagination": "
|
|
255
|
-
"previousPage": "
|
|
256
|
-
"nextPage": "
|
|
240
|
+
"cancel": "Cancel",
|
|
241
|
+
"close": "Close",
|
|
242
|
+
"back": "Back",
|
|
243
|
+
"save": "Save",
|
|
244
|
+
"edit": "Edit",
|
|
245
|
+
"done": "Done",
|
|
246
|
+
"retry": "Retry",
|
|
247
|
+
"loading": "Loading",
|
|
248
|
+
"timesIn": "Times in {{timezone}}",
|
|
249
|
+
"pagination": "Pages",
|
|
250
|
+
"previousPage": "Previous page",
|
|
251
|
+
"nextPage": "Next page"
|
|
257
252
|
},
|
|
258
253
|
weekdays: {
|
|
259
|
-
"mon": "
|
|
260
|
-
"tue": "
|
|
261
|
-
"wed": "
|
|
262
|
-
"thu": "
|
|
263
|
-
"fri": "
|
|
264
|
-
"sat": "
|
|
265
|
-
"sun": "
|
|
254
|
+
"mon": "Monday",
|
|
255
|
+
"tue": "Tuesday",
|
|
256
|
+
"wed": "Wednesday",
|
|
257
|
+
"thu": "Thursday",
|
|
258
|
+
"fri": "Friday",
|
|
259
|
+
"sat": "Saturday",
|
|
260
|
+
"sun": "Sunday"
|
|
266
261
|
},
|
|
267
262
|
status: {
|
|
268
|
-
"pending": "
|
|
269
|
-
"confirmed": "
|
|
270
|
-
"rejected": "
|
|
271
|
-
"cancelled": "
|
|
272
|
-
"expired": "
|
|
273
|
-
"no_show": "
|
|
274
|
-
"completed": "
|
|
263
|
+
"pending": "Pending approval",
|
|
264
|
+
"confirmed": "Confirmed",
|
|
265
|
+
"rejected": "Rejected",
|
|
266
|
+
"cancelled": "Cancelled",
|
|
267
|
+
"expired": "Expired",
|
|
268
|
+
"no_show": "No show",
|
|
269
|
+
"completed": "Completed"
|
|
275
270
|
},
|
|
276
271
|
errors: {
|
|
277
|
-
"generic": "
|
|
278
|
-
"NOT_FOUND": "
|
|
279
|
-
"RESERVATIONS_DISABLED": "
|
|
280
|
-
"NOT_ALLOWED_TO_BOOK": "
|
|
281
|
-
"IN_THE_PAST": "
|
|
282
|
-
"OFF_TIME_STEP": "Start
|
|
283
|
-
"DURATION_TOO_SHORT": "
|
|
284
|
-
"DURATION_TOO_LONG": "
|
|
285
|
-
"BEYOND_MAX_ADVANCE": "
|
|
286
|
-
"LEAD_TIME_TOO_SHORT": "
|
|
287
|
-
"OUTSIDE_BOOKABLE_HOURS": "
|
|
288
|
-
"USER_BOOKING_LIMIT": "
|
|
289
|
-
"OVERLAP": "
|
|
290
|
-
"
|
|
291
|
-
"
|
|
292
|
-
"
|
|
293
|
-
"
|
|
294
|
-
"
|
|
295
|
-
"
|
|
272
|
+
"generic": "Something went wrong. Please try again.",
|
|
273
|
+
"NOT_FOUND": "This reservation or resource does not exist.",
|
|
274
|
+
"RESERVATIONS_DISABLED": "Reservations are not enabled for this resource.",
|
|
275
|
+
"NOT_ALLOWED_TO_BOOK": "You are not allowed to book this resource.",
|
|
276
|
+
"IN_THE_PAST": "The booking would start in the past.",
|
|
277
|
+
"OFF_TIME_STEP": "Start and duration must fit the booking time step.",
|
|
278
|
+
"DURATION_TOO_SHORT": "The booking is shorter than the minimum duration.",
|
|
279
|
+
"DURATION_TOO_LONG": "The booking is longer than the maximum duration.",
|
|
280
|
+
"BEYOND_MAX_ADVANCE": "This is too far in the future to book.",
|
|
281
|
+
"LEAD_TIME_TOO_SHORT": "It is too late to book this slot.",
|
|
282
|
+
"OUTSIDE_BOOKABLE_HOURS": "The slot is outside the bookable hours.",
|
|
283
|
+
"USER_BOOKING_LIMIT": "You have reached the maximum number of active bookings for this resource.",
|
|
284
|
+
"OVERLAP": "The slot overlaps another booking. Please choose a different time.",
|
|
285
|
+
"OVERLAP_FULL": "All slots are booked at this time. Please choose a different time.",
|
|
286
|
+
"OWN_OVERLAP": "You already have a booking that overlaps this time. Please choose a different time.",
|
|
287
|
+
"MAINTENANCE": "The resource is in maintenance during this time.",
|
|
288
|
+
"NOT_PENDING": "This booking is no longer waiting for approval.",
|
|
289
|
+
"NOT_ACTIVE": "This booking is not active.",
|
|
290
|
+
"NOT_CANCELLABLE": "This booking can no longer be cancelled.",
|
|
291
|
+
"ALREADY_STARTED": "This booking has already started.",
|
|
292
|
+
"ALREADY_FINISHED": "This booking has already finished.",
|
|
296
293
|
"FUTURE_BOOKINGS_EXIST": {
|
|
297
|
-
"one": "
|
|
298
|
-
"many": "
|
|
294
|
+
"one": "There is {{count}} upcoming booking.",
|
|
295
|
+
"many": "There are {{count}} upcoming bookings."
|
|
299
296
|
},
|
|
300
|
-
"INVALID_RANGE": "
|
|
301
|
-
"INVALID_SETTINGS": "
|
|
302
|
-
"INVALID_TIMEZONE": "
|
|
303
|
-
"RANGE_TOO_LARGE": "
|
|
304
|
-
"FORBIDDEN": "
|
|
305
|
-
"RESERVATION_NOT_FOUND": "
|
|
306
|
-
"RESOURCE_NOT_FOUND": "
|
|
307
|
-
"FEED_LIMIT": "
|
|
308
|
-
"FEED_NOT_FOUND": "
|
|
309
|
-
"INVALID_FEED": "
|
|
297
|
+
"INVALID_RANGE": "The selected time range is not valid.",
|
|
298
|
+
"INVALID_SETTINGS": "Some settings are not valid.",
|
|
299
|
+
"INVALID_TIMEZONE": "This timezone is not valid.",
|
|
300
|
+
"RANGE_TOO_LARGE": "The requested time range is too large.",
|
|
301
|
+
"FORBIDDEN": "You are not allowed to do this.",
|
|
302
|
+
"RESERVATION_NOT_FOUND": "This reservation does not exist.",
|
|
303
|
+
"RESOURCE_NOT_FOUND": "This resource does not exist.",
|
|
304
|
+
"FEED_LIMIT": "You have reached the maximum number of calendar feeds. Revoke one you no longer use first.",
|
|
305
|
+
"FEED_NOT_FOUND": "This calendar feed does not exist or was revoked.",
|
|
306
|
+
"INVALID_FEED": "Choose at least one source for the calendar feed."
|
|
310
307
|
},
|
|
311
308
|
card: {
|
|
312
|
-
"title": "
|
|
313
|
-
"reserve": "
|
|
314
|
-
"cannotBook": "
|
|
315
|
-
"view": "
|
|
316
|
-
"managerHint": "
|
|
317
|
-
"next": "
|
|
318
|
-
"current": "
|
|
319
|
-
"loadFailed": "
|
|
320
|
-
"day": "
|
|
321
|
-
"week": "
|
|
322
|
-
"previous": "
|
|
323
|
-
"nextRange": "
|
|
324
|
-
"dayBarLabel": "
|
|
325
|
-
"free": "
|
|
326
|
-
"reserved": "
|
|
327
|
-
"reservedPending": "
|
|
328
|
-
"
|
|
329
|
-
"
|
|
330
|
-
"
|
|
309
|
+
"title": "Reservations",
|
|
310
|
+
"reserve": "Reserve",
|
|
311
|
+
"cannotBook": "Booking is not available",
|
|
312
|
+
"view": "View",
|
|
313
|
+
"managerHint": "As a manager you see the holder, notes and reasons of every booking.",
|
|
314
|
+
"next": "Your next booking",
|
|
315
|
+
"current": "Current booking",
|
|
316
|
+
"loadFailed": "Reservations could not be loaded",
|
|
317
|
+
"day": "Day",
|
|
318
|
+
"week": "Week",
|
|
319
|
+
"previous": "Earlier",
|
|
320
|
+
"nextRange": "Later",
|
|
321
|
+
"dayBarLabel": "Booked times of the day",
|
|
322
|
+
"free": "No bookings",
|
|
323
|
+
"reserved": "Reserved",
|
|
324
|
+
"reservedPending": "Reserved (pending approval)",
|
|
325
|
+
"slotsBooked": "{{booked}} of {{total}} slots reserved",
|
|
326
|
+
"yours": "Your booking",
|
|
327
|
+
"maintenance": "Maintenance",
|
|
328
|
+
"openEnd": "open end"
|
|
331
329
|
},
|
|
332
330
|
booking: {
|
|
333
|
-
"title": "{{resource}}
|
|
334
|
-
"titleGeneric": "
|
|
335
|
-
"date": "
|
|
336
|
-
"timezoneHint": "
|
|
337
|
-
"start": "
|
|
338
|
-
"duration": "
|
|
339
|
-
"durationHint": "In
|
|
340
|
-
"note": "
|
|
341
|
-
"noSlots": "
|
|
342
|
-
"approvalNeeded": "
|
|
343
|
-
"instantNote": "
|
|
344
|
-
"submit": "
|
|
345
|
-
"requestSubmit": "
|
|
346
|
-
"failedTitle": "
|
|
347
|
-
"bookedTitle": "
|
|
348
|
-
"bookedBody": "
|
|
349
|
-
"requestedTitle": "
|
|
350
|
-
"requestedBody": "
|
|
331
|
+
"title": "Reserve {{resource}}",
|
|
332
|
+
"titleGeneric": "Reserve resource",
|
|
333
|
+
"date": "Date",
|
|
334
|
+
"timezoneHint": "Times are in {{timezone}}",
|
|
335
|
+
"start": "Start",
|
|
336
|
+
"duration": "Duration",
|
|
337
|
+
"durationHint": "In steps of {{step}} min, from {{min}} to {{max}}",
|
|
338
|
+
"note": "Note (optional)",
|
|
339
|
+
"noSlots": "No free start times on this day.",
|
|
340
|
+
"approvalNeeded": "A manager has to approve this booking before it becomes valid.",
|
|
341
|
+
"instantNote": "Your booking is confirmed immediately.",
|
|
342
|
+
"submit": "Reserve",
|
|
343
|
+
"requestSubmit": "Request reservation",
|
|
344
|
+
"failedTitle": "Reservation failed",
|
|
345
|
+
"bookedTitle": "Reservation confirmed",
|
|
346
|
+
"bookedBody": "Your booking for {{range}} is confirmed.",
|
|
347
|
+
"requestedTitle": "Reservation requested",
|
|
348
|
+
"requestedBody": "Your request for {{range}} is waiting for approval."
|
|
351
349
|
},
|
|
352
350
|
checkIn: {
|
|
353
|
-
"required": "
|
|
354
|
-
"requiredFromStart": "
|
|
355
|
-
"notRequired": "
|
|
351
|
+
"required": "Check in by starting the resource: from {{early}} min before the start until {{grace}} min after it. Without check-in the booking is released.",
|
|
352
|
+
"requiredFromStart": "Check in by starting the resource: from the start until {{grace}} min after it. Without check-in the booking is released.",
|
|
353
|
+
"notRequired": "No check-in is required; the booking stays until it ends."
|
|
356
354
|
},
|
|
357
355
|
keepFree: {
|
|
358
|
-
"title": "
|
|
359
|
-
"body": "
|
|
360
|
-
"keep": "
|
|
361
|
-
"free": "
|
|
356
|
+
"title": "Your booking runs until {{until}}. Keep it or free the rest?",
|
|
357
|
+
"body": "You stopped using the resource before your booking ended. Keep the rest of the booking, or release it for others?",
|
|
358
|
+
"keep": "Keep",
|
|
359
|
+
"free": "Free rest"
|
|
362
360
|
},
|
|
363
361
|
actions: {
|
|
364
|
-
"reasonLabel": "
|
|
365
|
-
"commentLabel": "
|
|
366
|
-
"failedTitle": "
|
|
362
|
+
"reasonLabel": "Reason (optional)",
|
|
363
|
+
"commentLabel": "Comment (optional)",
|
|
364
|
+
"failedTitle": "Action failed",
|
|
367
365
|
"cancel": {
|
|
368
|
-
"label": "
|
|
369
|
-
"title": "
|
|
370
|
-
"body": "
|
|
371
|
-
"confirm": "
|
|
366
|
+
"label": "Cancel",
|
|
367
|
+
"title": "Cancel this booking?",
|
|
368
|
+
"body": "The booking {{range}} for {{resource}} will be cancelled and the slot freed.",
|
|
369
|
+
"confirm": "Cancel booking"
|
|
372
370
|
},
|
|
373
371
|
"end-early": {
|
|
374
|
-
"label": "
|
|
375
|
-
"title": "
|
|
376
|
-
"body": "
|
|
377
|
-
"confirm": "
|
|
372
|
+
"label": "End early",
|
|
373
|
+
"title": "End this booking early?",
|
|
374
|
+
"body": "The booking for {{resource}} ends now and the rest of the slot (until {{until}}) is freed.",
|
|
375
|
+
"confirm": "End booking"
|
|
378
376
|
},
|
|
379
377
|
"keep": {
|
|
380
|
-
"label": "
|
|
381
|
-
"title": "
|
|
382
|
-
"body": "
|
|
383
|
-
"confirm": "
|
|
378
|
+
"label": "Keep",
|
|
379
|
+
"title": "Keep this booking?",
|
|
380
|
+
"body": "The booking {{range}} for {{resource}} stays as it is.",
|
|
381
|
+
"confirm": "Keep booking"
|
|
384
382
|
},
|
|
385
383
|
"approve": {
|
|
386
|
-
"label": "
|
|
387
|
-
"title": "
|
|
388
|
-
"body": "
|
|
389
|
-
"confirm": "
|
|
384
|
+
"label": "Approve",
|
|
385
|
+
"title": "Approve this booking?",
|
|
386
|
+
"body": "The booking {{range}} for {{resource}} will be confirmed.",
|
|
387
|
+
"confirm": "Approve"
|
|
390
388
|
},
|
|
391
389
|
"reject": {
|
|
392
|
-
"label": "
|
|
393
|
-
"title": "
|
|
394
|
-
"body": "
|
|
395
|
-
"confirm": "
|
|
390
|
+
"label": "Reject",
|
|
391
|
+
"title": "Reject this booking?",
|
|
392
|
+
"body": "The booking {{range}} for {{resource}} will be rejected and the holder notified.",
|
|
393
|
+
"confirm": "Reject"
|
|
396
394
|
}
|
|
397
395
|
},
|
|
398
396
|
table: {
|
|
399
|
-
"empty": "
|
|
400
|
-
"loadFailed": "
|
|
401
|
-
"reason": "
|
|
397
|
+
"empty": "No bookings",
|
|
398
|
+
"loadFailed": "Bookings could not be loaded",
|
|
399
|
+
"reason": "Reason: {{reason}}"
|
|
402
400
|
},
|
|
403
401
|
my: {
|
|
404
|
-
"title": "
|
|
405
|
-
"subtitle": "
|
|
406
|
-
"upcoming": "
|
|
407
|
-
"past": "
|
|
408
|
-
"manageLink": "
|
|
402
|
+
"title": "My reservations",
|
|
403
|
+
"subtitle": "Your upcoming and past bookings",
|
|
404
|
+
"upcoming": "Upcoming",
|
|
405
|
+
"past": "Past",
|
|
406
|
+
"manageLink": "Manage reservations"
|
|
409
407
|
},
|
|
410
408
|
manage: {
|
|
411
|
-
"denied": "
|
|
412
|
-
"title": "
|
|
413
|
-
"subtitle": "
|
|
414
|
-
"pending": "
|
|
415
|
-
"pendingHint": "
|
|
416
|
-
"all": "
|
|
409
|
+
"denied": "You do not manage any resource, so there is nothing to show here.",
|
|
410
|
+
"title": "Manage reservations",
|
|
411
|
+
"subtitle": "Approve requests and oversee all bookings of your resources",
|
|
412
|
+
"pending": "Waiting for approval",
|
|
413
|
+
"pendingHint": "Approve or reject requests; the holder is notified.",
|
|
414
|
+
"all": "All bookings",
|
|
417
415
|
"filters": {
|
|
418
|
-
"resource": "
|
|
419
|
-
"allResources": "
|
|
420
|
-
"searchResources": "
|
|
416
|
+
"resource": "Resource",
|
|
417
|
+
"allResources": "All resources",
|
|
418
|
+
"searchResources": "Search resources",
|
|
421
419
|
"status": "Status",
|
|
422
|
-
"allStatuses": "
|
|
423
|
-
"from": "
|
|
424
|
-
"to": "
|
|
420
|
+
"allStatuses": "All statuses",
|
|
421
|
+
"from": "From",
|
|
422
|
+
"to": "To"
|
|
425
423
|
}
|
|
426
424
|
},
|
|
427
425
|
detail: {
|
|
428
|
-
"title": "
|
|
429
|
-
"loadFailed": "
|
|
430
|
-
"holder": "
|
|
431
|
-
"cannotKeep": "
|
|
432
|
-
"cannotCancel": "
|
|
426
|
+
"title": "Reservation",
|
|
427
|
+
"loadFailed": "The reservation could not be loaded",
|
|
428
|
+
"holder": "Booked by {{name}}",
|
|
429
|
+
"cannotKeep": "This booking can no longer be kept.",
|
|
430
|
+
"cannotCancel": "This booking can no longer be cancelled."
|
|
433
431
|
},
|
|
434
432
|
settings: {
|
|
435
|
-
"loadFailed": "
|
|
436
|
-
"enabled": "
|
|
437
|
-
"approvalRequired": "
|
|
438
|
-
"checkInEnabled": "
|
|
439
|
-
"failed": "
|
|
433
|
+
"loadFailed": "The reservation settings could not be loaded",
|
|
434
|
+
"enabled": "Enable reservations for this resource",
|
|
435
|
+
"approvalRequired": "Bookings need approval by a manager",
|
|
436
|
+
"checkInEnabled": "Require check-in (start the resource within the grace period)",
|
|
437
|
+
"failed": "Settings could not be saved",
|
|
440
438
|
"whoCanBook": {
|
|
441
|
-
"label": "
|
|
442
|
-
"can-start": "
|
|
443
|
-
"managers-only": "
|
|
444
|
-
"any-user": "
|
|
439
|
+
"label": "Who can book",
|
|
440
|
+
"can-start": "Everyone who can start the resource",
|
|
441
|
+
"managers-only": "Managers only",
|
|
442
|
+
"any-user": "Any signed-in user"
|
|
445
443
|
},
|
|
446
444
|
"groups": {
|
|
447
|
-
"rules": "
|
|
448
|
-
"limits": "
|
|
449
|
-
"checkIn": "Check-in
|
|
450
|
-
"hours": "
|
|
445
|
+
"rules": "Booking rules",
|
|
446
|
+
"limits": "Buffers and limits",
|
|
447
|
+
"checkIn": "Check-in and reminders",
|
|
448
|
+
"hours": "Bookable hours"
|
|
451
449
|
},
|
|
452
450
|
"fields": {
|
|
453
|
-
"timeStepMinutes": "
|
|
454
|
-
"minDurationMinutes": "
|
|
455
|
-
"maxDurationMinutes": "
|
|
456
|
-
"maxAdvanceDays": "
|
|
457
|
-
"minLeadMinutes": "
|
|
458
|
-
"bufferBeforeMinutes": "
|
|
459
|
-
"bufferAfterMinutes": "
|
|
460
|
-
"maxActiveBookingsPerUser": "
|
|
461
|
-
"confirmWindowMinutes": "
|
|
462
|
-
"checkInGraceMinutes": "
|
|
463
|
-
"earlyCheckInMinutes": "
|
|
464
|
-
"handoverReminderMinutes": "
|
|
451
|
+
"timeStepMinutes": "Time step (minutes)",
|
|
452
|
+
"minDurationMinutes": "Minimum duration (minutes)",
|
|
453
|
+
"maxDurationMinutes": "Maximum duration (minutes)",
|
|
454
|
+
"maxAdvanceDays": "Book at most this many days ahead",
|
|
455
|
+
"minLeadMinutes": "Latest booking before start (minutes)",
|
|
456
|
+
"bufferBeforeMinutes": "Buffer before a booking (minutes)",
|
|
457
|
+
"bufferAfterMinutes": "Buffer after a booking (minutes)",
|
|
458
|
+
"maxActiveBookingsPerUser": "Active bookings per user",
|
|
459
|
+
"confirmWindowMinutes": "Ask to confirm starting this long before a reservation (minutes)",
|
|
460
|
+
"checkInGraceMinutes": "Check-in grace period (minutes)",
|
|
461
|
+
"earlyCheckInMinutes": "Early check-in window (minutes)",
|
|
462
|
+
"handoverReminderMinutes": "Handover reminder before a reservation (minutes)"
|
|
465
463
|
},
|
|
466
464
|
"hints": {
|
|
467
|
-
"timeStepMinutes": "
|
|
468
|
-
"minDurationMinutes": "
|
|
469
|
-
"maxDurationMinutes": "
|
|
470
|
-
"maxAdvanceDays": "{{min}}
|
|
471
|
-
"minLeadMinutes": "0
|
|
472
|
-
"bufferBeforeMinutes": "
|
|
473
|
-
"bufferAfterMinutes": "
|
|
474
|
-
"maxActiveBookingsPerUser": "0
|
|
475
|
-
"confirmWindowMinutes": "0
|
|
476
|
-
"checkInGraceMinutes": "{{min}}
|
|
477
|
-
"earlyCheckInMinutes": "
|
|
478
|
-
"handoverReminderMinutes": "
|
|
465
|
+
"timeStepMinutes": "Starts and durations snap to this step; {{min}} to {{max}}, must divide 1440.",
|
|
466
|
+
"minDurationMinutes": "Shortest booking, a multiple of the step.",
|
|
467
|
+
"maxDurationMinutes": "Longest booking, a multiple of the step.",
|
|
468
|
+
"maxAdvanceDays": "{{min}} to {{max}} days.",
|
|
469
|
+
"minLeadMinutes": "0 allows booking right up to the start.",
|
|
470
|
+
"bufferBeforeMinutes": "Kept free before each booking.",
|
|
471
|
+
"bufferAfterMinutes": "Kept free after each booking.",
|
|
472
|
+
"maxActiveBookingsPerUser": "0 means unlimited.",
|
|
473
|
+
"confirmWindowMinutes": "0 never asks. Maximum {{max}}.",
|
|
474
|
+
"checkInGraceMinutes": "{{min}} to {{max}} minutes after the start.",
|
|
475
|
+
"earlyCheckInMinutes": "How early the holder may start. {{min}} to {{max}}.",
|
|
476
|
+
"handoverReminderMinutes": "Notifies the current user. 0 turns it off."
|
|
479
477
|
},
|
|
480
478
|
"validation": {
|
|
481
|
-
"range": "
|
|
482
|
-
"stepDividesDay": "
|
|
483
|
-
"multipleOfStep": "
|
|
484
|
-
"maxBelowMin": "
|
|
485
|
-
"tooManyRanges": "
|
|
486
|
-
"timeFormat": "
|
|
487
|
-
"endAfterStart": "
|
|
488
|
-
"overlap": "
|
|
479
|
+
"range": "Enter a whole number from {{min}} to {{max}}.",
|
|
480
|
+
"stepDividesDay": "The step must divide 1440 minutes evenly.",
|
|
481
|
+
"multipleOfStep": "Must be a multiple of {{step}} minutes.",
|
|
482
|
+
"maxBelowMin": "Must not be shorter than the minimum duration.",
|
|
483
|
+
"tooManyRanges": "At most 8 ranges per day.",
|
|
484
|
+
"timeFormat": "Use HH:mm, for example 09:00. The end may be 24:00.",
|
|
485
|
+
"endAfterStart": "The end must be after the start.",
|
|
486
|
+
"overlap": "Ranges must not overlap."
|
|
489
487
|
},
|
|
490
488
|
"hours": {
|
|
491
|
-
"description": "
|
|
492
|
-
"allDay": "
|
|
493
|
-
"addRange": "
|
|
494
|
-
"addRangeTo": "
|
|
495
|
-
"removeRange": "
|
|
496
|
-
"from": "
|
|
497
|
-
"to": "
|
|
498
|
-
"fromLabel": "
|
|
499
|
-
"toLabel": "
|
|
489
|
+
"description": "Bookings must lie fully inside these hours. A day without ranges is closed once any other day has ranges; with no ranges at all the resource is bookable around the clock.",
|
|
490
|
+
"allDay": "No range set",
|
|
491
|
+
"addRange": "Add range",
|
|
492
|
+
"addRangeTo": "Add range on {{day}}",
|
|
493
|
+
"removeRange": "Remove range {{index}} on {{day}}",
|
|
494
|
+
"from": "From",
|
|
495
|
+
"to": "Until",
|
|
496
|
+
"fromLabel": "From ({{day}}, range {{index}})",
|
|
497
|
+
"toLabel": "Until ({{day}}, range {{index}})"
|
|
500
498
|
},
|
|
501
499
|
"disableWarning": {
|
|
502
|
-
"title": "
|
|
500
|
+
"title": "Disable reservations?",
|
|
503
501
|
"body": {
|
|
504
|
-
"one": "
|
|
505
|
-
"many": "
|
|
502
|
+
"one": "{{count}} upcoming booking exists. Disabling reservations cancels it and notifies the holder.",
|
|
503
|
+
"many": "{{count}} upcoming bookings exist. Disabling reservations cancels them and notifies the holders."
|
|
506
504
|
},
|
|
507
505
|
"confirm": {
|
|
508
|
-
"one": "
|
|
509
|
-
"many": "
|
|
506
|
+
"one": "Disable and cancel {{count}} booking",
|
|
507
|
+
"many": "Disable and cancel {{count}} bookings"
|
|
510
508
|
}
|
|
511
509
|
},
|
|
512
510
|
"saved": {
|
|
513
|
-
"title": "
|
|
514
|
-
"body": "
|
|
511
|
+
"title": "Settings saved",
|
|
512
|
+
"body": "The reservation settings were saved. They apply to new bookings.",
|
|
515
513
|
"bodyCancelled": {
|
|
516
|
-
"one": "
|
|
517
|
-
"many": "
|
|
514
|
+
"one": "The settings were saved and {{count}} upcoming booking was cancelled.",
|
|
515
|
+
"many": "The settings were saved and {{count}} upcoming bookings were cancelled."
|
|
518
516
|
}
|
|
519
517
|
}
|
|
520
518
|
},
|
|
521
519
|
admin: {
|
|
522
|
-
"description": "
|
|
523
|
-
"loadFailed": "
|
|
524
|
-
"current": "
|
|
525
|
-
"default": "
|
|
526
|
-
"search": "
|
|
527
|
-
"searchPlaceholder": "
|
|
528
|
-
"matches": "{{count}}
|
|
529
|
-
"matchesTruncated": "{{total}}
|
|
530
|
-
"list": "
|
|
531
|
-
"saved": "
|
|
532
|
-
"savedBody": "
|
|
533
|
-
"failed": "
|
|
520
|
+
"description": "The timezone used for bookable hours, the booking time grid, notifications and calendar feeds.",
|
|
521
|
+
"loadFailed": "The timezone setting could not be loaded",
|
|
522
|
+
"current": "Timezone",
|
|
523
|
+
"default": "server default: {{timezone}}",
|
|
524
|
+
"search": "Search timezones",
|
|
525
|
+
"searchPlaceholder": "e.g. Europe/Berlin",
|
|
526
|
+
"matches": "{{count}} matching",
|
|
527
|
+
"matchesTruncated": "{{total}} matching, showing the first {{shown}}. Type to narrow the list.",
|
|
528
|
+
"list": "Timezones",
|
|
529
|
+
"saved": "Timezone saved",
|
|
530
|
+
"savedBody": "Reservations now use {{timezone}}.",
|
|
531
|
+
"failed": "Timezone could not be saved"
|
|
534
532
|
},
|
|
535
533
|
feeds: {
|
|
536
|
-
"title": "
|
|
537
|
-
"description": "
|
|
538
|
-
"create": "
|
|
539
|
-
"empty": "
|
|
540
|
-
"revoked": "
|
|
541
|
-
"revokedAt": "
|
|
542
|
-
"lastUsed": "
|
|
543
|
-
"neverUsed": "
|
|
544
|
-
"failed": "
|
|
545
|
-
"loadFailed": "
|
|
534
|
+
"title": "Calendar feeds",
|
|
535
|
+
"description": "Subscribe to reservations in your calendar app. Each feed has its own secret link; anyone with the link can read the feed.",
|
|
536
|
+
"create": "New feed",
|
|
537
|
+
"empty": "No feeds yet",
|
|
538
|
+
"revoked": "Revoked",
|
|
539
|
+
"revokedAt": "Revoked on {{date}}",
|
|
540
|
+
"lastUsed": "Last used {{date}}",
|
|
541
|
+
"neverUsed": "Never used",
|
|
542
|
+
"failed": "Action failed",
|
|
543
|
+
"loadFailed": "Calendar feeds could not be loaded",
|
|
546
544
|
"selection": {
|
|
547
|
-
"ownOnly": "
|
|
548
|
-
"introduced": "
|
|
549
|
-
"maintained": "
|
|
545
|
+
"ownOnly": "Only my own bookings",
|
|
546
|
+
"introduced": "Resources I am introduced to",
|
|
547
|
+
"maintained": "Resources I maintain",
|
|
550
548
|
"groups": {
|
|
551
|
-
"one": "{{count}}
|
|
552
|
-
"many": "{{count}}
|
|
549
|
+
"one": "{{count}} group",
|
|
550
|
+
"many": "{{count}} groups"
|
|
553
551
|
},
|
|
554
552
|
"resources": {
|
|
555
|
-
"one": "{{count}}
|
|
556
|
-
"many": "{{count}}
|
|
553
|
+
"one": "{{count}} resource",
|
|
554
|
+
"many": "{{count}} resources"
|
|
557
555
|
}
|
|
558
556
|
},
|
|
559
557
|
"form": {
|
|
560
|
-
"createTitle": "
|
|
561
|
-
"editTitle": "
|
|
558
|
+
"createTitle": "New calendar feed",
|
|
559
|
+
"editTitle": "Edit calendar feed",
|
|
562
560
|
"name": "Name",
|
|
563
|
-
"ownOnly": "
|
|
564
|
-
"introduced": "
|
|
565
|
-
"maintained": "
|
|
566
|
-
"groups": "
|
|
567
|
-
"noGroups": "
|
|
568
|
-
"resources": "
|
|
569
|
-
"searchResources": "
|
|
570
|
-
"selectedCount": "{{count}}
|
|
571
|
-
"needSelection": "
|
|
572
|
-
"create": "
|
|
561
|
+
"ownOnly": "Only my own bookings",
|
|
562
|
+
"introduced": "All resources I am introduced to",
|
|
563
|
+
"maintained": "All resources I maintain",
|
|
564
|
+
"groups": "Resource groups",
|
|
565
|
+
"noGroups": "No groups available",
|
|
566
|
+
"resources": "Specific resources",
|
|
567
|
+
"searchResources": "Search resources",
|
|
568
|
+
"selectedCount": "{{count}} selected",
|
|
569
|
+
"needSelection": "Choose at least one source for this feed.",
|
|
570
|
+
"create": "Create feed"
|
|
573
571
|
},
|
|
574
572
|
"secret": {
|
|
575
|
-
"title": "Feed
|
|
576
|
-
"body": "
|
|
577
|
-
"url": "Feed
|
|
578
|
-
"copy": "
|
|
579
|
-
"copied": "
|
|
573
|
+
"title": "Feed \"{{name}}\" is ready",
|
|
574
|
+
"body": "Copy this link now. For security it is shown only once; if you lose it, regenerate the feed.",
|
|
575
|
+
"url": "Feed link",
|
|
576
|
+
"copy": "Copy link",
|
|
577
|
+
"copied": "Copied"
|
|
580
578
|
},
|
|
581
579
|
"regenerate": {
|
|
582
|
-
"label": "
|
|
583
|
-
"title": "
|
|
584
|
-
"body": "
|
|
585
|
-
"confirm": "
|
|
580
|
+
"label": "Regenerate",
|
|
581
|
+
"title": "Regenerate \"{{name}}\"?",
|
|
582
|
+
"body": "A new link is created and the old one stops working immediately. Calendars using the old link lose access.",
|
|
583
|
+
"confirm": "Regenerate"
|
|
586
584
|
},
|
|
587
585
|
"revoke": {
|
|
588
|
-
"label": "
|
|
589
|
-
"title": "
|
|
590
|
-
"body": "
|
|
591
|
-
"confirm": "
|
|
586
|
+
"label": "Revoke",
|
|
587
|
+
"title": "Revoke \"{{name}}\"?",
|
|
588
|
+
"body": "The link stops working for good. This cannot be undone.",
|
|
589
|
+
"confirm": "Revoke"
|
|
592
590
|
}
|
|
591
|
+
},
|
|
592
|
+
dashboard: {
|
|
593
|
+
"title": "Upcoming reservations",
|
|
594
|
+
"description": "Your next bookings",
|
|
595
|
+
"empty": "No upcoming reservations.",
|
|
596
|
+
"unknownResource": "Unknown resource",
|
|
597
|
+
"manage": "Manage",
|
|
598
|
+
"loadError": "Your reservations could not be loaded.",
|
|
599
|
+
"next": "Next",
|
|
600
|
+
"now": "Now",
|
|
601
|
+
"group": "Reservations",
|
|
602
|
+
"keywords": ["booking", "calendar"]
|
|
593
603
|
}
|
|
594
604
|
};
|
|
595
|
-
var
|
|
596
|
-
title: "
|
|
605
|
+
var de_default = {
|
|
606
|
+
title: "Reservierungen",
|
|
597
607
|
sidebar: {
|
|
598
|
-
"my": "
|
|
599
|
-
"manage": "
|
|
608
|
+
"my": "Meine Reservierungen",
|
|
609
|
+
"manage": "Reservierungen verwalten"
|
|
600
610
|
},
|
|
601
611
|
slots: {
|
|
602
|
-
"settings": "
|
|
603
|
-
"admin": "
|
|
604
|
-
"account": "
|
|
612
|
+
"settings": "Reservierungen",
|
|
613
|
+
"admin": "Reservierungen",
|
|
614
|
+
"account": "Kalender-Feeds (iCal)"
|
|
605
615
|
},
|
|
606
616
|
common: {
|
|
607
|
-
"cancel": "
|
|
608
|
-
"close": "
|
|
609
|
-
"back": "
|
|
610
|
-
"save": "
|
|
611
|
-
"edit": "
|
|
612
|
-
"done": "
|
|
613
|
-
"retry": "
|
|
614
|
-
"loading": "
|
|
615
|
-
"timesIn": "
|
|
616
|
-
"pagination": "
|
|
617
|
-
"previousPage": "
|
|
618
|
-
"nextPage": "
|
|
617
|
+
"cancel": "Abbrechen",
|
|
618
|
+
"close": "Schließen",
|
|
619
|
+
"back": "Zurück",
|
|
620
|
+
"save": "Speichern",
|
|
621
|
+
"edit": "Bearbeiten",
|
|
622
|
+
"done": "Fertig",
|
|
623
|
+
"retry": "Erneut versuchen",
|
|
624
|
+
"loading": "Wird geladen",
|
|
625
|
+
"timesIn": "Zeiten in {{timezone}}",
|
|
626
|
+
"pagination": "Seiten",
|
|
627
|
+
"previousPage": "Vorherige Seite",
|
|
628
|
+
"nextPage": "Nächste Seite"
|
|
619
629
|
},
|
|
620
630
|
weekdays: {
|
|
621
|
-
"mon": "
|
|
622
|
-
"tue": "
|
|
623
|
-
"wed": "
|
|
624
|
-
"thu": "
|
|
625
|
-
"fri": "
|
|
626
|
-
"sat": "
|
|
627
|
-
"sun": "
|
|
631
|
+
"mon": "Montag",
|
|
632
|
+
"tue": "Dienstag",
|
|
633
|
+
"wed": "Mittwoch",
|
|
634
|
+
"thu": "Donnerstag",
|
|
635
|
+
"fri": "Freitag",
|
|
636
|
+
"sat": "Samstag",
|
|
637
|
+
"sun": "Sonntag"
|
|
628
638
|
},
|
|
629
639
|
status: {
|
|
630
|
-
"pending": "
|
|
631
|
-
"confirmed": "
|
|
632
|
-
"rejected": "
|
|
633
|
-
"cancelled": "
|
|
634
|
-
"expired": "
|
|
635
|
-
"no_show": "
|
|
636
|
-
"completed": "
|
|
640
|
+
"pending": "Wartet auf Genehmigung",
|
|
641
|
+
"confirmed": "Bestätigt",
|
|
642
|
+
"rejected": "Abgelehnt",
|
|
643
|
+
"cancelled": "Storniert",
|
|
644
|
+
"expired": "Abgelaufen",
|
|
645
|
+
"no_show": "Nicht erschienen",
|
|
646
|
+
"completed": "Abgeschlossen"
|
|
637
647
|
},
|
|
638
648
|
errors: {
|
|
639
|
-
"generic": "
|
|
640
|
-
"NOT_FOUND": "
|
|
641
|
-
"RESERVATIONS_DISABLED": "
|
|
642
|
-
"NOT_ALLOWED_TO_BOOK": "
|
|
643
|
-
"IN_THE_PAST": "
|
|
644
|
-
"OFF_TIME_STEP": "Start
|
|
645
|
-
"DURATION_TOO_SHORT": "
|
|
646
|
-
"DURATION_TOO_LONG": "
|
|
647
|
-
"BEYOND_MAX_ADVANCE": "
|
|
648
|
-
"LEAD_TIME_TOO_SHORT": "
|
|
649
|
-
"OUTSIDE_BOOKABLE_HOURS": "
|
|
650
|
-
"USER_BOOKING_LIMIT": "
|
|
651
|
-
"OVERLAP": "
|
|
652
|
-
"
|
|
653
|
-
"
|
|
654
|
-
"
|
|
655
|
-
"
|
|
656
|
-
"
|
|
657
|
-
"
|
|
649
|
+
"generic": "Etwas ist schiefgelaufen. Bitte versuche es erneut.",
|
|
650
|
+
"NOT_FOUND": "Diese Reservierung oder Ressource existiert nicht.",
|
|
651
|
+
"RESERVATIONS_DISABLED": "Für diese Ressource sind Reservierungen nicht aktiviert.",
|
|
652
|
+
"NOT_ALLOWED_TO_BOOK": "Du darfst diese Ressource nicht buchen.",
|
|
653
|
+
"IN_THE_PAST": "Die Buchung würde in der Vergangenheit beginnen.",
|
|
654
|
+
"OFF_TIME_STEP": "Start und Dauer müssen zum Buchungsraster passen.",
|
|
655
|
+
"DURATION_TOO_SHORT": "Die Buchung ist kürzer als die Mindestdauer.",
|
|
656
|
+
"DURATION_TOO_LONG": "Die Buchung ist länger als die Höchstdauer.",
|
|
657
|
+
"BEYOND_MAX_ADVANCE": "Das liegt zu weit in der Zukunft, um es zu buchen.",
|
|
658
|
+
"LEAD_TIME_TOO_SHORT": "Für diesen Zeitraum ist es zu spät zum Buchen.",
|
|
659
|
+
"OUTSIDE_BOOKABLE_HOURS": "Der Zeitraum liegt außerhalb der buchbaren Zeiten.",
|
|
660
|
+
"USER_BOOKING_LIMIT": "Du hast die maximale Anzahl aktiver Buchungen für diese Ressource erreicht.",
|
|
661
|
+
"OVERLAP": "Der Zeitraum überschneidet sich mit einer anderen Buchung. Bitte wähle eine andere Zeit.",
|
|
662
|
+
"OVERLAP_FULL": "Zu dieser Zeit sind alle Plätze belegt. Bitte wähle eine andere Zeit.",
|
|
663
|
+
"OWN_OVERLAP": "Du hast in diesem Zeitraum bereits eine Buchung. Bitte wähle eine andere Zeit.",
|
|
664
|
+
"MAINTENANCE": "Die Ressource ist in dieser Zeit in Wartung.",
|
|
665
|
+
"NOT_PENDING": "Diese Buchung wartet nicht mehr auf Genehmigung.",
|
|
666
|
+
"NOT_ACTIVE": "Diese Buchung ist nicht aktiv.",
|
|
667
|
+
"NOT_CANCELLABLE": "Diese Buchung kann nicht mehr storniert werden.",
|
|
668
|
+
"ALREADY_STARTED": "Diese Buchung hat bereits begonnen.",
|
|
669
|
+
"ALREADY_FINISHED": "Diese Buchung ist bereits beendet.",
|
|
658
670
|
"FUTURE_BOOKINGS_EXIST": {
|
|
659
|
-
"one": "
|
|
660
|
-
"many": "
|
|
671
|
+
"one": "Es gibt {{count}} kommende Buchung.",
|
|
672
|
+
"many": "Es gibt {{count}} kommende Buchungen."
|
|
661
673
|
},
|
|
662
|
-
"INVALID_RANGE": "
|
|
663
|
-
"INVALID_SETTINGS": "
|
|
664
|
-
"INVALID_TIMEZONE": "
|
|
665
|
-
"RANGE_TOO_LARGE": "
|
|
666
|
-
"FORBIDDEN": "
|
|
667
|
-
"RESERVATION_NOT_FOUND": "
|
|
668
|
-
"RESOURCE_NOT_FOUND": "
|
|
669
|
-
"FEED_LIMIT": "
|
|
670
|
-
"FEED_NOT_FOUND": "
|
|
671
|
-
"INVALID_FEED": "
|
|
674
|
+
"INVALID_RANGE": "Der gewählte Zeitraum ist ungültig.",
|
|
675
|
+
"INVALID_SETTINGS": "Einige Einstellungen sind ungültig.",
|
|
676
|
+
"INVALID_TIMEZONE": "Diese Zeitzone ist ungültig.",
|
|
677
|
+
"RANGE_TOO_LARGE": "Der angefragte Zeitraum ist zu groß.",
|
|
678
|
+
"FORBIDDEN": "Dazu hast du keine Berechtigung.",
|
|
679
|
+
"RESERVATION_NOT_FOUND": "Diese Reservierung existiert nicht.",
|
|
680
|
+
"RESOURCE_NOT_FOUND": "Diese Ressource existiert nicht.",
|
|
681
|
+
"FEED_LIMIT": "Du hast die maximale Anzahl an Kalender-Feeds erreicht. Widerrufe zuerst einen nicht mehr genutzten Feed.",
|
|
682
|
+
"FEED_NOT_FOUND": "Dieser Kalender-Feed existiert nicht oder wurde widerrufen.",
|
|
683
|
+
"INVALID_FEED": "Wähle mindestens eine Quelle für den Kalender-Feed."
|
|
672
684
|
},
|
|
673
685
|
card: {
|
|
674
|
-
"title": "
|
|
675
|
-
"reserve": "
|
|
676
|
-
"cannotBook": "
|
|
677
|
-
"view": "
|
|
678
|
-
"managerHint": "
|
|
679
|
-
"next": "
|
|
680
|
-
"current": "
|
|
681
|
-
"loadFailed": "
|
|
682
|
-
"day": "
|
|
683
|
-
"week": "
|
|
684
|
-
"previous": "
|
|
685
|
-
"nextRange": "
|
|
686
|
-
"dayBarLabel": "
|
|
687
|
-
"free": "
|
|
688
|
-
"reserved": "
|
|
689
|
-
"reservedPending": "
|
|
690
|
-
"
|
|
691
|
-
"
|
|
692
|
-
"
|
|
686
|
+
"title": "Reservierungen",
|
|
687
|
+
"reserve": "Reservieren",
|
|
688
|
+
"cannotBook": "Buchen ist nicht möglich",
|
|
689
|
+
"view": "Ansicht",
|
|
690
|
+
"managerHint": "Als verwaltende Person siehst du bei jeder Buchung, wer sie hält, und ihre Notizen und Gründe.",
|
|
691
|
+
"next": "Deine nächste Buchung",
|
|
692
|
+
"current": "Aktuelle Buchung",
|
|
693
|
+
"loadFailed": "Reservierungen konnten nicht geladen werden",
|
|
694
|
+
"day": "Tag",
|
|
695
|
+
"week": "Woche",
|
|
696
|
+
"previous": "Früher",
|
|
697
|
+
"nextRange": "Später",
|
|
698
|
+
"dayBarLabel": "Gebuchte Zeiten des Tages",
|
|
699
|
+
"free": "Keine Buchungen",
|
|
700
|
+
"reserved": "Reserviert",
|
|
701
|
+
"reservedPending": "Reserviert (wartet auf Genehmigung)",
|
|
702
|
+
"slotsBooked": "{{booked}} von {{total}} Plätzen reserviert",
|
|
703
|
+
"yours": "Deine Buchung",
|
|
704
|
+
"maintenance": "Wartung",
|
|
705
|
+
"openEnd": "offenes Ende"
|
|
693
706
|
},
|
|
694
707
|
booking: {
|
|
695
|
-
"title": "
|
|
696
|
-
"titleGeneric": "
|
|
697
|
-
"date": "
|
|
698
|
-
"timezoneHint": "
|
|
699
|
-
"start": "
|
|
700
|
-
"duration": "
|
|
701
|
-
"durationHint": "In
|
|
702
|
-
"note": "
|
|
703
|
-
"noSlots": "
|
|
704
|
-
"approvalNeeded": "
|
|
705
|
-
"instantNote": "
|
|
706
|
-
"submit": "
|
|
707
|
-
"requestSubmit": "
|
|
708
|
-
"failedTitle": "
|
|
709
|
-
"bookedTitle": "
|
|
710
|
-
"bookedBody": "
|
|
711
|
-
"requestedTitle": "
|
|
712
|
-
"requestedBody": "
|
|
708
|
+
"title": "{{resource}} reservieren",
|
|
709
|
+
"titleGeneric": "Ressource reservieren",
|
|
710
|
+
"date": "Datum",
|
|
711
|
+
"timezoneHint": "Zeiten in {{timezone}}",
|
|
712
|
+
"start": "Beginn",
|
|
713
|
+
"duration": "Dauer",
|
|
714
|
+
"durationHint": "In Schritten von {{step}} Min., von {{min}} bis {{max}}",
|
|
715
|
+
"note": "Notiz (optional)",
|
|
716
|
+
"noSlots": "An diesem Tag gibt es keine freien Startzeiten.",
|
|
717
|
+
"approvalNeeded": "Eine verwaltende Person muss diese Buchung genehmigen, bevor sie gültig wird.",
|
|
718
|
+
"instantNote": "Deine Buchung wird sofort bestätigt.",
|
|
719
|
+
"submit": "Reservieren",
|
|
720
|
+
"requestSubmit": "Reservierung anfragen",
|
|
721
|
+
"failedTitle": "Reservierung fehlgeschlagen",
|
|
722
|
+
"bookedTitle": "Reservierung bestätigt",
|
|
723
|
+
"bookedBody": "Deine Buchung für {{range}} ist bestätigt.",
|
|
724
|
+
"requestedTitle": "Reservierung angefragt",
|
|
725
|
+
"requestedBody": "Deine Anfrage für {{range}} wartet auf Genehmigung."
|
|
713
726
|
},
|
|
714
727
|
checkIn: {
|
|
715
|
-
"required": "
|
|
716
|
-
"requiredFromStart": "
|
|
717
|
-
"notRequired": "
|
|
728
|
+
"required": "Einchecken durch Starten der Ressource: ab {{early}} Min. vor Beginn bis {{grace}} Min. nach Beginn. Ohne Check-in wird die Buchung freigegeben.",
|
|
729
|
+
"requiredFromStart": "Einchecken durch Starten der Ressource: ab Beginn bis {{grace}} Min. nach Beginn. Ohne Check-in wird die Buchung freigegeben.",
|
|
730
|
+
"notRequired": "Ein Check-in ist nicht nötig; die Buchung bleibt bis zum Ende bestehen."
|
|
718
731
|
},
|
|
719
732
|
keepFree: {
|
|
720
|
-
"title": "
|
|
721
|
-
"body": "
|
|
722
|
-
"keep": "
|
|
723
|
-
"free": "
|
|
733
|
+
"title": "Deine Buchung läuft bis {{until}}. Behalten oder den Rest freigeben?",
|
|
734
|
+
"body": "Du hast die Ressource beendet, bevor deine Buchung abgelaufen ist. Möchtest du den Rest der Buchung behalten oder für andere freigeben?",
|
|
735
|
+
"keep": "Behalten",
|
|
736
|
+
"free": "Rest freigeben"
|
|
724
737
|
},
|
|
725
738
|
actions: {
|
|
726
|
-
"reasonLabel": "
|
|
727
|
-
"commentLabel": "
|
|
728
|
-
"failedTitle": "
|
|
739
|
+
"reasonLabel": "Grund (optional)",
|
|
740
|
+
"commentLabel": "Kommentar (optional)",
|
|
741
|
+
"failedTitle": "Aktion fehlgeschlagen",
|
|
729
742
|
"cancel": {
|
|
730
|
-
"label": "
|
|
731
|
-
"title": "
|
|
732
|
-
"body": "
|
|
733
|
-
"confirm": "
|
|
743
|
+
"label": "Stornieren",
|
|
744
|
+
"title": "Diese Buchung stornieren?",
|
|
745
|
+
"body": "Die Buchung {{range}} für {{resource}} wird storniert und der Zeitraum freigegeben.",
|
|
746
|
+
"confirm": "Buchung stornieren"
|
|
734
747
|
},
|
|
735
748
|
"end-early": {
|
|
736
|
-
"label": "
|
|
737
|
-
"title": "
|
|
738
|
-
"body": "
|
|
739
|
-
"confirm": "
|
|
749
|
+
"label": "Vorzeitig beenden",
|
|
750
|
+
"title": "Diese Buchung vorzeitig beenden?",
|
|
751
|
+
"body": "Die Buchung für {{resource}} endet jetzt und der Rest (bis {{until}}) wird freigegeben.",
|
|
752
|
+
"confirm": "Buchung beenden"
|
|
740
753
|
},
|
|
741
754
|
"keep": {
|
|
742
|
-
"label": "
|
|
743
|
-
"title": "
|
|
744
|
-
"body": "
|
|
745
|
-
"confirm": "
|
|
755
|
+
"label": "Behalten",
|
|
756
|
+
"title": "Diese Buchung behalten?",
|
|
757
|
+
"body": "Die Buchung {{range}} für {{resource}} bleibt unverändert bestehen.",
|
|
758
|
+
"confirm": "Buchung behalten"
|
|
746
759
|
},
|
|
747
760
|
"approve": {
|
|
748
|
-
"label": "
|
|
749
|
-
"title": "
|
|
750
|
-
"body": "
|
|
751
|
-
"confirm": "
|
|
761
|
+
"label": "Genehmigen",
|
|
762
|
+
"title": "Diese Buchung genehmigen?",
|
|
763
|
+
"body": "Die Buchung {{range}} für {{resource}} wird bestätigt.",
|
|
764
|
+
"confirm": "Genehmigen"
|
|
752
765
|
},
|
|
753
766
|
"reject": {
|
|
754
|
-
"label": "
|
|
755
|
-
"title": "
|
|
756
|
-
"body": "
|
|
757
|
-
"confirm": "
|
|
767
|
+
"label": "Ablehnen",
|
|
768
|
+
"title": "Diese Buchung ablehnen?",
|
|
769
|
+
"body": "Die Buchung {{range}} für {{resource}} wird abgelehnt und der Inhaber benachrichtigt.",
|
|
770
|
+
"confirm": "Ablehnen"
|
|
758
771
|
}
|
|
759
772
|
},
|
|
760
773
|
table: {
|
|
761
|
-
"empty": "
|
|
762
|
-
"loadFailed": "
|
|
763
|
-
"reason": "
|
|
774
|
+
"empty": "Keine Buchungen",
|
|
775
|
+
"loadFailed": "Buchungen konnten nicht geladen werden",
|
|
776
|
+
"reason": "Grund: {{reason}}"
|
|
764
777
|
},
|
|
765
778
|
my: {
|
|
766
|
-
"title": "
|
|
767
|
-
"subtitle": "
|
|
768
|
-
"upcoming": "
|
|
769
|
-
"past": "
|
|
770
|
-
"manageLink": "
|
|
779
|
+
"title": "Meine Reservierungen",
|
|
780
|
+
"subtitle": "Deine kommenden und vergangenen Buchungen",
|
|
781
|
+
"upcoming": "Kommend",
|
|
782
|
+
"past": "Vergangen",
|
|
783
|
+
"manageLink": "Reservierungen verwalten"
|
|
771
784
|
},
|
|
772
785
|
manage: {
|
|
773
|
-
"denied": "
|
|
774
|
-
"title": "
|
|
775
|
-
"subtitle": "
|
|
776
|
-
"pending": "
|
|
777
|
-
"pendingHint": "
|
|
778
|
-
"all": "
|
|
786
|
+
"denied": "Du verwaltest keine Ressource, deshalb gibt es hier nichts anzuzeigen.",
|
|
787
|
+
"title": "Reservierungen verwalten",
|
|
788
|
+
"subtitle": "Anfragen genehmigen und alle Buchungen deiner Ressourcen im Blick behalten",
|
|
789
|
+
"pending": "Wartet auf Genehmigung",
|
|
790
|
+
"pendingHint": "Anfragen genehmigen oder ablehnen; die buchende Person wird benachrichtigt.",
|
|
791
|
+
"all": "Alle Buchungen",
|
|
779
792
|
"filters": {
|
|
780
|
-
"resource": "
|
|
781
|
-
"allResources": "
|
|
782
|
-
"searchResources": "
|
|
793
|
+
"resource": "Ressource",
|
|
794
|
+
"allResources": "Alle Ressourcen",
|
|
795
|
+
"searchResources": "Ressourcen suchen",
|
|
783
796
|
"status": "Status",
|
|
784
|
-
"allStatuses": "
|
|
785
|
-
"from": "
|
|
786
|
-
"to": "
|
|
797
|
+
"allStatuses": "Alle Status",
|
|
798
|
+
"from": "Von",
|
|
799
|
+
"to": "Bis"
|
|
787
800
|
}
|
|
788
801
|
},
|
|
789
802
|
detail: {
|
|
790
|
-
"title": "
|
|
791
|
-
"loadFailed": "
|
|
792
|
-
"holder": "
|
|
793
|
-
"cannotKeep": "
|
|
794
|
-
"cannotCancel": "
|
|
803
|
+
"title": "Reservierung",
|
|
804
|
+
"loadFailed": "Die Reservierung konnte nicht geladen werden",
|
|
805
|
+
"holder": "Gebucht von {{name}}",
|
|
806
|
+
"cannotKeep": "Diese Buchung kann nicht mehr behalten werden.",
|
|
807
|
+
"cannotCancel": "Diese Buchung kann nicht mehr storniert werden."
|
|
795
808
|
},
|
|
796
809
|
settings: {
|
|
797
|
-
"loadFailed": "
|
|
798
|
-
"enabled": "
|
|
799
|
-
"approvalRequired": "
|
|
800
|
-
"checkInEnabled": "
|
|
801
|
-
"failed": "
|
|
810
|
+
"loadFailed": "Die Reservierungs-Einstellungen konnten nicht geladen werden",
|
|
811
|
+
"enabled": "Reservierungen für diese Ressource aktivieren",
|
|
812
|
+
"approvalRequired": "Buchungen müssen von einer verwaltenden Person genehmigt werden",
|
|
813
|
+
"checkInEnabled": "Check-in verlangen (Ressource innerhalb der Karenzzeit starten)",
|
|
814
|
+
"failed": "Die Einstellungen konnten nicht gespeichert werden",
|
|
802
815
|
"whoCanBook": {
|
|
803
|
-
"label": "
|
|
804
|
-
"can-start": "
|
|
805
|
-
"managers-only": "
|
|
806
|
-
"any-user": "
|
|
816
|
+
"label": "Wer darf buchen",
|
|
817
|
+
"can-start": "Alle, die die Ressource starten dürfen",
|
|
818
|
+
"managers-only": "Nur verwaltende Personen",
|
|
819
|
+
"any-user": "Jeder angemeldete Nutzer"
|
|
807
820
|
},
|
|
808
821
|
"groups": {
|
|
809
|
-
"rules": "
|
|
810
|
-
"limits": "
|
|
811
|
-
"checkIn": "Check-in
|
|
812
|
-
"hours": "
|
|
822
|
+
"rules": "Buchungsregeln",
|
|
823
|
+
"limits": "Puffer und Limits",
|
|
824
|
+
"checkIn": "Check-in und Erinnerungen",
|
|
825
|
+
"hours": "Buchbare Zeiten"
|
|
813
826
|
},
|
|
814
827
|
"fields": {
|
|
815
|
-
"timeStepMinutes": "
|
|
816
|
-
"minDurationMinutes": "
|
|
817
|
-
"maxDurationMinutes": "
|
|
818
|
-
"maxAdvanceDays": "
|
|
819
|
-
"minLeadMinutes": "
|
|
820
|
-
"bufferBeforeMinutes": "
|
|
821
|
-
"bufferAfterMinutes": "
|
|
822
|
-
"maxActiveBookingsPerUser": "
|
|
823
|
-
"confirmWindowMinutes": "
|
|
824
|
-
"checkInGraceMinutes": "Check-in
|
|
825
|
-
"earlyCheckInMinutes": "
|
|
826
|
-
"handoverReminderMinutes": "
|
|
828
|
+
"timeStepMinutes": "Zeitraster (Minuten)",
|
|
829
|
+
"minDurationMinutes": "Mindestdauer (Minuten)",
|
|
830
|
+
"maxDurationMinutes": "Höchstdauer (Minuten)",
|
|
831
|
+
"maxAdvanceDays": "Höchstens so viele Tage im Voraus buchen",
|
|
832
|
+
"minLeadMinutes": "Späteste Buchung vor Beginn (Minuten)",
|
|
833
|
+
"bufferBeforeMinutes": "Puffer vor einer Buchung (Minuten)",
|
|
834
|
+
"bufferAfterMinutes": "Puffer nach einer Buchung (Minuten)",
|
|
835
|
+
"maxActiveBookingsPerUser": "Aktive Buchungen pro Nutzer",
|
|
836
|
+
"confirmWindowMinutes": "Bestätigung zum Starten so lange vor einer Reservierung (Minuten)",
|
|
837
|
+
"checkInGraceMinutes": "Karenzzeit für den Check-in (Minuten)",
|
|
838
|
+
"earlyCheckInMinutes": "Frühes Einchecken (Minuten)",
|
|
839
|
+
"handoverReminderMinutes": "Übergabe-Erinnerung vor einer Reservierung (Minuten)"
|
|
827
840
|
},
|
|
828
841
|
"hints": {
|
|
829
|
-
"timeStepMinutes": "
|
|
830
|
-
"minDurationMinutes": "
|
|
831
|
-
"maxDurationMinutes": "
|
|
832
|
-
"maxAdvanceDays": "{{min}}
|
|
833
|
-
"minLeadMinutes": "0
|
|
834
|
-
"bufferBeforeMinutes": "
|
|
835
|
-
"bufferAfterMinutes": "
|
|
836
|
-
"maxActiveBookingsPerUser": "0
|
|
837
|
-
"confirmWindowMinutes": "0
|
|
838
|
-
"checkInGraceMinutes": "{{min}}
|
|
839
|
-
"earlyCheckInMinutes": "
|
|
840
|
-
"handoverReminderMinutes": "
|
|
842
|
+
"timeStepMinutes": "Beginn und Dauer rasten auf diesem Raster ein; {{min}} bis {{max}}, muss 1440 teilen.",
|
|
843
|
+
"minDurationMinutes": "Kürzeste Buchung, ein Vielfaches des Rasters.",
|
|
844
|
+
"maxDurationMinutes": "Längste Buchung, ein Vielfaches des Rasters.",
|
|
845
|
+
"maxAdvanceDays": "{{min}} bis {{max}} Tage.",
|
|
846
|
+
"minLeadMinutes": "0 erlaubt Buchungen bis zum Beginn.",
|
|
847
|
+
"bufferBeforeMinutes": "Wird vor jeder Buchung freigehalten.",
|
|
848
|
+
"bufferAfterMinutes": "Wird nach jeder Buchung freigehalten.",
|
|
849
|
+
"maxActiveBookingsPerUser": "0 bedeutet unbegrenzt.",
|
|
850
|
+
"confirmWindowMinutes": "0 fragt nie. Höchstens {{max}}.",
|
|
851
|
+
"checkInGraceMinutes": "{{min}} bis {{max}} Minuten nach dem Beginn.",
|
|
852
|
+
"earlyCheckInMinutes": "Wie früh der Inhaber starten darf. {{min}} bis {{max}}.",
|
|
853
|
+
"handoverReminderMinutes": "Benachrichtigt den aktuellen Nutzer. 0 schaltet es aus."
|
|
841
854
|
},
|
|
842
855
|
"validation": {
|
|
843
|
-
"range": "
|
|
844
|
-
"stepDividesDay": "
|
|
845
|
-
"multipleOfStep": "
|
|
846
|
-
"maxBelowMin": "
|
|
847
|
-
"tooManyRanges": "
|
|
848
|
-
"timeFormat": "
|
|
849
|
-
"endAfterStart": "
|
|
850
|
-
"overlap": "
|
|
856
|
+
"range": "Gib eine ganze Zahl von {{min}} bis {{max}} ein.",
|
|
857
|
+
"stepDividesDay": "Das Raster muss 1440 Minuten ohne Rest teilen.",
|
|
858
|
+
"multipleOfStep": "Muss ein Vielfaches von {{step}} Minuten sein.",
|
|
859
|
+
"maxBelowMin": "Darf nicht kürzer als die Mindestdauer sein.",
|
|
860
|
+
"tooManyRanges": "Höchstens 8 Zeiträume pro Tag.",
|
|
861
|
+
"timeFormat": "Format HH:mm, zum Beispiel 09:00. Das Ende darf 24:00 sein.",
|
|
862
|
+
"endAfterStart": "Das Ende muss nach dem Beginn liegen.",
|
|
863
|
+
"overlap": "Zeiträume dürfen sich nicht überschneiden."
|
|
851
864
|
},
|
|
852
865
|
"hours": {
|
|
853
|
-
"description": "
|
|
854
|
-
"allDay": "
|
|
855
|
-
"addRange": "
|
|
856
|
-
"addRangeTo": "
|
|
857
|
-
"removeRange": "
|
|
858
|
-
"from": "
|
|
859
|
-
"to": "
|
|
860
|
-
"fromLabel": "
|
|
861
|
-
"toLabel": "
|
|
866
|
+
"description": "Buchungen müssen vollständig in diesen Zeiten liegen. Ein Tag ohne Zeitraum ist geschlossen, sobald ein anderer Tag Zeiträume hat; ganz ohne Zeiträume ist die Ressource rund um die Uhr buchbar.",
|
|
867
|
+
"allDay": "Kein Zeitraum festgelegt",
|
|
868
|
+
"addRange": "Zeitraum hinzufügen",
|
|
869
|
+
"addRangeTo": "Zeitraum für {{day}} hinzufügen",
|
|
870
|
+
"removeRange": "Zeitraum {{index}} am {{day}} entfernen",
|
|
871
|
+
"from": "Von",
|
|
872
|
+
"to": "Bis",
|
|
873
|
+
"fromLabel": "Von ({{day}}, Zeitraum {{index}})",
|
|
874
|
+
"toLabel": "Bis ({{day}}, Zeitraum {{index}})"
|
|
862
875
|
},
|
|
863
876
|
"disableWarning": {
|
|
864
|
-
"title": "
|
|
877
|
+
"title": "Reservierungen deaktivieren?",
|
|
865
878
|
"body": {
|
|
866
|
-
"one": "{{count}}
|
|
867
|
-
"many": "{{count}}
|
|
879
|
+
"one": "Es gibt {{count}} kommende Buchung. Beim Deaktivieren wird sie storniert und der Inhaber benachrichtigt.",
|
|
880
|
+
"many": "Es gibt {{count}} kommende Buchungen. Beim Deaktivieren werden sie storniert und die Inhaber benachrichtigt."
|
|
868
881
|
},
|
|
869
882
|
"confirm": {
|
|
870
|
-
"one": "
|
|
871
|
-
"many": "
|
|
883
|
+
"one": "Deaktivieren und {{count}} Buchung stornieren",
|
|
884
|
+
"many": "Deaktivieren und {{count}} Buchungen stornieren"
|
|
872
885
|
}
|
|
873
886
|
},
|
|
874
887
|
"saved": {
|
|
875
|
-
"title": "
|
|
876
|
-
"body": "
|
|
888
|
+
"title": "Einstellungen gespeichert",
|
|
889
|
+
"body": "Die Reservierungseinstellungen wurden gespeichert. Sie gelten für neue Buchungen.",
|
|
877
890
|
"bodyCancelled": {
|
|
878
|
-
"one": "
|
|
879
|
-
"many": "
|
|
891
|
+
"one": "Die Einstellungen wurden gespeichert und {{count}} kommende Buchung storniert.",
|
|
892
|
+
"many": "Die Einstellungen wurden gespeichert und {{count}} kommende Buchungen storniert."
|
|
880
893
|
}
|
|
881
894
|
}
|
|
882
895
|
},
|
|
883
896
|
admin: {
|
|
884
|
-
"description": "
|
|
885
|
-
"loadFailed": "
|
|
886
|
-
"current": "
|
|
887
|
-
"default": "
|
|
888
|
-
"search": "
|
|
889
|
-
"searchPlaceholder": "
|
|
890
|
-
"matches": "{{count}}
|
|
891
|
-
"matchesTruncated": "{{total}}
|
|
892
|
-
"list": "
|
|
893
|
-
"saved": "
|
|
894
|
-
"savedBody": "
|
|
895
|
-
"failed": "
|
|
897
|
+
"description": "Die Zeitzone für buchbare Zeiten, das Buchungsraster, Benachrichtigungen und Kalender-Feeds.",
|
|
898
|
+
"loadFailed": "Die Zeitzonen-Einstellung konnte nicht geladen werden",
|
|
899
|
+
"current": "Zeitzone",
|
|
900
|
+
"default": "Server-Standard: {{timezone}}",
|
|
901
|
+
"search": "Zeitzonen suchen",
|
|
902
|
+
"searchPlaceholder": "z. B. Europe/Berlin",
|
|
903
|
+
"matches": "{{count}} Treffer",
|
|
904
|
+
"matchesTruncated": "{{total}} Treffer, die ersten {{shown}} werden angezeigt. Zum Eingrenzen tippen.",
|
|
905
|
+
"list": "Zeitzonen",
|
|
906
|
+
"saved": "Zeitzone gespeichert",
|
|
907
|
+
"savedBody": "Reservierungen verwenden jetzt {{timezone}}.",
|
|
908
|
+
"failed": "Die Zeitzone konnte nicht gespeichert werden"
|
|
896
909
|
},
|
|
897
910
|
feeds: {
|
|
898
|
-
"title": "
|
|
899
|
-
"description": "
|
|
900
|
-
"create": "
|
|
901
|
-
"empty": "
|
|
902
|
-
"revoked": "
|
|
903
|
-
"revokedAt": "
|
|
904
|
-
"lastUsed": "
|
|
905
|
-
"neverUsed": "
|
|
906
|
-
"failed": "
|
|
907
|
-
"loadFailed": "
|
|
911
|
+
"title": "Kalender-Feeds",
|
|
912
|
+
"description": "Abonniere Reservierungen in deiner Kalender-App. Jeder Feed hat einen eigenen geheimen Link; wer den Link kennt, kann den Feed lesen.",
|
|
913
|
+
"create": "Neuer Feed",
|
|
914
|
+
"empty": "Noch keine Feeds",
|
|
915
|
+
"revoked": "Widerrufen",
|
|
916
|
+
"revokedAt": "Widerrufen am {{date}}",
|
|
917
|
+
"lastUsed": "Zuletzt genutzt {{date}}",
|
|
918
|
+
"neverUsed": "Nie genutzt",
|
|
919
|
+
"failed": "Aktion fehlgeschlagen",
|
|
920
|
+
"loadFailed": "Kalender-Feeds konnten nicht geladen werden",
|
|
908
921
|
"selection": {
|
|
909
|
-
"ownOnly": "
|
|
910
|
-
"introduced": "
|
|
911
|
-
"maintained": "
|
|
922
|
+
"ownOnly": "Nur meine eigenen Buchungen",
|
|
923
|
+
"introduced": "Ressourcen, in die ich eingewiesen bin",
|
|
924
|
+
"maintained": "Ressourcen, die ich betreue",
|
|
912
925
|
"groups": {
|
|
913
|
-
"one": "{{count}}
|
|
914
|
-
"many": "{{count}}
|
|
926
|
+
"one": "{{count}} Gruppe",
|
|
927
|
+
"many": "{{count}} Gruppen"
|
|
915
928
|
},
|
|
916
929
|
"resources": {
|
|
917
|
-
"one": "{{count}}
|
|
918
|
-
"many": "{{count}}
|
|
930
|
+
"one": "{{count}} Ressource",
|
|
931
|
+
"many": "{{count}} Ressourcen"
|
|
919
932
|
}
|
|
920
933
|
},
|
|
921
934
|
"form": {
|
|
922
|
-
"createTitle": "
|
|
923
|
-
"editTitle": "
|
|
935
|
+
"createTitle": "Neuer Kalender-Feed",
|
|
936
|
+
"editTitle": "Kalender-Feed bearbeiten",
|
|
924
937
|
"name": "Name",
|
|
925
|
-
"ownOnly": "
|
|
926
|
-
"introduced": "
|
|
927
|
-
"maintained": "
|
|
928
|
-
"groups": "
|
|
929
|
-
"noGroups": "
|
|
930
|
-
"resources": "
|
|
931
|
-
"searchResources": "
|
|
932
|
-
"selectedCount": "{{count}}
|
|
933
|
-
"needSelection": "
|
|
934
|
-
"create": "
|
|
938
|
+
"ownOnly": "Nur meine eigenen Buchungen",
|
|
939
|
+
"introduced": "Alle Ressourcen, in die ich eingewiesen bin",
|
|
940
|
+
"maintained": "Alle Ressourcen, die ich betreue",
|
|
941
|
+
"groups": "Ressourcengruppen",
|
|
942
|
+
"noGroups": "Keine Gruppen verfügbar",
|
|
943
|
+
"resources": "Bestimmte Ressourcen",
|
|
944
|
+
"searchResources": "Ressourcen suchen",
|
|
945
|
+
"selectedCount": "{{count}} ausgewählt",
|
|
946
|
+
"needSelection": "Wähle mindestens eine Quelle für diesen Feed.",
|
|
947
|
+
"create": "Feed erstellen"
|
|
935
948
|
},
|
|
936
949
|
"secret": {
|
|
937
|
-
"title": "Feed
|
|
938
|
-
"body": "
|
|
939
|
-
"url": "Feed
|
|
940
|
-
"copy": "
|
|
941
|
-
"copied": "
|
|
950
|
+
"title": "Feed „{{name}}“ ist bereit",
|
|
951
|
+
"body": "Kopiere diesen Link jetzt. Aus Sicherheitsgründen wird er nur einmal angezeigt; falls du ihn verlierst, erzeuge den Feed neu.",
|
|
952
|
+
"url": "Feed-Link",
|
|
953
|
+
"copy": "Link kopieren",
|
|
954
|
+
"copied": "Kopiert"
|
|
942
955
|
},
|
|
943
956
|
"regenerate": {
|
|
944
|
-
"label": "
|
|
945
|
-
"title": "
|
|
946
|
-
"body": "
|
|
947
|
-
"confirm": "
|
|
957
|
+
"label": "Neu erzeugen",
|
|
958
|
+
"title": "„{{name}}“ neu erzeugen?",
|
|
959
|
+
"body": "Es wird ein neuer Link erstellt und der alte funktioniert sofort nicht mehr. Kalender mit dem alten Link verlieren den Zugriff.",
|
|
960
|
+
"confirm": "Neu erzeugen"
|
|
948
961
|
},
|
|
949
962
|
"revoke": {
|
|
950
|
-
"label": "
|
|
951
|
-
"title": "
|
|
952
|
-
"body": "
|
|
953
|
-
"confirm": "
|
|
963
|
+
"label": "Widerrufen",
|
|
964
|
+
"title": "„{{name}}“ widerrufen?",
|
|
965
|
+
"body": "Der Link funktioniert dauerhaft nicht mehr. Das lässt sich nicht rückgängig machen.",
|
|
966
|
+
"confirm": "Widerrufen"
|
|
954
967
|
}
|
|
968
|
+
},
|
|
969
|
+
dashboard: {
|
|
970
|
+
"title": "Anstehende Reservierungen",
|
|
971
|
+
"description": "Ihre nächsten Buchungen",
|
|
972
|
+
"empty": "Keine anstehenden Reservierungen.",
|
|
973
|
+
"unknownResource": "Unbekannte Ressource",
|
|
974
|
+
"manage": "Verwalten",
|
|
975
|
+
"loadError": "Ihre Reservierungen konnten nicht geladen werden.",
|
|
976
|
+
"next": "Als Nächstes",
|
|
977
|
+
"now": "Jetzt",
|
|
978
|
+
"group": "Reservierungen",
|
|
979
|
+
"keywords": ["Buchung", "Kalender"]
|
|
955
980
|
}
|
|
956
981
|
};
|
|
957
|
-
|
|
958
|
-
//#region frontend/src/i18n.ts
|
|
982
|
+
// frontend/src/i18n.ts
|
|
959
983
|
var { useTranslations } = await importShared("@attraccess/plugins-frontend-ui");
|
|
960
984
|
var useReservationsTranslations = () => useTranslations({
|
|
961
985
|
en: en_default,
|
|
962
986
|
de: de_default
|
|
963
987
|
}, { escapeValues: false });
|
|
964
|
-
|
|
965
|
-
//#region frontend/src/lib/errors.ts
|
|
966
|
-
var KNOWN_CODES = /* @__PURE__ */ new Set([
|
|
967
|
-
"RESERVATIONS_DISABLED",
|
|
968
|
-
"NOT_ALLOWED_TO_BOOK",
|
|
969
|
-
"IN_THE_PAST",
|
|
970
|
-
"OFF_TIME_STEP",
|
|
971
|
-
"DURATION_TOO_SHORT",
|
|
972
|
-
"DURATION_TOO_LONG",
|
|
973
|
-
"BEYOND_MAX_ADVANCE",
|
|
974
|
-
"LEAD_TIME_TOO_SHORT",
|
|
975
|
-
"OUTSIDE_BOOKABLE_HOURS",
|
|
976
|
-
"USER_BOOKING_LIMIT",
|
|
977
|
-
"OVERLAP",
|
|
978
|
-
"MAINTENANCE",
|
|
979
|
-
"NOT_PENDING",
|
|
980
|
-
"NOT_ACTIVE",
|
|
981
|
-
"NOT_CANCELLABLE",
|
|
982
|
-
"ALREADY_STARTED",
|
|
983
|
-
"ALREADY_FINISHED",
|
|
984
|
-
"FUTURE_BOOKINGS_EXIST",
|
|
985
|
-
"INVALID_RANGE",
|
|
986
|
-
"INVALID_SETTINGS",
|
|
987
|
-
"INVALID_TIMEZONE",
|
|
988
|
-
"RANGE_TOO_LARGE",
|
|
989
|
-
"FORBIDDEN",
|
|
990
|
-
"RESERVATION_NOT_FOUND",
|
|
991
|
-
"RESOURCE_NOT_FOUND",
|
|
992
|
-
"FEED_LIMIT",
|
|
993
|
-
"FEED_NOT_FOUND",
|
|
994
|
-
"INVALID_FEED"
|
|
995
|
-
]);
|
|
996
|
-
/** Localised text for a known error code (e.g. the reason a booking is not possible), else the raw text. */
|
|
997
|
-
function describeCode(code, t) {
|
|
998
|
-
return KNOWN_CODES.has(code) ? t(`errors.${code}`, { count: 0 }) : code;
|
|
999
|
-
}
|
|
1000
|
-
/** Localised text for an API failure: a typed code wins, then the HTTP status, then the raw message. */
|
|
1001
|
-
function describeError(error, t) {
|
|
1002
|
-
if (error instanceof ReservationsApiError) {
|
|
1003
|
-
if (error.code && KNOWN_CODES.has(error.code)) return t(`errors.${error.code}`, { count: error.count ?? 0 });
|
|
1004
|
-
if (error.status === 403) return t("errors.FORBIDDEN");
|
|
1005
|
-
if (error.status === 404) return t("errors.NOT_FOUND");
|
|
1006
|
-
return error.message || t("errors.generic");
|
|
1007
|
-
}
|
|
1008
|
-
return error instanceof Error && error.message ? error.message : t("errors.generic");
|
|
1009
|
-
}
|
|
1010
|
-
//#endregion
|
|
1011
|
-
//#region frontend/src/lib/time.ts
|
|
988
|
+
// frontend/src/lib/time.ts
|
|
1012
989
|
var { detectLanguage } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1013
990
|
var DAY_MS$2 = 864e5;
|
|
1014
991
|
var formatters = /* @__PURE__ */ new Map();
|
|
@@ -1218,8 +1195,7 @@ function formatDuration(minutes, locale = detectLanguage()) {
|
|
|
1218
1195
|
function browserTimeZone() {
|
|
1219
1196
|
return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
|
|
1220
1197
|
}
|
|
1221
|
-
|
|
1222
|
-
//#region frontend/src/lib/queries.ts
|
|
1198
|
+
// frontend/src/lib/queries.ts
|
|
1223
1199
|
var { keepPreviousData, useQuery: useQuery$4, useQueryClient } = await importShared("@tanstack/react-query");
|
|
1224
1200
|
var { useCallback, useMemo: useMemo$8 } = await importShared("react");
|
|
1225
1201
|
var ROOT_KEY = "reservations";
|
|
@@ -1368,27 +1344,218 @@ function useIsManagerAnywhere() {
|
|
|
1368
1344
|
retry: false
|
|
1369
1345
|
}).data?.isManager === true;
|
|
1370
1346
|
}
|
|
1371
|
-
|
|
1372
|
-
//#region frontend/src/lib/useFormatters.ts
|
|
1347
|
+
// frontend/src/lib/useFormatters.ts
|
|
1373
1348
|
var { useMemo: useMemo$7 } = await importShared("react");
|
|
1374
|
-
|
|
1349
|
+
var { useDateTimeLocale } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1350
|
+
/**
|
|
1351
|
+
* Date/time formatting in the plugin timezone (falls back to the browser's). Dates and times follow the user's
|
|
1352
|
+
* date/time locale preference, like core; durations follow the UI language.
|
|
1353
|
+
*/
|
|
1375
1354
|
function useFormatters(timezone) {
|
|
1376
1355
|
const { language } = useReservationsTranslations();
|
|
1356
|
+
const locale = useDateTimeLocale();
|
|
1377
1357
|
return useMemo$7(() => {
|
|
1378
1358
|
const zone = timezone || browserTimeZone();
|
|
1379
1359
|
return {
|
|
1380
1360
|
zone,
|
|
1381
|
-
locale
|
|
1382
|
-
time: (value) => formatTime(value, zone,
|
|
1383
|
-
date: (value) => formatDate(value, zone,
|
|
1384
|
-
dateTime: (value) => formatDateTime(value, zone,
|
|
1361
|
+
locale,
|
|
1362
|
+
time: (value) => formatTime(value, zone, locale),
|
|
1363
|
+
date: (value) => formatDate(value, zone, locale),
|
|
1364
|
+
dateTime: (value) => formatDateTime(value, zone, locale),
|
|
1385
1365
|
duration: (minutes) => formatDuration(minutes, language),
|
|
1386
|
-
range: (start, end) => `${formatDateTime(start, zone,
|
|
1366
|
+
range: (start, end) => `${formatDateTime(start, zone, locale)} – ${formatTime(end, zone, locale)}`
|
|
1387
1367
|
};
|
|
1388
|
-
}, [
|
|
1368
|
+
}, [
|
|
1369
|
+
timezone,
|
|
1370
|
+
locale,
|
|
1371
|
+
language
|
|
1372
|
+
]);
|
|
1373
|
+
}
|
|
1374
|
+
// frontend/src/shared/StatusChip.tsx
|
|
1375
|
+
var { Chip: Chip$3 } = await importShared("@heroui/react");
|
|
1376
|
+
var COLOR = {
|
|
1377
|
+
pending: "warning",
|
|
1378
|
+
confirmed: "success",
|
|
1379
|
+
rejected: "danger",
|
|
1380
|
+
cancelled: "default",
|
|
1381
|
+
expired: "default",
|
|
1382
|
+
no_show: "danger",
|
|
1383
|
+
completed: "default"
|
|
1384
|
+
};
|
|
1385
|
+
function StatusChip({ status }) {
|
|
1386
|
+
const { t } = useReservationsTranslations();
|
|
1387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip$3, {
|
|
1388
|
+
size: "sm",
|
|
1389
|
+
color: COLOR[status],
|
|
1390
|
+
className: "rv:whitespace-nowrap",
|
|
1391
|
+
children: t(`status.${status}`)
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
// frontend/src/dashboard/UpcomingReservationsWidget.tsx
|
|
1395
|
+
var { useEffect: useEffect$7, useState: useState$12 } = await importShared("react");
|
|
1396
|
+
var { StatusAlert: StatusAlert$8 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1397
|
+
var { Link: Link$2, Spinner: Spinner$2 } = await importShared("@heroui/react");
|
|
1398
|
+
/** How many bookings each tile size lists. The tile has a fixed height, so it shows a fixed number instead of growing. */
|
|
1399
|
+
var MAX_RESERVATIONS = {
|
|
1400
|
+
small: 1,
|
|
1401
|
+
medium: 3,
|
|
1402
|
+
large: 7
|
|
1403
|
+
};
|
|
1404
|
+
var MINUTE = 6e4;
|
|
1405
|
+
var HOUR = 60 * MINUTE;
|
|
1406
|
+
var DAY = 24 * HOUR;
|
|
1407
|
+
/** The current time, updated every minute so relative starts stay right. */
|
|
1408
|
+
function useNow() {
|
|
1409
|
+
const [now, setNow] = useState$12(() => Date.now());
|
|
1410
|
+
useEffect$7(() => {
|
|
1411
|
+
const timer = setInterval(() => setNow(Date.now()), MINUTE);
|
|
1412
|
+
return () => clearInterval(timer);
|
|
1413
|
+
}, []);
|
|
1414
|
+
return now;
|
|
1415
|
+
}
|
|
1416
|
+
/** "in 2 hr" within a day, "now" once started, otherwise the start date. */
|
|
1417
|
+
function useRelativeStart(timezone) {
|
|
1418
|
+
const { t, language } = useReservationsTranslations();
|
|
1419
|
+
const format = useFormatters(timezone);
|
|
1420
|
+
const now = useNow();
|
|
1421
|
+
return (startTime) => {
|
|
1422
|
+
const delta = new Date(startTime).getTime() - now;
|
|
1423
|
+
if (delta <= 0) return t("dashboard.now");
|
|
1424
|
+
if (delta >= DAY) return format.dateTime(startTime);
|
|
1425
|
+
const relative = new Intl.RelativeTimeFormat(language, {
|
|
1426
|
+
style: "short",
|
|
1427
|
+
numeric: "auto"
|
|
1428
|
+
});
|
|
1429
|
+
return delta < HOUR ? relative.format(Math.max(1, Math.round(delta / MINUTE)), "minute") : relative.format(Math.round(delta / HOUR), "hour");
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
function NextReservation({ reservation, start }) {
|
|
1433
|
+
const { t } = useReservationsTranslations();
|
|
1434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link$2, {
|
|
1435
|
+
href: `/reservations/${reservation.id}`,
|
|
1436
|
+
className: "rv:flex rv:min-w-0 rv:flex-col rv:items-start rv:gap-1 rv:no-underline",
|
|
1437
|
+
"data-cy": "reservations-widget-item",
|
|
1438
|
+
children: [
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1440
|
+
className: "rv:text-xs rv:text-muted",
|
|
1441
|
+
children: t("dashboard.next")
|
|
1442
|
+
}),
|
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1444
|
+
className: "rv:w-full rv:truncate rv:text-base rv:font-semibold",
|
|
1445
|
+
children: reservation.resourceName ?? t("dashboard.unknownResource")
|
|
1446
|
+
}),
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1448
|
+
className: "rv:text-sm rv:text-muted",
|
|
1449
|
+
"data-cy": "reservations-widget-start",
|
|
1450
|
+
children: start
|
|
1451
|
+
})
|
|
1452
|
+
]
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Dashboard widget: the user's next bookings, each opening its detail page. Small shows the next one with a relative
|
|
1457
|
+
* start, medium the next three and large the next seven. The header links to /reservations.
|
|
1458
|
+
*/
|
|
1459
|
+
function UpcomingReservationsWidget({ size = "medium" } = {}) {
|
|
1460
|
+
const { t } = useReservationsTranslations();
|
|
1461
|
+
const timezone = usePluginTimezone();
|
|
1462
|
+
const upcoming = useMyReservations("upcoming");
|
|
1463
|
+
const isManager = useIsManagerAnywhere();
|
|
1464
|
+
const relativeStart = useRelativeStart(timezone);
|
|
1465
|
+
const renderList = () => {
|
|
1466
|
+
if (upcoming.isError) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusAlert$8, {
|
|
1467
|
+
status: "danger",
|
|
1468
|
+
title: t("dashboard.loadError")
|
|
1469
|
+
});
|
|
1470
|
+
if (upcoming.isPending || timezone === null) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner$2, { size: "sm" });
|
|
1471
|
+
const next = upcoming.data.slice(0, MAX_RESERVATIONS[size]);
|
|
1472
|
+
if (next.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
1473
|
+
className: "rv:text-sm rv:text-muted",
|
|
1474
|
+
children: t("dashboard.empty")
|
|
1475
|
+
});
|
|
1476
|
+
if (size === "small") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NextReservation, {
|
|
1477
|
+
reservation: next[0],
|
|
1478
|
+
start: relativeStart(next[0].startTime)
|
|
1479
|
+
});
|
|
1480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", {
|
|
1481
|
+
className: "rv:flex rv:min-w-0 rv:flex-col rv:gap-1",
|
|
1482
|
+
children: next.map((reservation) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", {
|
|
1483
|
+
className: "rv:flex rv:min-w-0 rv:items-center rv:gap-2",
|
|
1484
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link$2, {
|
|
1485
|
+
href: `/reservations/${reservation.id}`,
|
|
1486
|
+
className: "rv:flex rv:min-w-0 rv:flex-1 rv:items-center rv:gap-2 rv:no-underline",
|
|
1487
|
+
"data-cy": "reservations-widget-item",
|
|
1488
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1489
|
+
className: "rv:min-w-0 rv:flex-1 rv:truncate rv:text-sm rv:font-medium",
|
|
1490
|
+
children: reservation.resourceName ?? t("dashboard.unknownResource")
|
|
1491
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1492
|
+
className: "rv:shrink-0 rv:text-xs rv:text-muted",
|
|
1493
|
+
"data-cy": "reservations-widget-start",
|
|
1494
|
+
children: relativeStart(reservation.startTime)
|
|
1495
|
+
})]
|
|
1496
|
+
}), reservation.status !== "confirmed" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusChip, { status: reservation.status })]
|
|
1497
|
+
}, reservation.id))
|
|
1498
|
+
});
|
|
1499
|
+
};
|
|
1500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
1501
|
+
className: "rv:flex rv:min-w-0 rv:flex-col rv:gap-2",
|
|
1502
|
+
"data-cy": "reservations-widget",
|
|
1503
|
+
children: [renderList(), size !== "small" && isManager && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link$2, {
|
|
1504
|
+
href: "/reservations/manage",
|
|
1505
|
+
className: "rv:text-sm",
|
|
1506
|
+
"data-cy": "reservations-widget-manage",
|
|
1507
|
+
children: t("dashboard.manage")
|
|
1508
|
+
})]
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
// frontend/src/lib/errors.ts
|
|
1512
|
+
var KNOWN_CODES = /* @__PURE__ */ new Set([
|
|
1513
|
+
"RESERVATIONS_DISABLED",
|
|
1514
|
+
"NOT_ALLOWED_TO_BOOK",
|
|
1515
|
+
"IN_THE_PAST",
|
|
1516
|
+
"OFF_TIME_STEP",
|
|
1517
|
+
"DURATION_TOO_SHORT",
|
|
1518
|
+
"DURATION_TOO_LONG",
|
|
1519
|
+
"BEYOND_MAX_ADVANCE",
|
|
1520
|
+
"LEAD_TIME_TOO_SHORT",
|
|
1521
|
+
"OUTSIDE_BOOKABLE_HOURS",
|
|
1522
|
+
"USER_BOOKING_LIMIT",
|
|
1523
|
+
"OVERLAP",
|
|
1524
|
+
"OWN_OVERLAP",
|
|
1525
|
+
"MAINTENANCE",
|
|
1526
|
+
"NOT_PENDING",
|
|
1527
|
+
"NOT_ACTIVE",
|
|
1528
|
+
"NOT_CANCELLABLE",
|
|
1529
|
+
"ALREADY_STARTED",
|
|
1530
|
+
"ALREADY_FINISHED",
|
|
1531
|
+
"FUTURE_BOOKINGS_EXIST",
|
|
1532
|
+
"INVALID_RANGE",
|
|
1533
|
+
"INVALID_SETTINGS",
|
|
1534
|
+
"INVALID_TIMEZONE",
|
|
1535
|
+
"RANGE_TOO_LARGE",
|
|
1536
|
+
"FORBIDDEN",
|
|
1537
|
+
"RESERVATION_NOT_FOUND",
|
|
1538
|
+
"RESOURCE_NOT_FOUND",
|
|
1539
|
+
"FEED_LIMIT",
|
|
1540
|
+
"FEED_NOT_FOUND",
|
|
1541
|
+
"INVALID_FEED"
|
|
1542
|
+
]);
|
|
1543
|
+
var keyOf = (code, hints) => code === "OVERLAP" && (hints?.slots ?? 1) > 1 ? "errors.OVERLAP_FULL" : `errors.${code}`;
|
|
1544
|
+
/** Localised text for a known error code (e.g. the reason a booking is not possible), else the raw text. */
|
|
1545
|
+
function describeCode(code, t, hints) {
|
|
1546
|
+
return KNOWN_CODES.has(code) ? t(keyOf(code, hints), { count: 0 }) : code;
|
|
1547
|
+
}
|
|
1548
|
+
/** Localised text for an API failure: a typed code wins, then the HTTP status, then the raw message. */
|
|
1549
|
+
function describeError(error, t, hints) {
|
|
1550
|
+
if (error instanceof ReservationsApiError) {
|
|
1551
|
+
if (error.code && KNOWN_CODES.has(error.code)) return t(keyOf(error.code, hints), { count: error.count ?? 0 });
|
|
1552
|
+
if (error.status === 403) return t("errors.FORBIDDEN");
|
|
1553
|
+
if (error.status === 404) return t("errors.NOT_FOUND");
|
|
1554
|
+
return error.message || t("errors.generic");
|
|
1555
|
+
}
|
|
1556
|
+
return error instanceof Error && error.message ? error.message : t("errors.generic");
|
|
1389
1557
|
}
|
|
1390
|
-
|
|
1391
|
-
//#region frontend/src/shared/queryState.ts
|
|
1558
|
+
// frontend/src/shared/queryState.ts
|
|
1392
1559
|
/**
|
|
1393
1560
|
* Loading, error and retry props for `ReservationsTable`; a retry shows the spinner again, not the
|
|
1394
1561
|
* empty state. Pass the plugin timezone so the list waits for it instead of formatting in another zone.
|
|
@@ -1400,53 +1567,8 @@ function listState(query, timezone) {
|
|
|
1400
1567
|
onRetry: () => void query.refetch()
|
|
1401
1568
|
};
|
|
1402
1569
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
var { Description: Description$1, FieldError, Input: Input$2, Label: Label$4, ListBox: ListBox$2, ListBoxItem: ListBoxItem$1, NumberField, NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput, Select: HeroSelect, SelectIndicator, SelectPopover, SelectTrigger, SelectValue, TextField: TextField$3 } = await importShared("@heroui/react");
|
|
1406
|
-
function SelectField(props) {
|
|
1407
|
-
const { label, value, onChange, options, description, isDisabled, isInvalid, className } = props;
|
|
1408
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(HeroSelect, {
|
|
1409
|
-
value,
|
|
1410
|
-
onChange: (key) => onChange(String(key)),
|
|
1411
|
-
isDisabled,
|
|
1412
|
-
isInvalid,
|
|
1413
|
-
className,
|
|
1414
|
-
placeholder: label,
|
|
1415
|
-
"data-cy": props["data-cy"],
|
|
1416
|
-
children: [
|
|
1417
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$4, { children: label }),
|
|
1418
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SelectTrigger, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectValue, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectIndicator, {})] }),
|
|
1419
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description$1, { children: description }),
|
|
1420
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPopover, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListBox$2, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListBoxItem$1, {
|
|
1421
|
-
id: option.key,
|
|
1422
|
-
textValue: option.label,
|
|
1423
|
-
children: option.label
|
|
1424
|
-
}, option.key)) }) })
|
|
1425
|
-
]
|
|
1426
|
-
});
|
|
1427
|
-
}
|
|
1428
|
-
function NumberInput(props) {
|
|
1429
|
-
const { label, value, onChange, min, max, step, description, errorMessage } = props;
|
|
1430
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(NumberField, {
|
|
1431
|
-
value: Number.isFinite(value) ? value : void 0,
|
|
1432
|
-
onChange,
|
|
1433
|
-
minValue: min,
|
|
1434
|
-
maxValue: max,
|
|
1435
|
-
step,
|
|
1436
|
-
isInvalid: Boolean(errorMessage),
|
|
1437
|
-
"data-cy": props["data-cy"],
|
|
1438
|
-
children: [
|
|
1439
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$4, { children: label }),
|
|
1440
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(NumberFieldGroup, { children: [
|
|
1441
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NumberFieldDecrementButton, { children: "-" }),
|
|
1442
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NumberFieldInput, {}),
|
|
1443
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NumberFieldIncrementButton, { children: "+" })
|
|
1444
|
-
] }),
|
|
1445
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description$1, { children: description }),
|
|
1446
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldError, { children: errorMessage })
|
|
1447
|
-
]
|
|
1448
|
-
});
|
|
1449
|
-
}
|
|
1570
|
+
// frontend/src/shared/TextInput.tsx
|
|
1571
|
+
var { Description: Description$3, Input: Input$2, Label: Label$6, TextField: TextField$3 } = await importShared("@heroui/react");
|
|
1450
1572
|
function TextInput(props) {
|
|
1451
1573
|
const { label, value, onChange, type, placeholder, maxLength, min, max, isRequired, description } = props;
|
|
1452
1574
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TextField$3, {
|
|
@@ -1455,7 +1577,7 @@ function TextInput(props) {
|
|
|
1455
1577
|
isRequired,
|
|
1456
1578
|
type,
|
|
1457
1579
|
children: [
|
|
1458
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$
|
|
1580
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$6, { children: label }),
|
|
1459
1581
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input$2, {
|
|
1460
1582
|
placeholder,
|
|
1461
1583
|
maxLength,
|
|
@@ -1464,14 +1586,13 @@ function TextInput(props) {
|
|
|
1464
1586
|
"data-cy": props["data-cy"],
|
|
1465
1587
|
autoComplete: "off"
|
|
1466
1588
|
}),
|
|
1467
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description$
|
|
1589
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description$3, { children: description })
|
|
1468
1590
|
]
|
|
1469
1591
|
});
|
|
1470
1592
|
}
|
|
1471
|
-
|
|
1472
|
-
//#region frontend/src/ical/FeedFormModal.tsx
|
|
1593
|
+
// frontend/src/ical/FeedFormModal.tsx
|
|
1473
1594
|
var { Button: Button$10, LabeledSwitch: LabeledSwitch$1, ResourceSelector, StandardModal: StandardModal$1, StatusDialog: StatusDialog$8 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1474
|
-
var { Description, Fieldset: Fieldset$1, ModalBody: ModalBody$1, ModalFooter: ModalFooter$1, ModalHeader: ModalHeader$1, ModalHeading: ModalHeading$1 } = await importShared("@heroui/react");
|
|
1595
|
+
var { Description: Description$2, Fieldset: Fieldset$1, ModalBody: ModalBody$1, ModalFooter: ModalFooter$1, ModalHeader: ModalHeader$1, ModalHeading: ModalHeading$1 } = await importShared("@heroui/react");
|
|
1475
1596
|
var { useMutation: useMutation$6, useQuery: useQuery$3 } = await importShared("@tanstack/react-query");
|
|
1476
1597
|
var { useEffect: useEffect$6, useState: useState$11 } = await importShared("react");
|
|
1477
1598
|
var EMPTY = {
|
|
@@ -1584,7 +1705,7 @@ function FeedFormModal({ isOpen, feed, onOpenChange, onSaved }) {
|
|
|
1584
1705
|
resourceIds
|
|
1585
1706
|
})
|
|
1586
1707
|
}),
|
|
1587
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description, { children: t("feeds.form.selectedCount", { count: selection.resourceIds.length }) })
|
|
1708
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description$2, { children: t("feeds.form.selectedCount", { count: selection.resourceIds.length }) })
|
|
1588
1709
|
] })
|
|
1589
1710
|
] }),
|
|
1590
1711
|
!hasSelection && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
@@ -1614,8 +1735,7 @@ function FeedFormModal({ isOpen, feed, onOpenChange, onSaved }) {
|
|
|
1614
1735
|
children: error ?? ""
|
|
1615
1736
|
})] });
|
|
1616
1737
|
}
|
|
1617
|
-
|
|
1618
|
-
//#region frontend/src/ical/FeedSecretDialog.tsx
|
|
1738
|
+
// frontend/src/ical/FeedSecretDialog.tsx
|
|
1619
1739
|
var { Button: Button$9, StatusDialog: StatusDialog$7 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1620
1740
|
var { Input: Input$1 } = await importShared("@heroui/react");
|
|
1621
1741
|
var { CheckIcon, CopyIcon } = await importShared("lucide-react");
|
|
@@ -1674,10 +1794,9 @@ function FeedSecretDialog(props) {
|
|
|
1674
1794
|
})
|
|
1675
1795
|
});
|
|
1676
1796
|
}
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
var {
|
|
1680
|
-
var { Chip: Chip$3 } = await importShared("@heroui/react");
|
|
1797
|
+
// frontend/src/ical/IcalFeeds.tsx
|
|
1798
|
+
var { Button: Button$8, ConfirmableButton, EmptyState: EmptyState$1, StatusAlert: StatusAlert$7, StatusDialog: StatusDialog$6, TableDataLoadingIndicator: TableDataLoadingIndicator$2 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1799
|
+
var { Chip: Chip$2 } = await importShared("@heroui/react");
|
|
1681
1800
|
var { useMutation: useMutation$5 } = await importShared("@tanstack/react-query");
|
|
1682
1801
|
var { PlusIcon: PlusIcon$1 } = await importShared("lucide-react");
|
|
1683
1802
|
var { useState: useState$9 } = await importShared("react");
|
|
@@ -1695,18 +1814,32 @@ function IcalFeeds() {
|
|
|
1695
1814
|
const [formFeed, setFormFeed] = useState$9(null);
|
|
1696
1815
|
const [formOpen, setFormOpen] = useState$9(false);
|
|
1697
1816
|
const [secret, setSecret] = useState$9(null);
|
|
1698
|
-
const [confirm, setConfirm] = useState$9(null);
|
|
1699
1817
|
const [error, setError] = useState$9(null);
|
|
1700
1818
|
const run = useMutation$5({
|
|
1701
1819
|
mutationFn: async (current) => current.kind === "regenerate" ? regenerateFeed(current.feed.id) : (await revokeFeed(current.feed.id), null),
|
|
1702
1820
|
onSuccess: async (result) => {
|
|
1703
|
-
setConfirm(null);
|
|
1704
1821
|
if (result) setSecret(result);
|
|
1705
1822
|
await invalidate();
|
|
1706
1823
|
},
|
|
1707
|
-
onError: (failure) =>
|
|
1708
|
-
|
|
1709
|
-
|
|
1824
|
+
onError: (failure) => setError(describeError(failure, t))
|
|
1825
|
+
});
|
|
1826
|
+
const runAction = (current) => run.mutateAsync(current).catch(() => void 0);
|
|
1827
|
+
const confirmButton = (kind, feed) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmableButton, {
|
|
1828
|
+
label: t(`feeds.${kind}.label`),
|
|
1829
|
+
status: kind === "revoke" ? "error" : "warning",
|
|
1830
|
+
buttonProps: {
|
|
1831
|
+
size: "sm",
|
|
1832
|
+
variant: "secondary"
|
|
1833
|
+
},
|
|
1834
|
+
onConfirm: () => runAction({
|
|
1835
|
+
kind,
|
|
1836
|
+
feed
|
|
1837
|
+
}),
|
|
1838
|
+
confirm: {
|
|
1839
|
+
title: t(`feeds.${kind}.title`, { name: feed.name }),
|
|
1840
|
+
message: t(`feeds.${kind}.body`),
|
|
1841
|
+
confirmLabel: t(`feeds.${kind}.confirm`),
|
|
1842
|
+
"data-cy": "reservations-feed-confirm"
|
|
1710
1843
|
}
|
|
1711
1844
|
});
|
|
1712
1845
|
const describeSelection = (feed) => {
|
|
@@ -1766,7 +1899,7 @@ function IcalFeeds() {
|
|
|
1766
1899
|
children: [
|
|
1767
1900
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
1768
1901
|
className: "rv:flex rv:items-center rv:gap-2 rv:font-medium",
|
|
1769
|
-
children: [feed.name, feed.revokedAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip$
|
|
1902
|
+
children: [feed.name, feed.revokedAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip$2, {
|
|
1770
1903
|
size: "sm",
|
|
1771
1904
|
color: "danger",
|
|
1772
1905
|
children: t("feeds.revoked")
|
|
@@ -1798,24 +1931,8 @@ function IcalFeeds() {
|
|
|
1798
1931
|
},
|
|
1799
1932
|
children: t("common.edit")
|
|
1800
1933
|
}),
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
variant: "secondary",
|
|
1804
|
-
onPress: () => setConfirm({
|
|
1805
|
-
kind: "regenerate",
|
|
1806
|
-
feed
|
|
1807
|
-
}),
|
|
1808
|
-
children: t("feeds.regenerate.label")
|
|
1809
|
-
}),
|
|
1810
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$8, {
|
|
1811
|
-
size: "sm",
|
|
1812
|
-
variant: "secondary",
|
|
1813
|
-
onPress: () => setConfirm({
|
|
1814
|
-
kind: "revoke",
|
|
1815
|
-
feed
|
|
1816
|
-
}),
|
|
1817
|
-
children: t("feeds.revoke.label")
|
|
1818
|
-
})
|
|
1934
|
+
confirmButton("regenerate", feed),
|
|
1935
|
+
confirmButton("revoke", feed)
|
|
1819
1936
|
]
|
|
1820
1937
|
})]
|
|
1821
1938
|
}, feed.id))
|
|
@@ -1833,19 +1950,6 @@ function IcalFeeds() {
|
|
|
1833
1950
|
secret,
|
|
1834
1951
|
onClose: () => setSecret(null)
|
|
1835
1952
|
}),
|
|
1836
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusDialog$6, {
|
|
1837
|
-
isOpen: confirm !== null,
|
|
1838
|
-
onClose: () => !run.isPending && setConfirm(null),
|
|
1839
|
-
status: "warning",
|
|
1840
|
-
title: confirm ? t(`feeds.${confirm.kind}.title`, { name: confirm.feed.name }) : "",
|
|
1841
|
-
action: {
|
|
1842
|
-
label: confirm ? t(`feeds.${confirm.kind}.confirm`) : "",
|
|
1843
|
-
onPress: () => confirm && run.mutate(confirm),
|
|
1844
|
-
isPending: run.isPending
|
|
1845
|
-
},
|
|
1846
|
-
"data-cy": "reservations-feed-confirm",
|
|
1847
|
-
children: confirm ? t(`feeds.${confirm.kind}.body`) : ""
|
|
1848
|
-
}),
|
|
1849
1953
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusDialog$6, {
|
|
1850
1954
|
isOpen: error !== null,
|
|
1851
1955
|
onClose: () => setError(null),
|
|
@@ -1856,8 +1960,7 @@ function IcalFeeds() {
|
|
|
1856
1960
|
]
|
|
1857
1961
|
});
|
|
1858
1962
|
}
|
|
1859
|
-
|
|
1860
|
-
//#region frontend/src/shared/TimezoneHint.tsx
|
|
1963
|
+
// frontend/src/shared/TimezoneHint.tsx
|
|
1861
1964
|
/** "Times in Europe/Berlin": every list that shows booking times names the zone they are in. */
|
|
1862
1965
|
function TimezoneHint({ timezone }) {
|
|
1863
1966
|
const { t } = useReservationsTranslations();
|
|
@@ -1867,10 +1970,9 @@ function TimezoneHint({ timezone }) {
|
|
|
1867
1970
|
children: t("common.timesIn", { timezone })
|
|
1868
1971
|
});
|
|
1869
1972
|
}
|
|
1870
|
-
|
|
1871
|
-
//#region frontend/src/shared/useReservationActions.tsx
|
|
1973
|
+
// frontend/src/shared/useReservationActions.tsx
|
|
1872
1974
|
var { StatusDialog: StatusDialog$5 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1873
|
-
var { Label: Label$
|
|
1975
|
+
var { Label: Label$5, TextArea: TextArea$1, TextField: TextField$2 } = await importShared("@heroui/react");
|
|
1874
1976
|
var { useMutation: useMutation$4 } = await importShared("@tanstack/react-query");
|
|
1875
1977
|
var { useState: useState$8 } = await importShared("react");
|
|
1876
1978
|
var WITH_REASON = /* @__PURE__ */ new Set(["approve", "reject"]);
|
|
@@ -1934,7 +2036,7 @@ function useReservationActions(options = {}) {
|
|
|
1934
2036
|
}) }), reasonAllowed(pending) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TextField$2, {
|
|
1935
2037
|
value: reason,
|
|
1936
2038
|
onChange: setReason,
|
|
1937
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$
|
|
2039
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$5, { children: t(pending.action === "approve" ? "actions.commentLabel" : "actions.reasonLabel") }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextArea$1, {
|
|
1938
2040
|
maxLength: 500,
|
|
1939
2041
|
rows: 2
|
|
1940
2042
|
})]
|
|
@@ -1951,29 +2053,91 @@ function useReservationActions(options = {}) {
|
|
|
1951
2053
|
isPending: mutation.isPending
|
|
1952
2054
|
};
|
|
1953
2055
|
}
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
var
|
|
1957
|
-
var
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
function
|
|
1967
|
-
const
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
}
|
|
2056
|
+
// frontend/src/lib/slots.ts
|
|
2057
|
+
var MINUTE_MS = 6e4;
|
|
2058
|
+
var DAY_MS$1 = 864e5;
|
|
2059
|
+
var blocksSlot = (reservation) => reservation.status === "pending" || reservation.status === "confirmed";
|
|
2060
|
+
/** Span a booking keeps the resource busy for: [start − bufferBefore, end + bufferAfter), in epoch ms. */
|
|
2061
|
+
function blockedSpanOf(reservation) {
|
|
2062
|
+
return {
|
|
2063
|
+
start: new Date(reservation.startTime).getTime() - reservation.bufferBeforeMinutes * MINUTE_MS,
|
|
2064
|
+
end: new Date(reservation.endTime).getTime() + reservation.bufferAfterMinutes * MINUTE_MS
|
|
2065
|
+
};
|
|
2066
|
+
}
|
|
2067
|
+
/** Highest number of spans running at the same instant inside [from, to); touching spans do not overlap. */
|
|
2068
|
+
function peakConcurrency(spans, from, to) {
|
|
2069
|
+
const events = spans.map((span) => ({
|
|
2070
|
+
start: Math.max(span.start, from),
|
|
2071
|
+
end: Math.min(span.end, to)
|
|
2072
|
+
})).filter((span) => span.start < span.end).flatMap((span) => [{
|
|
2073
|
+
at: span.start,
|
|
2074
|
+
delta: 1
|
|
2075
|
+
}, {
|
|
2076
|
+
at: span.end,
|
|
2077
|
+
delta: -1
|
|
2078
|
+
}]);
|
|
2079
|
+
events.sort((a, b) => a.at - b.at || a.delta - b.delta);
|
|
2080
|
+
let current = 0;
|
|
2081
|
+
let peak = 0;
|
|
2082
|
+
for (const event of events) {
|
|
2083
|
+
current += event.delta;
|
|
2084
|
+
peak = Math.max(peak, current);
|
|
2085
|
+
}
|
|
2086
|
+
return peak;
|
|
2087
|
+
}
|
|
2088
|
+
function checkWindow(context, start, end) {
|
|
2089
|
+
const { rules, timezone, now } = context;
|
|
2090
|
+
const durationMinutes = (end.getTime() - start.getTime()) / MINUTE_MS;
|
|
2091
|
+
if (start.getTime() < now.getTime()) return "IN_THE_PAST";
|
|
2092
|
+
if (localMinutesOfDay(start, timezone) % rules.timeStepMinutes !== 0 || durationMinutes % rules.timeStepMinutes !== 0) return "OFF_TIME_STEP";
|
|
2093
|
+
if (durationMinutes < rules.minDurationMinutes) return "DURATION_TOO_SHORT";
|
|
2094
|
+
if (durationMinutes > rules.maxDurationMinutes) return "DURATION_TOO_LONG";
|
|
2095
|
+
if (start.getTime() > now.getTime() + rules.maxAdvanceDays * DAY_MS$1) return "BEYOND_MAX_ADVANCE";
|
|
2096
|
+
if (start.getTime() < now.getTime() + rules.minLeadMinutes * MINUTE_MS) return "LEAD_TIME_TOO_SHORT";
|
|
2097
|
+
const spanStart = /* @__PURE__ */ new Date(start.getTime() - rules.bufferBeforeMinutes * MINUTE_MS);
|
|
2098
|
+
const spanEnd = new Date(end.getTime() + rules.bufferAfterMinutes * MINUTE_MS);
|
|
2099
|
+
if (!isWithinBookableHours(rules.bookableHours, timezone, spanStart, spanEnd)) return "OUTSIDE_BOOKABLE_HOURS";
|
|
2100
|
+
const slots = context.slots ?? 1;
|
|
2101
|
+
const blocking = context.reservations.filter(blocksSlot).map((reservation) => ({
|
|
2102
|
+
...blockedSpanOf(reservation),
|
|
2103
|
+
mine: reservation.mine
|
|
2104
|
+
})).filter((span) => spanStart.getTime() < span.end && span.start < spanEnd.getTime());
|
|
2105
|
+
if (slots > 1 && blocking.some((span) => span.mine)) return "OWN_OVERLAP";
|
|
2106
|
+
if (peakConcurrency(blocking, spanStart.getTime(), spanEnd.getTime()) + 1 > slots) return "OVERLAP";
|
|
2107
|
+
return context.maintenance.some((span) => spanStart.getTime() < (span.endTime ? new Date(span.endTime).getTime() : Infinity) && new Date(span.startTime).getTime() < spanEnd.getTime()) ? "MAINTENANCE" : null;
|
|
2108
|
+
}
|
|
2109
|
+
/** Start times of one local day that allow at least the minimum duration. */
|
|
2110
|
+
function validStarts(context, day) {
|
|
2111
|
+
const { timeStepMinutes, minDurationMinutes } = context.rules;
|
|
2112
|
+
const dayStart = wallClockToDate(day, context.timezone);
|
|
2113
|
+
const nextDayStart = wallClockToDate(addLocalDays(day, 1), context.timezone);
|
|
2114
|
+
const result = [];
|
|
2115
|
+
for (let minutes = 0; minutes < 1440; minutes += timeStepMinutes) {
|
|
2116
|
+
const start = wallClockToDate({
|
|
2117
|
+
...day,
|
|
2118
|
+
hour: Math.floor(minutes / 60),
|
|
2119
|
+
minute: minutes % 60
|
|
2120
|
+
}, context.timezone);
|
|
2121
|
+
if (start.getTime() < dayStart.getTime() || start.getTime() >= nextDayStart.getTime()) continue;
|
|
2122
|
+
if (result.length && start.getTime() <= result[result.length - 1].getTime()) continue;
|
|
2123
|
+
if (checkWindow(context, start, new Date(start.getTime() + minDurationMinutes * MINUTE_MS)) === null) result.push(start);
|
|
2124
|
+
}
|
|
2125
|
+
return result;
|
|
2126
|
+
}
|
|
2127
|
+
/**
|
|
2128
|
+
* Durations (minutes) bookable from `start`. Once a longer window collides with a booking,
|
|
2129
|
+
* maintenance or the bookable hours, every longer one does as well, so scanning stops there.
|
|
2130
|
+
*/
|
|
2131
|
+
function validDurations(context, start) {
|
|
2132
|
+
const { timeStepMinutes, minDurationMinutes, maxDurationMinutes } = context.rules;
|
|
2133
|
+
const result = [];
|
|
2134
|
+
for (let minutes = minDurationMinutes; minutes <= maxDurationMinutes; minutes += timeStepMinutes) {
|
|
2135
|
+
if (checkWindow(context, start, new Date(start.getTime() + minutes * MINUTE_MS)) !== null) break;
|
|
2136
|
+
result.push(minutes);
|
|
2137
|
+
}
|
|
2138
|
+
return result;
|
|
1974
2139
|
}
|
|
1975
|
-
|
|
1976
|
-
//#region frontend/src/overview/AvailabilityTimeline.tsx
|
|
2140
|
+
// frontend/src/overview/AvailabilityTimeline.tsx
|
|
1977
2141
|
var { Chip: Chip$1 } = await importShared("@heroui/react");
|
|
1978
2142
|
var BAR_CLASS = {
|
|
1979
2143
|
mine: "rv:bg-accent",
|
|
@@ -1998,12 +2162,27 @@ function entriesOf(availability) {
|
|
|
1998
2162
|
}));
|
|
1999
2163
|
return [...reservations, ...maintenance].sort((a, b) => a.start - b.start);
|
|
2000
2164
|
}
|
|
2165
|
+
/**
|
|
2166
|
+
* Peak number of occupying bookings (incl. this one) per reservation entry, swept over the entry's buffered span
|
|
2167
|
+
* with the buffered spans the booking picker uses. That window is what a new booking at the same time has to fit
|
|
2168
|
+
* into, so "N of N" means the picker refuses that time, even when the overlap only starts later in the period.
|
|
2169
|
+
*/
|
|
2170
|
+
function bookedCounts(entries) {
|
|
2171
|
+
const spans = entries.flatMap((entry) => entry.reservation ? [blockedSpanOf(entry.reservation)] : []);
|
|
2172
|
+
return new Map(entries.flatMap((entry) => {
|
|
2173
|
+
if (!entry.reservation) return [];
|
|
2174
|
+
const own = blockedSpanOf(entry.reservation);
|
|
2175
|
+
return [[entry.key, peakConcurrency(spans, own.start, own.end)]];
|
|
2176
|
+
}));
|
|
2177
|
+
}
|
|
2001
2178
|
function AvailabilityTimeline(props) {
|
|
2002
2179
|
const { availability, days } = props;
|
|
2003
2180
|
const { t } = useReservationsTranslations();
|
|
2004
2181
|
const format = useFormatters(availability.timezone);
|
|
2005
2182
|
const zone = availability.timezone;
|
|
2006
2183
|
const entries = entriesOf(availability);
|
|
2184
|
+
const slots = availability.slots ?? 1;
|
|
2185
|
+
const booked = slots > 1 ? bookedCounts(entries) : /* @__PURE__ */ new Map();
|
|
2007
2186
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2008
2187
|
className: "rv:flex rv:flex-col rv:gap-4",
|
|
2009
2188
|
"data-cy": "reservations-timeline",
|
|
@@ -2041,19 +2220,26 @@ function AvailabilityTimeline(props) {
|
|
|
2041
2220
|
className: "rv:flex rv:flex-col rv:gap-1",
|
|
2042
2221
|
children: dayEntries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", {
|
|
2043
2222
|
className: "rv:flex rv:flex-wrap rv:items-center rv:gap-2 rv:text-sm",
|
|
2044
|
-
children: [
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2223
|
+
children: [
|
|
2224
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
2225
|
+
className: "rv:tabular-nums",
|
|
2226
|
+
children: [
|
|
2227
|
+
format.time(new Date(entry.start)),
|
|
2228
|
+
" –",
|
|
2229
|
+
" ",
|
|
2230
|
+
entry.end === Number.MAX_SAFE_INTEGER ? t("card.openEnd") : format.time(new Date(entry.end))
|
|
2231
|
+
]
|
|
2232
|
+
}),
|
|
2233
|
+
entry.kind === "maintenance" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip$1, {
|
|
2234
|
+
size: "sm",
|
|
2235
|
+
color: "danger",
|
|
2236
|
+
children: t("card.maintenance")
|
|
2237
|
+
}) : entry.reservation && (entry.reservation.mine || entry.reservation.userName) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: entry.reservation.mine ? t("card.yours") : entry.reservation.userName }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusChip, { status: entry.reservation.status })] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: entry.kind === "pending" ? t("card.reservedPending") : t("card.reserved") }),
|
|
2238
|
+
booked.has(entry.key) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotsChip, {
|
|
2239
|
+
booked: booked.get(entry.key) ?? 0,
|
|
2240
|
+
total: slots
|
|
2241
|
+
})
|
|
2242
|
+
]
|
|
2057
2243
|
}, entry.key))
|
|
2058
2244
|
})
|
|
2059
2245
|
]
|
|
@@ -2061,64 +2247,45 @@ function AvailabilityTimeline(props) {
|
|
|
2061
2247
|
})
|
|
2062
2248
|
});
|
|
2063
2249
|
}
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
if (start.getTime() < now.getTime() + rules.minLeadMinutes * MINUTE_MS) return "LEAD_TIME_TOO_SHORT";
|
|
2078
|
-
const spanStart = /* @__PURE__ */ new Date(start.getTime() - rules.bufferBeforeMinutes * MINUTE_MS);
|
|
2079
|
-
const spanEnd = new Date(end.getTime() + rules.bufferAfterMinutes * MINUTE_MS);
|
|
2080
|
-
if (!isWithinBookableHours(rules.bookableHours, timezone, spanStart, spanEnd)) return "OUTSIDE_BOOKABLE_HOURS";
|
|
2081
|
-
if (context.reservations.some((reservation) => {
|
|
2082
|
-
if (!blocksSlot(reservation)) return false;
|
|
2083
|
-
const otherStart = new Date(reservation.startTime).getTime() - reservation.bufferBeforeMinutes * MINUTE_MS;
|
|
2084
|
-
const otherEnd = new Date(reservation.endTime).getTime() + reservation.bufferAfterMinutes * MINUTE_MS;
|
|
2085
|
-
return spanStart.getTime() < otherEnd && otherStart < spanEnd.getTime();
|
|
2086
|
-
})) return "OVERLAP";
|
|
2087
|
-
return context.maintenance.some((span) => spanStart.getTime() < (span.endTime ? new Date(span.endTime).getTime() : Infinity) && new Date(span.startTime).getTime() < spanEnd.getTime()) ? "MAINTENANCE" : null;
|
|
2088
|
-
}
|
|
2089
|
-
/** Start times of one local day that allow at least the minimum duration. */
|
|
2090
|
-
function validStarts(context, day) {
|
|
2091
|
-
const { timeStepMinutes, minDurationMinutes } = context.rules;
|
|
2092
|
-
const dayStart = wallClockToDate(day, context.timezone);
|
|
2093
|
-
const nextDayStart = wallClockToDate(addLocalDays(day, 1), context.timezone);
|
|
2094
|
-
const result = [];
|
|
2095
|
-
for (let minutes = 0; minutes < 1440; minutes += timeStepMinutes) {
|
|
2096
|
-
const start = wallClockToDate({
|
|
2097
|
-
...day,
|
|
2098
|
-
hour: Math.floor(minutes / 60),
|
|
2099
|
-
minute: minutes % 60
|
|
2100
|
-
}, context.timezone);
|
|
2101
|
-
if (start.getTime() < dayStart.getTime() || start.getTime() >= nextDayStart.getTime()) continue;
|
|
2102
|
-
if (result.length && start.getTime() <= result[result.length - 1].getTime()) continue;
|
|
2103
|
-
if (checkWindow(context, start, new Date(start.getTime() + minDurationMinutes * MINUTE_MS)) === null) result.push(start);
|
|
2104
|
-
}
|
|
2105
|
-
return result;
|
|
2250
|
+
function SlotsChip(props) {
|
|
2251
|
+
const { t } = useReservationsTranslations();
|
|
2252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip$1, {
|
|
2253
|
+
size: "sm",
|
|
2254
|
+
variant: "soft",
|
|
2255
|
+
color: props.booked >= props.total ? "danger" : "default",
|
|
2256
|
+
className: "rv:whitespace-nowrap",
|
|
2257
|
+
"data-cy": "reservations-timeline-slots",
|
|
2258
|
+
children: t("card.slotsBooked", {
|
|
2259
|
+
booked: props.booked,
|
|
2260
|
+
total: props.total
|
|
2261
|
+
})
|
|
2262
|
+
});
|
|
2106
2263
|
}
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2264
|
+
// frontend/src/shared/SelectField.tsx
|
|
2265
|
+
var { Description: Description$1, Label: Label$4, ListBox: ListBox$2, ListBoxItem: ListBoxItem$1, Select: HeroSelect, SelectIndicator, SelectPopover, SelectTrigger, SelectValue } = await importShared("@heroui/react");
|
|
2266
|
+
function SelectField(props) {
|
|
2267
|
+
const { label, value, onChange, options, description, isDisabled, isInvalid, className } = props;
|
|
2268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(HeroSelect, {
|
|
2269
|
+
value,
|
|
2270
|
+
onChange: (key) => onChange(String(key)),
|
|
2271
|
+
isDisabled,
|
|
2272
|
+
isInvalid,
|
|
2273
|
+
className,
|
|
2274
|
+
placeholder: label,
|
|
2275
|
+
"data-cy": props["data-cy"],
|
|
2276
|
+
children: [
|
|
2277
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$4, { children: label }),
|
|
2278
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SelectTrigger, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectValue, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectIndicator, {})] }),
|
|
2279
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description$1, { children: description }),
|
|
2280
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPopover, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListBox$2, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListBoxItem$1, {
|
|
2281
|
+
id: option.key,
|
|
2282
|
+
textValue: option.label,
|
|
2283
|
+
children: option.label
|
|
2284
|
+
}, option.key)) }) })
|
|
2285
|
+
]
|
|
2286
|
+
});
|
|
2119
2287
|
}
|
|
2120
|
-
|
|
2121
|
-
//#region frontend/src/overview/CheckInRules.tsx
|
|
2288
|
+
// frontend/src/overview/CheckInRules.tsx
|
|
2122
2289
|
/** Plain-language summary of the check-in rules a booking is subject to. */
|
|
2123
2290
|
function CheckInRules({ rules }) {
|
|
2124
2291
|
const { t } = useReservationsTranslations();
|
|
@@ -2131,10 +2298,9 @@ function CheckInRules({ rules }) {
|
|
|
2131
2298
|
}) : t("checkIn.requiredFromStart", { grace: rules.checkInGraceMinutes })
|
|
2132
2299
|
});
|
|
2133
2300
|
}
|
|
2134
|
-
|
|
2135
|
-
//#region frontend/src/overview/BookingModal.tsx
|
|
2301
|
+
// frontend/src/overview/BookingModal.tsx
|
|
2136
2302
|
var { Button: Button$7, StandardModal, StatusAlert: StatusAlert$6, StatusDialog: StatusDialog$4 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
2137
|
-
var { Label: Label$
|
|
2303
|
+
var { Label: Label$3, ModalBody, ModalCloseTrigger, ModalFooter, ModalHeader, ModalHeading, TextArea, TextField: TextField$1 } = await importShared("@heroui/react");
|
|
2138
2304
|
var { useMutation: useMutation$3 } = await importShared("@tanstack/react-query");
|
|
2139
2305
|
var { useMemo: useMemo$6, useState: useState$7 } = await importShared("react");
|
|
2140
2306
|
var DAY_MS = 864e5;
|
|
@@ -2165,9 +2331,11 @@ function BookingModal(props) {
|
|
|
2165
2331
|
timezone: zone,
|
|
2166
2332
|
reservations: dayAvailability.data?.reservations ?? [],
|
|
2167
2333
|
maintenance: dayAvailability.data?.maintenance ?? [],
|
|
2168
|
-
now: /* @__PURE__ */ new Date()
|
|
2334
|
+
now: /* @__PURE__ */ new Date(),
|
|
2335
|
+
slots: dayAvailability.data?.slots ?? availability.slots
|
|
2169
2336
|
}), [
|
|
2170
2337
|
availability.rules,
|
|
2338
|
+
availability.slots,
|
|
2171
2339
|
zone,
|
|
2172
2340
|
dayAvailability.data
|
|
2173
2341
|
]);
|
|
@@ -2201,7 +2369,7 @@ function BookingModal(props) {
|
|
|
2201
2369
|
setOpen(false);
|
|
2202
2370
|
},
|
|
2203
2371
|
onError: (failure) => {
|
|
2204
|
-
setError(describeError(failure, t));
|
|
2372
|
+
setError(describeError(failure, t, { slots: context.slots }));
|
|
2205
2373
|
invalidate();
|
|
2206
2374
|
}
|
|
2207
2375
|
});
|
|
@@ -2270,7 +2438,7 @@ function BookingModal(props) {
|
|
|
2270
2438
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TextField$1, {
|
|
2271
2439
|
value: note,
|
|
2272
2440
|
onChange: setNote,
|
|
2273
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$
|
|
2441
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$3, { children: t("booking.note") }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextArea, {
|
|
2274
2442
|
maxLength: 500,
|
|
2275
2443
|
rows: 2
|
|
2276
2444
|
})]
|
|
@@ -2308,8 +2476,7 @@ function BookingModal(props) {
|
|
|
2308
2476
|
children: error ?? ""
|
|
2309
2477
|
})] });
|
|
2310
2478
|
}
|
|
2311
|
-
|
|
2312
|
-
//#region frontend/src/overview/KeepFreeDialog.tsx
|
|
2479
|
+
// frontend/src/overview/KeepFreeDialog.tsx
|
|
2313
2480
|
var { StatusDialog: StatusDialog$3 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
2314
2481
|
var { useMutation: useMutation$2 } = await importShared("@tanstack/react-query");
|
|
2315
2482
|
var { useEffect: useEffect$4, useMemo: useMemo$5, useState: useState$6 } = await importShared("react");
|
|
@@ -2382,8 +2549,7 @@ function KeepFreeDialog(props) {
|
|
|
2382
2549
|
children: error ?? ""
|
|
2383
2550
|
})] });
|
|
2384
2551
|
}
|
|
2385
|
-
|
|
2386
|
-
//#region frontend/src/overview/NextBooking.tsx
|
|
2552
|
+
// frontend/src/overview/NextBooking.tsx
|
|
2387
2553
|
var { Button: Button$6 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
2388
2554
|
var { useMemo: useMemo$4 } = await importShared("react");
|
|
2389
2555
|
/**
|
|
@@ -2425,8 +2591,7 @@ function NextBooking({ resourceId, timezone, onAsk }) {
|
|
|
2425
2591
|
})]
|
|
2426
2592
|
});
|
|
2427
2593
|
}
|
|
2428
|
-
|
|
2429
|
-
//#region frontend/src/overview/ReservationsCard.tsx
|
|
2594
|
+
// frontend/src/overview/ReservationsCard.tsx
|
|
2430
2595
|
var { Button: Button$5, StatusAlert: StatusAlert$5, StatusDialog: StatusDialog$2 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
2431
2596
|
var { Chip, ToggleButton, ToggleButtonGroup } = await importShared("@heroui/react");
|
|
2432
2597
|
var { CalendarCheckIcon: CalendarCheckIcon$1, ChevronLeftIcon, ChevronRightIcon } = await importShared("lucide-react");
|
|
@@ -2600,8 +2765,7 @@ function ReservationsCard({ resourceId }) {
|
|
|
2600
2765
|
]
|
|
2601
2766
|
});
|
|
2602
2767
|
}
|
|
2603
|
-
|
|
2604
|
-
//#region frontend/src/shared/PagePagination.tsx
|
|
2768
|
+
// frontend/src/shared/PagePagination.tsx
|
|
2605
2769
|
var { Pagination } = await importShared("@heroui/react");
|
|
2606
2770
|
/** Page numbers with ellipses: the first and last page, and the current one with its neighbours. */
|
|
2607
2771
|
function pageNumbers(page, total) {
|
|
@@ -2641,8 +2805,7 @@ function PagePagination({ page, total, onChange }) {
|
|
|
2641
2805
|
] })
|
|
2642
2806
|
});
|
|
2643
2807
|
}
|
|
2644
|
-
|
|
2645
|
-
//#region frontend/src/shared/ReservationsTable.tsx
|
|
2808
|
+
// frontend/src/shared/ReservationsTable.tsx
|
|
2646
2809
|
var { Button: Button$4, EmptyState, StatusAlert: StatusAlert$4, TableDataLoadingIndicator: TableDataLoadingIndicator$1 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
2647
2810
|
var { Link: Link$1 } = await importShared("@heroui/react");
|
|
2648
2811
|
/**
|
|
@@ -2738,10 +2901,9 @@ function ReservationsTable({ items, timezone, ariaLabel, showUser, isPending, er
|
|
|
2738
2901
|
})
|
|
2739
2902
|
});
|
|
2740
2903
|
}
|
|
2741
|
-
|
|
2742
|
-
//#region frontend/src/pages/ResourceFilter.tsx
|
|
2904
|
+
// frontend/src/pages/ResourceFilter.tsx
|
|
2743
2905
|
var { useDebounce } = await importShared("@attraccess/plugins-frontend-ui");
|
|
2744
|
-
var { Autocomplete, Label: Label$
|
|
2906
|
+
var { Autocomplete, Label: Label$2, ListBox: ListBox$1, SearchField } = await importShared("@heroui/react");
|
|
2745
2907
|
var { useQuery: useQuery$2 } = await importShared("@tanstack/react-query");
|
|
2746
2908
|
var { useState: useState$4 } = await importShared("react");
|
|
2747
2909
|
var ALL$1 = "all";
|
|
@@ -2775,7 +2937,7 @@ function ResourceFilter({ value, onChange }) {
|
|
|
2775
2937
|
fullWidth: true,
|
|
2776
2938
|
"data-cy": "reservations-manage-resource",
|
|
2777
2939
|
children: [
|
|
2778
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$
|
|
2940
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$2, { children: label }),
|
|
2779
2941
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Autocomplete.Trigger, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete.Value, { children: () => value?.name ?? allLabel }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete.Indicator, {})] }),
|
|
2780
2942
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete.Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Autocomplete.Filter, {
|
|
2781
2943
|
inputValue: search,
|
|
@@ -2804,8 +2966,7 @@ function ResourceFilter({ value, onChange }) {
|
|
|
2804
2966
|
]
|
|
2805
2967
|
});
|
|
2806
2968
|
}
|
|
2807
|
-
|
|
2808
|
-
//#region frontend/src/pages/ManagePage.tsx
|
|
2969
|
+
// frontend/src/pages/ManagePage.tsx
|
|
2809
2970
|
var { PageHeader: PageHeader$2, StatusAlert: StatusAlert$3 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
2810
2971
|
var { Card: Card$2 } = await importShared("@heroui/react");
|
|
2811
2972
|
var { useMemo: useMemo$2, useState: useState$3 } = await importShared("react");
|
|
@@ -2949,8 +3110,7 @@ function ManagePage() {
|
|
|
2949
3110
|
]
|
|
2950
3111
|
});
|
|
2951
3112
|
}
|
|
2952
|
-
|
|
2953
|
-
//#region frontend/src/pages/MyReservationsPage.tsx
|
|
3113
|
+
// frontend/src/pages/MyReservationsPage.tsx
|
|
2954
3114
|
var { PageHeader: PageHeader$1 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
2955
3115
|
var { Card: Card$1, Link } = await importShared("@heroui/react");
|
|
2956
3116
|
function MyReservationsPage() {
|
|
@@ -2997,8 +3157,7 @@ function MyReservationsPage() {
|
|
|
2997
3157
|
]
|
|
2998
3158
|
});
|
|
2999
3159
|
}
|
|
3000
|
-
|
|
3001
|
-
//#region frontend/src/pages/ReservationDeepLinkPage.tsx
|
|
3160
|
+
// frontend/src/pages/ReservationDeepLinkPage.tsx
|
|
3002
3161
|
var { Button: Button$3, PageHeader, StatusAlert: StatusAlert$2, TableDataLoadingIndicator } = await importShared("@attraccess/plugins-frontend-ui");
|
|
3003
3162
|
var { Card } = await importShared("@heroui/react");
|
|
3004
3163
|
var { useEffect: useEffect$2, useState: useState$2 } = await importShared("react");
|
|
@@ -3087,8 +3246,7 @@ function ReservationDeepLinkPage() {
|
|
|
3087
3246
|
]
|
|
3088
3247
|
});
|
|
3089
3248
|
}
|
|
3090
|
-
|
|
3091
|
-
//#region frontend/src/settings/AdminTimezoneSettings.tsx
|
|
3249
|
+
// frontend/src/settings/AdminTimezoneSettings.tsx
|
|
3092
3250
|
var { Button: Button$2, StatusAlert: StatusAlert$1, StatusDialog: StatusDialog$1 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
3093
3251
|
var { ListBox, ListBoxItem, Spinner: Spinner$1 } = await importShared("@heroui/react");
|
|
3094
3252
|
var { useMutation: useMutation$1, useQuery: useQuery$1 } = await importShared("@tanstack/react-query");
|
|
@@ -3238,8 +3396,7 @@ function AdminTimezoneSettings() {
|
|
|
3238
3396
|
]
|
|
3239
3397
|
});
|
|
3240
3398
|
}
|
|
3241
|
-
|
|
3242
|
-
//#region frontend/src/lib/validation.ts
|
|
3399
|
+
// frontend/src/lib/validation.ts
|
|
3243
3400
|
var INTEGER_RANGES = {
|
|
3244
3401
|
timeStepMinutes: [5, 240],
|
|
3245
3402
|
minDurationMinutes: [1, 1440],
|
|
@@ -3296,8 +3453,31 @@ function validateBookableHoursForm(hours) {
|
|
|
3296
3453
|
}
|
|
3297
3454
|
return errors;
|
|
3298
3455
|
}
|
|
3299
|
-
|
|
3300
|
-
|
|
3456
|
+
// frontend/src/shared/NumberInput.tsx
|
|
3457
|
+
var { Description, FieldError, Label: Label$1, NumberField, NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput } = await importShared("@heroui/react");
|
|
3458
|
+
function NumberInput(props) {
|
|
3459
|
+
const { label, value, onChange, min, max, step, description, errorMessage } = props;
|
|
3460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(NumberField, {
|
|
3461
|
+
value: Number.isFinite(value) ? value : void 0,
|
|
3462
|
+
onChange,
|
|
3463
|
+
minValue: min,
|
|
3464
|
+
maxValue: max,
|
|
3465
|
+
step,
|
|
3466
|
+
isInvalid: Boolean(errorMessage),
|
|
3467
|
+
"data-cy": props["data-cy"],
|
|
3468
|
+
children: [
|
|
3469
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label$1, { children: label }),
|
|
3470
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(NumberFieldGroup, { children: [
|
|
3471
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NumberFieldDecrementButton, { children: "-" }),
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NumberFieldInput, {}),
|
|
3473
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NumberFieldIncrementButton, { children: "+" })
|
|
3474
|
+
] }),
|
|
3475
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description, { children: description }),
|
|
3476
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldError, { children: errorMessage })
|
|
3477
|
+
]
|
|
3478
|
+
});
|
|
3479
|
+
}
|
|
3480
|
+
// frontend/src/settings/BookableHoursEditor.tsx
|
|
3301
3481
|
var { Button: Button$1 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
3302
3482
|
var { Input, Label, TextField } = await importShared("@heroui/react");
|
|
3303
3483
|
var { PlusIcon, Trash2Icon } = await importShared("lucide-react");
|
|
@@ -3425,8 +3605,7 @@ function BookableHoursEditor({ value, onChange, errors }) {
|
|
|
3425
3605
|
})]
|
|
3426
3606
|
});
|
|
3427
3607
|
}
|
|
3428
|
-
|
|
3429
|
-
//#region frontend/src/settings/ResourceSettingsForm.tsx
|
|
3608
|
+
// frontend/src/settings/ResourceSettingsForm.tsx
|
|
3430
3609
|
var { Button, LabeledSwitch, StatusAlert, StatusDialog } = await importShared("@attraccess/plugins-frontend-ui");
|
|
3431
3610
|
var { Fieldset, Spinner } = await importShared("@heroui/react");
|
|
3432
3611
|
var { useMutation, useQuery } = await importShared("@tanstack/react-query");
|
|
@@ -3675,10 +3854,9 @@ function ResourceSettingsForm({ resourceId }) {
|
|
|
3675
3854
|
]
|
|
3676
3855
|
});
|
|
3677
3856
|
}
|
|
3678
|
-
|
|
3679
|
-
//#region frontend/src/plugin.tsx
|
|
3857
|
+
// frontend/src/plugin.tsx
|
|
3680
3858
|
var { useTranslationState } = await importShared("@attraccess/plugins-frontend-ui");
|
|
3681
|
-
var { CalendarCheckIcon, CalendarClockIcon } = await importShared("lucide-react");
|
|
3859
|
+
var { CalendarCheckIcon, CalendarClockIcon, CalendarDaysIcon } = await importShared("lucide-react");
|
|
3682
3860
|
var labels = () => useTranslationState.getState().language === "de" ? de_default : en_default;
|
|
3683
3861
|
var ReservationsPlugin = class {
|
|
3684
3862
|
constructor() {
|
|
@@ -3687,7 +3865,7 @@ var ReservationsPlugin = class {
|
|
|
3687
3865
|
this.sidebarListeners = /* @__PURE__ */ new Set();
|
|
3688
3866
|
}
|
|
3689
3867
|
getPluginName() {
|
|
3690
|
-
return "reservations-plugin@0.
|
|
3868
|
+
return "reservations-plugin@0.2.0";
|
|
3691
3869
|
}
|
|
3692
3870
|
getDependencies() {
|
|
3693
3871
|
return [];
|
|
@@ -3755,6 +3933,25 @@ var ReservationsPlugin = class {
|
|
|
3755
3933
|
});
|
|
3756
3934
|
return items;
|
|
3757
3935
|
}
|
|
3936
|
+
getDashboardWidgets() {
|
|
3937
|
+
const text = labels().dashboard;
|
|
3938
|
+
return [{
|
|
3939
|
+
id: "reservations-upcoming",
|
|
3940
|
+
title: text.title,
|
|
3941
|
+
description: text.description,
|
|
3942
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CalendarDaysIcon, { className: "rv:w-5 rv:h-5" }),
|
|
3943
|
+
href: "/reservations",
|
|
3944
|
+
group: text.group,
|
|
3945
|
+
keywords: text.keywords,
|
|
3946
|
+
sizes: [
|
|
3947
|
+
"small",
|
|
3948
|
+
"medium",
|
|
3949
|
+
"large"
|
|
3950
|
+
],
|
|
3951
|
+
defaultSize: "medium",
|
|
3952
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UpcomingReservationsWidget, { ...props })
|
|
3953
|
+
}];
|
|
3954
|
+
}
|
|
3758
3955
|
getSlotContributions() {
|
|
3759
3956
|
const text = labels().slots;
|
|
3760
3957
|
return [
|
|
@@ -3784,5 +3981,4 @@ var ReservationsPlugin = class {
|
|
|
3784
3981
|
];
|
|
3785
3982
|
}
|
|
3786
3983
|
};
|
|
3787
|
-
//#endregion
|
|
3788
3984
|
export { ReservationsPlugin as default };
|