@attraccess/plugin-reservations 0.1.0 → 0.2.0-nightly.1200.1

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