@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.
@@ -1,8 +1,7 @@
1
- import { r as importShared } from "./_virtual___federation_fn_import-BXODRNto.js";
2
- //#region \0rolldown/runtime.js
3
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
- //#endregion
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
- //#endregion
65
- //#region ../../../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.production.js
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
- //#endregion
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$7, useRef: useRef$1 } = await importShared("react");
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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 = null;
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 de_default = {
234
- title: "Reservierungen",
228
+ var en_default = {
229
+ title: "Reservations",
235
230
  sidebar: {
236
- "my": "Meine Reservierungen",
237
- "manage": "Reservierungen verwalten"
231
+ "my": "My reservations",
232
+ "manage": "Manage reservations"
238
233
  },
239
234
  slots: {
240
- "settings": "Reservierungen",
241
- "admin": "Reservierungen",
242
- "account": "Kalender-Feeds (iCal)"
235
+ "settings": "Reservations",
236
+ "admin": "Reservations",
237
+ "account": "Calendar feeds (iCal)"
243
238
  },
244
239
  common: {
245
- "cancel": "Abbrechen",
246
- "close": "Schließen",
247
- "back": "Zurück",
248
- "save": "Speichern",
249
- "edit": "Bearbeiten",
250
- "done": "Fertig",
251
- "retry": "Erneut versuchen",
252
- "loading": "Wird geladen",
253
- "timesIn": "Zeiten in {{timezone}}",
254
- "pagination": "Seiten",
255
- "previousPage": "Vorherige Seite",
256
- "nextPage": "Nächste Seite"
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": "Montag",
260
- "tue": "Dienstag",
261
- "wed": "Mittwoch",
262
- "thu": "Donnerstag",
263
- "fri": "Freitag",
264
- "sat": "Samstag",
265
- "sun": "Sonntag"
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": "Wartet auf Genehmigung",
269
- "confirmed": "Bestätigt",
270
- "rejected": "Abgelehnt",
271
- "cancelled": "Storniert",
272
- "expired": "Abgelaufen",
273
- "no_show": "Nicht erschienen",
274
- "completed": "Abgeschlossen"
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": "Etwas ist schiefgelaufen. Bitte versuche es erneut.",
278
- "NOT_FOUND": "Diese Reservierung oder Ressource existiert nicht.",
279
- "RESERVATIONS_DISABLED": "Für diese Ressource sind Reservierungen nicht aktiviert.",
280
- "NOT_ALLOWED_TO_BOOK": "Du darfst diese Ressource nicht buchen.",
281
- "IN_THE_PAST": "Die Buchung würde in der Vergangenheit beginnen.",
282
- "OFF_TIME_STEP": "Start und Dauer müssen zum Buchungsraster passen.",
283
- "DURATION_TOO_SHORT": "Die Buchung ist kürzer als die Mindestdauer.",
284
- "DURATION_TOO_LONG": "Die Buchung ist länger als die Höchstdauer.",
285
- "BEYOND_MAX_ADVANCE": "Das liegt zu weit in der Zukunft, um es zu buchen.",
286
- "LEAD_TIME_TOO_SHORT": "Für diesen Zeitraum ist es zu spät zum Buchen.",
287
- "OUTSIDE_BOOKABLE_HOURS": "Der Zeitraum liegt außerhalb der buchbaren Zeiten.",
288
- "USER_BOOKING_LIMIT": "Du hast die maximale Anzahl aktiver Buchungen für diese Ressource erreicht.",
289
- "OVERLAP": "Der Zeitraum überschneidet sich mit einer anderen Buchung. Bitte wähle eine andere Zeit.",
290
- "MAINTENANCE": "Die Ressource ist in dieser Zeit in Wartung.",
291
- "NOT_PENDING": "Diese Buchung wartet nicht mehr auf Genehmigung.",
292
- "NOT_ACTIVE": "Diese Buchung ist nicht aktiv.",
293
- "NOT_CANCELLABLE": "Diese Buchung kann nicht mehr storniert werden.",
294
- "ALREADY_STARTED": "Diese Buchung hat bereits begonnen.",
295
- "ALREADY_FINISHED": "Diese Buchung ist bereits beendet.",
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": "Es gibt {{count}} kommende Buchung.",
298
- "many": "Es gibt {{count}} kommende Buchungen."
294
+ "one": "There is {{count}} upcoming booking.",
295
+ "many": "There are {{count}} upcoming bookings."
299
296
  },
300
- "INVALID_RANGE": "Der gewählte Zeitraum ist ungültig.",
301
- "INVALID_SETTINGS": "Einige Einstellungen sind ungültig.",
302
- "INVALID_TIMEZONE": "Diese Zeitzone ist ungültig.",
303
- "RANGE_TOO_LARGE": "Der angefragte Zeitraum ist zu groß.",
304
- "FORBIDDEN": "Dazu hast du keine Berechtigung.",
305
- "RESERVATION_NOT_FOUND": "Diese Reservierung existiert nicht.",
306
- "RESOURCE_NOT_FOUND": "Diese Ressource existiert nicht.",
307
- "FEED_LIMIT": "Du hast die maximale Anzahl an Kalender-Feeds erreicht. Widerrufe zuerst einen nicht mehr genutzten Feed.",
308
- "FEED_NOT_FOUND": "Dieser Kalender-Feed existiert nicht oder wurde widerrufen.",
309
- "INVALID_FEED": "Wähle mindestens eine Quelle für den Kalender-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": "Reservierungen",
313
- "reserve": "Reservieren",
314
- "cannotBook": "Buchen ist nicht möglich",
315
- "view": "Ansicht",
316
- "managerHint": "Als verwaltende Person siehst du bei jeder Buchung, wer sie hält, und ihre Notizen und Gründe.",
317
- "next": "Deine nächste Buchung",
318
- "current": "Aktuelle Buchung",
319
- "loadFailed": "Reservierungen konnten nicht geladen werden",
320
- "day": "Tag",
321
- "week": "Woche",
322
- "previous": "Früher",
323
- "nextRange": "Später",
324
- "dayBarLabel": "Gebuchte Zeiten des Tages",
325
- "free": "Keine Buchungen",
326
- "reserved": "Reserviert",
327
- "reservedPending": "Reserviert (wartet auf Genehmigung)",
328
- "yours": "Deine Buchung",
329
- "maintenance": "Wartung",
330
- "openEnd": "offenes Ende"
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}} reservieren",
334
- "titleGeneric": "Ressource reservieren",
335
- "date": "Datum",
336
- "timezoneHint": "Zeiten in {{timezone}}",
337
- "start": "Beginn",
338
- "duration": "Dauer",
339
- "durationHint": "In Schritten von {{step}} Min., von {{min}} bis {{max}}",
340
- "note": "Notiz (optional)",
341
- "noSlots": "An diesem Tag gibt es keine freien Startzeiten.",
342
- "approvalNeeded": "Eine verwaltende Person muss diese Buchung genehmigen, bevor sie gültig wird.",
343
- "instantNote": "Deine Buchung wird sofort bestätigt.",
344
- "submit": "Reservieren",
345
- "requestSubmit": "Reservierung anfragen",
346
- "failedTitle": "Reservierung fehlgeschlagen",
347
- "bookedTitle": "Reservierung bestätigt",
348
- "bookedBody": "Deine Buchung für {{range}} ist bestätigt.",
349
- "requestedTitle": "Reservierung angefragt",
350
- "requestedBody": "Deine Anfrage für {{range}} wartet auf Genehmigung."
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": "Einchecken durch Starten der Ressource: ab {{early}} Min. vor Beginn bis {{grace}} Min. nach Beginn. Ohne Check-in wird die Buchung freigegeben.",
354
- "requiredFromStart": "Einchecken durch Starten der Ressource: ab Beginn bis {{grace}} Min. nach Beginn. Ohne Check-in wird die Buchung freigegeben.",
355
- "notRequired": "Ein Check-in ist nicht nötig; die Buchung bleibt bis zum Ende bestehen."
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": "Deine Buchung läuft bis {{until}}. Behalten oder den Rest freigeben?",
359
- "body": "Du hast die Ressource beendet, bevor deine Buchung abgelaufen ist. Möchtest du den Rest der Buchung behalten oder für andere freigeben?",
360
- "keep": "Behalten",
361
- "free": "Rest freigeben"
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": "Grund (optional)",
365
- "commentLabel": "Kommentar (optional)",
366
- "failedTitle": "Aktion fehlgeschlagen",
362
+ "reasonLabel": "Reason (optional)",
363
+ "commentLabel": "Comment (optional)",
364
+ "failedTitle": "Action failed",
367
365
  "cancel": {
368
- "label": "Stornieren",
369
- "title": "Diese Buchung stornieren?",
370
- "body": "Die Buchung {{range}} für {{resource}} wird storniert und der Zeitraum freigegeben.",
371
- "confirm": "Buchung stornieren"
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": "Vorzeitig beenden",
375
- "title": "Diese Buchung vorzeitig beenden?",
376
- "body": "Die Buchung für {{resource}} endet jetzt und der Rest (bis {{until}}) wird freigegeben.",
377
- "confirm": "Buchung beenden"
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": "Behalten",
381
- "title": "Diese Buchung behalten?",
382
- "body": "Die Buchung {{range}} für {{resource}} bleibt unverändert bestehen.",
383
- "confirm": "Buchung behalten"
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": "Genehmigen",
387
- "title": "Diese Buchung genehmigen?",
388
- "body": "Die Buchung {{range}} für {{resource}} wird bestätigt.",
389
- "confirm": "Genehmigen"
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": "Ablehnen",
393
- "title": "Diese Buchung ablehnen?",
394
- "body": "Die Buchung {{range}} für {{resource}} wird abgelehnt und der Inhaber benachrichtigt.",
395
- "confirm": "Ablehnen"
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": "Keine Buchungen",
400
- "loadFailed": "Buchungen konnten nicht geladen werden",
401
- "reason": "Grund: {{reason}}"
397
+ "empty": "No bookings",
398
+ "loadFailed": "Bookings could not be loaded",
399
+ "reason": "Reason: {{reason}}"
402
400
  },
