@burdenoff/microfe-calendar 2026.610.1 → 2026.625.2
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/dist/components/AgendaView.js +47 -36
- package/dist/components/AgendaView.js.map +1 -1
- package/dist/pages/CalendarPage.js +199 -155
- package/dist/pages/CalendarPage.js.map +1 -1
- package/dist/pages/EventDetailsPage.js +495 -459
- package/dist/pages/EventDetailsPage.js.map +1 -1
- package/dist/pages/ResourcesPage.js +201 -187
- package/dist/pages/ResourcesPage.js.map +1 -1
- package/dist/pages/SettingsPage.js +413 -351
- package/dist/pages/SettingsPage.js.map +1 -1
- package/dist/pages/SubscriptionsPage.js +55 -52
- package/dist/pages/SubscriptionsPage.js.map +1 -1
- package/package.json +3 -2
|
@@ -2,21 +2,22 @@ import { useCalendar as e } from "../providers/CalendarProvider.js";
|
|
|
2
2
|
import { useDeleteEventMutation as t, useGetEventQuery as n } from "../generated/wspace-operations.js";
|
|
3
3
|
import { useSafePermissions as r } from "../hooks/useSafePermissions.js";
|
|
4
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
|
|
6
|
-
import { EventFormModal as
|
|
7
|
-
import { CALENDAR_PERMISSIONS as
|
|
8
|
-
import { useEventPermissions as
|
|
9
|
-
import { ConfirmDialog as
|
|
10
|
-
import { nativeConfirm as
|
|
11
|
-
import { useState as
|
|
12
|
-
import { AccessDenied as
|
|
13
|
-
import { useI18n as
|
|
14
|
-
import { ArrowLeft as
|
|
15
|
-
import { useNavigate as
|
|
16
|
-
import { jsx as
|
|
17
|
-
import {
|
|
5
|
+
import { ADD_ATTENDEE_MUTATION as ee, CREATE_REMINDER_MUTATION as te, DELETE_REMINDER_MUTATION as a, REMOVE_ATTENDEE_MUTATION as o, RESPOND_TO_EVENT_MUTATION as s } from "../graphql/calendarDocuments.js";
|
|
6
|
+
import { EventFormModal as c } from "../components/EventFormModal.js";
|
|
7
|
+
import { CALENDAR_PERMISSIONS as l } from "../constants/permissions.js";
|
|
8
|
+
import { useEventPermissions as ne } from "../hooks/useEventPermissions.js";
|
|
9
|
+
import { ConfirmDialog as re } from "../components/ConfirmDialog.js";
|
|
10
|
+
import { nativeConfirm as ie, nativeNotify as u } from "../utils/nativeBridge.js";
|
|
11
|
+
import { useState as d } from "react";
|
|
12
|
+
import { AccessDenied as ae } from "@burdenoff/fe-libs/shared/components";
|
|
13
|
+
import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
|
+
import { ArrowLeft as p, Bell as m, Clock as h, Edit as g, Link2 as oe, MapPin as _, Paperclip as se, Repeat as ce, Shield as v, Tag as y, Trash2 as le, Users as b, Video as ue } from "lucide-react";
|
|
15
|
+
import { useNavigate as de, useParams as fe } from "react-router-dom";
|
|
16
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
17
|
+
import { CTAOverflowMenu as pe, GlassCard as me, GradientText as he, NextSteps as ge, PagePurpose as _e } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
import { useMutation as C } from "@apollo/client/react";
|
|
18
19
|
//#region src/pages/EventDetailsPage.tsx
|
|
19
|
-
function
|
|
20
|
+
function w(e) {
|
|
20
21
|
return e ? {
|
|
21
22
|
id: e.id,
|
|
22
23
|
calendarId: e.calendarId,
|
|
@@ -82,7 +83,7 @@ function fe(e) {
|
|
|
82
83
|
} : null;
|
|
83
84
|
}
|
|
84
85
|
function T() {
|
|
85
|
-
let { eventId: T } =
|
|
86
|
+
let { eventId: T } = fe(), E = de(), { basePath: D } = e(), { t: O } = f(), k = (e, t) => {
|
|
86
87
|
let n = O(e);
|
|
87
88
|
return n === e ? t : n;
|
|
88
89
|
}, A = {
|
|
@@ -98,31 +99,53 @@ function T() {
|
|
|
98
99
|
EMAIL: k("calendar.reminderMethodEmail", "email"),
|
|
99
100
|
NOTIFICATION: k("calendar.reminderMethodNotification", "notification"),
|
|
100
101
|
SMS: k("calendar.reminderMethodSms", "sms")
|
|
101
|
-
}, [N, P] =
|
|
102
|
+
}, [N, P] = d(!1), [F, I] = d(!1), [L, R] = d(""), [z, B] = d(""), [V, ve] = d("15"), [H, U] = d("IN_APP"), { hasPermission: W, isLoading: G } = r(), ye = W(l.CALENDAR_EVENT_READ), { data: K, loading: be, error: q, refetch: J } = n({
|
|
102
103
|
variables: { id: T ?? "" },
|
|
103
|
-
skip: !T ||
|
|
104
|
+
skip: !T || G || !ye,
|
|
104
105
|
fetchPolicy: "cache-and-network"
|
|
105
|
-
}), [
|
|
106
|
-
|
|
106
|
+
}), [xe, { loading: Se }] = t(), [Ce, { loading: Y }] = C(ee), [we, { loading: Te }] = C(o), [Ee] = C(s), [De, { loading: X }] = C(te), [Oe, { loading: ke }] = C(a), Z = w(K?.event ?? null), Q = ne(Z), $ = W, Ae = async () => {
|
|
107
|
+
if (T && await ie({
|
|
108
|
+
title: k("calendar.deleteEvent", "Delete Event"),
|
|
109
|
+
message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{title}\"? This action cannot be undone.").replace("{title}", Z?.title ?? ""),
|
|
110
|
+
okButtonTitle: k("calendar.delete", "Delete")
|
|
111
|
+
}) !== !1) try {
|
|
112
|
+
await xe({ variables: { id: T } }), u("success"), I(!1), E(`${D}/view/week`);
|
|
113
|
+
} catch (e) {
|
|
114
|
+
throw u("error"), e;
|
|
115
|
+
}
|
|
116
|
+
}, je = async () => {
|
|
117
|
+
!T || !L.trim() || (await Ce({ variables: {
|
|
118
|
+
eventId: T,
|
|
119
|
+
email: L.trim(),
|
|
120
|
+
name: z.trim() || void 0
|
|
121
|
+
} }), R(""), B(""), await J());
|
|
122
|
+
}, Me = async () => {
|
|
123
|
+
T && (await De({ variables: { input: {
|
|
124
|
+
eventId: T,
|
|
125
|
+
minutesBefore: parseInt(V, 10),
|
|
126
|
+
channel: H
|
|
127
|
+
} } }), await J());
|
|
128
|
+
};
|
|
129
|
+
return G || be && !K ? /* @__PURE__ */ x("div", {
|
|
107
130
|
className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
|
|
108
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: /* @__PURE__ */ x("p", {
|
|
109
132
|
className: "font-text-md text-text-secondary",
|
|
110
133
|
children: k("calendar.loading", "Loading...")
|
|
111
134
|
})
|
|
112
|
-
}) : $(
|
|
135
|
+
}) : $(l.CALENDAR_EVENT_READ) ? q ? /* @__PURE__ */ x("div", {
|
|
113
136
|
className: "@container min-h-screen bg-bg-canvas p-page-padding",
|
|
114
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ x("div", {
|
|
115
138
|
className: "max-w-3xl mx-auto",
|
|
116
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ S("div", {
|
|
117
140
|
className: "text-center py-12",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ S("p", {
|
|
119
142
|
className: "font-text-md text-red-600 dark:text-red-400 mb-4",
|
|
120
143
|
children: [
|
|
121
144
|
k("calendar.failedToLoadEvent", "Failed to load event:"),
|
|
122
145
|
" ",
|
|
123
|
-
|
|
146
|
+
q.message
|
|
124
147
|
]
|
|
125
|
-
}), /* @__PURE__ */
|
|
148
|
+
}), /* @__PURE__ */ x("button", {
|
|
126
149
|
type: "button",
|
|
127
150
|
onClick: () => E(`${D}/view/week`),
|
|
128
151
|
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",
|
|
@@ -130,492 +153,505 @@ function T() {
|
|
|
130
153
|
})]
|
|
131
154
|
})
|
|
132
155
|
})
|
|
133
|
-
}) : Z ? /* @__PURE__ */
|
|
156
|
+
}) : Z ? /* @__PURE__ */ S("div", {
|
|
134
157
|
className: "@container min-h-screen bg-bg-canvas",
|
|
135
158
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
className: "border-b border-border-
|
|
138
|
-
children: /* @__PURE__ */
|
|
139
|
-
className: "max-w-4xl mx-auto flex items-center justify-between",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ x("header", {
|
|
160
|
+
className: "border-b border-border-seam bg-bg-surface px-page-padding py-element-padding",
|
|
161
|
+
children: /* @__PURE__ */ S("div", {
|
|
162
|
+
className: "max-w-4xl mx-auto flex items-center justify-between gap-inline-gap",
|
|
163
|
+
children: [/* @__PURE__ */ S("button", {
|
|
141
164
|
type: "button",
|
|
142
165
|
onClick: () => E(-1),
|
|
143
166
|
className: "inline-flex items-center gap-inline-gap-sm text-text-secondary hover:text-text-primary font-text-sm font-weight-medium transition-colors",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
145
|
-
}), /* @__PURE__ */
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
onClick: () => I(!0),
|
|
158
|
-
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",
|
|
159
|
-
children: [/* @__PURE__ */ S(ce, { className: "size-4" }), /* @__PURE__ */ S("span", {
|
|
160
|
-
className: "hidden @sm:inline",
|
|
161
|
-
children: k("calendar.delete", "Delete")
|
|
162
|
-
})]
|
|
163
|
-
})]
|
|
167
|
+
children: [/* @__PURE__ */ x(p, { className: "size-4" }), k("calendar.back", "Back")]
|
|
168
|
+
}), /* @__PURE__ */ x(pe, {
|
|
169
|
+
primary: $(l.CALENDAR_EVENT_UPDATE) && Q.canEdit ? {
|
|
170
|
+
label: k("calendar.edit", "Edit"),
|
|
171
|
+
icon: /* @__PURE__ */ x(g, { className: "size-4" }),
|
|
172
|
+
onSelect: () => P(!0)
|
|
173
|
+
} : void 0,
|
|
174
|
+
actions: $(l.CALENDAR_EVENT_DELETE) && Q.canDelete ? [{
|
|
175
|
+
label: k("calendar.delete", "Delete"),
|
|
176
|
+
icon: /* @__PURE__ */ x(le, { className: "size-4" }),
|
|
177
|
+
intent: "destructive",
|
|
178
|
+
onSelect: () => I(!0)
|
|
179
|
+
}] : []
|
|
164
180
|
})]
|
|
165
181
|
})
|
|
166
182
|
}),
|
|
167
183
|
/* @__PURE__ */ S("div", {
|
|
168
|
-
className: "max-w-4xl mx-auto p-page-padding",
|
|
169
|
-
children:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
184
|
+
className: "max-w-4xl mx-auto p-page-padding space-y-section-gap",
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ x(_e, {
|
|
187
|
+
className: "max-w-3xl",
|
|
188
|
+
children: k("calendar.eventDetailsPagePurpose", "Everything about this event in one place — time, location, attendees, reminders, resources, and attachments. Invite people, set when you want to be reminded, RSVP, or edit the details; changes sync to everyone on the invite.")
|
|
189
|
+
}),
|
|
190
|
+
/* @__PURE__ */ x(ge, {
|
|
191
|
+
storageKey: "calendar-event-details",
|
|
192
|
+
steps: [
|
|
193
|
+
...$(l.CALENDAR_EVENT_UPDATE) && Q.canEdit ? [{
|
|
194
|
+
id: "edit-event",
|
|
195
|
+
label: k("calendar.nextStepEditEvent", "Edit event details"),
|
|
196
|
+
description: k("calendar.nextStepEditEventDesc", "Update the title, time, location, or recurrence."),
|
|
197
|
+
icon: /* @__PURE__ */ x(g, { className: "size-4" }),
|
|
198
|
+
onClick: () => P(!0)
|
|
199
|
+
}] : [],
|
|
200
|
+
{
|
|
201
|
+
id: "manage-attendees",
|
|
202
|
+
label: k("calendar.nextStepAttendees", "Invite people and track RSVPs"),
|
|
203
|
+
description: k("calendar.nextStepAttendeesDesc", "Add attendees by email and see who has accepted."),
|
|
204
|
+
icon: /* @__PURE__ */ x(b, { className: "size-4" }),
|
|
205
|
+
href: "#event-attendees"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: "set-reminder",
|
|
209
|
+
label: k("calendar.nextStepReminder", "Set a reminder"),
|
|
210
|
+
description: k("calendar.nextStepReminderDesc", "Get notified by in-app, email, or SMS before the event starts."),
|
|
211
|
+
icon: /* @__PURE__ */ x(m, { className: "size-4" }),
|
|
212
|
+
href: "#event-reminders"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: "back-to-calendar",
|
|
216
|
+
label: k("calendar.nextStepBackToCalendar", "Back to your calendar"),
|
|
217
|
+
description: k("calendar.nextStepBackToCalendarDesc", "Return to the calendar grid to review the rest of your schedule."),
|
|
218
|
+
icon: /* @__PURE__ */ x(p, { className: "size-4" }),
|
|
219
|
+
onClick: () => E(`${D}/view/week`)
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ S(me, {
|
|
224
|
+
treatment: "glass",
|
|
225
|
+
className: "p-card-padding",
|
|
226
|
+
children: [/* @__PURE__ */ S("div", {
|
|
227
|
+
className: "mb-section-gap",
|
|
228
|
+
children: [/* @__PURE__ */ x("h1", {
|
|
229
|
+
className: "font-heading-lg text-text-primary mb-stack-gap",
|
|
230
|
+
children: /* @__PURE__ */ x(he, { children: Z.title })
|
|
231
|
+
}), /* @__PURE__ */ S("div", {
|
|
232
|
+
className: "flex items-center gap-inline-gap text-text-secondary font-text-md",
|
|
233
|
+
children: [/* @__PURE__ */ x(h, { className: "size-4" }), /* @__PURE__ */ x("span", { children: Z.isAllDay ? `${i(Z.startTime).split(",")[0]} (${k("calendar.allDay", "All day")})` : `${i(Z.startTime)} - ${i(Z.endTime)}` })]
|
|
234
|
+
})]
|
|
235
|
+
}), /* @__PURE__ */ S("div", {
|
|
236
|
+
className: "space-y-stack-gap",
|
|
237
|
+
children: [
|
|
238
|
+
Z.location && /* @__PURE__ */ S("div", {
|
|
239
|
+
className: "flex gap-inline-gap",
|
|
240
|
+
children: [/* @__PURE__ */ x(_, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
241
|
+
className: "min-w-0 flex-1",
|
|
242
|
+
children: [/* @__PURE__ */ x("p", {
|
|
202
243
|
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
203
|
-
children: k("calendar.
|
|
204
|
-
}),
|
|
205
|
-
Z.locationType && /* @__PURE__ */ S("p", {
|
|
244
|
+
children: k("calendar.location", "Location")
|
|
245
|
+
}), /* @__PURE__ */ x("p", {
|
|
206
246
|
className: "font-text-sm text-text-secondary",
|
|
207
|
-
children: Z.
|
|
208
|
-
})
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
247
|
+
children: Z.location
|
|
248
|
+
})]
|
|
249
|
+
})]
|
|
250
|
+
}),
|
|
251
|
+
(Z.locationAddress || Z.locationUrl || Z.locationType) && /* @__PURE__ */ S("div", {
|
|
252
|
+
className: "flex gap-inline-gap",
|
|
253
|
+
children: [/* @__PURE__ */ x(_, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
254
|
+
className: "min-w-0 flex-1 space-y-1",
|
|
255
|
+
children: [
|
|
256
|
+
/* @__PURE__ */ x("p", {
|
|
257
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
258
|
+
children: k("calendar.locationDetails", "Location details")
|
|
259
|
+
}),
|
|
260
|
+
Z.locationType && /* @__PURE__ */ x("p", {
|
|
261
|
+
className: "font-text-sm text-text-secondary",
|
|
262
|
+
children: Z.locationType
|
|
263
|
+
}),
|
|
264
|
+
Z.locationAddress && /* @__PURE__ */ x("p", {
|
|
265
|
+
className: "font-text-sm text-text-secondary",
|
|
266
|
+
children: Z.locationAddress
|
|
267
|
+
}),
|
|
268
|
+
Z.locationUrl && /* @__PURE__ */ x("a", {
|
|
269
|
+
href: Z.locationUrl,
|
|
270
|
+
target: "_blank",
|
|
271
|
+
rel: "noopener noreferrer",
|
|
272
|
+
className: "font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all",
|
|
273
|
+
children: Z.locationUrl
|
|
274
|
+
})
|
|
275
|
+
]
|
|
276
|
+
})]
|
|
277
|
+
}),
|
|
278
|
+
Z.videoCallLink && /* @__PURE__ */ S("div", {
|
|
279
|
+
className: "flex gap-inline-gap",
|
|
280
|
+
children: [/* @__PURE__ */ x(ue, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
281
|
+
className: "min-w-0 flex-1",
|
|
282
|
+
children: [/* @__PURE__ */ x("p", {
|
|
283
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
284
|
+
children: k("calendar.videoCall", "Video Call")
|
|
285
|
+
}), /* @__PURE__ */ x("a", {
|
|
286
|
+
href: Z.videoCallLink,
|
|
215
287
|
target: "_blank",
|
|
216
288
|
rel: "noopener noreferrer",
|
|
217
289
|
className: "font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all",
|
|
218
|
-
children: Z.
|
|
219
|
-
})
|
|
220
|
-
]
|
|
221
|
-
})]
|
|
222
|
-
}),
|
|
223
|
-
Z.videoCallLink && /* @__PURE__ */ C("div", {
|
|
224
|
-
className: "flex gap-inline-gap",
|
|
225
|
-
children: [/* @__PURE__ */ S(le, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
226
|
-
className: "min-w-0 flex-1",
|
|
227
|
-
children: [/* @__PURE__ */ S("p", {
|
|
228
|
-
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
229
|
-
children: k("calendar.videoCall", "Video Call")
|
|
230
|
-
}), /* @__PURE__ */ S("a", {
|
|
231
|
-
href: Z.videoCallLink,
|
|
232
|
-
target: "_blank",
|
|
233
|
-
rel: "noopener noreferrer",
|
|
234
|
-
className: "font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all",
|
|
235
|
-
children: Z.videoCallLink
|
|
290
|
+
children: Z.videoCallLink
|
|
291
|
+
})]
|
|
236
292
|
})]
|
|
237
|
-
})
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
className: "font-text-sm text-text-secondary",
|
|
250
|
-
children: [
|
|
251
|
-
k("calendar.visibility", "Visibility"),
|
|
252
|
-
": ",
|
|
253
|
-
Z.privacy
|
|
254
|
-
]
|
|
255
|
-
}),
|
|
256
|
-
Z.maxAttendees ? /* @__PURE__ */ S("p", {
|
|
257
|
-
className: "font-text-sm text-text-secondary",
|
|
258
|
-
children: k("calendar.attendeeCapacity", "{current} / {max} attendees").replace("{current}", String(Z.currentAttendeeCount ?? 0)).replace("{max}", String(Z.maxAttendees))
|
|
259
|
-
}) : null,
|
|
260
|
-
Z.checkInEnabled ? /* @__PURE__ */ S("p", {
|
|
261
|
-
className: "font-text-sm text-text-secondary",
|
|
262
|
-
children: k("calendar.checkInEnabled", "Attendee check-in enabled")
|
|
263
|
-
}) : null
|
|
264
|
-
]
|
|
265
|
-
})]
|
|
266
|
-
}),
|
|
267
|
-
/* @__PURE__ */ C("div", {
|
|
268
|
-
className: "flex gap-inline-gap",
|
|
269
|
-
children: [/* @__PURE__ */ S(x, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
270
|
-
className: "min-w-0 flex-1",
|
|
271
|
-
children: [
|
|
272
|
-
/* @__PURE__ */ C("p", {
|
|
273
|
-
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
274
|
-
children: [
|
|
275
|
-
k("calendar.attendees", "Attendees"),
|
|
276
|
-
" (",
|
|
277
|
-
Z.attendees?.length ?? 0,
|
|
278
|
-
")"
|
|
279
|
-
]
|
|
280
|
-
}),
|
|
281
|
-
Z.attendees && Z.attendees.length > 0 ? /* @__PURE__ */ S("div", {
|
|
282
|
-
className: "space-y-1",
|
|
283
|
-
children: Z.attendees.map((e) => /* @__PURE__ */ C("div", {
|
|
284
|
-
className: "flex items-center justify-between",
|
|
293
|
+
}),
|
|
294
|
+
/* @__PURE__ */ S("div", {
|
|
295
|
+
className: "flex gap-inline-gap",
|
|
296
|
+
children: [/* @__PURE__ */ x(v, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
297
|
+
className: "min-w-0 flex-1 space-y-1",
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ x("p", {
|
|
300
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
301
|
+
children: k("calendar.eventRules", "Event rules")
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ S("p", {
|
|
304
|
+
className: "font-text-sm text-text-secondary",
|
|
285
305
|
children: [
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
306
|
+
k("calendar.visibility", "Visibility"),
|
|
307
|
+
": ",
|
|
308
|
+
Z.privacy
|
|
309
|
+
]
|
|
310
|
+
}),
|
|
311
|
+
Z.maxAttendees ? /* @__PURE__ */ x("p", {
|
|
312
|
+
className: "font-text-sm text-text-secondary",
|
|
313
|
+
children: k("calendar.attendeeCapacity", "{current} / {max} attendees").replace("{current}", String(Z.currentAttendeeCount ?? 0)).replace("{max}", String(Z.maxAttendees))
|
|
314
|
+
}) : null,
|
|
315
|
+
Z.checkInEnabled ? /* @__PURE__ */ x("p", {
|
|
316
|
+
className: "font-text-sm text-text-secondary",
|
|
317
|
+
children: k("calendar.checkInEnabled", "Attendee check-in enabled")
|
|
318
|
+
}) : null
|
|
319
|
+
]
|
|
320
|
+
})]
|
|
321
|
+
}),
|
|
322
|
+
/* @__PURE__ */ S("div", {
|
|
323
|
+
id: "event-attendees",
|
|
324
|
+
className: "flex gap-inline-gap scroll-mt-24",
|
|
325
|
+
children: [/* @__PURE__ */ x(b, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
326
|
+
className: "min-w-0 flex-1",
|
|
327
|
+
children: [
|
|
328
|
+
/* @__PURE__ */ S("p", {
|
|
329
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
330
|
+
children: [
|
|
331
|
+
k("calendar.attendees", "Attendees"),
|
|
332
|
+
" (",
|
|
333
|
+
Z.attendees?.length ?? 0,
|
|
334
|
+
")"
|
|
335
|
+
]
|
|
336
|
+
}),
|
|
337
|
+
Z.attendees && Z.attendees.length > 0 ? /* @__PURE__ */ x("div", {
|
|
338
|
+
className: "space-y-1",
|
|
339
|
+
children: Z.attendees.map((e) => /* @__PURE__ */ S("div", {
|
|
340
|
+
className: "flex items-center justify-between",
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ x("span", {
|
|
343
|
+
className: "font-text-sm text-text-secondary",
|
|
344
|
+
children: e.name || e.email || e.userId
|
|
345
|
+
}),
|
|
346
|
+
/* @__PURE__ */ x("span", {
|
|
347
|
+
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"}`,
|
|
348
|
+
children: A[e.status] ?? e.status
|
|
349
|
+
}),
|
|
350
|
+
$(l.CALENDAR_ATTENDEE_DELETE) ? /* @__PURE__ */ x("button", {
|
|
351
|
+
type: "button",
|
|
352
|
+
onClick: async () => {
|
|
353
|
+
let t = K?.event?.attendees?.find((t) => (t.email ?? t.userId) === (e.email || e.userId))?.id;
|
|
354
|
+
t && (await we({ variables: { attendeeId: t } }), await J());
|
|
355
|
+
},
|
|
356
|
+
disabled: Te,
|
|
357
|
+
className: "ml-2 font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
|
|
358
|
+
children: k("calendar.remove", "Remove")
|
|
359
|
+
}) : null
|
|
360
|
+
]
|
|
361
|
+
}, e.userId || e.email))
|
|
362
|
+
}) : /* @__PURE__ */ x("p", {
|
|
363
|
+
className: "font-text-sm text-text-secondary",
|
|
364
|
+
children: k("calendar.noAttendeesYet", "No attendees added yet.")
|
|
365
|
+
}),
|
|
366
|
+
/* @__PURE__ */ S("div", {
|
|
367
|
+
className: "mt-3 grid grid-cols-1 gap-2 @md:grid-cols-[1fr,1fr,auto]",
|
|
368
|
+
children: [
|
|
369
|
+
/* @__PURE__ */ x("input", {
|
|
370
|
+
value: L,
|
|
371
|
+
onChange: (e) => R(e.target.value),
|
|
372
|
+
placeholder: k("calendar.attendeeEmail", "Attendee email"),
|
|
373
|
+
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",
|
|
374
|
+
"aria-label": k("calendar.attendeeEmail", "Attendee email")
|
|
289
375
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
|
|
292
|
-
|
|
376
|
+
/* @__PURE__ */ x("input", {
|
|
377
|
+
value: z,
|
|
378
|
+
onChange: (e) => B(e.target.value),
|
|
379
|
+
placeholder: k("calendar.attendeeName", "Attendee name"),
|
|
380
|
+
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",
|
|
381
|
+
"aria-label": k("calendar.attendeeName", "Attendee name")
|
|
293
382
|
}),
|
|
294
|
-
|
|
383
|
+
/* @__PURE__ */ x("button", {
|
|
295
384
|
type: "button",
|
|
296
|
-
onClick:
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
className: "ml-2 font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
|
|
302
|
-
children: k("calendar.remove", "Remove")
|
|
303
|
-
}) : null
|
|
385
|
+
onClick: je,
|
|
386
|
+
disabled: !L.trim() || Y,
|
|
387
|
+
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",
|
|
388
|
+
children: Y ? k("calendar.adding", "Adding...") : k("calendar.addAttendee", "Add attendee")
|
|
389
|
+
})
|
|
304
390
|
]
|
|
305
|
-
},
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
/* @__PURE__ */ S("input", {
|
|
314
|
-
value: L,
|
|
315
|
-
onChange: (e) => R(e.target.value),
|
|
316
|
-
placeholder: k("calendar.attendeeEmail", "Attendee email"),
|
|
317
|
-
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",
|
|
318
|
-
"aria-label": k("calendar.attendeeEmail", "Attendee email")
|
|
319
|
-
}),
|
|
320
|
-
/* @__PURE__ */ S("input", {
|
|
321
|
-
value: z,
|
|
322
|
-
onChange: (e) => B(e.target.value),
|
|
323
|
-
placeholder: k("calendar.attendeeName", "Attendee name"),
|
|
324
|
-
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",
|
|
325
|
-
"aria-label": k("calendar.attendeeName", "Attendee name")
|
|
326
|
-
}),
|
|
327
|
-
/* @__PURE__ */ S("button", {
|
|
391
|
+
}),
|
|
392
|
+
/* @__PURE__ */ x("div", {
|
|
393
|
+
className: "mt-2 flex flex-wrap gap-2",
|
|
394
|
+
children: [
|
|
395
|
+
"ACCEPTED",
|
|
396
|
+
"TENTATIVE",
|
|
397
|
+
"DECLINED"
|
|
398
|
+
].map((e) => /* @__PURE__ */ x("button", {
|
|
328
399
|
type: "button",
|
|
329
400
|
onClick: async () => {
|
|
330
|
-
|
|
401
|
+
T && (await Ee({ variables: {
|
|
331
402
|
eventId: T,
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
} }), R(""), B(""), await q());
|
|
403
|
+
status: e
|
|
404
|
+
} }), await J());
|
|
335
405
|
},
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
]
|
|
341
|
-
}),
|
|
342
|
-
/* @__PURE__ */ S("div", {
|
|
343
|
-
className: "mt-2 flex flex-wrap gap-2",
|
|
344
|
-
children: [
|
|
345
|
-
"ACCEPTED",
|
|
346
|
-
"TENTATIVE",
|
|
347
|
-
"DECLINED"
|
|
348
|
-
].map((e) => /* @__PURE__ */ S("button", {
|
|
349
|
-
type: "button",
|
|
350
|
-
onClick: async () => {
|
|
351
|
-
T && (await Se({ variables: {
|
|
352
|
-
eventId: T,
|
|
353
|
-
status: e
|
|
354
|
-
} }), await q());
|
|
355
|
-
},
|
|
356
|
-
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",
|
|
357
|
-
children: A[e] ?? e
|
|
358
|
-
}, e))
|
|
359
|
-
})
|
|
360
|
-
]
|
|
361
|
-
})]
|
|
362
|
-
}),
|
|
363
|
-
Z.tags && Z.tags.length > 0 && /* @__PURE__ */ C("div", {
|
|
364
|
-
className: "flex gap-inline-gap",
|
|
365
|
-
children: [/* @__PURE__ */ S(b, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
366
|
-
className: "min-w-0 flex-1",
|
|
367
|
-
children: [/* @__PURE__ */ S("p", {
|
|
368
|
-
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
369
|
-
children: k("calendar.tags", "Tags")
|
|
370
|
-
}), /* @__PURE__ */ S("div", {
|
|
371
|
-
className: "flex flex-wrap gap-2",
|
|
372
|
-
children: Z.tags.map((e) => /* @__PURE__ */ S("span", {
|
|
373
|
-
className: "px-2 py-0.5 rounded-radius-sm bg-bg-neutral text-text-secondary font-text-xs",
|
|
374
|
-
children: e
|
|
375
|
-
}, e))
|
|
376
|
-
})]
|
|
377
|
-
})]
|
|
378
|
-
}),
|
|
379
|
-
(Z.recurrence || Z.rrule) && /* @__PURE__ */ C("div", {
|
|
380
|
-
className: "flex gap-inline-gap",
|
|
381
|
-
children: [/* @__PURE__ */ S(v, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
382
|
-
className: "min-w-0 flex-1",
|
|
383
|
-
children: [/* @__PURE__ */ S("p", {
|
|
384
|
-
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
385
|
-
children: k("calendar.recurrence", "Recurrence")
|
|
386
|
-
}), Z.recurrence ? /* @__PURE__ */ C("p", {
|
|
387
|
-
className: "font-text-sm text-text-secondary",
|
|
388
|
-
children: [
|
|
389
|
-
Z.recurrence.pattern,
|
|
390
|
-
" (",
|
|
391
|
-
k("calendar.recurrenceEveryInterval", "every {interval}").replace("{interval}", String(Z.recurrence.interval)),
|
|
392
|
-
")"
|
|
406
|
+
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",
|
|
407
|
+
children: A[e] ?? e
|
|
408
|
+
}, e))
|
|
409
|
+
})
|
|
393
410
|
]
|
|
394
|
-
}) : /* @__PURE__ */ S("p", {
|
|
395
|
-
className: "font-text-sm text-text-secondary font-mono break-all",
|
|
396
|
-
children: Z.rrule
|
|
397
411
|
})]
|
|
398
|
-
})
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
412
|
+
}),
|
|
413
|
+
Z.tags && Z.tags.length > 0 && /* @__PURE__ */ S("div", {
|
|
414
|
+
className: "flex gap-inline-gap",
|
|
415
|
+
children: [/* @__PURE__ */ x(y, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
416
|
+
className: "min-w-0 flex-1",
|
|
417
|
+
children: [/* @__PURE__ */ x("p", {
|
|
418
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
419
|
+
children: k("calendar.tags", "Tags")
|
|
420
|
+
}), /* @__PURE__ */ x("div", {
|
|
421
|
+
className: "flex flex-wrap gap-2",
|
|
422
|
+
children: Z.tags.map((e) => /* @__PURE__ */ x("span", {
|
|
423
|
+
className: "px-2 py-0.5 rounded-radius-sm bg-bg-neutral text-text-secondary font-text-xs",
|
|
424
|
+
children: e
|
|
425
|
+
}, e))
|
|
426
|
+
})]
|
|
427
|
+
})]
|
|
428
|
+
}),
|
|
429
|
+
(Z.recurrence || Z.rrule) && /* @__PURE__ */ S("div", {
|
|
430
|
+
className: "flex gap-inline-gap",
|
|
431
|
+
children: [/* @__PURE__ */ x(ce, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
432
|
+
className: "min-w-0 flex-1",
|
|
433
|
+
children: [/* @__PURE__ */ x("p", {
|
|
406
434
|
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
407
|
-
children: k("calendar.
|
|
408
|
-
}),
|
|
409
|
-
Z.reminders && Z.reminders.length > 0 ? /* @__PURE__ */ S("div", {
|
|
410
|
-
className: "space-y-1",
|
|
411
|
-
children: Z.reminders.map((e) => /* @__PURE__ */ C("div", {
|
|
412
|
-
className: "flex items-center justify-between gap-3",
|
|
413
|
-
children: [/* @__PURE__ */ S("p", {
|
|
414
|
-
className: "font-text-sm text-text-secondary",
|
|
415
|
-
children: k("calendar.reminderSummary", "{minutes} minutes before ({method})").replace("{minutes}", String(e.minutesBefore)).replace("{method}", M[e.method] ?? e.method.toLowerCase())
|
|
416
|
-
}), /* @__PURE__ */ S("button", {
|
|
417
|
-
type: "button",
|
|
418
|
-
onClick: async () => {
|
|
419
|
-
e.id && (await we({ variables: { id: e.id } }), await q());
|
|
420
|
-
},
|
|
421
|
-
disabled: X,
|
|
422
|
-
className: "font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
|
|
423
|
-
children: k("calendar.delete", "Delete")
|
|
424
|
-
})]
|
|
425
|
-
}, e.id))
|
|
426
|
-
}) : /* @__PURE__ */ S("p", {
|
|
435
|
+
children: k("calendar.recurrence", "Recurrence")
|
|
436
|
+
}), Z.recurrence ? /* @__PURE__ */ S("p", {
|
|
427
437
|
className: "font-text-sm text-text-secondary",
|
|
428
|
-
children: k("calendar.noRemindersConfigured", "No reminders configured yet.")
|
|
429
|
-
}),
|
|
430
|
-
/* @__PURE__ */ C("div", {
|
|
431
|
-
className: "mt-3 grid grid-cols-1 gap-2 @md:grid-cols-[1fr,1fr,auto]",
|
|
432
|
-
children: [
|
|
433
|
-
/* @__PURE__ */ S("input", {
|
|
434
|
-
type: "number",
|
|
435
|
-
min: "1",
|
|
436
|
-
value: V,
|
|
437
|
-
onChange: (e) => pe(e.target.value),
|
|
438
|
-
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",
|
|
439
|
-
"aria-label": k("calendar.reminderMinutesBefore", "Minutes before event")
|
|
440
|
-
}),
|
|
441
|
-
/* @__PURE__ */ C("select", {
|
|
442
|
-
value: H,
|
|
443
|
-
onChange: (e) => me(e.target.value),
|
|
444
|
-
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",
|
|
445
|
-
"aria-label": k("calendar.reminderChannel", "Reminder channel"),
|
|
446
|
-
children: [
|
|
447
|
-
/* @__PURE__ */ S("option", {
|
|
448
|
-
value: "IN_APP",
|
|
449
|
-
children: k("calendar.inApp", "In app")
|
|
450
|
-
}),
|
|
451
|
-
/* @__PURE__ */ S("option", {
|
|
452
|
-
value: "EMAIL",
|
|
453
|
-
children: k("calendar.email", "Email")
|
|
454
|
-
}),
|
|
455
|
-
/* @__PURE__ */ S("option", {
|
|
456
|
-
value: "SMS",
|
|
457
|
-
children: "SMS"
|
|
458
|
-
})
|
|
459
|
-
]
|
|
460
|
-
}),
|
|
461
|
-
/* @__PURE__ */ S("button", {
|
|
462
|
-
type: "button",
|
|
463
|
-
onClick: async () => {
|
|
464
|
-
T && (await Ce({ variables: { input: {
|
|
465
|
-
eventId: T,
|
|
466
|
-
minutesBefore: parseInt(V, 10),
|
|
467
|
-
channel: H
|
|
468
|
-
} } }), await q());
|
|
469
|
-
},
|
|
470
|
-
disabled: Y,
|
|
471
|
-
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",
|
|
472
|
-
children: Y ? k("calendar.adding", "Adding...") : k("calendar.addReminder", "Add reminder")
|
|
473
|
-
})
|
|
474
|
-
]
|
|
475
|
-
})
|
|
476
|
-
]
|
|
477
|
-
})]
|
|
478
|
-
}),
|
|
479
|
-
Z.resourceBookings && Z.resourceBookings.length > 0 && /* @__PURE__ */ C("div", {
|
|
480
|
-
className: "flex gap-inline-gap",
|
|
481
|
-
children: [/* @__PURE__ */ S(x, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ C("div", {
|
|
482
|
-
className: "min-w-0 flex-1",
|
|
483
|
-
children: [/* @__PURE__ */ S("p", {
|
|
484
|
-
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
485
|
-
children: k("calendar.resourceBookings", "Resource bookings")
|
|
486
|
-
}), /* @__PURE__ */ S("div", {
|
|
487
|
-
className: "space-y-2",
|
|
488
|
-
children: Z.resourceBookings.map((e) => /* @__PURE__ */ C("div", {
|
|
489
|
-
className: "rounded-radius-md border border-border-subtle p-3",
|
|
490
438
|
children: [
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
/* @__PURE__ */ S("p", {
|
|
496
|
-
className: "font-text-xs text-text-tertiary",
|
|
497
|
-
children: [e.resourceType, e.resourceLocation].filter(Boolean).join(" • ")
|
|
498
|
-
}),
|
|
499
|
-
e.notes ? /* @__PURE__ */ S("p", {
|
|
500
|
-
className: "mt-1 font-text-sm text-text-secondary",
|
|
501
|
-
children: e.notes
|
|
502
|
-
}) : null
|
|
439
|
+
Z.recurrence.pattern,
|
|
440
|
+
" (",
|
|
441
|
+
k("calendar.recurrenceEveryInterval", "every {interval}").replace("{interval}", String(Z.recurrence.interval)),
|
|
442
|
+
")"
|
|
503
443
|
]
|
|
504
|
-
},
|
|
444
|
+
}) : /* @__PURE__ */ x("p", {
|
|
445
|
+
className: "font-text-sm text-text-secondary font-mono break-all",
|
|
446
|
+
children: Z.rrule
|
|
447
|
+
})]
|
|
505
448
|
})]
|
|
506
|
-
})
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
449
|
+
}),
|
|
450
|
+
/* @__PURE__ */ S("div", {
|
|
451
|
+
id: "event-reminders",
|
|
452
|
+
className: "flex gap-inline-gap scroll-mt-24",
|
|
453
|
+
children: [/* @__PURE__ */ x(m, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
454
|
+
className: "min-w-0 flex-1",
|
|
455
|
+
children: [
|
|
456
|
+
/* @__PURE__ */ x("p", {
|
|
457
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
458
|
+
children: k("calendar.reminders", "Reminders")
|
|
459
|
+
}),
|
|
460
|
+
Z.reminders && Z.reminders.length > 0 ? /* @__PURE__ */ x("div", {
|
|
461
|
+
className: "space-y-1",
|
|
462
|
+
children: Z.reminders.map((e) => /* @__PURE__ */ S("div", {
|
|
463
|
+
className: "flex items-center justify-between gap-3",
|
|
464
|
+
children: [/* @__PURE__ */ x("p", {
|
|
465
|
+
className: "font-text-sm text-text-secondary",
|
|
466
|
+
children: k("calendar.reminderSummary", "{minutes} minutes before ({method})").replace("{minutes}", String(e.minutesBefore)).replace("{method}", M[e.method] ?? e.method.toLowerCase())
|
|
467
|
+
}), /* @__PURE__ */ x("button", {
|
|
468
|
+
type: "button",
|
|
469
|
+
onClick: async () => {
|
|
470
|
+
e.id && (await Oe({ variables: { id: e.id } }), await J());
|
|
471
|
+
},
|
|
472
|
+
disabled: ke,
|
|
473
|
+
className: "font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
|
|
474
|
+
children: k("calendar.delete", "Delete")
|
|
475
|
+
})]
|
|
476
|
+
}, e.id))
|
|
477
|
+
}) : /* @__PURE__ */ x("p", {
|
|
478
|
+
className: "font-text-sm text-text-secondary",
|
|
479
|
+
children: k("calendar.noRemindersConfigured", "No reminders configured yet.")
|
|
480
|
+
}),
|
|
481
|
+
/* @__PURE__ */ S("div", {
|
|
482
|
+
className: "mt-3 grid grid-cols-1 gap-2 @md:grid-cols-[1fr,1fr,auto]",
|
|
527
483
|
children: [
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
484
|
+
/* @__PURE__ */ x("input", {
|
|
485
|
+
type: "number",
|
|
486
|
+
min: "1",
|
|
487
|
+
value: V,
|
|
488
|
+
onChange: (e) => ve(e.target.value),
|
|
489
|
+
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",
|
|
490
|
+
"aria-label": k("calendar.reminderMinutesBefore", "Minutes before event")
|
|
491
|
+
}),
|
|
492
|
+
/* @__PURE__ */ S("select", {
|
|
493
|
+
value: H,
|
|
494
|
+
onChange: (e) => U(e.target.value),
|
|
495
|
+
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",
|
|
496
|
+
"aria-label": k("calendar.reminderChannel", "Reminder channel"),
|
|
497
|
+
children: [
|
|
498
|
+
/* @__PURE__ */ x("option", {
|
|
499
|
+
value: "IN_APP",
|
|
500
|
+
children: k("calendar.inApp", "In app")
|
|
501
|
+
}),
|
|
502
|
+
/* @__PURE__ */ x("option", {
|
|
503
|
+
value: "EMAIL",
|
|
504
|
+
children: k("calendar.email", "Email")
|
|
505
|
+
}),
|
|
506
|
+
/* @__PURE__ */ x("option", {
|
|
507
|
+
value: "SMS",
|
|
508
|
+
children: "SMS"
|
|
509
|
+
})
|
|
510
|
+
]
|
|
511
|
+
}),
|
|
512
|
+
/* @__PURE__ */ x("button", {
|
|
513
|
+
type: "button",
|
|
514
|
+
onClick: Me,
|
|
515
|
+
disabled: X,
|
|
516
|
+
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",
|
|
517
|
+
children: X ? k("calendar.adding", "Adding...") : k("calendar.addReminder", "Add reminder")
|
|
518
|
+
})
|
|
531
519
|
]
|
|
532
|
-
})
|
|
533
|
-
|
|
520
|
+
})
|
|
521
|
+
]
|
|
534
522
|
})]
|
|
535
|
-
})
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
523
|
+
}),
|
|
524
|
+
Z.resourceBookings && Z.resourceBookings.length > 0 && /* @__PURE__ */ S("div", {
|
|
525
|
+
className: "flex gap-inline-gap",
|
|
526
|
+
children: [/* @__PURE__ */ x(b, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
527
|
+
className: "min-w-0 flex-1",
|
|
528
|
+
children: [/* @__PURE__ */ x("p", {
|
|
529
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
530
|
+
children: k("calendar.resourceBookings", "Resource bookings")
|
|
531
|
+
}), /* @__PURE__ */ x("div", {
|
|
532
|
+
className: "space-y-2",
|
|
533
|
+
children: Z.resourceBookings.map((e) => /* @__PURE__ */ S("div", {
|
|
534
|
+
className: "rounded-radius-md border border-border-subtle p-3",
|
|
535
|
+
children: [
|
|
536
|
+
/* @__PURE__ */ x("p", {
|
|
537
|
+
className: "font-text-sm font-weight-medium text-text-primary",
|
|
538
|
+
children: e.resourceName
|
|
539
|
+
}),
|
|
540
|
+
/* @__PURE__ */ x("p", {
|
|
541
|
+
className: "font-text-xs text-text-tertiary",
|
|
542
|
+
children: [e.resourceType, e.resourceLocation].filter(Boolean).join(" • ")
|
|
543
|
+
}),
|
|
544
|
+
e.notes ? /* @__PURE__ */ x("p", {
|
|
545
|
+
className: "mt-1 font-text-sm text-text-secondary",
|
|
546
|
+
children: e.notes
|
|
547
|
+
}) : null
|
|
548
|
+
]
|
|
549
|
+
}, e.id))
|
|
550
|
+
})]
|
|
547
551
|
})]
|
|
548
|
-
})
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
552
|
+
}),
|
|
553
|
+
Z.attachments && Z.attachments.length > 0 && /* @__PURE__ */ S("div", {
|
|
554
|
+
className: "flex gap-inline-gap",
|
|
555
|
+
children: [/* @__PURE__ */ x(se, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
556
|
+
className: "min-w-0 flex-1",
|
|
557
|
+
children: [/* @__PURE__ */ x("p", {
|
|
558
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
559
|
+
children: k("calendar.attachments", "Attachments")
|
|
560
|
+
}), /* @__PURE__ */ x("div", {
|
|
561
|
+
className: "space-y-2",
|
|
562
|
+
children: Z.attachments.map((e) => /* @__PURE__ */ S("div", {
|
|
563
|
+
className: "flex items-center gap-2 font-text-sm",
|
|
564
|
+
children: [/* @__PURE__ */ x("a", {
|
|
565
|
+
href: e.url || "#",
|
|
566
|
+
target: "_blank",
|
|
567
|
+
rel: "noopener noreferrer",
|
|
568
|
+
className: "text-blue-600 dark:text-blue-400 hover:underline break-all",
|
|
569
|
+
children: e.name
|
|
570
|
+
}), e.fileId ? /* @__PURE__ */ S("span", {
|
|
571
|
+
className: "text-text-tertiary",
|
|
572
|
+
children: [
|
|
573
|
+
"(",
|
|
574
|
+
e.fileId,
|
|
575
|
+
")"
|
|
576
|
+
]
|
|
577
|
+
}) : null]
|
|
578
|
+
}, e.id))
|
|
579
|
+
})]
|
|
567
580
|
})]
|
|
568
|
-
}),
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
581
|
+
}),
|
|
582
|
+
/* @__PURE__ */ S("div", {
|
|
583
|
+
className: "flex gap-inline-gap",
|
|
584
|
+
children: [/* @__PURE__ */ x(y, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
585
|
+
className: "min-w-0 flex-1",
|
|
586
|
+
children: [/* @__PURE__ */ x("p", {
|
|
587
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
588
|
+
children: k("calendar.status", "Status")
|
|
589
|
+
}), /* @__PURE__ */ x("span", {
|
|
590
|
+
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"}`,
|
|
591
|
+
children: j[Z.status] ?? Z.status
|
|
592
|
+
})]
|
|
593
|
+
})]
|
|
594
|
+
}),
|
|
595
|
+
Z.description && /* @__PURE__ */ S("div", {
|
|
596
|
+
className: "pt-stack-gap border-t border-border-default",
|
|
597
|
+
children: [/* @__PURE__ */ x("p", {
|
|
598
|
+
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
599
|
+
children: k("calendar.notes", "Notes")
|
|
600
|
+
}), /* @__PURE__ */ x("p", {
|
|
601
|
+
className: "font-text-sm text-text-secondary whitespace-pre-wrap",
|
|
602
|
+
children: Z.description
|
|
603
|
+
})]
|
|
604
|
+
}),
|
|
605
|
+
Array.isArray(Z.metadata?.links) && Z.metadata?.links.length > 0 && /* @__PURE__ */ S("div", {
|
|
606
|
+
className: "pt-stack-gap border-t border-border-default",
|
|
607
|
+
children: [/* @__PURE__ */ S("div", {
|
|
608
|
+
className: "flex items-center gap-inline-gap-sm mb-2",
|
|
609
|
+
children: [/* @__PURE__ */ x(oe, { className: "size-4 text-text-secondary" }), /* @__PURE__ */ x("p", {
|
|
610
|
+
className: "font-text-sm font-weight-semibold text-text-primary",
|
|
611
|
+
children: k("calendar.links", "Links")
|
|
612
|
+
})]
|
|
613
|
+
}), /* @__PURE__ */ x("div", {
|
|
614
|
+
className: "space-y-2",
|
|
615
|
+
children: Z.metadata.links.map((e) => /* @__PURE__ */ x("a", {
|
|
616
|
+
href: e,
|
|
617
|
+
target: "_blank",
|
|
618
|
+
rel: "noopener noreferrer",
|
|
619
|
+
className: "block font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all",
|
|
620
|
+
children: e
|
|
621
|
+
}, e))
|
|
622
|
+
})]
|
|
623
|
+
})
|
|
624
|
+
]
|
|
625
|
+
})]
|
|
626
|
+
})
|
|
627
|
+
]
|
|
582
628
|
}),
|
|
583
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ x(c, {
|
|
584
630
|
open: N,
|
|
585
631
|
event: Z,
|
|
586
632
|
onClose: () => P(!1)
|
|
587
633
|
}),
|
|
588
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ x(re, {
|
|
589
635
|
open: F,
|
|
590
636
|
title: k("calendar.deleteEvent", "Delete Event"),
|
|
591
637
|
message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{title}\"? This action cannot be undone.").replace("{title}", Z.title),
|
|
592
638
|
confirmLabel: k("calendar.delete", "Delete"),
|
|
593
639
|
variant: "danger",
|
|
594
|
-
loading:
|
|
595
|
-
onConfirm:
|
|
596
|
-
if (T && await ae({
|
|
597
|
-
title: k("calendar.deleteEvent", "Delete Event"),
|
|
598
|
-
message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{title}\"? This action cannot be undone.").replace("{title}", Z?.title ?? ""),
|
|
599
|
-
okButtonTitle: k("calendar.delete", "Delete")
|
|
600
|
-
}) !== !1) try {
|
|
601
|
-
await _e({ variables: { id: T } }), l("success"), I(!1), E(`${D}/view/week`);
|
|
602
|
-
} catch (e) {
|
|
603
|
-
throw l("error"), e;
|
|
604
|
-
}
|
|
605
|
-
},
|
|
640
|
+
loading: Se,
|
|
641
|
+
onConfirm: Ae,
|
|
606
642
|
onCancel: () => I(!1)
|
|
607
643
|
})
|
|
608
644
|
]
|
|
609
|
-
}) : /* @__PURE__ */
|
|
645
|
+
}) : /* @__PURE__ */ x("div", {
|
|
610
646
|
className: "@container min-h-screen bg-bg-canvas p-page-padding",
|
|
611
|
-
children: /* @__PURE__ */
|
|
647
|
+
children: /* @__PURE__ */ x("div", {
|
|
612
648
|
className: "max-w-3xl mx-auto",
|
|
613
|
-
children: /* @__PURE__ */
|
|
649
|
+
children: /* @__PURE__ */ S("div", {
|
|
614
650
|
className: "text-center py-12",
|
|
615
|
-
children: [/* @__PURE__ */
|
|
651
|
+
children: [/* @__PURE__ */ x("p", {
|
|
616
652
|
className: "font-text-md text-text-secondary",
|
|
617
653
|
children: k("calendar.eventNotFound", "Event not found")
|
|
618
|
-
}), /* @__PURE__ */
|
|
654
|
+
}), /* @__PURE__ */ x("button", {
|
|
619
655
|
type: "button",
|
|
620
656
|
onClick: () => E(`${D}/view/week`),
|
|
621
657
|
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",
|
|
@@ -623,7 +659,7 @@ function T() {
|
|
|
623
659
|
})]
|
|
624
660
|
})
|
|
625
661
|
})
|
|
626
|
-
}) : /* @__PURE__ */
|
|
662
|
+
}) : /* @__PURE__ */ x(ae, {
|
|
627
663
|
title: k("calendar.accessDenied", "Access Denied"),
|
|
628
664
|
description: k("calendar.noPermissionViewEvent", "You don't have permission to view this event.")
|
|
629
665
|
});
|