Clean up codebase and reorganize plugin architecture
All checks were successful
Build And Push Image / docker (push) Successful in 1m30s
All checks were successful
Build And Push Image / docker (push) Successful in 1m30s
- Archive documentation files to docs-archive/ - Remove numbered prefixes from plugin files for cleaner organization - Remove unused dependencies (@nuxt/ui, @vuepic/vue-datepicker) - Update event components and API endpoints - Simplify plugin structure with descriptive names
This commit is contained in:
@@ -80,50 +80,26 @@
|
||||
|
||||
<!-- Date and Time -->
|
||||
<v-col cols="12" md="6">
|
||||
<div class="date-picker-wrapper">
|
||||
<label class="date-picker-label">Start Date & Time*</label>
|
||||
<VueDatePicker
|
||||
v-model="startDateModel"
|
||||
:timezone="{
|
||||
timezone: 'Europe/Monaco',
|
||||
emitTimezone: 'UTC'
|
||||
}"
|
||||
:format="dateTimeFormat"
|
||||
placeholder="Select start date and time"
|
||||
:enable-time-picker="true"
|
||||
:is-24="true"
|
||||
:auto-apply="false"
|
||||
:action-row="{ showSelect: true, showCancel: true, showNow: false, showPreview: true }"
|
||||
:clearable="false"
|
||||
:required="true"
|
||||
@update:model-value="handleStartDateUpdate"
|
||||
@closed="onDatePickerClosed"
|
||||
/>
|
||||
</div>
|
||||
<VDateInput
|
||||
v-model="startDateModel"
|
||||
label="Start Date & Time*"
|
||||
:rules="[v => !!v || 'Start date is required']"
|
||||
variant="outlined"
|
||||
prepend-inner-icon="mdi-calendar"
|
||||
required
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
<div class="date-picker-wrapper">
|
||||
<label class="date-picker-label">End Date & Time*</label>
|
||||
<VueDatePicker
|
||||
v-model="endDateModel"
|
||||
:timezone="{
|
||||
timezone: 'Europe/Monaco',
|
||||
emitTimezone: 'UTC'
|
||||
}"
|
||||
:format="dateTimeFormat"
|
||||
placeholder="Select end date and time"
|
||||
:enable-time-picker="true"
|
||||
:is-24="true"
|
||||
:auto-apply="false"
|
||||
:action-row="{ showSelect: true, showCancel: true, showNow: false, showPreview: true }"
|
||||
:clearable="false"
|
||||
:required="true"
|
||||
:min-date="startDateModel"
|
||||
@update:model-value="handleEndDateUpdate"
|
||||
@closed="onDatePickerClosed"
|
||||
/>
|
||||
</div>
|
||||
<VDateInput
|
||||
v-model="endDateModel"
|
||||
label="End Date & Time*"
|
||||
:rules="[v => !!v || 'End date is required']"
|
||||
variant="outlined"
|
||||
prepend-inner-icon="mdi-calendar"
|
||||
:min="startDateModel"
|
||||
required
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<!-- Location -->
|
||||
|
||||
@@ -479,39 +479,73 @@ const close = () => {
|
||||
};
|
||||
|
||||
const submitRSVP = async (status: 'confirmed' | 'declined') => {
|
||||
if (!props.event) return;
|
||||
console.log('[EventDetailsDialog] submitRSVP called with status:', status);
|
||||
|
||||
if (!props.event) {
|
||||
console.error('[EventDetailsDialog] No event provided');
|
||||
return;
|
||||
}
|
||||
|
||||
rsvpLoading.value = true;
|
||||
|
||||
try {
|
||||
// Use event_id field for consistent RSVP relationships
|
||||
// This ensures RSVPs are linked properly to events using the business identifier
|
||||
const eventId = props.event.event_id ||
|
||||
(props.event as any).extendedProps?.event_id ||
|
||||
(props.event as any).Id || // Fallback to database ID if event_id not available
|
||||
props.event.id;
|
||||
let eventId = props.event.event_id ||
|
||||
(props.event as any).extendedProps?.event_id ||
|
||||
(props.event as any).Id || // Fallback to database ID if event_id not available
|
||||
props.event.id ||
|
||||
(props.event as any).id; // Additional fallback
|
||||
|
||||
// Direct access to Id field as backup
|
||||
if (!eventId && 'Id' in props.event) {
|
||||
eventId = (props.event as any)['Id'];
|
||||
console.log('[EventDetailsDialog] Found Id via direct property access:', eventId);
|
||||
}
|
||||
|
||||
// Try to access the Id property using Object.keys approach
|
||||
if (!eventId) {
|
||||
const keys = Object.keys(props.event);
|
||||
console.log('[EventDetailsDialog] Available keys:', keys);
|
||||
if (keys.includes('Id')) {
|
||||
eventId = props.event['Id' as keyof Event];
|
||||
console.log('[EventDetailsDialog] Found Id via keys lookup:', eventId);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('[EventDetailsDialog] Using event identifier for RSVP:', eventId);
|
||||
console.log('[EventDetailsDialog] Event object keys:', Object.keys(props.event));
|
||||
console.log('[EventDetailsDialog] Event event_id field:', props.event.event_id);
|
||||
console.log('[EventDetailsDialog] Event database Id field:', (props.event as any).Id);
|
||||
console.log('[EventDetailsDialog] Event id field:', props.event.id);
|
||||
console.log('[EventDetailsDialog] Full event object:', JSON.stringify(props.event, null, 2));
|
||||
|
||||
if (!eventId) {
|
||||
console.error('[EventDetailsDialog] Unable to determine event identifier');
|
||||
throw new Error('Unable to determine event identifier');
|
||||
}
|
||||
|
||||
await rsvpToEvent(eventId, {
|
||||
console.log('[EventDetailsDialog] Calling rsvpToEvent with:', {
|
||||
eventId,
|
||||
status,
|
||||
notes: rsvpNotes.value,
|
||||
guests: selectedGuests.value
|
||||
});
|
||||
|
||||
const result = await rsvpToEvent(eventId, {
|
||||
member_id: '', // This will be filled by the composable
|
||||
rsvp_status: status,
|
||||
rsvp_notes: rsvpNotes.value,
|
||||
extra_guests: selectedGuests.value.toString()
|
||||
});
|
||||
|
||||
console.log('[EventDetailsDialog] RSVP submitted successfully:', result);
|
||||
|
||||
emit('rsvp-updated', props.event);
|
||||
// TODO: Show success message
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error submitting RSVP:', error);
|
||||
console.error('[EventDetailsDialog] Error submitting RSVP:', error);
|
||||
// TODO: Show error message
|
||||
} finally {
|
||||
rsvpLoading.value = false;
|
||||
|
||||
Reference in New Issue
Block a user