Calendar Scheduling Guide
Learn how to use the Mantis calendar system to schedule maintenance events, track resource availability, and manage recurring service activities.Overview
The Mantis calendar provides:- Automatic maintenance scheduling based on resource frequency configurations
- Manual event creation for ad-hoc tasks and inspections
- Visual month view with color-coded events
- Drag-and-drop rescheduling for confirmed events
- Cost projections based on scheduled maintenance
The calendar distinguishes between planned maintenance (auto-generated from resource configs) and confirmed events (manually created calendar entries).
Understanding the Calendar View
Calendar Header
The calendar header includes: Month Navigation:- ◀ Previous Month button
- Current Month & Year display (e.g., “marzo 2024”)
- Mes Actual button (returns to current month if navigated away)
- ▶ Next Month button
Planificados
Count of auto-generated maintenance occurrences for the month
Eventos
Count of manually created/confirmed calendar events
Recursos
Number of resources with maintenance schedules
Costo Total
Projected maintenance costs for the month (GTQ)
- 🔵 Blue dot: Interval-based maintenance (every N days)
- 🟣 Purple dot: Week-based maintenance (specific weekdays)
- 🟠 Orange dot: Month-based maintenance (specific dates)
- 🟢 Green box: Confirmed calendar event
Calendar Month View
The month view displays a grid of days with:Day Cell Structure
- 🟢 Lime background: Days with scheduled content
- 🟡 Yellow ring: Today’s date
- 🔵 Blue highlight: Drag-and-drop target
- Green badge: Number of confirmed events
- Primary badge: Number of planned maintenance items
Automatic Maintenance Scheduling
Mantis automatically generates maintenance schedules based on resource frequency configurations.How Auto-Scheduling Works
Resource Added to Project
When you add a resource with maintenance enabled, the system stores:
frequency_type: DAY, WEEK, or MONTHinterval_days: For DAY typeweekdays: For WEEK type (array of 0-6)monthdays: For MONTH type (array of 1-31)maintenance_cost: Cost per occurrenceoperation_start_date: When scheduling begins
Calendar Loads Month
When you view a month in the calendar, the system:
- Retrieves all project resources with maintenance
- Calls
generateMaintenanceSchedule()function - Calculates occurrences for the visible month
Maintenance Schedule Examples
Example 1: Daily Pump Check (DAY type)- Resource: Pump PU-001
- Frequency: Every 3 days
- Start: March 1
- Schedule: March 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31
- Resource: Tank TQ-005
- Frequency: Monday and Friday
- March Schedule: All Mondays (4, 11, 18, 25) and Fridays (1, 8, 15, 22, 29)
- Resource: Sensor SN-012
- Frequency: 1st and 15th of each month
- March Schedule: March 1, March 15
- April Schedule: April 1, April 15
Auto-scheduled maintenance appears in read-only mode. To track actual completion, create a corresponding calendar event.
Creating Calendar Events
Calendar events are confirmed activities tracked separately from automatic schedules.Creating a New Event
Select Date
Option A: Click the [+] button that appears on hover over any day cellOption B: Click a day cell to open the detail modal, then click Nuevo Evento
Fill Event Form
The event form includes:Basic Information:
- Título (required): Event name (e.g., “Mantenimiento Bomba PU-001”)
- Tipo de Evento: Select from dropdown
- Mantenimiento (Maintenance)
- Instalación (Installation)
- Retiro (Removal)
- Inspección (Inspection)
- Otro (Other)
- Prioridad: Baja, Media, Alta, Urgente
- Estado: Programado, En Progreso, Completado, Cancelado (only visible when editing)
- Color: Visual identifier in calendar (color picker)
- Fecha Inicio (required): Event start date (pre-filled from clicked day)
- Fecha Fin: Optional end date for multi-day events
- Hora Inicio: Start time (e.g., 08:00)
- Hora Fin: End time (e.g., 17:00)
- Técnico Responsable: Assign to specific technician from dropdown
- Shows technicians available in the system
- Descripción: Multi-line text field for event details
- Include work to be performed, expected outcomes
- Recurso: Select from project resources dropdown
- Descripción: Specific activity for this resource
- Costo: Cost for this specific task
- Add multiple resources if the event involves several items
- Notas: Additional comments or instructions
Event Form Example
Managing Calendar Events
Viewing Event Details
Editing Events
Modify Fields
Update any field in the event form.New field available when editing:
- Estado: Change status (Programado → En Progreso → Completado)
Rescheduling Events (Drag-and-Drop)
Quickly reschedule events by dragging:Click and Hold Event
In the calendar view, click and hold an event box.The event becomes semi-transparent (opacity-50).
Deleting Events
CalendarEvent Model Reference
For developers and administrators:Model Fields
Event Details (Resources)
Frequency Type Configuration Deep Dive
DAY Type: Interval-Based Scheduling
Configuration:frequency_type: “DAY”interval_days: Integer (1-365)
- Oil changes: Every 7 days
- Filter replacement: Every 14 days
- General inspection: Every 30 days
WEEK Type: Weekday-Based Scheduling
Configuration:frequency_type: “WEEK”weekdays: Array of integers [0-6] where 0=Monday, 6=Sunday
- Weekly service: Every Monday (weekdays=[0])
- Business days: Mon-Fri (weekdays=[0,1,2,3,4])
- Weekend checks: Sat-Sun (weekdays=[5,6])
MONTH Type: Date-Based Scheduling
Configuration:frequency_type: “MONTH”monthdays: Array of integers [1-31]
- Monthly billing: 1st of month (monthdays=[1])
- Semi-monthly: 1st and 15th (monthdays=[1,15])
- Quarterly: 1st, 10th, 20th (monthdays=[1,10,20])
Edge Case Handling:
If you configure day 31 for a month with only 30 days (or day 29-31 for February), that occurrence is automatically skipped.
Best Practices
Scheduling Strategy
- Start with Auto-Scheduling: Configure resource maintenance frequencies during resource allocation
- Create Events for Actual Work: When maintenance is actually performed, create a calendar event
- Link Events to Plans: Use the same date and resource to connect confirmed events with planned maintenance
- Update Status: Move events through Programado → En Progreso → Completado as work progresses
- Document Thoroughly: Use descriptions and notes to record what was actually done
Color Coding Recommendations
By Priority:- 🔴 Red (#EF4444): Urgent/High priority
- 🟡 Yellow (#F59E0B): Medium priority
- 🟢 Green (#10B981): Low priority/Routine
- 🔵 Blue (#3B82F6): Inspections/Non-critical
- 🟢 Green: Maintenance
- 🔵 Blue: Inspections
- 🟡 Yellow: Installations
- 🟠 Orange: Removals
- 🔴 Red: Emergency/Unplanned
Maintenance Compliance Tracking
Weekly Review:- Navigate to current week in calendar
- Count planned maintenance items (colored dots)
- Count completed events (green boxes with “Completado” status)
- Calculate compliance:
(completed / planned) × 100%
- View full month
- Export or screenshot calendar
- Review summary cards for total counts
- Check Costo Total vs. budget
- Identify any missed maintenance (planned but no corresponding event)
Common Issues and Solutions
No maintenance appearing in calendar
No maintenance appearing in calendar
Problem: Calendar shows 0 Planificados despite resources with maintenanceChecks:
- Resource has
include_maintenance= true - Resource has
operation_start_datein the past or present - Resource
frequency_typeis properly configured - For WEEK type: At least one weekday selected
- For MONTH type: At least one month day selected
- For DAY type:
interval_days> 0
- Go to Recursos Asignados tab
- Edit the resource
- Verify maintenance checkbox is checked
- Check frequency configuration
- Save and return to calendar
Drag-and-drop not working
Drag-and-drop not working
Problem: Cannot drag events to new datesCauses:
- Browser doesn’t support HTML5 drag-and-drop
- Event is not a confirmed calendar event (trying to drag planned maintenance)
- JavaScript error preventing drag functionality
- Only confirmed events (green boxes) can be dragged
- Planned maintenance (colored dots) cannot be dragged - edit resource frequency instead
- Try different browser (Chrome, Firefox, Edge recommended)
- Check browser console for errors (F12)
- Alternative: Use Edit event to change date manually
Cost calculation doesn't match expectations
Cost calculation doesn't match expectations
Problem: Costo Total card shows unexpected valueFormula:Checks:
- Verify
maintenance_coston each resource - Count planned maintenance occurrences in month
- Check event details for additional costs
- Ensure no duplicate resources
- Click days with maintenance to see detailed breakdown
- Review resource maintenance costs in Recursos tab
- Sum manually and compare
- Contact support if persistent discrepancy
Weekday maintenance on wrong days
Weekday maintenance on wrong days
Problem: WEEK type showing maintenance on incorrect weekdaysCause: Weekday array mapping confusion (0=Monday vs. 0=Sunday)Mantis Convention:
- 0 = Monday (Lunes)
- 1 = Tuesday (Martes)
- …
- 6 = Sunday (Domingo)
- Edit resource maintenance configuration
- Click weekday buttons to verify selection
- Selected days should highlight in blue
- Save and verify in calendar
- If still incorrect, check browser locale settings
Month-based maintenance missing in February
Month-based maintenance missing in February
Problem: Configured day 30 or 31, but no maintenance in FebruaryExplanation: This is expected behavior. February only has 28/29 days.Solution:
- For consistent monthly maintenance, use days 1-28
- Alternatively, configure weekday-based (e.g., “last Monday of month”)
- Or create manual events for short months
- Consider using DAY type with 30-day interval instead
Calendar Workflow Example
Project Start: Configure Resources
March 1: Add pump PU-001 to project
- Enable maintenance
- Frequency: Every 7 days (DAY type)
- Cost: Q200 per maintenance
- Start date: March 1
Week 1: View Auto-Schedule
Open Calendar tab
- See blue dots on March 1, 8, 15, 22, 29
- Costo Total shows Q1,000 (5 occurrences × Q200)
March 8: Perform Maintenance
Technician performs scheduled maintenance
- Click March 8 in calendar
- Create event:
- Title: “Mantenimiento Bomba PU-001”
- Type: Mantenimiento
- Priority: Media
- Resource: PU-001 - Revisión completa - Q200
- Description: “Cambio de aceite, revisión filtros”
- Save event
March 9: Update Status
Work completed
- Click event on March 8
- Edit event
- Change status: Programado → Completado
- Add notes: “Filtros en buen estado, aceite cambiado”
- Save
March 14: Reschedule Next Maintenance
Client requests delay
- Click event on March 15
- Drag to March 17
- Event automatically moves
Related Guides
Resource Allocation
Configure resource maintenance frequencies
Project Management
Manage project lifecycle and timelines
Document Management
Upload maintenance reports and work sheets
API Reference
For developers integrating with the calendar:- Get Month Events:
GET /api/calendar/events/?project_id=<id>&year=2024&month=3 - Create Event:
POST /api/calendar/events/ - Update Event:
PUT /api/calendar/events/<event_id>/ - Move Event:
PATCH /api/calendar/events/<event_id>/move/(body:{"start_date": "2024-03-17"}) - Delete Event:
DELETE /api/calendar/events/<event_id>/ - Get Maintenance Schedule: Client-side calculation via
generateMaintenanceSchedule()