403
401
  my: {
404
- "title": "Meine Reservierungen",
405
- "subtitle": "Deine kommenden und vergangenen Buchungen",
406
- "upcoming": "Kommend",
407
- "past": "Vergangen",
408
- "manageLink": "Reservierungen verwalten"
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": "Du verwaltest keine Ressource, deshalb gibt es hier nichts anzuzeigen.",
412
- "title": "Reservierungen verwalten",
413
- "subtitle": "Anfragen genehmigen und alle Buchungen deiner Ressourcen im Blick behalten",
414
- "pending": "Wartet auf Genehmigung",
415
- "pendingHint": "Anfragen genehmigen oder ablehnen; die buchende Person wird benachrichtigt.",
416
- "all": "Alle Buchungen",
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": "Ressource",
419
- "allResources": "Alle Ressourcen",
420
- "searchResources": "Ressourcen suchen",
416
+ "resource": "Resource",
417
+ "allResources": "All resources",
418
+ "searchResources": "Search resources",
421
419
  "status": "Status",
422
- "allStatuses": "Alle Status",
423
- "from": "Von",
424
- "to": "Bis"
420
+ "allStatuses": "All statuses",
421
+ "from": "From",
422
+ "to": "To"
425
423
  }
426
424
  },
427
425
  detail: {
428
- "title": "Reservierung",
429
- "loadFailed": "Die Reservierung konnte nicht geladen werden",
430
- "holder": "Gebucht von {{name}}",
431
- "cannotKeep": "Diese Buchung kann nicht mehr behalten werden.",
432
- "cannotCancel": "Diese Buchung kann nicht mehr storniert werden."
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": "Die Reservierungs-Einstellungen konnten nicht geladen werden",
436
- "enabled": "Reservierungen für diese Ressource aktivieren",
437
- "approvalRequired": "Buchungen müssen von einer verwaltenden Person genehmigt werden",
438
- "checkInEnabled": "Check-in verlangen (Ressource innerhalb der Karenzzeit starten)",
439
- "failed": "Die Einstellungen konnten nicht gespeichert werden",
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": "Wer darf buchen",
442
- "can-start": "Alle, die die Ressource starten dürfen",
443
- "managers-only": "Nur verwaltende Personen",
444
- "any-user": "Jeder angemeldete Nutzer"
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": "Buchungsregeln",
448
- "limits": "Puffer und Limits",
449
- "checkIn": "Check-in und Erinnerungen",
450
- "hours": "Buchbare Zeiten"
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": "Zeitraster (Minuten)",
454
- "minDurationMinutes": "Mindestdauer (Minuten)",
455
- "maxDurationMinutes": "Höchstdauer (Minuten)",
456
- "maxAdvanceDays": "Höchstens so viele Tage im Voraus buchen",
457
- "minLeadMinutes": "Späteste Buchung vor Beginn (Minuten)",
458
- "bufferBeforeMinutes": "Puffer vor einer Buchung (Minuten)",
459
- "bufferAfterMinutes": "Puffer nach einer Buchung (Minuten)",
460
- "maxActiveBookingsPerUser": "Aktive Buchungen pro Nutzer",
461
- "confirmWindowMinutes": "Bestätigung zum Starten so lange vor einer Reservierung (Minuten)",
462
- "checkInGraceMinutes": "Karenzzeit für den Check-in (Minuten)",
463
- "earlyCheckInMinutes": "Frühes Einchecken (Minuten)",
464
- "handoverReminderMinutes": "Übergabe-Erinnerung vor einer Reservierung (Minuten)"
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": "Beginn und Dauer rasten auf diesem Raster ein; {{min}} bis {{max}}, muss 1440 teilen.",
468
- "minDurationMinutes": "Kürzeste Buchung, ein Vielfaches des Rasters.",
469
- "maxDurationMinutes": "Längste Buchung, ein Vielfaches des Rasters.",
470
- "maxAdvanceDays": "{{min}} bis {{max}} Tage.",
471
- "minLeadMinutes": "0 erlaubt Buchungen bis zum Beginn.",
472
- "bufferBeforeMinutes": "Wird vor jeder Buchung freigehalten.",
473
- "bufferAfterMinutes": "Wird nach jeder Buchung freigehalten.",
474
- "maxActiveBookingsPerUser": "0 bedeutet unbegrenzt.",
475
- "confirmWindowMinutes": "0 fragt nie. Höchstens {{max}}.",
476
- "checkInGraceMinutes": "{{min}} bis {{max}} Minuten nach dem Beginn.",
477
- "earlyCheckInMinutes": "Wie früh der Inhaber starten darf. {{min}} bis {{max}}.",
478
- "handoverReminderMinutes": "Benachrichtigt den aktuellen Nutzer. 0 schaltet es aus."
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": "Gib eine ganze Zahl von {{min}} bis {{max}} ein.",
482
- "stepDividesDay": "Das Raster muss 1440 Minuten ohne Rest teilen.",
483
- "multipleOfStep": "Muss ein Vielfaches von {{step}} Minuten sein.",
484
- "maxBelowMin": "Darf nicht kürzer als die Mindestdauer sein.",
485
- "tooManyRanges": "Höchstens 8 Zeiträume pro Tag.",
486
- "timeFormat": "Format HH:mm, zum Beispiel 09:00. Das Ende darf 24:00 sein.",
487
- "endAfterStart": "Das Ende muss nach dem Beginn liegen.",
488
- "overlap": "Zeiträume dürfen sich nicht überschneiden."
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": "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.",
492
- "allDay": "Kein Zeitraum festgelegt",
493
- "addRange": "Zeitraum hinzufügen",
494
- "addRangeTo": "Zeitraum für {{day}} hinzufügen",
495
- "removeRange": "Zeitraum {{index}} am {{day}} entfernen",
496
- "from": "Von",
497
- "to": "Bis",
498
- "fromLabel": "Von ({{day}}, Zeitraum {{index}})",
499
- "toLabel": "Bis ({{day}}, Zeitraum {{index}})"
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": "Reservierungen deaktivieren?",
500
+ "title": "Disable reservations?",
503
501
  "body": {
504
- "one": "Es gibt {{count}} kommende Buchung. Beim Deaktivieren wird sie storniert und der Inhaber benachrichtigt.",
505
- "many": "Es gibt {{count}} kommende Buchungen. Beim Deaktivieren werden sie storniert und die Inhaber benachrichtigt."
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": "Deaktivieren und {{count}} Buchung stornieren",
509
- "many": "Deaktivieren und {{count}} Buchungen stornieren"
506
+ "one": "Disable and cancel {{count}} booking",
507
+ "many": "Disable and cancel {{count}} bookings"
510
508
  }
511
509
  },
