@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 @@
|
|
|
1
|
+
{"version":3,"file":"EventDetailsPage.js","names":[],"sources":["../../src/pages/EventDetailsPage.tsx"],"sourcesContent":["import { useParams, useNavigate } from 'react-router-dom';\nimport { useState } from 'react';\nimport { useMutation } from '@apollo/client/react';\nimport {\n ArrowLeft,\n Edit,\n Trash2,\n Users,\n MapPin,\n Clock,\n Repeat,\n Bell,\n Video,\n Tag,\n Link2,\n Paperclip,\n Shield,\n} from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { AccessDenied } from '@burdenoff/fe-libs/shared/components';\nimport { useCalendar } from '../providers/CalendarProvider';\nimport { formatDateTime } from '../utils/dateHelpers';\nimport { useEventPermissions } from '../hooks/useEventPermissions';\nimport { useGetEventQuery, useDeleteEventMutation } from '../generated/wspace-operations';\nimport { CALENDAR_PERMISSIONS } from '../constants/permissions';\nimport { EventFormModal } from '../components/EventFormModal';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport type { CalendarEvent } from '../types';\nimport { useSafePermissions } from '../hooks/useSafePermissions';\nimport { nativeConfirm, nativeNotify } from '../utils/nativeBridge';\nimport {\n ADD_ATTENDEE_MUTATION,\n CREATE_REMINDER_MUTATION,\n DELETE_REMINDER_MUTATION,\n REMOVE_ATTENDEE_MUTATION,\n RESPOND_TO_EVENT_MUTATION,\n} from '../graphql/calendarDocuments';\n\n/**\n * Parse a raw GraphQL event into the frontend CalendarEvent shape\n */\nfunction parseRawEvent(\n raw: NonNullable<ReturnType<typeof useGetEventQuery>['data']>['event']\n): CalendarEvent | null {\n if (!raw) return null;\n return {\n id: raw.id,\n calendarId: raw.calendarId,\n calendarName: raw.calendar?.name ?? undefined,\n calendarColor: raw.calendar?.color ?? undefined,\n title: raw.title,\n description: raw.description ?? undefined,\n location: raw.location ?? undefined,\n locationAddress: raw.locationAddress ?? undefined,\n locationType: (raw.locationType as CalendarEvent['locationType']) ?? undefined,\n locationUrl: raw.locationUrl ?? undefined,\n startTime: new Date(raw.startTime),\n endTime: new Date(raw.endTime),\n isAllDay: raw.allDay,\n privacy: (raw.visibility as CalendarEvent['privacy']) ?? 'PUBLIC',\n status: (raw.status as CalendarEvent['status']) || 'CONFIRMED',\n eventType: (raw.eventType as CalendarEvent['eventType']) ?? 'MEETING',\n isRecurring: raw.isRecurring ?? false,\n rrule: raw.rrule ?? undefined,\n organizerId: raw.createdBy,\n attendees: raw.attendees?.map(\n (a: {\n userId?: string | null;\n email?: string | null;\n name?: string | null;\n rsvpStatus: string;\n isOptional: boolean;\n }) => ({\n userId: a.userId ?? '',\n email: a.email ?? '',\n name: a.name ?? '',\n status: (a.rsvpStatus as 'ACCEPTED' | 'DECLINED' | 'TENTATIVE' | 'PENDING') || 'PENDING',\n isRequired: !a.isOptional,\n })\n ),\n reminders: raw.reminders?.map((r: { id: string; minutesBefore: number; channel: string }) => ({\n id: r.id,\n minutesBefore: r.minutesBefore,\n method: (r.channel as 'EMAIL' | 'NOTIFICATION' | 'SMS') || 'NOTIFICATION',\n })),\n resourceBookings:\n raw.resourceBookings?.map(\n (booking: {\n id: string;\n resourceId: string;\n startTime: string;\n endTime: string;\n status: string;\n notes?: string | null;\n resource?: {\n id: string;\n name: string;\n resourceType?: string | null;\n location?: string | null;\n } | null;\n }) => ({\n id: booking.id,\n resourceId: booking.resourceId,\n resourceName: booking.resource?.name ?? 'Resource',\n resourceType: booking.resource?.resourceType ?? undefined,\n resourceLocation: booking.resource?.location ?? undefined,\n notes: booking.notes ?? undefined,\n eventId: raw.id,\n startTime: new Date(booking.startTime),\n endTime: new Date(booking.endTime),\n status: (booking.status as 'PENDING' | 'APPROVED' | 'REJECTED') ?? 'PENDING',\n createdAt: new Date(raw.createdAt),\n })\n ) ?? [],\n attachments:\n raw.attachments?.map(\n (\n attachment: {\n id?: string | null;\n fileId?: string | null;\n name?: string | null;\n fileName?: string | null;\n url?: string | null;\n fileUrl?: string | null;\n size?: number | null;\n mimeType?: string | null;\n },\n index: number\n ) => ({\n id: attachment.id ?? attachment.fileId ?? `attachment-${index}`,\n fileId: attachment.fileId ?? undefined,\n name: attachment.name ?? attachment.fileName ?? `Attachment ${index + 1}`,\n url: attachment.url ?? attachment.fileUrl ?? '',\n size: attachment.size ?? 0,\n mimeType: attachment.mimeType ?? 'application/octet-stream',\n })\n ) ?? [],\n videoCallLink: raw.onlineMeetingUrl ?? undefined,\n onlineMeetingProvider: raw.onlineMeetingProvider ?? undefined,\n maxAttendees: raw.maxAttendees ?? undefined,\n currentAttendeeCount: raw.currentAttendeeCount ?? undefined,\n checkInEnabled: raw.checkInEnabled ?? false,\n tags: raw.tags ?? [],\n metadata: (raw.metadata as Record<string, unknown> | null) ?? undefined,\n createdAt: new Date(raw.createdAt),\n updatedAt: new Date(raw.updatedAt),\n };\n}\n\n/**\n * Event details page\n * Shows comprehensive information about a calendar event\n */\nexport function EventDetailsPage() {\n const { eventId } = useParams<{ eventId: string }>();\n const navigate = useNavigate();\n const { basePath } = useCalendar();\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const value = t(key);\n return value === key ? fallback : value;\n };\n const attendeeStatusLabels: Record<string, string> = {\n ACCEPTED: tr('calendar.attendeeStatusAccepted', 'Accepted'),\n DECLINED: tr('calendar.attendeeStatusDeclined', 'Declined'),\n TENTATIVE: tr('calendar.attendeeStatusTentative', 'Tentative'),\n PENDING: tr('calendar.attendeeStatusPending', 'Pending'),\n };\n const eventStatusLabels: Record<string, string> = {\n CONFIRMED: tr('calendar.eventStatusConfirmed', 'Confirmed'),\n CANCELLED: tr('calendar.eventStatusCancelled', 'Cancelled'),\n TENTATIVE: tr('calendar.eventStatusTentative', 'Tentative'),\n };\n const reminderMethodLabels: Record<string, string> = {\n EMAIL: tr('calendar.reminderMethodEmail', 'email'),\n NOTIFICATION: tr('calendar.reminderMethodNotification', 'notification'),\n SMS: tr('calendar.reminderMethodSms', 'sms'),\n };\n\n const [showEditModal, setShowEditModal] = useState(false);\n const [showDeleteDialog, setShowDeleteDialog] = useState(false);\n const [attendeeEmail, setAttendeeEmail] = useState('');\n const [attendeeName, setAttendeeName] = useState('');\n const [reminderMinutes, setReminderMinutes] = useState('15');\n const [reminderChannel, setReminderChannel] = useState<'EMAIL' | 'IN_APP' | 'SMS'>('IN_APP');\n\n const { hasPermission: checkPermission, isLoading: permissionsLoading } = useSafePermissions();\n const canRead = checkPermission(CALENDAR_PERMISSIONS.CALENDAR_EVENT_READ);\n\n // Fetch the event\n const { data, loading, error, refetch } = useGetEventQuery({\n variables: { id: eventId ?? '' },\n skip: !eventId || permissionsLoading || !canRead,\n fetchPolicy: 'cache-and-network',\n });\n\n const [deleteEvent, { loading: deleting }] = useDeleteEventMutation();\n const [addAttendee, { loading: addingAttendee }] = useMutation(ADD_ATTENDEE_MUTATION);\n const [removeAttendee, { loading: removingAttendee }] = useMutation(REMOVE_ATTENDEE_MUTATION);\n const [respondToEvent] = useMutation(RESPOND_TO_EVENT_MUTATION);\n const [createReminder, { loading: creatingReminder }] = useMutation(CREATE_REMINDER_MUTATION);\n const [deleteReminder, { loading: deletingReminder }] = useMutation(DELETE_REMINDER_MUTATION);\n\n const event = parseRawEvent(data?.event ?? null);\n const permissions = useEventPermissions(event);\n const hasPermission = checkPermission;\n\n const handleDelete = async () => {\n if (!eventId) return;\n const confirmed = await nativeConfirm({\n title: tr('calendar.deleteEvent', 'Delete Event'),\n message: tr(\n 'calendar.deleteEventConfirmation',\n 'Are you sure you want to delete \"{title}\"? This action cannot be undone.'\n ).replace('{title}', event?.title ?? ''),\n okButtonTitle: tr('calendar.delete', 'Delete'),\n });\n if (confirmed === false) return;\n try {\n await deleteEvent({ variables: { id: eventId } });\n void nativeNotify('success');\n setShowDeleteDialog(false);\n navigate(`${basePath}/view/week`);\n } catch (err) {\n void nativeNotify('error');\n throw err;\n }\n };\n\n const handleAddAttendee = async () => {\n if (!eventId || !attendeeEmail.trim()) return;\n await addAttendee({\n variables: {\n eventId,\n email: attendeeEmail.trim(),\n name: attendeeName.trim() || undefined,\n },\n });\n setAttendeeEmail('');\n setAttendeeName('');\n await refetch();\n };\n\n const handleCreateReminder = async () => {\n if (!eventId) return;\n await createReminder({\n variables: {\n input: {\n eventId,\n minutesBefore: parseInt(reminderMinutes, 10),\n channel: reminderChannel,\n },\n },\n });\n await refetch();\n };\n\n if (permissionsLoading || (loading && !data)) {\n return (\n <div className=\"@container min-h-screen bg-bg-canvas flex items-center justify-center\">\n <p className=\"font-text-md text-text-secondary\">{tr('calendar.loading', 'Loading...')}</p>\n </div>\n );\n }\n\n if (!hasPermission(CALENDAR_PERMISSIONS.CALENDAR_EVENT_READ)) {\n return (\n <AccessDenied\n title={tr('calendar.accessDenied', 'Access Denied')}\n description={tr(\n 'calendar.noPermissionViewEvent',\n \"You don't have permission to view this event.\"\n )}\n />\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"@container min-h-screen bg-bg-canvas p-page-padding\">\n <div className=\"max-w-3xl mx-auto\">\n <div className=\"text-center py-12\">\n <p className=\"font-text-md text-red-600 dark:text-red-400 mb-4\">\n {tr('calendar.failedToLoadEvent', 'Failed to load event:')} {error.message}\n </p>\n <button\n onClick={() => navigate(`${basePath}/view/week`)}\n 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\"\n >\n {tr('calendar.backToCalendar', 'Back to Calendar')}\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n // Not found state\n if (!event) {\n return (\n <div className=\"@container min-h-screen bg-bg-canvas p-page-padding\">\n <div className=\"max-w-3xl mx-auto\">\n <div className=\"text-center py-12\">\n <p className=\"font-text-md text-text-secondary\">\n {tr('calendar.eventNotFound', 'Event not found')}\n </p>\n <button\n onClick={() => navigate(`${basePath}/view/week`)}\n 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\"\n >\n {tr('calendar.backToCalendar', 'Back to Calendar')}\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"@container min-h-screen bg-bg-canvas\">\n {/* Header */}\n <header className=\"border-b border-border-default bg-bg-surface px-page-padding py-element-padding\">\n <div className=\"max-w-4xl mx-auto flex items-center justify-between\">\n <button\n onClick={() => navigate(-1)}\n className=\"inline-flex items-center gap-inline-gap-sm text-text-secondary hover:text-text-primary font-text-sm font-weight-medium transition-colors\"\n >\n <ArrowLeft className=\"size-4\" />\n {tr('calendar.back', 'Back')}\n </button>\n\n <div className=\"flex items-center gap-inline-gap\">\n {hasPermission(CALENDAR_PERMISSIONS.CALENDAR_EVENT_UPDATE) && permissions.canEdit && (\n <button\n onClick={() => setShowEditModal(true)}\n 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\"\n >\n <Edit className=\"size-4\" />\n <span className=\"hidden @sm:inline\">{tr('calendar.edit', 'Edit')}</span>\n </button>\n )}\n\n {hasPermission(CALENDAR_PERMISSIONS.CALENDAR_EVENT_DELETE) && permissions.canDelete && (\n <button\n onClick={() => setShowDeleteDialog(true)}\n 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\"\n >\n <Trash2 className=\"size-4\" />\n <span className=\"hidden @sm:inline\">{tr('calendar.delete', 'Delete')}</span>\n </button>\n )}\n </div>\n </div>\n </header>\n\n {/* Content — host shell already renders <main>, use a plain div */}\n <div className=\"max-w-4xl mx-auto p-page-padding\">\n <div className=\"bg-bg-surface border border-border-default rounded-radius-lg p-card-padding\">\n {/* Event title and time */}\n <div className=\"mb-section-gap\">\n <h1 className=\"font-heading-lg text-text-primary mb-stack-gap\">{event.title}</h1>\n\n <div className=\"flex items-center gap-inline-gap text-text-secondary font-text-md\">\n <Clock className=\"size-4\" />\n <span>\n {event.isAllDay\n ? `${formatDateTime(event.startTime).split(',')[0]} (${tr('calendar.allDay', 'All day')})`\n : `${formatDateTime(event.startTime)} - ${formatDateTime(event.endTime)}`}\n </span>\n </div>\n </div>\n\n {/* Event details grid */}\n <div className=\"space-y-stack-gap\">\n {/* Location */}\n {event.location && (\n <div className=\"flex gap-inline-gap\">\n <MapPin className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.location', 'Location')}\n </p>\n <p className=\"font-text-sm text-text-secondary\">{event.location}</p>\n </div>\n </div>\n )}\n\n {(event.locationAddress || event.locationUrl || event.locationType) && (\n <div className=\"flex gap-inline-gap\">\n <MapPin className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1 space-y-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.locationDetails', 'Location details')}\n </p>\n {event.locationType && (\n <p className=\"font-text-sm text-text-secondary\">{event.locationType}</p>\n )}\n {event.locationAddress && (\n <p className=\"font-text-sm text-text-secondary\">{event.locationAddress}</p>\n )}\n {event.locationUrl && (\n <a\n href={event.locationUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all\"\n >\n {event.locationUrl}\n </a>\n )}\n </div>\n </div>\n )}\n\n {/* Video call */}\n {event.videoCallLink && (\n <div className=\"flex gap-inline-gap\">\n <Video className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.videoCall', 'Video Call')}\n </p>\n <a\n href={event.videoCallLink}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all\"\n >\n {event.videoCallLink}\n </a>\n </div>\n </div>\n )}\n\n {/* Visibility and capacity */}\n <div className=\"flex gap-inline-gap\">\n <Shield className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1 space-y-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.eventRules', 'Event rules')}\n </p>\n <p className=\"font-text-sm text-text-secondary\">\n {tr('calendar.visibility', 'Visibility')}: {event.privacy}\n </p>\n {event.maxAttendees ? (\n <p className=\"font-text-sm text-text-secondary\">\n {tr('calendar.attendeeCapacity', '{current} / {max} attendees')\n .replace('{current}', String(event.currentAttendeeCount ?? 0))\n .replace('{max}', String(event.maxAttendees))}\n </p>\n ) : null}\n {event.checkInEnabled ? (\n <p className=\"font-text-sm text-text-secondary\">\n {tr('calendar.checkInEnabled', 'Attendee check-in enabled')}\n </p>\n ) : null}\n </div>\n </div>\n\n {/* Attendees */}\n <div className=\"flex gap-inline-gap\">\n <Users className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.attendees', 'Attendees')} ({event.attendees?.length ?? 0})\n </p>\n {event.attendees && event.attendees.length > 0 ? (\n <div className=\"space-y-1\">\n {event.attendees.map((attendee) => (\n <div\n key={attendee.userId || attendee.email}\n className=\"flex items-center justify-between\"\n >\n <span className=\"font-text-sm text-text-secondary\">\n {attendee.name || attendee.email || attendee.userId}\n </span>\n <span\n className={`font-text-xs px-2 py-0.5 rounded-radius-sm ${\n attendee.status === 'ACCEPTED'\n ? 'bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300'\n : attendee.status === 'DECLINED'\n ? 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300'\n : 'bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400'\n }`}\n >\n {attendeeStatusLabels[attendee.status] ?? attendee.status}\n </span>\n {hasPermission(CALENDAR_PERMISSIONS.CALENDAR_ATTENDEE_DELETE) ? (\n <button\n type=\"button\"\n onClick={async () => {\n const attendeeId = data?.event?.attendees?.find(\n (currentAttendee: {\n email?: string | null;\n userId?: string | null;\n id: string;\n }) =>\n (currentAttendee.email ?? currentAttendee.userId) ===\n (attendee.email || attendee.userId)\n )?.id;\n\n if (!attendeeId) return;\n await removeAttendee({ variables: { attendeeId } });\n await refetch();\n }}\n disabled={removingAttendee}\n className=\"ml-2 font-text-xs text-action-primary-bg hover:underline disabled:opacity-50\"\n >\n {tr('calendar.remove', 'Remove')}\n </button>\n ) : null}\n </div>\n ))}\n </div>\n ) : (\n <p className=\"font-text-sm text-text-secondary\">\n {tr('calendar.noAttendeesYet', 'No attendees added yet.')}\n </p>\n )}\n <div className=\"mt-3 grid grid-cols-1 gap-2 @md:grid-cols-[1fr,1fr,auto]\">\n <input\n value={attendeeEmail}\n onChange={(currentEvent) => setAttendeeEmail(currentEvent.target.value)}\n placeholder={tr('calendar.attendeeEmail', 'Attendee email')}\n 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\"\n />\n <input\n value={attendeeName}\n onChange={(currentEvent) => setAttendeeName(currentEvent.target.value)}\n placeholder={tr('calendar.attendeeName', 'Attendee name')}\n 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\"\n />\n <button\n type=\"button\"\n onClick={handleAddAttendee}\n disabled={!attendeeEmail.trim() || addingAttendee}\n 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\"\n >\n {addingAttendee\n ? tr('calendar.adding', 'Adding...')\n : tr('calendar.addAttendee', 'Add attendee')}\n </button>\n </div>\n <div className=\"mt-2 flex flex-wrap gap-2\">\n {(['ACCEPTED', 'TENTATIVE', 'DECLINED'] as const).map((statusValue) => (\n <button\n key={statusValue}\n type=\"button\"\n onClick={async () => {\n if (!eventId) return;\n await respondToEvent({ variables: { eventId, status: statusValue } });\n await refetch();\n }}\n 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\"\n >\n {attendeeStatusLabels[statusValue] ?? statusValue}\n </button>\n ))}\n </div>\n </div>\n </div>\n\n {/* Tags */}\n {event.tags && event.tags.length > 0 && (\n <div className=\"flex gap-inline-gap\">\n <Tag className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-2\">\n {tr('calendar.tags', 'Tags')}\n </p>\n <div className=\"flex flex-wrap gap-2\">\n {event.tags.map((tagValue) => (\n <span\n key={tagValue}\n className=\"px-2 py-0.5 rounded-radius-sm bg-bg-neutral text-text-secondary font-text-xs\"\n >\n {tagValue}\n </span>\n ))}\n </div>\n </div>\n </div>\n )}\n\n {/* Recurrence */}\n {(event.recurrence || event.rrule) && (\n <div className=\"flex gap-inline-gap\">\n <Repeat className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.recurrence', 'Recurrence')}\n </p>\n {event.recurrence ? (\n <p className=\"font-text-sm text-text-secondary\">\n {event.recurrence.pattern} (\n {tr('calendar.recurrenceEveryInterval', 'every {interval}').replace(\n '{interval}',\n String(event.recurrence.interval)\n )}\n )\n </p>\n ) : (\n <p className=\"font-text-sm text-text-secondary font-mono break-all\">\n {event.rrule}\n </p>\n )}\n </div>\n </div>\n )}\n\n {/* Reminders */}\n <div className=\"flex gap-inline-gap\">\n <Bell className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.reminders', 'Reminders')}\n </p>\n {event.reminders && event.reminders.length > 0 ? (\n <div className=\"space-y-1\">\n {event.reminders.map((reminder) => (\n <div key={reminder.id} className=\"flex items-center justify-between gap-3\">\n <p className=\"font-text-sm text-text-secondary\">\n {tr('calendar.reminderSummary', '{minutes} minutes before ({method})')\n .replace('{minutes}', String(reminder.minutesBefore))\n .replace(\n '{method}',\n reminderMethodLabels[reminder.method] ?? reminder.method.toLowerCase()\n )}\n </p>\n <button\n type=\"button\"\n onClick={async () => {\n if (!reminder.id) return;\n await deleteReminder({ variables: { id: reminder.id } });\n await refetch();\n }}\n disabled={deletingReminder}\n className=\"font-text-xs text-action-primary-bg hover:underline disabled:opacity-50\"\n >\n {tr('calendar.delete', 'Delete')}\n </button>\n </div>\n ))}\n </div>\n ) : (\n <p className=\"font-text-sm text-text-secondary\">\n {tr('calendar.noRemindersConfigured', 'No reminders configured yet.')}\n </p>\n )}\n <div className=\"mt-3 grid grid-cols-1 gap-2 @md:grid-cols-[1fr,1fr,auto]\">\n <input\n type=\"number\"\n min=\"1\"\n value={reminderMinutes}\n onChange={(currentEvent) => setReminderMinutes(currentEvent.target.value)}\n 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\"\n />\n <select\n value={reminderChannel}\n onChange={(currentEvent) =>\n setReminderChannel(currentEvent.target.value as 'EMAIL' | 'IN_APP' | 'SMS')\n }\n 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\"\n >\n <option value=\"IN_APP\">{tr('calendar.inApp', 'In app')}</option>\n <option value=\"EMAIL\">{tr('calendar.email', 'Email')}</option>\n <option value=\"SMS\">SMS</option>\n </select>\n <button\n type=\"button\"\n onClick={handleCreateReminder}\n disabled={creatingReminder}\n 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\"\n >\n {creatingReminder\n ? tr('calendar.adding', 'Adding...')\n : tr('calendar.addReminder', 'Add reminder')}\n </button>\n </div>\n </div>\n </div>\n\n {/* Resource bookings */}\n {event.resourceBookings && event.resourceBookings.length > 0 && (\n <div className=\"flex gap-inline-gap\">\n <Users className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-2\">\n {tr('calendar.resourceBookings', 'Resource bookings')}\n </p>\n <div className=\"space-y-2\">\n {event.resourceBookings.map((booking) => (\n <div\n key={booking.id}\n className=\"rounded-radius-md border border-border-subtle p-3\"\n >\n <p className=\"font-text-sm font-weight-medium text-text-primary\">\n {booking.resourceName}\n </p>\n <p className=\"font-text-xs text-text-tertiary\">\n {[booking.resourceType, booking.resourceLocation]\n .filter(Boolean)\n .join(' • ')}\n </p>\n {booking.notes ? (\n <p className=\"mt-1 font-text-sm text-text-secondary\">{booking.notes}</p>\n ) : null}\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n\n {/* Attachments */}\n {event.attachments && event.attachments.length > 0 && (\n <div className=\"flex gap-inline-gap\">\n <Paperclip className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-2\">\n {tr('calendar.attachments', 'Attachments')}\n </p>\n <div className=\"space-y-2\">\n {event.attachments.map((attachment) => (\n <div key={attachment.id} className=\"flex items-center gap-2 font-text-sm\">\n <a\n href={attachment.url || '#'}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-blue-600 dark:text-blue-400 hover:underline break-all\"\n >\n {attachment.name}\n </a>\n {attachment.fileId ? (\n <span className=\"text-text-tertiary\">({attachment.fileId})</span>\n ) : null}\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n\n {/* Status badge */}\n <div className=\"flex gap-inline-gap\">\n <Tag className=\"size-5 text-text-secondary shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.status', 'Status')}\n </p>\n <span\n className={`font-text-xs px-2 py-0.5 rounded-radius-sm ${\n event.status === 'CONFIRMED'\n ? 'bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300'\n : event.status === 'CANCELLED'\n ? 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300'\n : 'bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300'\n }`}\n >\n {eventStatusLabels[event.status] ?? event.status}\n </span>\n </div>\n </div>\n\n {/* Description */}\n {event.description && (\n <div className=\"pt-stack-gap border-t border-border-default\">\n <p className=\"font-text-sm font-weight-semibold text-text-primary mb-2\">\n {tr('calendar.notes', 'Notes')}\n </p>\n <p className=\"font-text-sm text-text-secondary whitespace-pre-wrap\">\n {event.description}\n </p>\n </div>\n )}\n\n {Array.isArray(event.metadata?.links) && event.metadata?.links.length > 0 && (\n <div className=\"pt-stack-gap border-t border-border-default\">\n <div className=\"flex items-center gap-inline-gap-sm mb-2\">\n <Link2 className=\"size-4 text-text-secondary\" />\n <p className=\"font-text-sm font-weight-semibold text-text-primary\">\n {tr('calendar.links', 'Links')}\n </p>\n </div>\n <div className=\"space-y-2\">\n {(event.metadata.links as string[]).map((link) => (\n <a\n key={link}\n href={link}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block font-text-sm text-blue-600 dark:text-blue-400 hover:underline break-all\"\n >\n {link}\n </a>\n ))}\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n\n {/* Edit Modal */}\n <EventFormModal open={showEditModal} event={event} onClose={() => setShowEditModal(false)} />\n\n {/* Delete Confirmation */}\n <ConfirmDialog\n open={showDeleteDialog}\n title={tr('calendar.deleteEvent', 'Delete Event')}\n message={tr(\n 'calendar.deleteEventConfirmation',\n 'Are you sure you want to delete \"{title}\"? This action cannot be undone.'\n ).replace('{title}', event.title)}\n confirmLabel={tr('calendar.delete', 'Delete')}\n variant=\"danger\"\n loading={deleting}\n onConfirm={handleDelete}\n onCancel={() => setShowDeleteDialog(false)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyCA,SAAS,GACP,GACsB;AAEtB,QADK,IACE;EACL,IAAI,EAAI;EACR,YAAY,EAAI;EAChB,cAAc,EAAI,UAAU,QAAQ,KAAA;EACpC,eAAe,EAAI,UAAU,SAAS,KAAA;EACtC,OAAO,EAAI;EACX,aAAa,EAAI,eAAe,KAAA;EAChC,UAAU,EAAI,YAAY,KAAA;EAC1B,iBAAiB,EAAI,mBAAmB,KAAA;EACxC,cAAe,EAAI,gBAAkD,KAAA;EACrE,aAAa,EAAI,eAAe,KAAA;EAChC,WAAW,IAAI,KAAK,EAAI,UAAU;EAClC,SAAS,IAAI,KAAK,EAAI,QAAQ;EAC9B,UAAU,EAAI;EACd,SAAU,EAAI,cAA2C;EACzD,QAAS,EAAI,UAAsC;EACnD,WAAY,EAAI,aAA4C;EAC5D,aAAa,EAAI,eAAe;EACh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ACE,eAAe,EAAS,GAAG,EAAS,YAAY;KAChD,WAAU;eAET,EAAG,2BAA2B,mBAAmB;KAC3C,CAAA,CACL;;GACF,CAAA;EACF,CAAA,GAhDN,kBAAC,GAAD;EACE,OAAO,EAAG,yBAAyB,gBAAgB;EACnD,aAAa,EACX,kCACA,gDACD;EACD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourcesPage.d.ts","sourceRoot":"","sources":["../../src/pages/ResourcesPage.tsx"],"names":[],"mappings":"AA8CA;;;GAGG;AACH,wBAAgB,aAAa,4CAke5B"}
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { useCreateCalendarResourceMutation as e, useDeleteCalendarResourceMutation as t, useGetCalendarResourcesQuery as n } from "../generated/wspace-operations.js";
|
|
2
|
+
import { useSafePermissions as r } from "../hooks/useSafePermissions.js";
|
|
3
|
+
import { CALENDAR_PERMISSIONS as i } from "../constants/permissions.js";
|
|
4
|
+
import { ConfirmDialog as a } from "../components/ConfirmDialog.js";
|
|
5
|
+
import { nativeConfirm as o, nativeNotify as s } from "../utils/nativeBridge.js";
|
|
6
|
+
import { useMemo as c, useState as l } from "react";
|
|
7
|
+
import { AccessDenied as u } from "@burdenoff/fe-libs/shared/components";
|
|
8
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
+
import { Car as f, DoorOpen as p, MapPin as m, Monitor as h, Package as g, Plus as _, Users as v, X as y } from "lucide-react";
|
|
10
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
11
|
+
//#region src/pages/ResourcesPage.tsx
|
|
12
|
+
var S = {
|
|
13
|
+
ROOM: p,
|
|
14
|
+
EQUIPMENT: h,
|
|
15
|
+
VEHICLE: f,
|
|
16
|
+
DESK: g,
|
|
17
|
+
PARKING_SPOT: f,
|
|
18
|
+
OTHER: g
|
|
19
|
+
};
|
|
20
|
+
function C() {
|
|
21
|
+
let { hasPermission: f, isLoading: p } = r(), { t: h } = d(), C = (e, t) => {
|
|
22
|
+
let n = h(e);
|
|
23
|
+
return n === e ? t : n;
|
|
24
|
+
}, [w, T] = l(!1), [E, D] = l(null), O = f(i.CALENDAR_RESOURCE_READ), { data: k, loading: A, error: j, refetch: M } = n({
|
|
25
|
+
fetchPolicy: "cache-and-network",
|
|
26
|
+
skip: p || !O
|
|
27
|
+
}), N = k?.getCalendarResources ?? [], [P, { loading: F, error: I }] = e(), [L, { loading: R }] = t(), [z, B] = l({
|
|
28
|
+
name: "",
|
|
29
|
+
description: "",
|
|
30
|
+
resourceType: "ROOM",
|
|
31
|
+
capacity: "",
|
|
32
|
+
location: "",
|
|
33
|
+
building: "",
|
|
34
|
+
floor: "",
|
|
35
|
+
room: "",
|
|
36
|
+
requireApproval: !1
|
|
37
|
+
}), V = c(() => ({
|
|
38
|
+
ROOM: C("calendar.room", "Room"),
|
|
39
|
+
EQUIPMENT: C("calendar.equipment", "Equipment"),
|
|
40
|
+
VEHICLE: C("calendar.vehicle", "Vehicle"),
|
|
41
|
+
DESK: C("calendar.desk", "Desk"),
|
|
42
|
+
PARKING_SPOT: C("calendar.parkingSpot", "Parking Spot"),
|
|
43
|
+
OTHER: C("calendar.other", "Other")
|
|
44
|
+
}), [h]), H = (e, t) => {
|
|
45
|
+
B((n) => ({
|
|
46
|
+
...n,
|
|
47
|
+
[e]: t
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
return p || A && !k ? /* @__PURE__ */ b("div", {
|
|
51
|
+
className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
|
|
52
|
+
children: /* @__PURE__ */ b("p", {
|
|
53
|
+
className: "font-text-md text-text-secondary",
|
|
54
|
+
children: C("calendar.loading", "Loading...")
|
|
55
|
+
})
|
|
56
|
+
}) : O ? /* @__PURE__ */ x("div", {
|
|
57
|
+
className: "@container min-h-screen bg-bg-canvas",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ b("header", {
|
|
60
|
+
className: "border-b border-border-default bg-bg-surface px-page-padding py-element-padding",
|
|
61
|
+
children: /* @__PURE__ */ x("div", {
|
|
62
|
+
className: "flex flex-col @lg:flex-row @lg:items-center @lg:justify-between gap-stack-gap",
|
|
63
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h1", {
|
|
64
|
+
className: "font-heading-lg text-text-primary mb-stack-gap-sm",
|
|
65
|
+
children: C("calendar.resources", "Resources")
|
|
66
|
+
}), /* @__PURE__ */ b("p", {
|
|
67
|
+
className: "font-text-md text-text-secondary",
|
|
68
|
+
children: C("calendar.bookConferenceRooms", "Book conference rooms, equipment, and other workspace resources")
|
|
69
|
+
})] }), f(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ x("button", {
|
|
70
|
+
onClick: () => T(!0),
|
|
71
|
+
className: "inline-flex items-center gap-inline-gap-sm 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",
|
|
72
|
+
children: [/* @__PURE__ */ b(_, { className: "size-4" }), C("calendar.addResource", "Add Resource")]
|
|
73
|
+
}) : null]
|
|
74
|
+
})
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ x("div", {
|
|
77
|
+
className: "p-page-padding",
|
|
78
|
+
children: [
|
|
79
|
+
A && N.length === 0 && /* @__PURE__ */ b("div", {
|
|
80
|
+
className: "text-center py-12",
|
|
81
|
+
children: /* @__PURE__ */ b("p", {
|
|
82
|
+
className: "font-text-md text-text-secondary",
|
|
83
|
+
children: C("calendar.loadingResources", "Loading resources...")
|
|
84
|
+
})
|
|
85
|
+
}),
|
|
86
|
+
j && /* @__PURE__ */ b("div", {
|
|
87
|
+
className: "text-center py-12",
|
|
88
|
+
children: /* @__PURE__ */ x("p", {
|
|
89
|
+
className: "font-text-md text-red-600 dark:text-red-400",
|
|
90
|
+
children: [
|
|
91
|
+
C("calendar.failedToLoadResources", "Failed to load resources:"),
|
|
92
|
+
" ",
|
|
93
|
+
j.message
|
|
94
|
+
]
|
|
95
|
+
})
|
|
96
|
+
}),
|
|
97
|
+
!A && !j && N.length === 0 && /* @__PURE__ */ x("div", {
|
|
98
|
+
className: "text-center py-12",
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ b(g, { className: "size-12 text-text-tertiary mx-auto mb-4" }),
|
|
101
|
+
/* @__PURE__ */ b("p", {
|
|
102
|
+
className: "font-text-md text-text-secondary mb-4",
|
|
103
|
+
children: C("calendar.noResourcesYet", "No resources yet")
|
|
104
|
+
}),
|
|
105
|
+
f(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ x("button", {
|
|
106
|
+
onClick: () => T(!0),
|
|
107
|
+
className: "inline-flex items-center gap-inline-gap-sm 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",
|
|
108
|
+
children: [/* @__PURE__ */ b(_, { className: "size-4" }), C("calendar.addYourFirstResource", "Add your first resource")]
|
|
109
|
+
}) : null
|
|
110
|
+
]
|
|
111
|
+
}),
|
|
112
|
+
N.length > 0 && /* @__PURE__ */ b("div", {
|
|
113
|
+
className: "grid gap-grid-gap",
|
|
114
|
+
style: { gridTemplateColumns: "repeat(auto-fit, minmax(18rem, 1fr))" },
|
|
115
|
+
children: N.map((e) => /* @__PURE__ */ b("div", {
|
|
116
|
+
className: "@container bg-bg-surface border border-border-default rounded-radius-lg p-card-padding hover:border-border-hover transition-colors",
|
|
117
|
+
children: /* @__PURE__ */ x("div", {
|
|
118
|
+
className: "flex items-start gap-inline-gap",
|
|
119
|
+
children: [/* @__PURE__ */ b("div", {
|
|
120
|
+
className: "size-10 inline-flex items-center justify-center rounded-radius-md bg-bg-neutral text-text-secondary shrink-0",
|
|
121
|
+
children: /* @__PURE__ */ b(S[e.resourceType] ?? g, { className: "size-5" })
|
|
122
|
+
}), /* @__PURE__ */ x("div", {
|
|
123
|
+
className: "min-w-0 flex-1",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ x("div", {
|
|
126
|
+
className: "flex items-start justify-between",
|
|
127
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
128
|
+
className: "font-heading-sm text-text-primary mb-1",
|
|
129
|
+
children: e.name
|
|
130
|
+
}), f(i.CALENDAR_RESOURCE_DELETE) && /* @__PURE__ */ b("button", {
|
|
131
|
+
onClick: () => D({
|
|
132
|
+
id: e.id,
|
|
133
|
+
name: e.name
|
|
134
|
+
}),
|
|
135
|
+
className: "size-6 inline-flex items-center justify-center rounded-radius-sm hover:bg-red-50 dark:hover:bg-red-950/20 text-text-tertiary hover:text-red-600 transition-colors shrink-0",
|
|
136
|
+
"aria-label": `${C("calendar.deleteResource", "Delete Resource")} ${e.name}`,
|
|
137
|
+
children: /* @__PURE__ */ b(y, { className: "size-3.5" })
|
|
138
|
+
})]
|
|
139
|
+
}),
|
|
140
|
+
e.description && /* @__PURE__ */ b("p", {
|
|
141
|
+
className: "font-text-sm text-text-secondary mb-2 line-clamp-2",
|
|
142
|
+
children: e.description
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ x("div", {
|
|
145
|
+
className: "flex flex-wrap items-center gap-2",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ b("span", {
|
|
148
|
+
className: "font-text-xs px-2 py-0.5 rounded-radius-sm bg-bg-neutral text-text-secondary",
|
|
149
|
+
children: V[e.resourceType] ?? e.resourceType
|
|
150
|
+
}),
|
|
151
|
+
e.capacity && /* @__PURE__ */ x("span", {
|
|
152
|
+
className: "inline-flex items-center gap-1 font-text-xs text-text-tertiary",
|
|
153
|
+
children: [/* @__PURE__ */ b(v, { className: "size-3" }), e.capacity]
|
|
154
|
+
}),
|
|
155
|
+
e.location && /* @__PURE__ */ x("span", {
|
|
156
|
+
className: "inline-flex items-center gap-1 font-text-xs text-text-tertiary",
|
|
157
|
+
children: [/* @__PURE__ */ b(m, { className: "size-3" }), e.location]
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ x("div", {
|
|
162
|
+
className: "mt-2 flex items-center gap-2",
|
|
163
|
+
children: [/* @__PURE__ */ b("span", {
|
|
164
|
+
className: `font-text-xs px-2 py-0.5 rounded-radius-sm ${e.isActive ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300" : "bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400"}`,
|
|
165
|
+
children: e.isActive ? C("calendar.active", "Active") : C("calendar.inactive", "Inactive")
|
|
166
|
+
}), e.requireApproval && /* @__PURE__ */ b("span", {
|
|
167
|
+
className: "font-text-xs px-2 py-0.5 rounded-radius-sm bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300",
|
|
168
|
+
children: C("calendar.requiresApproval", "Requires Approval")
|
|
169
|
+
})]
|
|
170
|
+
})
|
|
171
|
+
]
|
|
172
|
+
})]
|
|
173
|
+
})
|
|
174
|
+
}, e.id))
|
|
175
|
+
})
|
|
176
|
+
]
|
|
177
|
+
}),
|
|
178
|
+
w && /* @__PURE__ */ x("dialog", {
|
|
179
|
+
open: !0,
|
|
180
|
+
className: "fixed inset-0 z-50 m-auto rounded-radius-lg border border-border-default bg-bg-surface shadow-lg backdrop:bg-black/50 max-w-lg w-full p-0",
|
|
181
|
+
style: { position: "fixed" },
|
|
182
|
+
children: [/* @__PURE__ */ b("div", {
|
|
183
|
+
className: "fixed inset-0 bg-black/50",
|
|
184
|
+
onClick: () => T(!1)
|
|
185
|
+
}), /* @__PURE__ */ x("form", {
|
|
186
|
+
onSubmit: async (e) => {
|
|
187
|
+
e.preventDefault(), z.name.trim() && (await P({ variables: { input: {
|
|
188
|
+
name: z.name,
|
|
189
|
+
description: z.description || void 0,
|
|
190
|
+
resourceType: z.resourceType,
|
|
191
|
+
capacity: z.capacity ? parseInt(z.capacity, 10) : void 0,
|
|
192
|
+
location: z.location || void 0,
|
|
193
|
+
building: z.building || void 0,
|
|
194
|
+
floor: z.floor || void 0,
|
|
195
|
+
room: z.room || void 0,
|
|
196
|
+
requireApproval: z.requireApproval
|
|
197
|
+
} } }), B({
|
|
198
|
+
name: "",
|
|
199
|
+
description: "",
|
|
200
|
+
resourceType: "ROOM",
|
|
201
|
+
capacity: "",
|
|
202
|
+
location: "",
|
|
203
|
+
building: "",
|
|
204
|
+
floor: "",
|
|
205
|
+
room: "",
|
|
206
|
+
requireApproval: !1
|
|
207
|
+
}), T(!1), M());
|
|
208
|
+
},
|
|
209
|
+
className: "relative z-10 bg-bg-surface rounded-radius-lg p-6 max-w-lg w-full mx-auto mt-20 border border-border-default shadow-lg",
|
|
210
|
+
children: [
|
|
211
|
+
/* @__PURE__ */ x("div", {
|
|
212
|
+
className: "flex items-center justify-between mb-6",
|
|
213
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
214
|
+
className: "font-heading-md text-text-primary",
|
|
215
|
+
children: C("calendar.addResource", "Add Resource")
|
|
216
|
+
}), /* @__PURE__ */ b("button", {
|
|
217
|
+
type: "button",
|
|
218
|
+
onClick: () => T(!1),
|
|
219
|
+
className: "size-8 inline-flex items-center justify-center rounded-radius-sm hover:bg-bg-elevated text-text-tertiary",
|
|
220
|
+
children: /* @__PURE__ */ b(y, { className: "size-5" })
|
|
221
|
+
})]
|
|
222
|
+
}),
|
|
223
|
+
I && /* @__PURE__ */ b("div", {
|
|
224
|
+
className: "mb-4 p-3 rounded-radius-md bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800",
|
|
225
|
+
children: /* @__PURE__ */ b("p", {
|
|
226
|
+
className: "font-text-sm text-red-700 dark:text-red-300",
|
|
227
|
+
children: I.message
|
|
228
|
+
})
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ x("div", {
|
|
231
|
+
className: "space-y-4",
|
|
232
|
+
children: [
|
|
233
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
|
|
234
|
+
htmlFor: "resource-name",
|
|
235
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
236
|
+
children: [
|
|
237
|
+
C("calendar.name", "Name"),
|
|
238
|
+
" ",
|
|
239
|
+
/* @__PURE__ */ b("span", {
|
|
240
|
+
className: "text-red-500",
|
|
241
|
+
children: "*"
|
|
242
|
+
})
|
|
243
|
+
]
|
|
244
|
+
}), /* @__PURE__ */ b("input", {
|
|
245
|
+
id: "resource-name",
|
|
246
|
+
type: "text",
|
|
247
|
+
required: !0,
|
|
248
|
+
value: z.name,
|
|
249
|
+
onChange: (e) => H("name", e.target.value),
|
|
250
|
+
placeholder: C("calendar.resourceNameExample", "e.g. Conference Room A"),
|
|
251
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
252
|
+
})] }),
|
|
253
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
254
|
+
htmlFor: "resource-type",
|
|
255
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
256
|
+
children: C("calendar.type", "Type")
|
|
257
|
+
}), /* @__PURE__ */ x("select", {
|
|
258
|
+
id: "resource-type",
|
|
259
|
+
value: z.resourceType,
|
|
260
|
+
onChange: (e) => H("resourceType", e.target.value),
|
|
261
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
262
|
+
children: [
|
|
263
|
+
/* @__PURE__ */ b("option", {
|
|
264
|
+
value: "ROOM",
|
|
265
|
+
children: C("calendar.room", "Room")
|
|
266
|
+
}),
|
|
267
|
+
/* @__PURE__ */ b("option", {
|
|
268
|
+
value: "EQUIPMENT",
|
|
269
|
+
children: C("calendar.equipment", "Equipment")
|
|
270
|
+
}),
|
|
271
|
+
/* @__PURE__ */ b("option", {
|
|
272
|
+
value: "DESK",
|
|
273
|
+
children: C("calendar.desk", "Desk")
|
|
274
|
+
}),
|
|
275
|
+
/* @__PURE__ */ b("option", {
|
|
276
|
+
value: "VEHICLE",
|
|
277
|
+
children: C("calendar.vehicle", "Vehicle")
|
|
278
|
+
}),
|
|
279
|
+
/* @__PURE__ */ b("option", {
|
|
280
|
+
value: "PARKING_SPOT",
|
|
281
|
+
children: C("calendar.parkingSpot", "Parking Spot")
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ b("option", {
|
|
284
|
+
value: "OTHER",
|
|
285
|
+
children: C("calendar.other", "Other")
|
|
286
|
+
})
|
|
287
|
+
]
|
|
288
|
+
})] }),
|
|
289
|
+
/* @__PURE__ */ x("div", {
|
|
290
|
+
className: "grid grid-cols-2 gap-3",
|
|
291
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
292
|
+
htmlFor: "resource-capacity",
|
|
293
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
294
|
+
children: C("calendar.capacity", "Capacity")
|
|
295
|
+
}), /* @__PURE__ */ b("input", {
|
|
296
|
+
id: "resource-capacity",
|
|
297
|
+
type: "number",
|
|
298
|
+
min: "1",
|
|
299
|
+
value: z.capacity,
|
|
300
|
+
onChange: (e) => H("capacity", e.target.value),
|
|
301
|
+
placeholder: C("calendar.resourceCapacityExample", "e.g. 12"),
|
|
302
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
303
|
+
})] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
304
|
+
htmlFor: "resource-location",
|
|
305
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
306
|
+
children: C("calendar.location", "Location")
|
|
307
|
+
}), /* @__PURE__ */ b("input", {
|
|
308
|
+
id: "resource-location",
|
|
309
|
+
type: "text",
|
|
310
|
+
value: z.location,
|
|
311
|
+
onChange: (e) => H("location", e.target.value),
|
|
312
|
+
placeholder: C("calendar.resourceLocationExample", "e.g. Building A"),
|
|
313
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
314
|
+
})] })]
|
|
315
|
+
}),
|
|
316
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
317
|
+
htmlFor: "resource-description",
|
|
318
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
319
|
+
children: C("calendar.description", "Description")
|
|
320
|
+
}), /* @__PURE__ */ b("textarea", {
|
|
321
|
+
id: "resource-description",
|
|
322
|
+
value: z.description,
|
|
323
|
+
onChange: (e) => H("description", e.target.value),
|
|
324
|
+
placeholder: C("calendar.addDescription", "Add a description"),
|
|
325
|
+
rows: 2,
|
|
326
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border resize-none"
|
|
327
|
+
})] }),
|
|
328
|
+
/* @__PURE__ */ x("div", {
|
|
329
|
+
className: "flex items-center gap-3",
|
|
330
|
+
children: [/* @__PURE__ */ b("input", {
|
|
331
|
+
id: "resource-approval",
|
|
332
|
+
type: "checkbox",
|
|
333
|
+
checked: z.requireApproval,
|
|
334
|
+
onChange: (e) => H("requireApproval", e.target.checked),
|
|
335
|
+
className: "size-4 rounded border-border-default"
|
|
336
|
+
}), /* @__PURE__ */ b("label", {
|
|
337
|
+
htmlFor: "resource-approval",
|
|
338
|
+
className: "font-text-sm text-text-primary",
|
|
339
|
+
children: C("calendar.requireApprovalForBookings", "Require approval for bookings")
|
|
340
|
+
})]
|
|
341
|
+
})
|
|
342
|
+
]
|
|
343
|
+
}),
|
|
344
|
+
/* @__PURE__ */ x("div", {
|
|
345
|
+
className: "mt-6 flex justify-end gap-3",
|
|
346
|
+
children: [/* @__PURE__ */ b("button", {
|
|
347
|
+
type: "button",
|
|
348
|
+
onClick: () => T(!1),
|
|
349
|
+
disabled: F,
|
|
350
|
+
className: "px-4 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors disabled:opacity-50",
|
|
351
|
+
children: C("calendar.cancel", "Cancel")
|
|
352
|
+
}), /* @__PURE__ */ b("button", {
|
|
353
|
+
type: "submit",
|
|
354
|
+
disabled: F || !z.name.trim(),
|
|
355
|
+
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 transition-colors disabled:opacity-50",
|
|
356
|
+
children: F ? C("calendar.creating", "Creating...") : C("calendar.createResource", "Create Resource")
|
|
357
|
+
})]
|
|
358
|
+
})
|
|
359
|
+
]
|
|
360
|
+
})]
|
|
361
|
+
}),
|
|
362
|
+
/* @__PURE__ */ b(a, {
|
|
363
|
+
open: !!E,
|
|
364
|
+
title: C("calendar.deleteResource", "Delete Resource"),
|
|
365
|
+
message: C("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.").replace("{name}", E?.name ?? ""),
|
|
366
|
+
confirmLabel: C("calendar.delete", "Delete"),
|
|
367
|
+
variant: "danger",
|
|
368
|
+
loading: R,
|
|
369
|
+
onConfirm: async () => {
|
|
370
|
+
if (E && await o({
|
|
371
|
+
title: C("calendar.deleteResource", "Delete Resource"),
|
|
372
|
+
message: C("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.").replace("{name}", E.name),
|
|
373
|
+
okButtonTitle: C("calendar.delete", "Delete")
|
|
374
|
+
}) !== !1) try {
|
|
375
|
+
await L({ variables: { id: E.id } }), s("success"), D(null), M();
|
|
376
|
+
} catch (e) {
|
|
377
|
+
throw s("error"), e;
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
onCancel: () => D(null)
|
|
381
|
+
})
|
|
382
|
+
]
|
|
383
|
+
}) : /* @__PURE__ */ b(u, {
|
|
384
|
+
title: C("calendar.accessDenied", "Access Denied"),
|
|
385
|
+
description: C("calendar.noPermissionViewResources", "You don't have permission to view resources.")
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
//#endregion
|
|
389
|
+
export { C as ResourcesPage };
|
|
390
|
+
|
|
391
|
+
//# sourceMappingURL=ResourcesPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourcesPage.js","names":[],"sources":["../../src/pages/ResourcesPage.tsx"],"sourcesContent":["import { useState, useMemo } from 'react';\nimport {\n DoorOpen,\n Monitor,\n Car,\n Package,\n Plus,\n MapPin,\n Users,\n X,\n type LucideIcon,\n} from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { AccessDenied } from '@burdenoff/fe-libs/shared/components';\nimport {\n useGetCalendarResourcesQuery,\n useCreateCalendarResourceMutation,\n useDeleteCalendarResourceMutation,\n} from '../generated/wspace-operations';\nimport type { CalendarResourceType } from '../generated/wspace-types';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport { CALENDAR_PERMISSIONS } from '../constants/permissions';\nimport { useSafePermissions } from '../hooks/useSafePermissions';\nimport { nativeConfirm, nativeNotify } from '../utils/nativeBridge';\n\nconst resourceTypeIcons: Record<string, LucideIcon> = {\n ROOM: DoorOpen,\n EQUIPMENT: Monitor,\n VEHICLE: Car,\n DESK: Package,\n PARKING_SPOT: Car,\n OTHER: Package,\n};\n\ninterface CreateResourceForm {\n name: string;\n description: string;\n resourceType: CalendarResourceType;\n capacity: string;\n location: string;\n building: string;\n floor: string;\n room: string;\n requireApproval: boolean;\n}\n\n/**\n * Resources page\n * Shows available resources (rooms, equipment, etc.) with real data\n */\nexport function ResourcesPage() {\n const { hasPermission, isLoading: permissionsLoading } = useSafePermissions();\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const value = t(key);\n return value === key ? fallback : value;\n };\n const [showCreateForm, setShowCreateForm] = useState(false);\n const [deleteTarget, setDeleteTarget] = useState<{ id: string; name: string } | null>(null);\n\n const canRead = hasPermission(CALENDAR_PERMISSIONS.CALENDAR_RESOURCE_READ);\n\n // Fetch resources — skip until permissions are resolved to avoid leaking existence info\n const { data, loading, error, refetch } = useGetCalendarResourcesQuery({\n fetchPolicy: 'cache-and-network',\n skip: permissionsLoading || !canRead,\n });\n\n const resources = data?.getCalendarResources ?? [];\n\n // Mutations\n const [createResource, { loading: creating, error: createError }] =\n useCreateCalendarResourceMutation();\n const [deleteResource, { loading: deleting }] = useDeleteCalendarResourceMutation();\n\n // Form state\n const [form, setForm] = useState<CreateResourceForm>({\n name: '',\n description: '',\n resourceType: 'ROOM' as CalendarResourceType,\n capacity: '',\n location: '',\n building: '',\n floor: '',\n room: '',\n requireApproval: false,\n });\n\n const resourceTypeLabels = useMemo<Record<string, string>>(\n () => ({\n ROOM: tr('calendar.room', 'Room'),\n EQUIPMENT: tr('calendar.equipment', 'Equipment'),\n VEHICLE: tr('calendar.vehicle', 'Vehicle'),\n DESK: tr('calendar.desk', 'Desk'),\n PARKING_SPOT: tr('calendar.parkingSpot', 'Parking Spot'),\n OTHER: tr('calendar.other', 'Other'),\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [t]\n );\n\n const updateField = <K extends keyof CreateResourceForm>(\n key: K,\n value: CreateResourceForm[K]\n ) => {\n setForm((prev) => ({ ...prev, [key]: value }));\n };\n\n const handleCreateResource = async (e: React.FormEvent) => {\n e.preventDefault();\n if (!form.name.trim()) return;\n\n await createResource({\n variables: {\n input: {\n name: form.name,\n description: form.description || undefined,\n resourceType: form.resourceType,\n capacity: form.capacity ? parseInt(form.capacity, 10) : undefined,\n location: form.location || undefined,\n building: form.building || undefined,\n floor: form.floor || undefined,\n room: form.room || undefined,\n requireApproval: form.requireApproval,\n },\n },\n });\n\n setForm({\n name: '',\n description: '',\n resourceType: 'ROOM' as CalendarResourceType,\n capacity: '',\n location: '',\n building: '',\n floor: '',\n room: '',\n requireApproval: false,\n });\n setShowCreateForm(false);\n refetch();\n };\n\n const handleDeleteResource = async () => {\n if (!deleteTarget) return;\n const confirmed = await nativeConfirm({\n title: tr('calendar.deleteResource', 'Delete Resource'),\n message: tr(\n 'calendar.deleteResourceConfirmation',\n 'Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.'\n ).replace('{name}', deleteTarget.name),\n okButtonTitle: tr('calendar.delete', 'Delete'),\n });\n if (confirmed === false) return;\n try {\n await deleteResource({ variables: { id: deleteTarget.id } });\n void nativeNotify('success');\n setDeleteTarget(null);\n refetch();\n } catch (err) {\n void nativeNotify('error');\n throw err;\n }\n };\n\n if (permissionsLoading || (loading && !data)) {\n return (\n <div className=\"@container min-h-screen bg-bg-canvas flex items-center justify-center\">\n <p className=\"font-text-md text-text-secondary\">{tr('calendar.loading', 'Loading...')}</p>\n </div>\n );\n }\n\n if (!canRead) {\n return (\n <AccessDenied\n title={tr('calendar.accessDenied', 'Access Denied')}\n description={tr(\n 'calendar.noPermissionViewResources',\n \"You don't have permission to view resources.\"\n )}\n />\n );\n }\n\n return (\n <div className=\"@container min-h-screen bg-bg-canvas\">\n {/* Header */}\n <header className=\"border-b border-border-default bg-bg-surface px-page-padding py-element-padding\">\n <div className=\"flex flex-col @lg:flex-row @lg:items-center @lg:justify-between gap-stack-gap\">\n <div>\n <h1 className=\"font-heading-lg text-text-primary mb-stack-gap-sm\">\n {tr('calendar.resources', 'Resources')}\n </h1>\n <p className=\"font-text-md text-text-secondary\">\n {tr(\n 'calendar.bookConferenceRooms',\n 'Book conference rooms, equipment, and other workspace resources'\n )}\n </p>\n </div>\n\n {hasPermission(CALENDAR_PERMISSIONS.CALENDAR_RESOURCE_CREATE) ? (\n <button\n onClick={() => setShowCreateForm(true)}\n className=\"inline-flex items-center gap-inline-gap-sm 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\"\n >\n <Plus className=\"size-4\" />\n {tr('calendar.addResource', 'Add Resource')}\n </button>\n ) : null}\n </div>\n </header>\n\n {/* Content — host shell already renders <main>, use a plain div */}\n <div className=\"p-page-padding\">\n {/* Loading state */}\n {loading && resources.length === 0 && (\n <div className=\"text-center py-12\">\n <p className=\"font-text-md text-text-secondary\">\n {tr('calendar.loadingResources', 'Loading resources...')}\n </p>\n </div>\n )}\n\n {/* Error state */}\n {error && (\n <div className=\"text-center py-12\">\n <p className=\"font-text-md text-red-600 dark:text-red-400\">\n {tr('calendar.failedToLoadResources', 'Failed to load resources:')} {error.message}\n </p>\n </div>\n )}\n\n {/* Empty state */}\n {!loading && !error && resources.length === 0 && (\n <div className=\"text-center py-12\">\n <Package className=\"size-12 text-text-tertiary mx-auto mb-4\" />\n <p className=\"font-text-md text-text-secondary mb-4\">\n {tr('calendar.noResourcesYet', 'No resources yet')}\n </p>\n {hasPermission(CALENDAR_PERMISSIONS.CALENDAR_RESOURCE_CREATE) ? (\n <button\n onClick={() => setShowCreateForm(true)}\n className=\"inline-flex items-center gap-inline-gap-sm 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\"\n >\n <Plus className=\"size-4\" />\n {tr('calendar.addYourFirstResource', 'Add your first resource')}\n </button>\n ) : null}\n </div>\n )}\n\n {/* Resource grid */}\n {resources.length > 0 && (\n <div\n className=\"grid gap-grid-gap\"\n style={{ gridTemplateColumns: 'repeat(auto-fit, minmax(18rem, 1fr))' }}\n >\n {resources.map(\n (resource: {\n id: string;\n name: string;\n description?: string | null;\n resourceType: string;\n capacity?: number | null;\n location?: string | null;\n isActive: boolean;\n requireApproval: boolean;\n }) => {\n const IconComponent = resourceTypeIcons[resource.resourceType] ?? Package;\n return (\n <div\n key={resource.id}\n className=\"@container bg-bg-surface border border-border-default rounded-radius-lg p-card-padding hover:border-border-hover transition-colors\"\n >\n <div className=\"flex items-start gap-inline-gap\">\n <div className=\"size-10 inline-flex items-center justify-center rounded-radius-md bg-bg-neutral text-text-secondary shrink-0\">\n <IconComponent className=\"size-5\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-start justify-between\">\n <h3 className=\"font-heading-sm text-text-primary mb-1\">\n {resource.name}\n </h3>\n {hasPermission(CALENDAR_PERMISSIONS.CALENDAR_RESOURCE_DELETE) && (\n <button\n onClick={() =>\n setDeleteTarget({ id: resource.id, name: resource.name })\n }\n className=\"size-6 inline-flex items-center justify-center rounded-radius-sm hover:bg-red-50 dark:hover:bg-red-950/20 text-text-tertiary hover:text-red-600 transition-colors shrink-0\"\n aria-label={`${tr('calendar.deleteResource', 'Delete Resource')} ${resource.name}`}\n >\n <X className=\"size-3.5\" />\n </button>\n )}\n </div>\n\n {resource.description && (\n <p className=\"font-text-sm text-text-secondary mb-2 line-clamp-2\">\n {resource.description}\n </p>\n )}\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <span className=\"font-text-xs px-2 py-0.5 rounded-radius-sm bg-bg-neutral text-text-secondary\">\n {resourceTypeLabels[resource.resourceType] ?? resource.resourceType}\n </span>\n\n {resource.capacity && (\n <span className=\"inline-flex items-center gap-1 font-text-xs text-text-tertiary\">\n <Users className=\"size-3\" />\n {resource.capacity}\n </span>\n )}\n\n {resource.location && (\n <span className=\"inline-flex items-center gap-1 font-text-xs text-text-tertiary\">\n <MapPin className=\"size-3\" />\n {resource.location}\n </span>\n )}\n </div>\n\n <div className=\"mt-2 flex items-center gap-2\">\n <span\n className={`font-text-xs px-2 py-0.5 rounded-radius-sm ${\n resource.isActive\n ? 'bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300'\n : 'bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400'\n }`}\n >\n {resource.isActive\n ? tr('calendar.active', 'Active')\n : tr('calendar.inactive', 'Inactive')}\n </span>\n {resource.requireApproval && (\n <span className=\"font-text-xs px-2 py-0.5 rounded-radius-sm bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300\">\n {tr('calendar.requiresApproval', 'Requires Approval')}\n </span>\n )}\n </div>\n </div>\n </div>\n </div>\n );\n }\n )}\n </div>\n )}\n </div>\n\n {/* Create Resource Modal */}\n {showCreateForm && (\n <dialog\n open\n className=\"fixed inset-0 z-50 m-auto rounded-radius-lg border border-border-default bg-bg-surface shadow-lg backdrop:bg-black/50 max-w-lg w-full p-0\"\n style={{ position: 'fixed' }}\n >\n <div className=\"fixed inset-0 bg-black/50\" onClick={() => setShowCreateForm(false)} />\n <form\n onSubmit={handleCreateResource}\n className=\"relative z-10 bg-bg-surface rounded-radius-lg p-6 max-w-lg w-full mx-auto mt-20 border border-border-default shadow-lg\"\n >\n <div className=\"flex items-center justify-between mb-6\">\n <h2 className=\"font-heading-md text-text-primary\">\n {tr('calendar.addResource', 'Add Resource')}\n </h2>\n <button\n type=\"button\"\n onClick={() => setShowCreateForm(false)}\n className=\"size-8 inline-flex items-center justify-center rounded-radius-sm hover:bg-bg-elevated text-text-tertiary\"\n >\n <X className=\"size-5\" />\n </button>\n </div>\n\n {createError && (\n <div className=\"mb-4 p-3 rounded-radius-md bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800\">\n <p className=\"font-text-sm text-red-700 dark:text-red-300\">{createError.message}</p>\n </div>\n )}\n\n <div className=\"space-y-4\">\n <div>\n <label\n htmlFor=\"resource-name\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.name', 'Name')} <span className=\"text-red-500\">*</span>\n </label>\n <input\n id=\"resource-name\"\n type=\"text\"\n required\n value={form.name}\n onChange={(e) => updateField('name', e.target.value)}\n placeholder={tr('calendar.resourceNameExample', 'e.g. Conference Room A')}\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n />\n </div>\n\n <div>\n <label\n htmlFor=\"resource-type\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.type', 'Type')}\n </label>\n <select\n id=\"resource-type\"\n value={form.resourceType}\n onChange={(e) =>\n updateField('resourceType', e.target.value as CalendarResourceType)\n }\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n >\n <option value=\"ROOM\">{tr('calendar.room', 'Room')}</option>\n <option value=\"EQUIPMENT\">{tr('calendar.equipment', 'Equipment')}</option>\n <option value=\"DESK\">{tr('calendar.desk', 'Desk')}</option>\n <option value=\"VEHICLE\">{tr('calendar.vehicle', 'Vehicle')}</option>\n <option value=\"PARKING_SPOT\">{tr('calendar.parkingSpot', 'Parking Spot')}</option>\n <option value=\"OTHER\">{tr('calendar.other', 'Other')}</option>\n </select>\n </div>\n\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <label\n htmlFor=\"resource-capacity\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.capacity', 'Capacity')}\n </label>\n <input\n id=\"resource-capacity\"\n type=\"number\"\n min=\"1\"\n value={form.capacity}\n onChange={(e) => updateField('capacity', e.target.value)}\n placeholder={tr('calendar.resourceCapacityExample', 'e.g. 12')}\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n />\n </div>\n <div>\n <label\n htmlFor=\"resource-location\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.location', 'Location')}\n </label>\n <input\n id=\"resource-location\"\n type=\"text\"\n value={form.location}\n onChange={(e) => updateField('location', e.target.value)}\n placeholder={tr('calendar.resourceLocationExample', 'e.g. Building A')}\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n />\n </div>\n </div>\n\n <div>\n <label\n htmlFor=\"resource-description\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.description', 'Description')}\n </label>\n <textarea\n id=\"resource-description\"\n value={form.description}\n onChange={(e) => updateField('description', e.target.value)}\n placeholder={tr('calendar.addDescription', 'Add a description')}\n rows={2}\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border resize-none\"\n />\n </div>\n\n <div className=\"flex items-center gap-3\">\n <input\n id=\"resource-approval\"\n type=\"checkbox\"\n checked={form.requireApproval}\n onChange={(e) => updateField('requireApproval', e.target.checked)}\n className=\"size-4 rounded border-border-default\"\n />\n <label htmlFor=\"resource-approval\" className=\"font-text-sm text-text-primary\">\n {tr('calendar.requireApprovalForBookings', 'Require approval for bookings')}\n </label>\n </div>\n </div>\n\n <div className=\"mt-6 flex justify-end gap-3\">\n <button\n type=\"button\"\n onClick={() => setShowCreateForm(false)}\n disabled={creating}\n className=\"px-4 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors disabled:opacity-50\"\n >\n {tr('calendar.cancel', 'Cancel')}\n </button>\n <button\n type=\"submit\"\n disabled={creating || !form.name.trim()}\n 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 transition-colors disabled:opacity-50\"\n >\n {creating\n ? tr('calendar.creating', 'Creating...')\n : tr('calendar.createResource', 'Create Resource')}\n </button>\n </div>\n </form>\n </dialog>\n )}\n\n {/* Delete Confirmation */}\n <ConfirmDialog\n open={Boolean(deleteTarget)}\n title={tr('calendar.deleteResource', 'Delete Resource')}\n message={tr(\n 'calendar.deleteResourceConfirmation',\n 'Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.'\n ).replace('{name}', deleteTarget?.name ?? '')}\n confirmLabel={tr('calendar.delete', 'Delete')}\n variant=\"danger\"\n loading={deleting}\n onConfirm={handleDeleteResource}\n onCancel={() => setDeleteTarget(null)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyBA,IAAM,IAAgD;CACpD,MAAM;CACN,WAAW;CACX,SAAS;CACT,MAAM;CACN,cAAc;CACd,OAAO;CACR;AAkBD,SAAgB,IAAgB;CAC9B,IAAM,EAAE,kBAAe,WAAW,MAAuB,GAAoB,EACvE,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAQ,EAAE,EAAI;AACpB,SAAO,MAAU,IAAM,IAAW;IAE9B,CAAC,GAAgB,KAAqB,EAAS,GAAM,EACrD,CAAC,GAAc,KAAmB,EAA8C,KAAK,EAErF,IAAU,EAAc,EAAqB,uBAAuB,EAGpE,EAAE,SAAM,YAAS,UAAO,eAAY,EAA6B;EACrE,aAAa;EACb,MAAM,KAAsB,CAAC;EAC9B,CAAC,EAEI,IAAY,GAAM,wBAAwB,EAAE,EAG5C,CAAC,GAAgB,EAAE,SAAS,GAAU,OAAO,OACjD,GAAmC,EAC/B,CAAC,GAAgB,EAAE,SAAS,OAAc,GAAmC,EAG7E,CAAC,GAAM,KAAW,EAA6B;EACnD,MAAM;EACN,aAAa;EACb,cAAc;EACd,UAAU;EACV,UAAU;EACV,UAAU;EACV,OAAO;EACP,MAAM;EACN,iBAAiB;EAClB,CAAC,EAEI,IAAqB,SAClB;EACL,MAAM,EAAG,iBAAiB,OAAO;EACjC,WAAW,EAAG,sBAAsB,YAAY;EAChD,SAAS,EAAG,oBAAoB,UAAU;EAC1C,MAAM,EAAG,iBAAiB,OAAO;EACjC,cAAc,EAAG,wBAAwB,eAAe;EACxD,OAAO,EAAG,kBAAkB,QAAQ;EACrC,GAED,CAAC,EAAE,CACJ,EAEK,KACJ,GACA,MACG;AACH,KA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