@burdenoff/microfe-calendar 2026.510.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -0
- package/dist/CalendarRoot.d.ts +33 -0
- package/dist/CalendarRoot.d.ts.map +1 -0
- package/dist/CalendarRoot.js +81 -0
- package/dist/CalendarRoot.js.map +1 -0
- package/dist/CalendarRoutes.d.ts +21 -0
- package/dist/CalendarRoutes.d.ts.map +1 -0
- package/dist/CalendarRoutes.js +69 -0
- package/dist/CalendarRoutes.js.map +1 -0
- package/dist/components/AgendaView.d.ts +6 -0
- package/dist/components/AgendaView.d.ts.map +1 -0
- package/dist/components/AgendaView.js +102 -0
- package/dist/components/AgendaView.js.map +1 -0
- package/dist/components/ConfirmDialog.d.ts +16 -0
- package/dist/components/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/ConfirmDialog.js +79 -0
- package/dist/components/ConfirmDialog.js.map +1 -0
- package/dist/components/DayView.d.ts +6 -0
- package/dist/components/DayView.d.ts.map +1 -0
- package/dist/components/DayView.js +73 -0
- package/dist/components/DayView.js.map +1 -0
- package/dist/components/EventBlock.d.ts +8 -0
- package/dist/components/EventBlock.d.ts.map +1 -0
- package/dist/components/EventBlock.js +38 -0
- package/dist/components/EventBlock.js.map +1 -0
- package/dist/components/EventFormModal.d.ts +14 -0
- package/dist/components/EventFormModal.d.ts.map +1 -0
- package/dist/components/EventFormModal.js +545 -0
- package/dist/components/EventFormModal.js.map +1 -0
- package/dist/components/MiniCalendar.d.ts +6 -0
- package/dist/components/MiniCalendar.d.ts.map +1 -0
- package/dist/components/MiniCalendar.js +73 -0
- package/dist/components/MiniCalendar.js.map +1 -0
- package/dist/components/MonthView.d.ts +6 -0
- package/dist/components/MonthView.d.ts.map +1 -0
- package/dist/components/MonthView.js +70 -0
- package/dist/components/MonthView.js.map +1 -0
- package/dist/components/TimelineView.d.ts +6 -0
- package/dist/components/TimelineView.d.ts.map +1 -0
- package/dist/components/TimelineView.js +99 -0
- package/dist/components/TimelineView.js.map +1 -0
- package/dist/components/ViewSwitcher.d.ts +6 -0
- package/dist/components/ViewSwitcher.d.ts.map +1 -0
- package/dist/components/ViewSwitcher.js +51 -0
- package/dist/components/ViewSwitcher.js.map +1 -0
- package/dist/components/WeekView.d.ts +6 -0
- package/dist/components/WeekView.d.ts.map +1 -0
- package/dist/components/WeekView.js +77 -0
- package/dist/components/WeekView.js.map +1 -0
- package/dist/components/YearView.d.ts +6 -0
- package/dist/components/YearView.d.ts.map +1 -0
- package/dist/components/YearView.js +69 -0
- package/dist/components/YearView.js.map +1 -0
- package/dist/constants/permissions.d.ts +90 -0
- package/dist/constants/permissions.d.ts.map +1 -0
- package/dist/constants/permissions.js +70 -0
- package/dist/constants/permissions.js.map +1 -0
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +20716 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +906 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-operations.js +456 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +53363 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/graphql/calendarDocuments.d.ts +25 -0
- package/dist/graphql/calendarDocuments.d.ts.map +1 -0
- package/dist/graphql/calendarDocuments.js +360 -0
- package/dist/graphql/calendarDocuments.js.map +1 -0
- package/dist/hooks/index.d.ts +11 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useCalendarPermissions.d.ts +14 -0
- package/dist/hooks/useCalendarPermissions.d.ts.map +1 -0
- package/dist/hooks/useCalendarPermissions.js +48 -0
- package/dist/hooks/useCalendarPermissions.js.map +1 -0
- package/dist/hooks/useEventPermissions.d.ts +15 -0
- package/dist/hooks/useEventPermissions.d.ts.map +1 -0
- package/dist/hooks/useEventPermissions.js +34 -0
- package/dist/hooks/useEventPermissions.js.map +1 -0
- package/dist/hooks/useEvents.d.ts +15 -0
- package/dist/hooks/useEvents.d.ts.map +1 -0
- package/dist/hooks/useEvents.js +199 -0
- package/dist/hooks/useEvents.js.map +1 -0
- package/dist/hooks/useSafePermissions.d.ts +6 -0
- package/dist/hooks/useSafePermissions.d.ts.map +1 -0
- package/dist/hooks/useSafePermissions.js +17 -0
- package/dist/hooks/useSafePermissions.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/pages/CalendarPage.d.ts +5 -0
- package/dist/pages/CalendarPage.d.ts.map +1 -0
- package/dist/pages/CalendarPage.js +239 -0
- package/dist/pages/CalendarPage.js.map +1 -0
- package/dist/pages/EventDetailsPage.d.ts +6 -0
- package/dist/pages/EventDetailsPage.d.ts.map +1 -0
- package/dist/pages/EventDetailsPage.js +625 -0
- package/dist/pages/EventDetailsPage.js.map +1 -0
- package/dist/pages/ResourcesPage.d.ts +6 -0
- package/dist/pages/ResourcesPage.d.ts.map +1 -0
- package/dist/pages/ResourcesPage.js +391 -0
- package/dist/pages/ResourcesPage.js.map +1 -0
- package/dist/pages/SettingsPage.d.ts +2 -0
- package/dist/pages/SettingsPage.d.ts.map +1 -0
- package/dist/pages/SettingsPage.js +798 -0
- package/dist/pages/SettingsPage.js.map +1 -0
- package/dist/pages/SubscriptionsPage.d.ts +6 -0
- package/dist/pages/SubscriptionsPage.d.ts.map +1 -0
- package/dist/pages/SubscriptionsPage.js +170 -0
- package/dist/pages/SubscriptionsPage.js.map +1 -0
- package/dist/providers/CalendarProvider.d.ts +31 -0
- package/dist/providers/CalendarProvider.d.ts.map +1 -0
- package/dist/providers/CalendarProvider.js +53 -0
- package/dist/providers/CalendarProvider.js.map +1 -0
- package/dist/store/calendarStore.d.ts +69 -0
- package/dist/store/calendarStore.d.ts.map +1 -0
- package/dist/store/calendarStore.js +82 -0
- package/dist/store/calendarStore.js.map +1 -0
- package/dist/types/index.d.ts +341 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/dateHelpers.d.ts +115 -0
- package/dist/utils/dateHelpers.d.ts.map +1 -0
- package/dist/utils/dateHelpers.js +86 -0
- package/dist/utils/dateHelpers.js.map +1 -0
- package/dist/utils/icalHelpers.d.ts +19 -0
- package/dist/utils/icalHelpers.d.ts.map +1 -0
- package/dist/utils/icalHelpers.js +57 -0
- package/dist/utils/icalHelpers.js.map +1 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/dist/utils/nativeBridge.js +2 -0
- package/dist/utils/recurrenceHelpers.d.ts +15 -0
- package/dist/utils/recurrenceHelpers.d.ts.map +1 -0
- package/dist/utils/timezoneHelpers.d.ts +39 -0
- package/dist/utils/timezoneHelpers.d.ts.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
import { useCalendar as e } from "../providers/CalendarProvider.js";
|
|
2
|
+
import { useDeleteEventMutation as t, useGetEventQuery as n } from "../generated/wspace-operations.js";
|
|
3
|
+
import { useSafePermissions as r } from "../hooks/useSafePermissions.js";
|
|
4
|
+
import { formatDateTime as i } from "../utils/dateHelpers.js";
|
|
5
|
+
import { ADD_ATTENDEE_MUTATION as ee, CREATE_REMINDER_MUTATION as te, DELETE_REMINDER_MUTATION as ne, REMOVE_ATTENDEE_MUTATION as a, RESPOND_TO_EVENT_MUTATION as o } from "../graphql/calendarDocuments.js";
|
|
6
|
+
import { EventFormModal as s } from "../components/EventFormModal.js";
|
|
7
|
+
import { CALENDAR_PERMISSIONS as c } from "../constants/permissions.js";
|
|
8
|
+
import { useEventPermissions as re } from "../hooks/useEventPermissions.js";
|
|
9
|
+
import { ConfirmDialog as ie } from "../components/ConfirmDialog.js";
|
|
10
|
+
import { nativeConfirm as ae, nativeNotify as l } from "../utils/nativeBridge.js";
|
|
11
|
+
import { useState as u } from "react";
|
|
12
|
+
import { AccessDenied as d } from "@burdenoff/fe-libs/shared/components";
|
|
13
|
+
import { useI18n as oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
|
+
import { ArrowLeft as se, Bell as f, Clock as p, Edit as m, Link2 as h, MapPin as g, Paperclip as _, Repeat as v, Shield as y, Tag as b, Trash2 as ce, Users as x, Video as le } from "lucide-react";
|
|
15
|
+
import { useNavigate as ue, useParams as de } from "react-router-dom";
|
|
16
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
17
|
+
import { useMutation as w } from "@apollo/client/react";
|
|
18
|
+
//#region src/pages/EventDetailsPage.tsx
|
|
19
|
+
function fe(e) {
|
|
20
|
+
return e ? {
|
|
21
|
+
id: e.id,
|
|
22
|
+
calendarId: e.calendarId,
|
|
23
|
+
calendarName: e.calendar?.name ?? void 0,
|
|
24
|
+
calendarColor: e.calendar?.color ?? void 0,
|
|
25
|
+
title: e.title,
|
|
26
|
+
description: e.description ?? void 0,
|
|
27
|
+
location: e.location ?? void 0,
|
|
28
|
+
locationAddress: e.locationAddress ?? void 0,
|
|
29
|
+
locationType: e.locationType ?? void 0,
|
|
30
|
+
locationUrl: e.locationUrl ?? void 0,
|
|
31
|
+
startTime: new Date(e.startTime),
|
|
32
|
+
endTime: new Date(e.endTime),
|
|
33
|
+
isAllDay: e.allDay,
|
|
34
|
+
privacy: e.visibility ?? "PUBLIC",
|
|
35
|
+
status: e.status || "CONFIRMED",
|
|
36
|
+
eventType: e.eventType ?? "MEETING",
|
|
37
|
+
isRecurring: e.isRecurring ?? !1,
|
|
38
|
+
rrule: e.rrule ?? void 0,
|
|
39
|
+
organizerId: e.createdBy,
|
|
40
|
+
attendees: e.attendees?.map((e) => ({
|
|
41
|
+
userId: e.userId ?? "",
|
|
42
|
+
email: e.email ?? "",
|
|
43
|
+
name: e.name ?? "",
|
|
44
|
+
status: e.rsvpStatus || "PENDING",
|
|
45
|
+
isRequired: !e.isOptional
|
|
46
|
+
})),
|
|
47
|
+
reminders: e.reminders?.map((e) => ({
|
|
48
|
+
id: e.id,
|
|
49
|
+
minutesBefore: e.minutesBefore,
|
|
50
|
+
method: e.channel || "NOTIFICATION"
|
|
51
|
+
})),
|
|
52
|
+
resourceBookings: e.resourceBookings?.map((t) => ({
|
|
53
|
+
id: t.id,
|
|
54
|
+
resourceId: t.resourceId,
|
|
55
|
+
resourceName: t.resource?.name ?? "Resource",
|
|
56
|
+
resourceType: t.resource?.resourceType ?? void 0,
|
|
57
|
+
resourceLocation: t.resource?.location ?? void 0,
|
|
58
|
+
notes: t.notes ?? void 0,
|
|
59
|
+
eventId: e.id,
|
|
60
|
+
startTime: new Date(t.startTime),
|
|
61
|
+
endTime: new Date(t.endTime),
|
|
62
|
+
status: t.status ?? "PENDING",
|
|
63
|
+
createdAt: new Date(e.createdAt)
|
|
64
|
+
})) ?? [],
|
|
65
|
+
attachments: e.attachments?.map((e, t) => ({
|
|
66
|
+
id: e.id ?? e.fileId ?? `attachment-${t}`,
|
|
67
|
+
fileId: e.fileId ?? void 0,
|
|
68
|
+
name: e.name ?? e.fileName ?? `Attachment ${t + 1}`,
|
|
69
|
+
url: e.url ?? e.fileUrl ?? "",
|
|
70
|
+
size: e.size ?? 0,
|
|
71
|
+
mimeType: e.mimeType ?? "application/octet-stream"
|
|
72
|
+
})) ?? [],
|
|
73
|
+
videoCallLink: e.onlineMeetingUrl ?? void 0,
|
|
74
|
+
onlineMeetingProvider: e.onlineMeetingProvider ?? void 0,
|
|
75
|
+
maxAttendees: e.maxAttendees ?? void 0,
|
|
76
|
+
currentAttendeeCount: e.currentAttendeeCount ?? void 0,
|
|
77
|
+
checkInEnabled: e.checkInEnabled ?? !1,
|
|
78
|
+
tags: e.tags ?? [],
|
|
79
|
+
metadata: e.metadata ?? void 0,
|
|
80
|
+
createdAt: new Date(e.createdAt),
|
|
81
|
+
updatedAt: new Date(e.updatedAt)
|
|
82
|
+
} : null;
|
|
83
|
+
}
|
|
84
|
+
function T() {
|
|
85
|
+
let { eventId: T } = de(), E = ue(), { basePath: D } = e(), { t: O } = oe(), k = (e, t) => {
|
|
86
|
+
let n = O(e);
|
|
87
|
+
return n === e ? t : n;
|
|
88
|
+
}, A = {
|
|
89
|
+
ACCEPTED: k("calendar.attendeeStatusAccepted", "Accepted"),
|
|
90
|
+
DECLINED: k("calendar.attendeeStatusDeclined", "Declined"),
|
|
91
|
+
TENTATIVE: k("calendar.attendeeStatusTentative", "Tentative"),
|
|
92
|
+
PENDING: k("calendar.attendeeStatusPending", "Pending")
|
|
93
|
+
}, j = {
|
|
94
|
+
CONFIRMED: k("calendar.eventStatusConfirmed", "Confirmed"),
|
|
95
|
+
CANCELLED: k("calendar.eventStatusCancelled", "Cancelled"),
|
|
96
|
+
TENTATIVE: k("calendar.eventStatusTentative", "Tentative")
|
|
97
|
+
}, M = {
|
|
98
|
+
EMAIL: k("calendar.reminderMethodEmail", "email"),
|
|
99
|
+
NOTIFICATION: k("calendar.reminderMethodNotification", "notification"),
|
|
100
|
+
SMS: k("calendar.reminderMethodSms", "sms")
|
|
101
|
+
}, [N, P] = u(!1), [F, I] = u(!1), [L, R] = u(""), [z, B] = u(""), [V, pe] = u("15"), [H, me] = u("IN_APP"), { hasPermission: U, isLoading: W } = r(), he = U(c.CALENDAR_EVENT_READ), { data: G, loading: ge, error: K, refetch: q } = n({
|
|
102
|
+
variables: { id: T ?? "" },
|
|
103
|
+
skip: !T || W || !he,
|
|
104
|
+
fetchPolicy: "cache-and-network"
|
|
105
|
+
}), [_e, { loading: ve }] = t(), [ye, { loading: J }] = w(ee), [be, { loading: xe }] = w(a), [Se] = w(o), [Ce, { loading: Y }] = w(te), [we, { loading: X }] = w(ne), Z = fe(G?.event ?? null), Q = re(Z), $ = U;
|
|
106
|
+
return W || ge && !G ? /* @__PURE__ */ S("div", {
|
|
107
|
+
className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
|
|
108
|
+
children: /* @__PURE__ */ S("p", {
|
|
109
|
+
className: "font-text-md text-text-secondary",
|
|
110
|
+
children: k("calendar.loading", "Loading...")
|
|
111
|
+
})
|
|
112
|
+
}) : $(c.CALENDAR_EVENT_READ) ? K ? /* @__PURE__ */ S("div", {
|
|
113
|
+
className: "@container min-h-screen bg-bg-canvas p-page-padding",
|
|
114
|
+
children: /* @__PURE__ */ S("div", {
|
|
115
|
+
className: "max-w-3xl mx-auto",
|
|
116
|
+
children: /* @__PURE__ */ C("div", {
|
|
117
|
+
className: "text-center py-12",
|
|
118
|
+
children: [/* @__PURE__ */ C("p", {
|
|
119
|
+
className: "font-text-md text-red-600 dark:text-red-400 mb-4",
|
|
120
|
+
children: [
|
|
121
|
+
k("calendar.failedToLoadEvent", "Failed to load event:"),
|
|
122
|
+
" ",
|
|
123
|
+
K.message
|
|
124
|
+
]
|
|
125
|
+
}), /* @__PURE__ */ S("button", {
|
|
126
|
+
onClick: () => E(`${D}/view/week`),
|
|
127
|
+
className: "px-element-padding py-element-padding-sm rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors",
|
|
128
|
+
children: k("calendar.backToCalendar", "Back to Calendar")
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
}) : Z ? /* @__PURE__ */ C("div", {
|
|
133
|
+
className: "@container min-h-screen bg-bg-canvas",
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ S("header", {
|
|
136
|
+
className: "border-b border-border-default bg-bg-surface px-page-padding py-element-padding",
|
|
137
|
+
children: /* @__PURE__ */ C("div", {
|
|
138
|
+
className: "max-w-4xl mx-auto flex items-center justify-between",
|
|
139
|
+
children: [/* @__PURE__ */ C("button", {
|
|
140
|
+
onClick: () => E(-1),
|
|
141
|
+
className: "inline-flex items-center gap-inline-gap-sm text-text-secondary hover:text-text-primary font-text-sm font-weight-medium transition-colors",
|
|
142
|
+
children: [/* @__PURE__ */ S(se, { className: "size-4" }), k("calendar.back", "Back")]
|
|
143
|
+
}), /* @__PURE__ */ C("div", {
|
|
144
|
+
className: "flex items-center gap-inline-gap",
|
|
145
|
+
children: [$(c.CALENDAR_EVENT_UPDATE) && Q.canEdit && /* @__PURE__ */ C("button", {
|
|
146
|
+
onClick: () => P(!0),
|
|
147
|
+
className: "inline-flex items-center gap-inline-gap-sm px-element-padding py-element-padding-sm rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary font-text-sm font-weight-medium transition-colors",
|
|
148
|
+
children: [/* @__PURE__ */ S(m, { className: "size-4" }), /* @__PURE__ */ S("span", {
|
|
149
|
+
className: "hidden @sm:inline",
|
|
150
|
+
children: k("calendar.edit", "Edit")
|
|
151
|
+
})]
|
|
152
|
+
}), $(c.CALENDAR_EVENT_DELETE) && Q.canDelete && /* @__PURE__ */ C("button", {
|
|
153
|
+
onClick: () => I(!0),
|
|
154
|
+
className: "inline-flex items-center gap-inline-gap-sm px-element-padding py-element-padding-sm rounded-radius-md border border-red-300 dark:border-red-800 bg-bg-surface hover:bg-red-50 dark:hover:bg-red-950/20 text-red-600 dark:text-red-400 font-text-sm font-weight-medium transition-colors",
|
|
155
|
+
children: [/* @__PURE__ */ S(ce, { className: "size-4" }), /* @__PURE__ */ S("span", {
|
|
156
|
+
className: "hidden @sm:inline",
|
|
157
|
+
children: k("calendar.delete", "Delete")
|
|
158
|
+
})]
|
|
159
|
+
})]
|
|
160
|
+
})]
|
|
161
|
+
})
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ S("div", {
|
|
164
|
+
className: "max-w-4xl mx-auto p-page-padding",
|
|
165
|
+
children: /* @__PURE__ */ C("div", {
|
|
166
|
+
className: "bg-bg-surface border border-border-default rounded-radius-lg p-card-padding",
|
|
167
|
+
children: [/* @__PURE__ */ C("div", {
|
|
168
|
+
className: "mb-section-gap",
|
|
169
|
+
children: [/* @__PURE__ */ S("h1", {
|
|
170
|
+
className: "font-heading-lg text-text-primary mb-stack-gap",
|
|
171
|
+
children: Z.title
|
|
172
|
+
}), /* @__PURE__ */ C("div", {
|
|
173
|
+
className: "flex items-center gap-inline-gap text-text-secondary font-text-md",
|
|
174
|
+
children: [/* @__PURE__ */ S(p, { className: "size-4" }), /* @__PURE__ */ S("span", { children: Z.isAllDay ? `${i(Z.startTime).split(",")[0]} (${k("calendar.allDay", "All day")})` : `${i(Z.startTime)} - ${i(Z.endTime)}` })]
|
|
175
|
+
})]
|
|
176
|
+
}), /* @__PURE__ */ C("div", {
|
|
177
|
+
className: "space-y-stack-gap",
|
|
178
|
+
children: [
|
|
179
|
+
Z.location && /* @__PURE__ */ C("div", {
|
|
180
|
+
className: "flex gap-inline-gap",
|
|
181
|
+
children: [/* @__PURE__ */ S(g, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
182
|
+
className: "min-w-0 flex-1",
|
|
183
|
+
children: [/* @__PURE__ */ S("p", {
|
|
184
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
185
|
+
children: k("calendar.location", "Location")
|
|
186
|
+
}), /* @__PURE__ */ S("p", {
|
|
187
|
+
className: "font-text-sm text-text-secondary",
|
|
188
|
+
children: Z.location
|
|
189
|
+
})]
|
|
190
|
+
})]
|
|
191
|
+
}),
|
|
192
|
+
(Z.locationAddress || Z.locationUrl || Z.locationType) && /* @__PURE__ */ C("div", {
|
|
193
|
+
className: "flex gap-inline-gap",
|
|
194
|
+
children: [/* @__PURE__ */ S(g, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
195
|
+
className: "min-w-0 flex-1 space-y-1",
|
|
196
|
+
children: [
|
|
197
|
+
/* @__PURE__ */ S("p", {
|
|
198
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
199
|
+
children: k("calendar.locationDetails", "Location details")
|
|
200
|
+
}),
|
|
201
|
+
Z.locationType && /* @__PURE__ */ S("p", {
|
|
202
|
+
className: "font-text-sm text-text-secondary",
|
|
203
|
+
children: Z.locationType
|
|
204
|
+
}),
|
|
205
|
+
Z.locationAddress && /* @__PURE__ */ S("p", {
|
|
206
|
+
className: "font-text-sm text-text-secondary",
|
|
207
|
+
children: Z.locationAddress
|
|
208
|
+
}),
|
|
209
|
+
Z.locationUrl && /* @__PURE__ */ S("a", {
|
|
210
|
+
href: Z.locationUrl,
|
|
211
|
+
target: "_blank",
|
|
212
|
+
rel: "noopener noreferrer",
|
|
213
|
+
className: "font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all",
|
|
214
|
+
children: Z.locationUrl
|
|
215
|
+
})
|
|
216
|
+
]
|
|
217
|
+
})]
|
|
218
|
+
}),
|
|
219
|
+
Z.videoCallLink && /* @__PURE__ */ C("div", {
|
|
220
|
+
className: "flex gap-inline-gap",
|
|
221
|
+
children: [/* @__PURE__ */ S(le, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
222
|
+
className: "min-w-0 flex-1",
|
|
223
|
+
children: [/* @__PURE__ */ S("p", {
|
|
224
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
225
|
+
children: k("calendar.videoCall", "Video Call")
|
|
226
|
+
}), /* @__PURE__ */ S("a", {
|
|
227
|
+
href: Z.videoCallLink,
|
|
228
|
+
target: "_blank",
|
|
229
|
+
rel: "noopener noreferrer",
|
|
230
|
+
className: "font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all",
|
|
231
|
+
children: Z.videoCallLink
|
|
232
|
+
})]
|
|
233
|
+
})]
|
|
234
|
+
}),
|
|
235
|
+
/* @__PURE__ */ C("div", {
|
|
236
|
+
className: "flex gap-inline-gap",
|
|
237
|
+
children: [/* @__PURE__ */ S(y, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
238
|
+
className: "min-w-0 flex-1 space-y-1",
|
|
239
|
+
children: [
|
|
240
|
+
/* @__PURE__ */ S("p", {
|
|
241
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
242
|
+
children: k("calendar.eventRules", "Event rules")
|
|
243
|
+
}),
|
|
244
|
+
/* @__PURE__ */ C("p", {
|
|
245
|
+
className: "font-text-sm text-text-secondary",
|
|
246
|
+
children: [
|
|
247
|
+
k("calendar.visibility", "Visibility"),
|
|
248
|
+
": ",
|
|
249
|
+
Z.privacy
|
|
250
|
+
]
|
|
251
|
+
}),
|
|
252
|
+
Z.maxAttendees ? /* @__PURE__ */ S("p", {
|
|
253
|
+
className: "font-text-sm text-text-secondary",
|
|
254
|
+
children: k("calendar.attendeeCapacity", "{current} / {max} attendees").replace("{current}", String(Z.currentAttendeeCount ?? 0)).replace("{max}", String(Z.maxAttendees))
|
|
255
|
+
}) : null,
|
|
256
|
+
Z.checkInEnabled ? /* @__PURE__ */ S("p", {
|
|
257
|
+
className: "font-text-sm text-text-secondary",
|
|
258
|
+
children: k("calendar.checkInEnabled", "Attendee check-in enabled")
|
|
259
|
+
}) : null
|
|
260
|
+
]
|
|
261
|
+
})]
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ C("div", {
|
|
264
|
+
className: "flex gap-inline-gap",
|
|
265
|
+
children: [/* @__PURE__ */ S(x, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
266
|
+
className: "min-w-0 flex-1",
|
|
267
|
+
children: [
|
|
268
|
+
/* @__PURE__ */ C("p", {
|
|
269
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
270
|
+
children: [
|
|
271
|
+
k("calendar.attendees", "Attendees"),
|
|
272
|
+
" (",
|
|
273
|
+
Z.attendees?.length ?? 0,
|
|
274
|
+
")"
|
|
275
|
+
]
|
|
276
|
+
}),
|
|
277
|
+
Z.attendees && Z.attendees.length > 0 ? /* @__PURE__ */ S("div", {
|
|
278
|
+
className: "space-y-1",
|
|
279
|
+
children: Z.attendees.map((e) => /* @__PURE__ */ C("div", {
|
|
280
|
+
className: "flex items-center justify-between",
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ S("span", {
|
|
283
|
+
className: "font-text-sm text-text-secondary",
|
|
284
|
+
children: e.name || e.email || e.userId
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ S("span", {
|
|
287
|
+
className: `font-text-xs px-2 py-0.5 rounded-radius-sm ${e.status === "ACCEPTED" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300" : e.status === "DECLINED" ? "bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300" : "bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400"}`,
|
|
288
|
+
children: A[e.status] ?? e.status
|
|
289
|
+
}),
|
|
290
|
+
$(c.CALENDAR_ATTENDEE_DELETE) ? /* @__PURE__ */ S("button", {
|
|
291
|
+
type: "button",
|
|
292
|
+
onClick: async () => {
|
|
293
|
+
let t = G?.event?.attendees?.find((t) => (t.email ?? t.userId) === (e.email || e.userId))?.id;
|
|
294
|
+
t && (await be({ variables: { attendeeId: t } }), await q());
|
|
295
|
+
},
|
|
296
|
+
disabled: xe,
|
|
297
|
+
className: "ml-2 font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
|
|
298
|
+
children: k("calendar.remove", "Remove")
|
|
299
|
+
}) : null
|
|
300
|
+
]
|
|
301
|
+
}, e.userId || e.email))
|
|
302
|
+
}) : /* @__PURE__ */ S("p", {
|
|
303
|
+
className: "font-text-sm text-text-secondary",
|
|
304
|
+
children: k("calendar.noAttendeesYet", "No attendees added yet.")
|
|
305
|
+
}),
|
|
306
|
+
/* @__PURE__ */ C("div", {
|
|
307
|
+
className: "mt-3 grid grid-cols-1 gap-2 @md:grid-cols-[1fr,1fr,auto]",
|
|
308
|
+
children: [
|
|
309
|
+
/* @__PURE__ */ S("input", {
|
|
310
|
+
value: L,
|
|
311
|
+
onChange: (e) => R(e.target.value),
|
|
312
|
+
placeholder: k("calendar.attendeeEmail", "Attendee email"),
|
|
313
|
+
className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
314
|
+
}),
|
|
315
|
+
/* @__PURE__ */ S("input", {
|
|
316
|
+
value: z,
|
|
317
|
+
onChange: (e) => B(e.target.value),
|
|
318
|
+
placeholder: k("calendar.attendeeName", "Attendee name"),
|
|
319
|
+
className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
320
|
+
}),
|
|
321
|
+
/* @__PURE__ */ S("button", {
|
|
322
|
+
type: "button",
|
|
323
|
+
onClick: async () => {
|
|
324
|
+
!T || !L.trim() || (await ye({ variables: {
|
|
325
|
+
eventId: T,
|
|
326
|
+
email: L.trim(),
|
|
327
|
+
name: z.trim() || void 0
|
|
328
|
+
} }), R(""), B(""), await q());
|
|
329
|
+
},
|
|
330
|
+
disabled: !L.trim() || J,
|
|
331
|
+
className: "px-4 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover disabled:opacity-50",
|
|
332
|
+
children: J ? k("calendar.adding", "Adding...") : k("calendar.addAttendee", "Add attendee")
|
|
333
|
+
})
|
|
334
|
+
]
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ S("div", {
|
|
337
|
+
className: "mt-2 flex flex-wrap gap-2",
|
|
338
|
+
children: [
|
|
339
|
+
"ACCEPTED",
|
|
340
|
+
"TENTATIVE",
|
|
341
|
+
"DECLINED"
|
|
342
|
+
].map((e) => /* @__PURE__ */ S("button", {
|
|
343
|
+
type: "button",
|
|
344
|
+
onClick: async () => {
|
|
345
|
+
T && (await Se({ variables: {
|
|
346
|
+
eventId: T,
|
|
347
|
+
status: e
|
|
348
|
+
} }), await q());
|
|
349
|
+
},
|
|
350
|
+
className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary font-text-sm",
|
|
351
|
+
children: A[e] ?? e
|
|
352
|
+
}, e))
|
|
353
|
+
})
|
|
354
|
+
]
|
|
355
|
+
})]
|
|
356
|
+
}),
|
|
357
|
+
Z.tags && Z.tags.length > 0 && /* @__PURE__ */ C("div", {
|
|
358
|
+
className: "flex gap-inline-gap",
|
|
359
|
+
children: [/* @__PURE__ */ S(b, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
360
|
+
className: "min-w-0 flex-1",
|
|
361
|
+
children: [/* @__PURE__ */ S("p", {
|
|
362
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
363
|
+
children: k("calendar.tags", "Tags")
|
|
364
|
+
}), /* @__PURE__ */ S("div", {
|
|
365
|
+
className: "flex flex-wrap gap-2",
|
|
366
|
+
children: Z.tags.map((e) => /* @__PURE__ */ S("span", {
|
|
367
|
+
className: "px-2 py-0.5 rounded-radius-sm bg-bg-neutral text-text-secondary font-text-xs",
|
|
368
|
+
children: e
|
|
369
|
+
}, e))
|
|
370
|
+
})]
|
|
371
|
+
})]
|
|
372
|
+
}),
|
|
373
|
+
(Z.recurrence || Z.rrule) && /* @__PURE__ */ C("div", {
|
|
374
|
+
className: "flex gap-inline-gap",
|
|
375
|
+
children: [/* @__PURE__ */ S(v, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
376
|
+
className: "min-w-0 flex-1",
|
|
377
|
+
children: [/* @__PURE__ */ S("p", {
|
|
378
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
379
|
+
children: k("calendar.recurrence", "Recurrence")
|
|
380
|
+
}), Z.recurrence ? /* @__PURE__ */ C("p", {
|
|
381
|
+
className: "font-text-sm text-text-secondary",
|
|
382
|
+
children: [
|
|
383
|
+
Z.recurrence.pattern,
|
|
384
|
+
" (",
|
|
385
|
+
k("calendar.recurrenceEveryInterval", "every {interval}").replace("{interval}", String(Z.recurrence.interval)),
|
|
386
|
+
")"
|
|
387
|
+
]
|
|
388
|
+
}) : /* @__PURE__ */ S("p", {
|
|
389
|
+
className: "font-text-sm text-text-secondary font-mono break-all",
|
|
390
|
+
children: Z.rrule
|
|
391
|
+
})]
|
|
392
|
+
})]
|
|
393
|
+
}),
|
|
394
|
+
/* @__PURE__ */ C("div", {
|
|
395
|
+
className: "flex gap-inline-gap",
|
|
396
|
+
children: [/* @__PURE__ */ S(f, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
397
|
+
className: "min-w-0 flex-1",
|
|
398
|
+
children: [
|
|
399
|
+
/* @__PURE__ */ S("p", {
|
|
400
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
401
|
+
children: k("calendar.reminders", "Reminders")
|
|
402
|
+
}),
|
|
403
|
+
Z.reminders && Z.reminders.length > 0 ? /* @__PURE__ */ S("div", {
|
|
404
|
+
className: "space-y-1",
|
|
405
|
+
children: Z.reminders.map((e) => /* @__PURE__ */ C("div", {
|
|
406
|
+
className: "flex items-center justify-between gap-3",
|
|
407
|
+
children: [/* @__PURE__ */ S("p", {
|
|
408
|
+
className: "font-text-sm text-text-secondary",
|
|
409
|
+
children: k("calendar.reminderSummary", "{minutes} minutes before ({method})").replace("{minutes}", String(e.minutesBefore)).replace("{method}", M[e.method] ?? e.method.toLowerCase())
|
|
410
|
+
}), /* @__PURE__ */ S("button", {
|
|
411
|
+
type: "button",
|
|
412
|
+
onClick: async () => {
|
|
413
|
+
e.id && (await we({ variables: { id: e.id } }), await q());
|
|
414
|
+
},
|
|
415
|
+
disabled: X,
|
|
416
|
+
className: "font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
|
|
417
|
+
children: k("calendar.delete", "Delete")
|
|
418
|
+
})]
|
|
419
|
+
}, e.id))
|
|
420
|
+
}) : /* @__PURE__ */ S("p", {
|
|
421
|
+
className: "font-text-sm text-text-secondary",
|
|
422
|
+
children: k("calendar.noRemindersConfigured", "No reminders configured yet.")
|
|
423
|
+
}),
|
|
424
|
+
/* @__PURE__ */ C("div", {
|
|
425
|
+
className: "mt-3 grid grid-cols-1 gap-2 @md:grid-cols-[1fr,1fr,auto]",
|
|
426
|
+
children: [
|
|
427
|
+
/* @__PURE__ */ S("input", {
|
|
428
|
+
type: "number",
|
|
429
|
+
min: "1",
|
|
430
|
+
value: V,
|
|
431
|
+
onChange: (e) => pe(e.target.value),
|
|
432
|
+
className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
433
|
+
}),
|
|
434
|
+
/* @__PURE__ */ C("select", {
|
|
435
|
+
value: H,
|
|
436
|
+
onChange: (e) => me(e.target.value),
|
|
437
|
+
className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
438
|
+
children: [
|
|
439
|
+
/* @__PURE__ */ S("option", {
|
|
440
|
+
value: "IN_APP",
|
|
441
|
+
children: k("calendar.inApp", "In app")
|
|
442
|
+
}),
|
|
443
|
+
/* @__PURE__ */ S("option", {
|
|
444
|
+
value: "EMAIL",
|
|
445
|
+
children: k("calendar.email", "Email")
|
|
446
|
+
}),
|
|
447
|
+
/* @__PURE__ */ S("option", {
|
|
448
|
+
value: "SMS",
|
|
449
|
+
children: "SMS"
|
|
450
|
+
})
|
|
451
|
+
]
|
|
452
|
+
}),
|
|
453
|
+
/* @__PURE__ */ S("button", {
|
|
454
|
+
type: "button",
|
|
455
|
+
onClick: async () => {
|
|
456
|
+
T && (await Ce({ variables: { input: {
|
|
457
|
+
eventId: T,
|
|
458
|
+
minutesBefore: parseInt(V, 10),
|
|
459
|
+
channel: H
|
|
460
|
+
} } }), await q());
|
|
461
|
+
},
|
|
462
|
+
disabled: Y,
|
|
463
|
+
className: "px-4 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover disabled:opacity-50",
|
|
464
|
+
children: Y ? k("calendar.adding", "Adding...") : k("calendar.addReminder", "Add reminder")
|
|
465
|
+
})
|
|
466
|
+
]
|
|
467
|
+
})
|
|
468
|
+
]
|
|
469
|
+
})]
|
|
470
|
+
}),
|
|
471
|
+
Z.resourceBookings && Z.resourceBookings.length > 0 && /* @__PURE__ */ C("div", {
|
|
472
|
+
className: "flex gap-inline-gap",
|
|
473
|
+
children: [/* @__PURE__ */ S(x, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
474
|
+
className: "min-w-0 flex-1",
|
|
475
|
+
children: [/* @__PURE__ */ S("p", {
|
|
476
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
477
|
+
children: k("calendar.resourceBookings", "Resource bookings")
|
|
478
|
+
}), /* @__PURE__ */ S("div", {
|
|
479
|
+
className: "space-y-2",
|
|
480
|
+
children: Z.resourceBookings.map((e) => /* @__PURE__ */ C("div", {
|
|
481
|
+
className: "rounded-radius-md border border-border-subtle p-3",
|
|
482
|
+
children: [
|
|
483
|
+
/* @__PURE__ */ S("p", {
|
|
484
|
+
className: "font-text-sm font-weight-medium text-text-primary",
|
|
485
|
+
children: e.resourceName
|
|
486
|
+
}),
|
|
487
|
+
/* @__PURE__ */ S("p", {
|
|
488
|
+
className: "font-text-xs text-text-tertiary",
|
|
489
|
+
children: [e.resourceType, e.resourceLocation].filter(Boolean).join(" • ")
|
|
490
|
+
}),
|
|
491
|
+
e.notes ? /* @__PURE__ */ S("p", {
|
|
492
|
+
className: "mt-1 font-text-sm text-text-secondary",
|
|
493
|
+
children: e.notes
|
|
494
|
+
}) : null
|
|
495
|
+
]
|
|
496
|
+
}, e.id))
|
|
497
|
+
})]
|
|
498
|
+
})]
|
|
499
|
+
}),
|
|
500
|
+
Z.attachments && Z.attachments.length > 0 && /* @__PURE__ */ C("div", {
|
|
501
|
+
className: "flex gap-inline-gap",
|
|
502
|
+
children: [/* @__PURE__ */ S(_, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
503
|
+
className: "min-w-0 flex-1",
|
|
504
|
+
children: [/* @__PURE__ */ S("p", {
|
|
505
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
506
|
+
children: k("calendar.attachments", "Attachments")
|
|
507
|
+
}), /* @__PURE__ */ S("div", {
|
|
508
|
+
className: "space-y-2",
|
|
509
|
+
children: Z.attachments.map((e) => /* @__PURE__ */ C("div", {
|
|
510
|
+
className: "flex items-center gap-2 font-text-sm",
|
|
511
|
+
children: [/* @__PURE__ */ S("a", {
|
|
512
|
+
href: e.url || "#",
|
|
513
|
+
target: "_blank",
|
|
514
|
+
rel: "noopener noreferrer",
|
|
515
|
+
className: "text-blue-600 dark:text-blue-400 hover:underline break-all",
|
|
516
|
+
children: e.name
|
|
517
|
+
}), e.fileId ? /* @__PURE__ */ C("span", {
|
|
518
|
+
className: "text-text-tertiary",
|
|
519
|
+
children: [
|
|
520
|
+
"(",
|
|
521
|
+
e.fileId,
|
|
522
|
+
")"
|
|
523
|
+
]
|
|
524
|
+
}) : null]
|
|
525
|
+
}, e.id))
|
|
526
|
+
})]
|
|
527
|
+
})]
|
|
528
|
+
}),
|
|
529
|
+
/* @__PURE__ */ C("div", {
|
|
530
|
+
className: "flex gap-inline-gap",
|
|
531
|
+
children: [/* @__PURE__ */ S(b, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
532
|
+
className: "min-w-0 flex-1",
|
|
533
|
+
children: [/* @__PURE__ */ S("p", {
|
|
534
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
535
|
+
children: k("calendar.status", "Status")
|
|
536
|
+
}), /* @__PURE__ */ S("span", {
|
|
537
|
+
className: `font-text-xs px-2 py-0.5 rounded-radius-sm ${Z.status === "CONFIRMED" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300" : Z.status === "CANCELLED" ? "bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300" : "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300"}`,
|
|
538
|
+
children: j[Z.status] ?? Z.status
|
|
539
|
+
})]
|
|
540
|
+
})]
|
|
541
|
+
}),
|
|
542
|
+
Z.description && /* @__PURE__ */ C("div", {
|
|
543
|
+
className: "pt-stack-gap border-t border-border-default",
|
|
544
|
+
children: [/* @__PURE__ */ S("p", {
|
|
545
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
546
|
+
children: k("calendar.notes", "Notes")
|
|
547
|
+
}), /* @__PURE__ */ S("p", {
|
|
548
|
+
className: "font-text-sm text-text-secondary whitespace-pre-wrap",
|
|
549
|
+
children: Z.description
|
|
550
|
+
})]
|
|
551
|
+
}),
|
|
552
|
+
Array.isArray(Z.metadata?.links) && Z.metadata?.links.length > 0 && /* @__PURE__ */ C("div", {
|
|
553
|
+
className: "pt-stack-gap border-t border-border-default",
|
|
554
|
+
children: [/* @__PURE__ */ C("div", {
|
|
555
|
+
className: "flex items-center gap-inline-gap-sm mb-2",
|
|
556
|
+
children: [/* @__PURE__ */ S(h, { className: "size-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
|
|
557
|
+
className: "font-text-sm font-weight-semibold text-text-primary",
|
|
558
|
+
children: k("calendar.links", "Links")
|
|
559
|
+
})]
|
|
560
|
+
}), /* @__PURE__ */ S("div", {
|
|
561
|
+
className: "space-y-2",
|
|
562
|
+
children: Z.metadata.links.map((e) => /* @__PURE__ */ S("a", {
|
|
563
|
+
href: e,
|
|
564
|
+
target: "_blank",
|
|
565
|
+
rel: "noopener noreferrer",
|
|
566
|
+
className: "block font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all",
|
|
567
|
+
children: e
|
|
568
|
+
}, e))
|
|
569
|
+
})]
|
|
570
|
+
})
|
|
571
|
+
]
|
|
572
|
+
})]
|
|
573
|
+
})
|
|
574
|
+
}),
|
|
575
|
+
/* @__PURE__ */ S(s, {
|
|
576
|
+
open: N,
|
|
577
|
+
event: Z,
|
|
578
|
+
onClose: () => P(!1)
|
|
579
|
+
}),
|
|
580
|
+
/* @__PURE__ */ S(ie, {
|
|
581
|
+
open: F,
|
|
582
|
+
title: k("calendar.deleteEvent", "Delete Event"),
|
|
583
|
+
message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{title}\"? This action cannot be undone.").replace("{title}", Z.title),
|
|
584
|
+
confirmLabel: k("calendar.delete", "Delete"),
|
|
585
|
+
variant: "danger",
|
|
586
|
+
loading: ve,
|
|
587
|
+
onConfirm: async () => {
|
|
588
|
+
if (T && await ae({
|
|
589
|
+
title: k("calendar.deleteEvent", "Delete Event"),
|
|
590
|
+
message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{title}\"? This action cannot be undone.").replace("{title}", Z?.title ?? ""),
|
|
591
|
+
okButtonTitle: k("calendar.delete", "Delete")
|
|
592
|
+
}) !== !1) try {
|
|
593
|
+
await _e({ variables: { id: T } }), l("success"), I(!1), E(`${D}/view/week`);
|
|
594
|
+
} catch (e) {
|
|
595
|
+
throw l("error"), e;
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
onCancel: () => I(!1)
|
|
599
|
+
})
|
|
600
|
+
]
|
|
601
|
+
}) : /* @__PURE__ */ S("div", {
|
|
602
|
+
className: "@container min-h-screen bg-bg-canvas p-page-padding",
|
|
603
|
+
children: /* @__PURE__ */ S("div", {
|
|
604
|
+
className: "max-w-3xl mx-auto",
|
|
605
|
+
children: /* @__PURE__ */ C("div", {
|
|
606
|
+
className: "text-center py-12",
|
|
607
|
+
children: [/* @__PURE__ */ S("p", {
|
|
608
|
+
className: "font-text-md text-text-secondary",
|
|
609
|
+
children: k("calendar.eventNotFound", "Event not found")
|
|
610
|
+
}), /* @__PURE__ */ S("button", {
|
|
611
|
+
onClick: () => E(`${D}/view/week`),
|
|
612
|
+
className: "mt-stack-gap px-element-padding py-element-padding-sm rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors",
|
|
613
|
+
children: k("calendar.backToCalendar", "Back to Calendar")
|
|
614
|
+
})]
|
|
615
|
+
})
|
|
616
|
+
})
|
|
617
|
+
}) : /* @__PURE__ */ S(d, {
|
|
618
|
+
title: k("calendar.accessDenied", "Access Denied"),
|
|
619
|
+
description: k("calendar.noPermissionViewEvent", "You don't have permission to view this event.")
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
//#endregion
|
|
623
|
+
export { T as EventDetailsPage };
|
|
624
|
+
|
|
625
|
+
//# sourceMappingURL=EventDetailsPage.js.map
|