512
510
  "saved": {
513
- "title": "Einstellungen gespeichert",
514
- "body": "Die Reservierungseinstellungen wurden gespeichert. Sie gelten für neue Buchungen.",
511
+ "title": "Settings saved",
512
+ "body": "The reservation settings were saved. They apply to new bookings.",
515
513
  "bodyCancelled": {
516
- "one": "Die Einstellungen wurden gespeichert und {{count}} kommende Buchung storniert.",
517
- "many": "Die Einstellungen wurden gespeichert und {{count}} kommende Buchungen storniert."
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": "Die Zeitzone für buchbare Zeiten, das Buchungsraster, Benachrichtigungen und Kalender-Feeds.",
523
- "loadFailed": "Die Zeitzonen-Einstellung konnte nicht geladen werden",
524
- "current": "Zeitzone",
525
- "default": "Server-Standard: {{timezone}}",
526
- "search": "Zeitzonen suchen",
527
- "searchPlaceholder": "z. B. Europe/Berlin",
528
- "matches": "{{count}} Treffer",
529
- "matchesTruncated": "{{total}} Treffer, die ersten {{shown}} werden angezeigt. Zum Eingrenzen tippen.",
530
- "list": "Zeitzonen",
531
- "saved": "Zeitzone gespeichert",
532
- "savedBody": "Reservierungen verwenden jetzt {{timezone}}.",
533
- "failed": "Die Zeitzone konnte nicht gespeichert werden"
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": "Kalender-Feeds",
537
- "description": "Abonniere Reservierungen in deiner Kalender-App. Jeder Feed hat einen eigenen geheimen Link; wer den Link kennt, kann den Feed lesen.",
538
- "create": "Neuer Feed",
539
- "empty": "Noch keine Feeds",
540
- "revoked": "Widerrufen",
541
- "revokedAt": "Widerrufen am {{date}}",
542
- "lastUsed": "Zuletzt genutzt {{date}}",
543
- "neverUsed": "Nie genutzt",
544
- "failed": "Aktion fehlgeschlagen",
545
- "loadFailed": "Kalender-Feeds konnten nicht geladen werden",
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": "Nur meine eigenen Buchungen",
548
- "introduced": "Ressourcen, in die ich eingewiesen bin",
549
- "maintained": "Ressourcen, die ich betreue",
545
+ "ownOnly": "Only my own bookings",
546
+ "introduced": "Resources I am introduced to",
547
+ "maintained": "Resources I maintain",
550
548
  "groups": {
551
- "one": "{{count}} Gruppe",
552
- "many": "{{count}} Gruppen"
549
+ "one": "{{count}} group",
550
+ "many": "{{count}} groups"
553
551
  },
554
552
  "resources": {
555
- "one": "{{count}} Ressource",
556
- "many": "{{count}} Ressourcen"
553
+ "one": "{{count}} resource",
554
+ "many": "{{count}} resources"
557
555
  }
558
556
  },
559
557
  "form": {
560
- "createTitle": "Neuer Kalender-Feed",
561
- "editTitle": "Kalender-Feed bearbeiten",
558
+ "createTitle": "New calendar feed",
559
+ "editTitle": "Edit calendar feed",
562
560
  "name": "Name",
563
- "ownOnly": "Nur meine eigenen Buchungen",
564
- "introduced": "Alle Ressourcen, in die ich eingewiesen bin",
565
- "maintained": "Alle Ressourcen, die ich betreue",
566
- "groups": "Ressourcengruppen",
567
- "noGroups": "Keine Gruppen verfügbar",
568
- "resources": "Bestimmte Ressourcen",
569
- "searchResources": "Ressourcen suchen",
570
- "selectedCount": "{{count}} ausgewählt",
571
- "needSelection": "Wähle mindestens eine Quelle für diesen Feed.",
572
- "create": "Feed erstellen"
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 „{{name}}“ ist bereit",
576
- "body": "Kopiere diesen Link jetzt. Aus Sicherheitsgründen wird er nur einmal angezeigt; falls du ihn verlierst, erzeuge den Feed neu.",
577
- "url": "Feed-Link",
578
- "copy": "Link kopieren",
579
- "copied": "Kopiert"
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": "Neu erzeugen",
583
- "title": "„{{name}}“ neu erzeugen?",
584
- "body": "Es wird ein neuer Link erstellt und der alte funktioniert sofort nicht mehr. Kalender mit dem alten Link verlieren den Zugriff.",
585
- "confirm": "Neu erzeugen"
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": "Widerrufen",
589
- "title": "„{{name}}“ widerrufen?",
590
- "body": "Der Link funktioniert dauerhaft nicht mehr. Das lässt sich nicht rückgängig machen.",
591
- "confirm": "Widerrufen"
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 en_default = {
596
- title: "Reservations",
605
+ var de_default = {
606
+ title: "Reservierungen",
597
607
  sidebar: {
598
- "my": "My reservations",
599
- "manage": "Manage reservations"
608
+ "my": "Meine Reservierungen",
609
+ "manage": "Reservierungen verwalten"
600
610
  },
601
611
  slots: {
602
- "settings": "Reservations",
603
- "admin": "Reservations",
604
- "account": "Calendar feeds (iCal)"
612
+ "settings": "Reservierungen",
613
+ "admin": "Reservierungen",
614
+ "account": "Kalender-Feeds (iCal)"
605
615
  },
606
616
  common: {
607
- "cancel": "Cancel",
608
- "close": "Close",
609
- "back": "Back",
610
- "save": "Save",
611
- "edit": "Edit",
612
- "done": "Done",
613
- "retry": "Retry",
614
- "loading": "Loading",
615
- "timesIn": "Times in {{timezone}}",
616
- "pagination": "Pages",
617
- "previousPage": "Previous page",
618
- "nextPage": "Next page"
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": "Monday",
622
- "tue": "Tuesday",
623
- "wed": "Wednesday",
624
- "thu": "Thursday",
625
- "fri": "Friday",
626
- "sat": "Saturday",
627
- "sun": "Sunday"
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": "Pending approval",
631
- "confirmed": "Confirmed",
632
- "rejected": "Rejected",
633
- "cancelled": "Cancelled",
634
- "expired": "Expired",
635
- "no_show": "No show",
636
- "completed": "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": "Something went wrong. Please try again.",
640
- "NOT_FOUND": "This reservation or resource does not exist.",
641
- "RESERVATIONS_DISABLED": "Reservations are not enabled for this resource.",
642
- "NOT_ALLOWED_TO_BOOK": "You are not allowed to book this resource.",
643
- "IN_THE_PAST": "The booking would start in the past.",
644
- "OFF_TIME_STEP": "Start and duration must fit the booking time step.",
645
- "DURATION_TOO_SHORT": "The booking is shorter than the minimum duration.",
646
- "DURATION_TOO_LONG": "The booking is longer than the maximum duration.",
647
- "BEYOND_MAX_ADVANCE": "This is too far in the future to book.",
648
- "LEAD_TIME_TOO_SHORT": "It is too late to book this slot.",
649
- "OUTSIDE_BOOKABLE_HOURS": "The slot is outside the bookable hours.",
650
- "USER_BOOKING_LIMIT": "You have reached the maximum number of active bookings for this resource.",
651
- "OVERLAP": "The slot overlaps another booking. Please choose a different time.",
652
- "MAINTENANCE": "The resource is in maintenance during this time.",
653
- "NOT_PENDING": "This booking is no longer waiting for approval.",
654
- "NOT_ACTIVE": "This booking is not active.",
655
- "NOT_CANCELLABLE": "This booking can no longer be cancelled.",
656
- "ALREADY_STARTED": "This booking has already started.",
657
- "ALREADY_FINISHED": "This booking has already finished.",
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": "There is {{count}} upcoming booking.",
660
- "many": "There are {{count}} upcoming bookings."
671
+ "one": "Es gibt {{count}} kommende Buchung.",
672
+ "many": "Es gibt {{count}} kommende Buchungen."
661
673
  },
662
- "INVALID_RANGE": "The selected time range is not valid.",
663
- "INVALID_SETTINGS": "Some settings are not valid.",
664
- "INVALID_TIMEZONE": "This timezone is not valid.",
665
- "RANGE_TOO_LARGE": "The requested time range is too large.",
666
- "FORBIDDEN": "You are not allowed to do this.",
667
- "RESERVATION_NOT_FOUND": "This reservation does not exist.",
668
- "RESOURCE_NOT_FOUND": "This resource does not exist.",
669
- "FEED_LIMIT": "You have reached the maximum number of calendar feeds. Revoke one you no longer use first.",
670
- "FEED_NOT_FOUND": "This calendar feed does not exist or was revoked.",
671
- "INVALID_FEED": "Choose at least one source for the calendar 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": "Reservations",
675
- "reserve": "Reserve",
676
- "cannotBook": "Booking is not available",
677
- "view": "View",
678
- "managerHint": "As a manager you see the holder, notes and reasons of every booking.",
679
- "next": "Your next booking",
680
- "current": "Current booking",
681
- "loadFailed": "Reservations could not be loaded",
682
- "day": "Day",
683
- "week": "Week",
684
- "previous": "Earlier",
685
- "nextRange": "Later",
686
- "dayBarLabel": "Booked times of the day",
687
- "free": "No bookings",
688
- "reserved": "Reserved",
689
- "reservedPending": "Reserved (pending approval)",
690
- "yours": "Your booking",
691
- "maintenance": "Maintenance",
692
- "openEnd": "open end"
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": "Reserve {{resource}}",
696
- "titleGeneric": "Reserve resource",
697
- "date": "Date",
698
- "timezoneHint": "Times are in {{timezone}}",
699
- "start": "Start",
700
- "duration": "Duration",
701
- "durationHint": "In steps of {{step}} min, from {{min}} to {{max}}",
702
- "note": "Note (optional)",
703
- "noSlots": "No free start times on this day.",
704
- "approvalNeeded": "A manager has to approve this booking before it becomes valid.",
705
- "instantNote": "Your booking is confirmed immediately.",
706
- "submit": "Reserve",
707
- "requestSubmit": "Request reservation",
708
- "failedTitle": "Reservation failed",
709
- "bookedTitle": "Reservation confirmed",
710
- "bookedBody": "Your booking for {{range}} is confirmed.",
711
- "requestedTitle": "Reservation requested",
712
- "requestedBody": "Your request for {{range}} is waiting for approval."
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": "Check in by starting the resource: from {{early}} min before the start until {{grace}} min after it. Without check-in the booking is released.",
716
- "requiredFromStart": "Check in by starting the resource: from the start until {{grace}} min after it. Without check-in the booking is released.",
717
- "notRequired": "No check-in is required; the booking stays until it ends."
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": "Your booking runs until {{until}}. Keep it or free the rest?",
721
- "body": "You stopped using the resource before your booking ended. Keep the rest of the booking, or release it for others?",
722
- "keep": "Keep",
723
- "free": "Free rest"
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": "Reason (optional)",
727
- "commentLabel": "Comment (optional)",
728
- "failedTitle": "Action failed",
739
+ "reasonLabel": "Grund (optional)",
740
+ "commentLabel": "Kommentar (optional)",
741
+ "failedTitle": "Aktion fehlgeschlagen",
729
742
  "cancel": {
730
- "label": "Cancel",
731
- "title": "Cancel this booking?",
732
- "body": "The booking {{range}} for {{resource}} will be cancelled and the slot freed.",
733
- "confirm": "Cancel booking"
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": "End early",
737
- "title": "End this booking early?",
738
- "body": "The booking for {{resource}} ends now and the rest of the slot (until {{until}}) is freed.",
739
- "confirm": "End booking"
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": "Keep",
743
- "title": "Keep this booking?",
744
- "body": "The booking {{range}} for {{resource}} stays as it is.",
745
- "confirm": "Keep booking"
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": "Approve",
749
- "title": "Approve this booking?",
750
- "body": "The booking {{range}} for {{resource}} will be confirmed.",
751
- "confirm": "Approve"
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": "Reject",
755
- "title": "Reject this booking?",
756
- "body": "The booking {{range}} for {{resource}} will be rejected and the holder notified.",
757
- "confirm": "Reject"
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": "No bookings",
762
- "loadFailed": "Bookings could not be loaded",
763
- "reason": "Reason: {{reason}}"
774
+ "empty": "Keine Buchungen",
775
+ "loadFailed": "Buchungen konnten nicht geladen werden",
776
+ "reason": "Grund: {{reason}}"
764
777
  },
765
778
  my: {
766
- "title": "My reservations",
767
- "subtitle": "Your upcoming and past bookings",
768
- "upcoming": "Upcoming",
769
- "past": "Past",
770
- "manageLink": "Manage reservations"
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": "You do not manage any resource, so there is nothing to show here.",
774
- "title": "Manage reservations",
775
- "subtitle": "Approve requests and oversee all bookings of your resources",
776
- "pending": "Waiting for approval",
777
- "pendingHint": "Approve or reject requests; the holder is notified.",
778
- "all": "All bookings",
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": "Resource",
781
- "allResources": "All resources",
782
- "searchResources": "Search resources",
793
+ "resource": "Ressource",
794
+ "allResources": "Alle Ressourcen",
795
+ "searchResources": "Ressourcen suchen",
783
796
  "status": "Status",
784
- "allStatuses": "All statuses",
785
- "from": "From",
786
- "to": "To"
797
+ "allStatuses": "Alle Status",
798
+ "from": "Von",
799
+ "to": "Bis"
787
800
  }
788
801
  },
789
802
  detail: {
790
- "title": "Reservation",
791
- "loadFailed": "The reservation could not be loaded",
792
- "holder": "Booked by {{name}}",
793
- "cannotKeep": "This booking can no longer be kept.",
794
- "cannotCancel": "This booking can no longer be cancelled."
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": "The reservation settings could not be loaded",
798
- "enabled": "Enable reservations for this resource",
799
- "approvalRequired": "Bookings need approval by a manager",
800
- "checkInEnabled": "Require check-in (start the resource within the grace period)",
801
- "failed": "Settings could not be saved",
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": "Who can book",
804
- "can-start": "Everyone who can start the resource",
805
- "managers-only": "Managers only",
806
- "any-user": "Any signed-in 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": "Booking rules",
810
- "limits": "Buffers and limits",
811
- "checkIn": "Check-in and reminders",
812
- "hours": "Bookable 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": "Time step (minutes)",
816
- "minDurationMinutes": "Minimum duration (minutes)",
817
- "maxDurationMinutes": "Maximum duration (minutes)",
818
- "maxAdvanceDays": "Book at most this many days ahead",
819
- "minLeadMinutes": "Latest booking before start (minutes)",
820
- "bufferBeforeMinutes": "Buffer before a booking (minutes)",
821
- "bufferAfterMinutes": "Buffer after a booking (minutes)",
822
- "maxActiveBookingsPerUser": "Active bookings per user",
823
- "confirmWindowMinutes": "Ask to confirm starting this long before a reservation (minutes)",
824
- "checkInGraceMinutes": "Check-in grace period (minutes)",
825
- "earlyCheckInMinutes": "Early check-in window (minutes)",
826
- "handoverReminderMinutes": "Handover reminder before a reservation (minutes)"
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": "Starts and durations snap to this step; {{min}} to {{max}}, must divide 1440.",
830
- "minDurationMinutes": "Shortest booking, a multiple of the step.",
831
- "maxDurationMinutes": "Longest booking, a multiple of the step.",
832
- "maxAdvanceDays": "{{min}} to {{max}} days.",
833
- "minLeadMinutes": "0 allows booking right up to the start.",
834
- "bufferBeforeMinutes": "Kept free before each booking.",
835
- "bufferAfterMinutes": "Kept free after each booking.",
836
- "maxActiveBookingsPerUser": "0 means unlimited.",
837
- "confirmWindowMinutes": "0 never asks. Maximum {{max}}.",
838
- "checkInGraceMinutes": "{{min}} to {{max}} minutes after the start.",
839
- "earlyCheckInMinutes": "How early the holder may start. {{min}} to {{max}}.",
840
- "handoverReminderMinutes": "Notifies the current user. 0 turns it off."
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": "Enter a whole number from {{min}} to {{max}}.",
844
- "stepDividesDay": "The step must divide 1440 minutes evenly.",
845
- "multipleOfStep": "Must be a multiple of {{step}} minutes.",
846
- "maxBelowMin": "Must not be shorter than the minimum duration.",
847
- "tooManyRanges": "At most 8 ranges per day.",
848
- "timeFormat": "Use HH:mm, for example 09:00. The end may be 24:00.",
849
- "endAfterStart": "The end must be after the start.",
850
- "overlap": "Ranges must not 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": "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.",
854
- "allDay": "No range set",
855
- "addRange": "Add range",
856
- "addRangeTo": "Add range on {{day}}",
857
- "removeRange": "Remove range {{index}} on {{day}}",
858
- "from": "From",
859
- "to": "Until",
860
- "fromLabel": "From ({{day}}, range {{index}})",
861
- "toLabel": "Until ({{day}}, range {{index}})"
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": "Disable reservations?",
877
+ "title": "Reservierungen deaktivieren?",
865
878
  "body": {
866
- "one": "{{count}} upcoming booking exists. Disabling reservations cancels it and notifies the holder.",
867
- "many": "{{count}} upcoming bookings exist. Disabling reservations cancels them and notifies the holders."
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": "Disable and cancel {{count}} booking",
871
- "many": "Disable and cancel {{count}} bookings"
883
+ "one": "Deaktivieren und {{count}} Buchung stornieren",
884
+ "many": "Deaktivieren und {{count}} Buchungen stornieren"
872
885
  }
873
886
  },
874
887
  "saved": {
875
- "title": "Settings saved",
876
- "body": "The reservation settings were saved. They apply to new bookings.",
888
+ "title": "Einstellungen gespeichert",
889
+ "body": "Die Reservierungseinstellungen wurden gespeichert. Sie gelten für neue Buchungen.",
877
890
  "bodyCancelled": {
878
- "one": "The settings were saved and {{count}} upcoming booking was cancelled.",
879
- "many": "The settings were saved and {{count}} upcoming bookings were cancelled."
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": "The timezone used for bookable hours, the booking time grid, notifications and calendar feeds.",
885
- "loadFailed": "The timezone setting could not be loaded",
886
- "current": "Timezone",
887
- "default": "server default: {{timezone}}",
888
- "search": "Search timezones",
889
- "searchPlaceholder": "e.g. Europe/Berlin",
890
- "matches": "{{count}} matching",
891
- "matchesTruncated": "{{total}} matching, showing the first {{shown}}. Type to narrow the list.",
892
- "list": "Timezones",
893
- "saved": "Timezone saved",
894
- "savedBody": "Reservations now use {{timezone}}.",
895
- "failed": "Timezone could not be saved"
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": "Calendar feeds",
899
- "description": "Subscribe to reservations in your calendar app. Each feed has its own secret link; anyone with the link can read the feed.",
900
- "create": "New feed",
901
- "empty": "No feeds yet",
902
- "revoked": "Revoked",
903
- "revokedAt": "Revoked on {{date}}",
904
- "lastUsed": "Last used {{date}}",
905
- "neverUsed": "Never used",
906
- "failed": "Action failed",
907
- "loadFailed": "Calendar feeds could not be loaded",
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": "Only my own bookings",
910
- "introduced": "Resources I am introduced to",
911
- "maintained": "Resources I maintain",
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}} group",
914
- "many": "{{count}} groups"
926
+ "one": "{{count}} Gruppe",
927
+ "many": "{{count}} Gruppen"
915
928
  },
916
929
  "resources": {
917
- "one": "{{count}} resource",
918
- "many": "{{count}} resources"
930
+ "one": "{{count}} Ressource",
931
+ "many": "{{count}} Ressourcen"
919
932
  }
920
933
  },
921
934
  "form": {
922
- "createTitle": "New calendar feed",
923
- "editTitle": "Edit calendar feed",
935
+ "createTitle": "Neuer Kalender-Feed",
936
+ "editTitle": "Kalender-Feed bearbeiten",
924
937
  "name": "Name",
925
- "ownOnly": "Only my own bookings",
926
- "introduced": "All resources I am introduced to",
927
- "maintained": "All resources I maintain",
928
- "groups": "Resource groups",
929
- "noGroups": "No groups available",
930
- "resources": "Specific resources",
931
- "searchResources": "Search resources",
932
- "selectedCount": "{{count}} selected",
933
- "needSelection": "Choose at least one source for this feed.",
934
- "create": "Create feed"
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 \"{{name}}\" is ready",
938
- "body": "Copy this link now. For security it is shown only once; if you lose it, regenerate the feed.",
939
- "url": "Feed link",
940
- "copy": "Copy link",
941
- "copied": "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": "Regenerate",
945
- "title": "Regenerate \"{{name}}\"?",
946
- "body": "A new link is created and the old one stops working immediately. Calendars using the old link lose access.",
947
- "confirm": "Regenerate"
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": "Revoke",
951
- "title": "Revoke \"{{name}}\"?",
952
- "body": "The link stops working for good. This cannot be undone.",
953
- "confirm": "Revoke"
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
1372
- //#region frontend/src/lib/useFormatters.ts
1347
+ // frontend/src/lib/useFormatters.ts
1373
1348
  var { useMemo: useMemo$7 } = await importShared("react");
1374
- /** Date/time formatting in the plugin timezone (falls back to the browser's) and the UI language. */
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: language,
1382
- time: (value) => formatTime(value, zone, language),
1383
- date: (value) => formatDate(value, zone, language),
1384
- dateTime: (value) => formatDateTime(value, zone, language),
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, language)} – ${formatTime(end, zone, language)}`
1366
+ range: (start, end) => `${formatDateTime(start, zone, locale)} – ${formatTime(end, zone, locale)}`
1387
1367
  };
1388
- }, [timezone, language]);
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
- //#endregion
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
- //#endregion
1404
- //#region frontend/src/shared/fields.tsx
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$4, { children: 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$1, { children: description })
1589
+ description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description$3, { children: description })
1468
1590
  ]
1469
1591
  });
1470
1592
  }
1471
- //#endregion
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
- //#endregion
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
- //#endregion
1678
- //#region frontend/src/ical/IcalFeeds.tsx
1679
- var { Button: Button$8, EmptyState: EmptyState$1, StatusAlert: StatusAlert$7, StatusDialog: StatusDialog$6, TableDataLoadingIndicator: TableDataLoadingIndicator$2 } = await importShared("@attraccess/plugins-frontend-ui");
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
- setConfirm(null);
1709
- setError(describeError(failure, t));
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$3, {
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
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$8, {
1802
- size: "sm",
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
- //#endregion
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
- //#endregion
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$3, TextArea: TextArea$1, TextField: TextField$2 } = await importShared("@heroui/react");
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$3, { children: t(pending.action === "approve" ? "actions.commentLabel" : "actions.reasonLabel") }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextArea$1, {
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
- //#endregion
1955
- //#region frontend/src/shared/StatusChip.tsx
1956
- var { Chip: Chip$2 } = await importShared("@heroui/react");
1957
- var COLOR = {
1958
- pending: "warning",
1959
- confirmed: "success",
1960
- rejected: "danger",
1961
- cancelled: "default",
1962
- expired: "default",
1963
- no_show: "danger",
1964
- completed: "default"
1965
- };
1966
- function StatusChip({ status }) {
1967
- const { t } = useReservationsTranslations();
1968
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip$2, {
1969
- size: "sm",
1970
- color: COLOR[status],
1971
- className: "rv:whitespace-nowrap",
1972
- children: t(`status.${status}`)
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
- //#endregion
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: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
2045
- className: "rv:tabular-nums",
2046
- children: [
2047
- format.time(new Date(entry.start)),
2048
- " –",
2049
- " ",
2050
- entry.end === Number.MAX_SAFE_INTEGER ? t("card.openEnd") : format.time(new Date(entry.end))
2051
- ]
2052
- }), entry.kind === "maintenance" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip$1, {
2053
- size: "sm",
2054
- color: "danger",
2055
- children: t("card.maintenance")
2056
- }) : 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") })]
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
- //#endregion
2065
- //#region frontend/src/lib/slots.ts
2066
- var MINUTE_MS = 6e4;
2067
- var DAY_MS$1 = 864e5;
2068
- var blocksSlot = (reservation) => reservation.status === "pending" || reservation.status === "confirmed";
2069
- function checkWindow(context, start, end) {
2070
- const { rules, timezone, now } = context;
2071
- const durationMinutes = (end.getTime() - start.getTime()) / MINUTE_MS;
2072
- if (start.getTime() < now.getTime()) return "IN_THE_PAST";
2073
- if (localMinutesOfDay(start, timezone) % rules.timeStepMinutes !== 0 || durationMinutes % rules.timeStepMinutes !== 0) return "OFF_TIME_STEP";
2074
- if (durationMinutes < rules.minDurationMinutes) return "DURATION_TOO_SHORT";
2075
- if (durationMinutes > rules.maxDurationMinutes) return "DURATION_TOO_LONG";
2076
- if (start.getTime() > now.getTime() + rules.maxAdvanceDays * DAY_MS$1) return "BEYOND_MAX_ADVANCE";
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
- * Durations (minutes) bookable from `start`. Once a longer window collides with a booking,
2109
- * maintenance or the bookable hours, every longer one does as well, so scanning stops there.
2110
- */
2111
- function validDurations(context, start) {
2112
- const { timeStepMinutes, minDurationMinutes, maxDurationMinutes } = context.rules;
2113
- const result = [];
2114
- for (let minutes = minDurationMinutes; minutes <= maxDurationMinutes; minutes += timeStepMinutes) {
2115
- if (checkWindow(context, start, new Date(start.getTime() + minutes * MINUTE_MS)) !== null) break;
2116
- result.push(minutes);
2117
- }
2118
- return result;
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
- //#endregion
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
- //#endregion
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$2, ModalBody, ModalCloseTrigger, ModalFooter, ModalHeader, ModalHeading, TextArea, TextField: TextField$1 } = await importShared("@heroui/react");
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$2, { children: t("booking.note") }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextArea, {
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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$1, ListBox: ListBox$1, SearchField } = await importShared("@heroui/react");
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$1, { children: 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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
3300
- //#region frontend/src/settings/BookableHoursEditor.tsx
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
- //#endregion
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
- //#endregion
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.1.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 };