Files
GoMFT/static/js/vendor.js
T
StarFleetCPTN 37d507ade6 feat: Implement calendar view for scheduled jobs
- Added a new calendar view to display scheduled jobs for the next two months.
- Introduced components for generating calendar events from job data.
- Integrated FullCalendar for enhanced calendar functionality.
- Updated routing to include a new endpoint for the calendar view.
- Enhanced layout to include a link to the calendar in the navigation.
- Added necessary CSS for FullCalendar styling and functionality.
- Included tooltips for event details and filtering options for job visibility.
2025-04-13 08:49:00 -07:00

79 lines
2.5 KiB
JavaScript

// Import HTMX
import 'htmx.org';
// Import Alpine.js
import Alpine from 'alpinejs';
window.Alpine = Alpine;
// Import Flowbite
import 'flowbite';
import 'flowbite/dist/flowbite.css';
// Import FullCalendar
import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import listPlugin from '@fullcalendar/list';
import interactionPlugin from '@fullcalendar/interaction';
// Make FullCalendar available globally
window.FullCalendar = {
Calendar,
dayGridPlugin,
timeGridPlugin,
listPlugin,
interactionPlugin
};
// Import Popper.js
import * as Popper from '@popperjs/core';
window.Popper = Popper;
// Import Tippy.js
import tippy from 'tippy.js';
import 'tippy.js/dist/tippy.css';
import 'tippy.js/themes/light.css';
window.tippy = tippy;
// Initialize Flowbite components
document.addEventListener('DOMContentLoaded', () => {
// Initialize Alpine.js
Alpine.start();
// Initialize Flowbite modals
const modalTriggers = document.querySelectorAll('[data-modal-target]');
modalTriggers.forEach(trigger => {
const targetId = trigger.getAttribute('data-modal-target');
const targetModal = document.getElementById(targetId);
if (targetModal) {
// Show modal
trigger.addEventListener('click', () => {
targetModal.classList.remove('hidden');
targetModal.classList.add('flex');
// Add backdrop
document.body.style.overflow = 'hidden';
});
// Handle modal hide buttons
const hideButtons = targetModal.querySelectorAll('[data-modal-hide]');
hideButtons.forEach(button => {
button.addEventListener('click', () => {
targetModal.classList.add('hidden');
targetModal.classList.remove('flex');
// Remove backdrop
document.body.style.overflow = '';
});
});
// Handle clicking outside the modal
targetModal.addEventListener('click', (event) => {
if (event.target === targetModal || event.target.classList.contains('fixed')) {
targetModal.classList.add('hidden');
targetModal.classList.remove('flex');
// Remove backdrop
document.body.style.overflow = '';
}
});
}
});
});