Employee Calendar Documentation

Part 1: USER GUIDE - Employee Calendar


Table of Contents


1. Overview

The Employee Calendar is a visual representation of all your work-related events in one centralized view. It displays your shifts, attendance records, leave dates, overtime, company events, and holidays in an easy-to-read calendar format.

What is the Calendar?

Think of it as your personal work calendar that shows:

  • πŸ“… Your assigned shifts (Morning, Afternoon, Night)
  • βœ… Days you've checked in (attendance records)
  • πŸ–οΈ Approved leave dates
  • ⏰ Overtime requests
  • πŸŽ‰ Company events and holidays
  • πŸ“Œ Shift changes and notifications

Key Features

βœ… Multi-Month View - See up to 3 months at a time
βœ… Color-Coded Events - Different colors for different event types
βœ… Click for Details - Click any date to see detailed information
βœ… Filter Events - Show/hide specific event types
βœ… Print Ready - Print your calendar for offline reference
βœ… Export Functionality - Download as ICS file for Google Calendar, Outlook
βœ… Real-Time Updates - Calendar syncs with system changes

Calendar Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          EMPLOYEE CALENDAR                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                          β”‚
β”‚ [View Controls] [Filter] [Export] [Print]               β”‚
β”‚                                                          β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚                                                     β”‚ β”‚
β”‚ β”‚           CALENDAR GRID (Days/Weeks/Month)          β”‚ β”‚
β”‚ β”‚                                                     β”‚ β”‚
β”‚ β”‚     Date cells with color-coded indicators          β”‚ β”‚
β”‚ β”‚                                                     β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                                          β”‚
β”‚ [Legend]                                                 β”‚
β”‚ πŸ”΅ Shift | βœ… Checked-In | πŸ–οΈ Leave | ⏰ Overtime...  β”‚
β”‚                                                          β”‚
β”‚ [Previous] [Today] [Next] Month: December 2025          β”‚
β”‚                                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2. Accessing the Calendar

2.1 Ways to Access

Option 1: From Dashboard

Dashboard β†’ Left Menu β†’ Calendar
    ↓
Calendar Page Opens

Option 2: From Left Navigation Menu

Main Menu β†’ Calendar Icon πŸ“…
    ↓
Calendar Page Opens

Option 3: Direct URL

https://dtr.company.com/employee/calendar

Option 4: From Other Pages

Any Employee Page β†’ Calendar Link
    ↓
Opens Calendar View

2.2 Calendar Page Load

When you first open the calendar:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Loading Calendar...                 β”‚
β”‚                                      β”‚
β”‚  ⏳ Fetching your events             β”‚
β”‚  ⏳ Loading attendance records        β”‚
β”‚  ⏳ Loading shift information         β”‚
β”‚  ⏳ Loading leave data                β”‚
β”‚                                      β”‚
β”‚  [Please wait]                       β”‚
β”‚                                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Typical load time: 1-3 seconds

Once loaded:

βœ… Calendar Ready
   All your events visible
   Ready for interaction

3. Calendar Interface

3.1 Calendar Layout

The calendar displays in Month View by default:

                    DECEMBER 2025
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ Sun Mon Tue Wed Thu Fri Sat      β”‚
        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
        β”‚               1   2              β”‚
        β”‚  3   4   5   6   7   8   9      β”‚
        β”‚ 10  11  12  13  14  15  16      β”‚
        β”‚ 17  18  19  20  21  22  23      β”‚
        β”‚ 24  25  26  27  28  29  30      β”‚
        β”‚ 31                               β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

    [β—€ Previous] [Today] [Next β–Ά]

3.2 Date Cell Structure

Each date cell contains multiple pieces of information:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         4            β”‚  ← Date number
β”‚ (Wed)                β”‚  ← Day of week (optional)
β”‚                      β”‚
β”‚ πŸ”΅ Morning 08-17:00  β”‚  ← Shift (if assigned)
β”‚ βœ… Checked In        β”‚  ← Attendance status (if today)
β”‚ πŸ–οΈ Leave            β”‚  ← Special indicators
β”‚                      β”‚
β”‚ [Color Bar]          β”‚  ← Color-coded indicator
β”‚                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Dense Display (Less detail):

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    4    β”‚  ← Just date
β”‚ πŸ”΅ βœ…   β”‚  ← Icons only
β”‚ [β–ˆβ–ˆβ–ˆβ–ˆ]  β”‚  ← Color bar
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3.3 Header Controls

Top Bar Options:

[View Mode β–Ό] [Filter β–Ό] [Export β–Ό] [Print]
Control Options Purpose
View Mode Month / Week / Day Change calendar display
Filter Shifts, Leaves, OT, etc Show/hide event types
Export ICS, PDF, CSV Download calendar data
Print Print to printer Physical copy

3.4 Navigation Bar

Bottom Bar Navigation:

[β—€ Previous Month] [Today] [Next Month β–Ά]
Month: December 2025

Controls:

  • β—€ Previous - Go to previous month
  • Today - Jump to current month
  • Next β–Ά - Go to next month
  • Month Label - Click to jump to specific month

3.5 Legend (Key)

Shows what each color means:

CALENDAR LEGEND
═══════════════════════════════════════════

πŸ”΅ Blue   = Regular Shift Assigned
🟑 Yellow = Pending Approval (Shift/Leave/OT)
πŸ”΄ Red    = On Approved Leave
🟒 Green  = Checked In (Attendance)
⬜ Gray   = Off Day / Holiday
⭐ Star   = Company Event
πŸ“Œ Pin    = Shift Change Notification

4. Understanding Events

4.1 Event Types Displayed

1. Shifts (πŸ”΅ Blue)

Your assigned work shifts for the day.

Dec 4 (Wed)
πŸ”΅ Morning Shift (08:00 - 17:00)

Information Shown:

  • βœ“ Shift name
  • βœ“ Start time
  • βœ“ End time
  • βœ“ Duration (typically 9 hours with break)

Click to see:

  • Workplace location
  • Workstation assignment
  • Break times
  • Special requirements

2. Attendance Records (βœ… Green)

Days you've successfully checked in.

Dec 4 (Wed)
βœ… Checked In - 08:30 AM
βœ… Checked Out - 17:15 PM
Duration: 8h 45m
Status: APPROVED

Information Shown:

  • βœ“ Check-in time
  • βœ“ Check-out time
  • βœ“ Total duration worked
  • βœ“ Approval status
  • βœ“ Location verified

3. Leave (πŸ–οΈ Red)

Days you've taken approved leave.

Dec 10-11 (Tue-Wed)
πŸ–οΈ Sick Leave (2 days)
Approved by: Team Lead & HR

Information Shown:

  • βœ“ Leave type
  • βœ“ Date range
  • βœ“ Number of days
  • βœ“ Approval chain
  • βœ“ Leave balance impact

4. Overtime (⏰ Orange)

Overtime hours you've recorded.

Dec 5 (Fri)
⏰ Overtime: 2.5 hours
Reason: Project Deadline
Status: APPROVED

Information Shown:

  • βœ“ OT hours
  • βœ“ Reason for OT
  • βœ“ Approval status
  • βœ“ Approver name

5. Company Events (⭐ Star)

Company-wide announcements and events.

Dec 8 (Sun)
⭐ Company Foundation Day (Holiday)
All offices closed

Information Shown:

  • βœ“ Event name
  • βœ“ Event description
  • βœ“ Company-wide notice
  • βœ“ Impact on schedule

6. Holidays (⬜ Gray)

National and company holidays.

Dec 25 (Wed)
⬜ Christmas Holiday
Day off - No work required

Information Shown:

  • βœ“ Holiday name
  • βœ“ Holiday type (national/company)
  • βœ“ Whether it's a day off

7. Pending Approvals (🟑 Yellow)

Items waiting for approval.

Dec 20-27 (Fri-Fri)
🟑 Vacation Leave (5 days) - PENDING
Awaiting: Team Lead Review
Submitted: 2 days ago

Information Shown:

  • βœ“ Request type
  • βœ“ Pending status
  • βœ“ Next approver
  • βœ“ Days pending

5. Navigation & Filtering

5.1 Monthly Navigation

Move Between Months:

[β—€ Previous]               [Next β–Ά]
   Click to go to         Click to go to
   November 2025          January 2026

[Today]
Jump directly to current month
(December 2025)

Navigation Behavior:

  • Click Previous β†’ Goes back one month
  • Click Next β†’ Goes forward one month
  • Click Today β†’ Jumps to current date's month
  • Multiple clicks β†’ Can go back/forward multiple months

Timeline Example:

Oct 2025 β†’ Sep 2025 β†’ Aug 2025 ← (Previous)
Dec 2025 β†’ Jan 2026 β†’ Feb 2026 ← (Next)

5.2 View Mode Selection

Change How Calendar Displays:

[View Mode β–Ό]
  β”œβ”€ Month (Default)      ← See full month
  β”œβ”€ Week                 ← See single week
  └─ Day                  ← See single day

Month View

Shows entire month (28-31 days)
Each date cell shows multiple events
Good for: Planning ahead, seeing patterns

                DECEMBER 2025
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ Sun Mon Tue Wed Thu Fri Sat  β”‚
        β”‚               1   2          β”‚
        β”‚  3   4   5   6   7   8   9  β”‚
        β”‚ 10  11  12  13  14  15  16  β”‚
        β”‚ 17  18  19  20  21  22  23  β”‚
        β”‚ 24  25  26  27  28  29  30  β”‚
        β”‚ 31                           β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Week View

Shows single week (7 days)
More detail per day
Good for: Seeing hourly details, weekly planning

        WEEK OF DEC 1-7, 2025

Mon 1   Tue 2   Wed 3   Thu 4   Fri 5   Sat 6   Sun 7
─────────────────────────────────────────────────────
Morning Morning Morning Morning Morning OFF     OFF
08-17   08-17   08-17   08-17   08-17
βœ…      βœ…      βœ…      βœ…      ⏰OT
        Checked Checked Checked Pending
        In      In      In      +2.5h

Day View

Shows single day (24 hours)
Hourly breakdown
Good for: Seeing time details, shift specifics

        DECEMBER 4, 2025 (WEDNESDAY)

Time    Status          Details
─────────────────────────────────────
08:00   Morning Shift   Starts
08:30   βœ… Checked In   System verified
12:00   Break Time      1 hour break
13:00   Break Ends      Resume work
17:00   Shift Ends      Expected end
17:15   βœ… Checked Out  Shift complete
        Duration: 8h 45m

5.3 Filter Events

Show/Hide Specific Event Types:

[Filter β–Ό]
  β˜‘ Shifts              ← Checked = visible
  β˜‘ Attendance
  β˜‘ Leave
  β˜‘ Overtime
  β˜‘ Company Events
  β˜‘ Holidays
  ☐ Pending Approvals   ← Unchecked = hidden

Example - Hide Pending Items:

Before Filtering (All events shown):
────────────────────────────────────
Dec 20: 🟑 PENDING Vacation Leave
Dec 21: πŸ–οΈ Leave approved

After Filtering (Pending hidden):
────────────────────────────────────
Dec 20: [Hidden]
Dec 21: πŸ–οΈ Leave approved

Use Cases:

Filter When to Use
Shifts Only Planning work schedule
Attendance Only Reviewing work history
Leaves Only Managing time off
OT Only Tracking extra hours
No Pending Seeing finalized plans

5.4 Search & Jump

Jump to Specific Date:

[Go to Date] β–Ό
β”œβ”€ December 4 (Today)
β”œβ”€ December 25 (Christmas)
β”œβ”€ January 1, 2026 (New Year)
└─ [Custom Date...]

Select β†’ Calendar jumps to that date

6. Viewing Event Details

6.1 Click a Date to See Details

Step 1: Locate Date

Find the date you want to view on the calendar.

Step 2: Click the Date

Click on date cell β†’ Details modal opens

Step 3: Modal Opens

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        DECEMBER 4, 2025 (WEDNESDAY)    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                        β”‚
β”‚ SHIFT INFORMATION                      β”‚
β”‚ ─────────────────────────────────────  β”‚
β”‚ Shift:      Morning (08:00 - 17:00)   β”‚
β”‚ Workplace:  Main Office - 3rd Floor   β”‚
β”‚ Workstation: Desk 5-A                 β”‚
β”‚                                        β”‚
β”‚ ATTENDANCE RECORDS                     β”‚
β”‚ ─────────────────────────────────────  β”‚
β”‚ Check-In:    08:30 AM βœ…              β”‚
β”‚ Check-Out:   17:15 PM βœ…              β”‚
β”‚ Duration:    8h 45m                   β”‚
β”‚ Status:      APPROVED                 β”‚
β”‚ Location:    42.5m from office βœ…     β”‚
β”‚                                        β”‚
β”‚ OTHER EVENTS FOR THIS DAY              β”‚
β”‚ ─────────────────────────────────────  β”‚
β”‚ Team Standup: 10:00 AM (Meeting)      β”‚
β”‚ Client Call: 2:00 PM (Conference Rm)  β”‚
β”‚                                        β”‚
β”‚ [Edit] [Export] [Print] [Close]       β”‚
β”‚                                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

6.2 Information Displayed

Shift Details:

Shift Name:      Morning / Afternoon / Night
Start Time:      08:00 AM
End Time:        17:00 PM (5:00 PM)
Duration:        9 hours (includes 1 hour break)
Break Time:      12:00 PM - 1:00 PM
Workplace:       Office address
Workstation:     Your assigned desk

Attendance Details:

Check-In Time:   08:30 AM (timestamp)
Check-Out Time:  17:15 PM (timestamp)
Total Duration:  8 hours 45 minutes
Status:          APPROVED / REMOTE / PENDING
Location:        Distance from office (meters)
Verified By:     GPS / Manual / Admin

Leave Details:

Leave Type:      Sick / Vacation / Emergency
Date Range:      Start date - End date
Days Approved:   Number of days
Reason:          Why leave was requested
Approvers:       Team Lead name, HR name
Approval Date:   When it was approved
Balance Impact:  Days used / remaining

Overtime Details:

Date:            Which date OT was worked
Hours:           2.5 hours
Reason:          Why overtime was needed
Status:          APPROVED / PENDING / REJECTED
Approver:        Who approved it
Approval Date:   When it was approved

6.3 Actions from Details Modal

Edit (If Applicable):

[Edit] button appears if event is editable
  β”œβ”€ Pending leaves β†’ Can edit/cancel
  β”œβ”€ Pending OT β†’ Can withdraw
  └─ Future shifts β†’ Can request swap

Export:

[Export] β†’ Download as ICS file
β”œβ”€ Add to Google Calendar
β”œβ”€ Add to Outlook
β”œβ”€ Add to Apple Calendar
└─ Add to other calendar apps

Print:

[Print] β†’ Print event details
β”œβ”€ Prints with formatting
β”œβ”€ Includes timestamps
β”œβ”€ Professional format
└─ Good for records

Close:

[Close] β†’ Returns to calendar view
[X] button β†’ Also closes modal

7. Legend & Color Coding

7.1 Color System

The calendar uses 7 main colors to represent different event types:

1. Blue (πŸ”΅) - Regular Shifts

Color:   #3B82F6 (Azure Blue)
Meaning: Your assigned work shift
Example: Morning (08:00-17:00)

Calendar Cell:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 4            β”‚
β”‚ πŸ”΅ MORNING   β”‚
β”‚ 08:00-17:00  β”‚
β”‚ [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ]   β”‚  ← Blue bar
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2. Green (🟒) - Checked-In

Color:   #10B981 (Emerald Green)
Meaning: Successfully checked in for work
Example: βœ… Checked In - 08:30 AM

Calendar Cell:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 4            β”‚
β”‚ 🟒 CHECKED INβ”‚
β”‚ 08:30-17:15  β”‚
β”‚ [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ]   β”‚  ← Green bar
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3. Red (πŸ”΄) - On Leave

Color:   #EF4444 (Bright Red)
Meaning: Approved leave - no work
Example: Sick Leave (2 days)

Calendar Cell:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 10-11        β”‚
β”‚ πŸ”΄ LEAVE     β”‚
β”‚ Sick Leave   β”‚
β”‚ [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ]   β”‚  ← Red bar
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

4. Orange (🟠) - Overtime

Color:   #F97316 (Orange)
Meaning: Extra hours worked
Example: ⏰ 2.5 hours OT

Calendar Cell:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 5            β”‚
β”‚ 🟠 OVERTIME  β”‚
β”‚ +2.5 hours   β”‚
β”‚ [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ]   β”‚  ← Orange bar
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

5. Yellow (🟑) - Pending Approval

Color:   #FBBF24 (Amber Yellow)
Meaning: Awaiting approval decision
Example: Pending Leave Request

Calendar Cell:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 20           β”‚
β”‚ 🟑 PENDING   β”‚
β”‚ Leave Requestβ”‚
β”‚ [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ]   β”‚  ← Yellow bar
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

6. Gray (⬜) - Off Days / Holidays

Color:   #9CA3AF (Light Gray)
Meaning: Day off, no work
Example: Weekend, Company Holiday

Calendar Cell:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 7            β”‚
β”‚ ⬜ OFF DAY   β”‚
β”‚ Weekend      β”‚
β”‚ [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ]   β”‚  ← Gray bar
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

7. Star (⭐) - Company Events

Color:   #FBBF24 (Gold Yellow)
Meaning: Important company event
Example: ⭐ Company Founding Day

Calendar Cell:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 8            β”‚
β”‚ ⭐ EVENT     β”‚
β”‚ Founding Day β”‚
β”‚ [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ]   β”‚  ← Gold bar
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

7.2 Color Meaning Quick Reference

Color Meaning Action
πŸ”΅ Blue Shift assigned Work as scheduled
🟒 Green Checked in Record exists
πŸ”΄ Red On leave Rest day, no work
🟠 Orange Overtime worked Extra hours logged
🟑 Yellow Pending Awaiting decision
⬜ Gray Off/Holiday No work required
⭐ Gold Company event Important notice

7.3 Multiple Events on Same Day

If day has multiple event types:

Date cell shows all relevant colors:

Dec 4
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 4 (Wed)                  β”‚
β”‚                          β”‚
β”‚ πŸ”΅ Morning Shift 08-17   β”‚
β”‚ 🟒 Checked In 08:30-17:15β”‚
β”‚ ⏰ OT Pending +1.5h      β”‚
β”‚                          β”‚
β”‚ [πŸŸ’πŸ”΅πŸŸ ] Stacked bars   β”‚
β”‚                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

All colors visible in cell
Multiple bars show multiple events

8. Tips & Best Practices

8.1 Using Calendar Effectively

βœ… DO:

  1. Check Calendar Regularly

    Morning: Check today's shift & events
    Weekly: Review upcoming week
    Monthly: Plan the month ahead
  2. Export to Personal Calendar

    Export shifts to Google Calendar
    Get notifications on your phone
    Never miss a shift or deadline
  3. Track Attendance

    Review daily check-in records
    Ensure all days are properly recorded
    Report discrepancies early
  4. Plan Leave Early

    Check calendar for busy periods
    Request leave well in advance
    Avoid blackout dates
  5. Monitor Pending Items

    Keep eye on pending approvals
    Follow up if taking too long
    Resubmit if rejected

8.2 Best Practices

For Shift Management:

βœ… Check assigned shift before arriving
βœ… Note shift changes (yellow indicators)
βœ… Plan travel time based on shift start
❌ Don't assume same shift every day

For Leave Planning:

βœ… Plan ahead (submit 2+ weeks early)
βœ… Check leave balance before requesting
βœ… Mark calendar when approved
❌ Don't submit at last minute

For Overtime:

βœ… Document reason for overtime
βœ… Request approval same day if possible
βœ… Keep records of extra work
❌ Don't assume OT is automatically approved

For Attendance:

βœ… Check in before shift start
βœ… Verify check-out at shift end
βœ… Report issues to Team Lead
❌ Don't rely on memory for times

8.3 Calendar Shortcuts

Keyboard Shortcuts:

Shortcut Action
← β†’ Previous/Next month
T Jump to today
M Switch to month view
W Switch to week view
D Switch to day view
P Print calendar
E Export calendar
? Show help

9. Troubleshooting

Issue 1: "Calendar Not Loading"

Symptom: Blank calendar or loading spinner stuck

Solutions:

  1. Wait 5-10 seconds for load to complete
  2. Refresh page (F5 or Ctrl+R)
  3. Clear browser cache
  4. Try different browser
  5. Check internet connection
  6. Contact IT if persists

Issue 2: "Events Not Showing"

Symptom: Expected events don't appear on calendar

Solutions:

  1. Check filter settings
    [Filter β–Ό] β†’ Make sure event type is β˜‘ checked
  2. Verify date range
    Are you looking in correct month?
    [β—€ Previous] or [Next β–Ά] to navigate
  3. Refresh calendar
    F5 or [Refresh] button
  4. Check event status
    Pending events may be filtered out

Issue 3: "Wrong Color for Event"

Symptom: Event shows unexpected color

Solutions:

  1. Check event status
    Click date to see full details
    Status determines color
  2. Verify event type
    Look at legend to confirm meaning
  3. Check filter
    Event might be from different category

Issue 4: "Cannot Export Calendar"

Symptom: Export button doesn't work

Solutions:

  1. Check browser
    Use Chrome, Firefox, or Safari
    Older IE may not support export
  2. Check file access
    Browser may need permission to download
    Check popup blocker
    Allow downloads
  3. Try different format
    If PDF fails, try ICS or CSV
  4. Check disk space
    Ensure device has storage space

Issue 5: "Mobile Calendar Issues"

Symptom: Calendar doesn't work well on phone

Solutions:

  1. Rotate device to landscape
    More readable in landscape mode
  2. Use mobile-optimized view
    Some features work better on desktop
  3. Try responsive design
    Try pinch-zoom to see details
  4. Use calendar app instead
    Export to Google Calendar for mobile
    Get native app experience

FAQ

Q: Can I share my calendar with manager?
A: Yes, export and share the ICS file or screenshot with your Team Lead.

Q: How far back does calendar show history?
A: Shows past 1 year and future 1 year by default. Contact IT for extended history.

Q: Can I sync with Outlook or Google Calendar?
A: Yes! Export as ICS file and import into your calendar app.

Q: Why is some event data missing?
A: Old records may be archived. Contact HR for historical data.

Q: Can I print multiple months at once?
A: Yes, select month range then print. Or export to PDF first.

Q: How often does calendar update?
A: Real-time. Changes appear within seconds of approval.

Q: Can I set calendar reminders?
A: Yes, export to Google Calendar which has built-in reminders.

Q: What if shift is wrong on calendar?
A: Contact HR or Team Lead to correct the assignment.


END OF USER GUIDE - PART 1


PART 2: DEVELOPER GUIDE - Employee Calendar


Table of Contents


1. Architecture Overview

1.1 Component Stack

CalendarController
    β”œβ”€β”€ ShiftServices
    β”œβ”€β”€ LeaveRequestServices
    β”œβ”€β”€ OvertimeServices
    β”œβ”€β”€ AttendanceRecordServices
    β”œβ”€β”€ HolidayServices
    └── CompanyEventServices
        ↓
    view('users.employee.calendar.index')
        β”œβ”€β”€ Blade Template
        β”œβ”€β”€ Alpine.js Components
        β”œβ”€β”€ Calendar Library (FullCalendar/Similar)
        └── Event Rendering
            β”œβ”€β”€ Shift Events
            β”œβ”€β”€ Attendance Events
            β”œβ”€β”€ Leave Events
            β”œβ”€β”€ Overtime Events
            β”œβ”€β”€ Holiday Events
            └── Company Event

1.2 Data Flow

User Visits: /employee/calendar
    ↓
CalendarController@index
    β”œβ”€ Get all shifts for user
    β”œβ”€ Get all attendance records
    β”œβ”€ Get all leave requests
    β”œβ”€ Get all overtime requests
    β”œβ”€ Get all holidays
    └─ Get all company events
    ↓
Process & Format Data
    └─ Convert to calendar events
        β”œβ”€ Add color coding
        β”œβ”€ Add click handlers
        β”œβ”€ Add metadata
        └─ Format dates
    ↓
Pass to Blade View
    └─ JSON-encoded events array
    ↓
Alpine.js / Calendar Library
    β”œβ”€ Render events on calendar
    β”œβ”€ Add interactivity
    β”œβ”€ Handle clicks
    └─ Manage filters
    ↓
User Interaction
    β”œβ”€ Click date β†’ Show details modal
    β”œβ”€ Filter β†’ Update displayed events
    β”œβ”€ Export β†’ Generate ICS file
    └─ Print β†’ Print calendar

2. Controller Implementation

2.1 CalendarController

File: app/Http/Controllers/Web/Employee/CalendarController.php

Method: index()

public function index(
    ShiftServices $shiftServices,
    AttendanceRecordServices $attendanceServices,
    LeaveRequestServices $leaveServices,
    OvertimeServices $overtimeServices,
    HolidayServices $holidayServices,
    CompanyEventServices $eventServices
) {
    $userId = auth()->user()->id;

    // Get all events
    $shifts = $shiftServices->getUserShifts($userId);
    $attendances = $attendanceServices->getRecords($userId);
    $leaves = $leaveServices->getApprovedLeaves($userId);
    $overtimes = $overtimeServices->getApprovedOvertimes($userId);
    $holidays = $holidayServices->getHolidays();
    $events = $eventServices->getCompanyEvents();

    // Format for calendar
    $calendarEvents = $this->formatCalendarEvents([
        'shifts' => $shifts,
        'attendances' => $attendances,
        'leaves' => $leaves,
        'overtimes' => $overtimes,
        'holidays' => $holidays,
        'events' => $events
    ]);

    return view('users.employee.calendar.index', [
        'events' => json_encode($calendarEvents),
        'userId' => $userId
    ]);
}

private function formatCalendarEvents($data)
{
    $events = [];

    // Format shifts as blue events
    foreach ($data['shifts'] as $shift) {
        $events[] = [
            'id' => 'shift-' . $shift->id,
            'title' => $shift->shift->name . ' (' .
                       $shift->shift->time_started . '-' .
                       $shift->shift->time_ended . ')',
            'start' => $shift->date,
            'color' => '#3B82F6', // Blue
            'type' => 'shift',
            'extendedProps' => [
                'workplace' => $shift->workplace->name,
                'workstation' => $shift->workstation->name,
                'duration' => $shift->shift->duration
            ]
        ];
    }

    // Format attendances as green events
    foreach ($data['attendances'] as $attendance) {
        $events[] = [
            'id' => 'attendance-' . $attendance->id,
            'title' => 'βœ… Checked In - ' .
                      $attendance->clock_in->format('H:i A'),
            'start' => $attendance->clock_in->format('Y-m-d'),
            'color' => '#10B981', // Green
            'type' => 'attendance',
            'extendedProps' => [
                'clockIn' => $attendance->clock_in,
                'clockOut' => $attendance->clock_out,
                'duration' => $attendance->duration_minutes,
                'status' => $attendance->status
            ]
        ];
    }

    // Format leaves as red events
    foreach ($data['leaves'] as $leave) {
        $events[] = [
            'id' => 'leave-' . $leave->id,
            'title' => 'πŸ–οΈ ' . $leave->leave_type->name .
                      ' (' . $leave->days . ' days)',
            'start' => $leave->start_date,
            'end' => $leave->end_date->addDay(),
            'color' => '#EF4444', // Red
            'type' => 'leave',
            'extendedProps' => [
                'leaveType' => $leave->leave_type->name,
                'days' => $leave->days,
                'reason' => $leave->reason
            ]
        ];
    }

    // Format overtimes as orange events
    foreach ($data['overtimes'] as $overtime) {
        $events[] = [
            'id' => 'overtime-' . $overtime->id,
            'title' => '⏰ OT: ' . $overtime->hours . ' hours',
            'start' => $overtime->date,
            'color' => '#F97316', // Orange
            'type' => 'overtime',
            'extendedProps' => [
                'hours' => $overtime->hours,
                'reason' => $overtime->reason,
                'status' => $overtime->status
            ]
        ];
    }

    // Format holidays as gray events
    foreach ($data['holidays'] as $holiday) {
        $events[] = [
            'id' => 'holiday-' . $holiday->id,
            'title' => '⬜ ' . $holiday->name,
            'start' => $holiday->date,
            'color' => '#9CA3AF', // Gray
            'type' => 'holiday',
            'extendedProps' => [
                'description' => $holiday->description
            ]
        ];
    }

    // Format company events as gold events
    foreach ($data['events'] as $event) {
        $events[] = [
            'id' => 'event-' . $event->id,
            'title' => '⭐ ' . $event->title,
            'start' => $event->start_date,
            'end' => $event->end_date,
            'color' => '#FBBF24', // Gold
            'type' => 'event',
            'extendedProps' => [
                'description' => $event->description,
                'location' => $event->location
            ]
        ];
    }

    return $events;
}

2.2 Service Classes

class ShiftServices
{
    public function getUserShifts($userId, $startDate = null, $endDate = null)
    {
        return UserShift::where('user_id', $userId)
            ->whereBetween('date', [$startDate, $endDate])
            ->with(['shift', 'workplace', 'workstation'])
            ->get();
    }
}

class AttendanceRecordServices
{
    public function getRecords($userId, $year = null)
    {
        $year = $year ?? now()->year;

        return AttendanceRecord::where('user_id', $userId)
            ->whereYear('clock_in', $year)
            ->get();
    }
}

class LeaveRequestServices
{
    public function getApprovedLeaves($userId)
    {
        return LeaveRequest::where('user_id', $userId)
            ->where('status', 'APPROVED')
            ->with('leave_type')
            ->get();
    }
}

3. Blade Template Structure

3.1 Calendar Markup

File: resources/views/users/employee/calendar/index.blade.php

<x-employee-layout>
    <div class="container-fluid p-4">

        <!-- Header Controls -->
        <div class="flex justify-between items-center mb-4">
            <h1 class="text-3xl font-bold">My Calendar</h1>

            <div class="flex gap-2">
                <!-- View Mode -->
                <select @change="changeViewMode" class="select select-sm">
                    <option value="dayGridMonth">Month</option>
                    <option value="timeGridWeek">Week</option>
                    <option value="timeGridDay">Day</option>
                </select>

                <!-- Filter -->
                <button @click="showFilter = !showFilter" class="btn btn-sm">
                    Filter
                </button>

                <!-- Export -->
                <button @click="exportCalendar" class="btn btn-sm">
                    Export
                </button>

                <!-- Print -->
                <button @click="window.print()" class="btn btn-sm">
                    Print
                </button>
            </div>
        </div>

        <!-- Filter Panel -->
        <div x-show="showFilter" class="mb-4 p-4 bg-base-200 rounded">
            <label class="flex items-center gap-2">
                <input type="checkbox"
                    @change="toggleFilter('shift')"
                    :checked="filters.shift" />
                <span>Shifts</span>
            </label>
            <label class="flex items-center gap-2">
                <input type="checkbox"
                    @change="toggleFilter('attendance')"
                    :checked="filters.attendance" />
                <span>Attendance</span>
            </label>
            <label class="flex items-center gap-2">
                <input type="checkbox"
                    @change="toggleFilter('leave')"
                    :checked="filters.leave" />
                <span>Leaves</span>
            </label>
            <label class="flex items-center gap-2">
                <input type="checkbox"
                    @change="toggleFilter('overtime')"
                    :checked="filters.overtime" />
                <span>Overtime</span>
            </label>
            <label class="flex items-center gap-2">
                <input type="checkbox"
                    @change="toggleFilter('holiday')"
                    :checked="filters.holiday" />
                <span>Holidays</span>
            </label>
            <label class="flex items-center gap-2">
                <input type="checkbox"
                    @change="toggleFilter('event')"
                    :checked="filters.event" />
                <span>Company Events</span>
            </label>
        </div>

        <!-- Calendar Container -->
        <div id="calendar"></div>

        <!-- Legend -->
        <div class="mt-4 p-4 bg-base-200 rounded">
            <h3 class="font-bold mb-2">Legend</h3>
            <div class="grid grid-cols-3 gap-4">
                <div class="flex items-center gap-2">
                    <div class="w-4 h-4 bg-blue-500"></div>
                    <span>Shift</span>
                </div>
                <div class="flex items-center gap-2">
                    <div class="w-4 h-4 bg-green-500"></div>
                    <span>Checked In</span>
                </div>
                <div class="flex items-center gap-2">
                    <div class="w-4 h-4 bg-red-500"></div>
                    <span>Leave</span>
                </div>
                <div class="flex items-center gap-2">
                    <div class="w-4 h-4 bg-orange-500"></div>
                    <span>Overtime</span>
                </div>
                <div class="flex items-center gap-2">
                    <div class="w-4 h-4 bg-yellow-500"></div>
                    <span>Pending</span>
                </div>
                <div class="flex items-center gap-2">
                    <div class="w-4 h-4 bg-gray-500"></div>
                    <span>Holiday</span>
                </div>
            </div>
        </div>
    </div>

    <!-- Event Details Modal -->
    <div id="eventModal" class="modal">
        <div class="modal-box">
            <h3 id="eventTitle" class="font-bold text-lg"></h3>
            <div id="eventDetails" class="py-4"></div>
            <div class="modal-action">
                <button class="btn" onclick="eventModal.close()">Close</button>
                <button class="btn btn-primary" onclick="editEvent()">Edit</button>
            </div>
        </div>
    </div>

    @push('scripts')
    <script>
        const events = @json($events);

        document.addEventListener('DOMContentLoaded', function() {
            initializeCalendar(events);
        });
    </script>
    @endpush
</x-employee-layout>

4. Calendar Engine Integration

4.1 FullCalendar.js Implementation

function initializeCalendar(events) {
    const calendarEl = document.getElementById("calendar");

    const calendar = new FullCalendar.Calendar(calendarEl, {
        initialView: "dayGridMonth",
        headerToolbar: {
            left: "prev,next today",
            center: "title",
            right: "dayGridMonth,timeGridWeek,timeGridDay",
        },
        events: events,
        eventClick: handleEventClick,
        datesSet: handleDatesSet,
        eventClassNames: getEventClasses,
        height: "auto",
    });

    calendar.render();
}

function handleEventClick(info) {
    const event = info.event;
    displayEventModal(event);
}

function getEventClasses(info) {
    return ["event-" + info.event.extendedProps.type];
}

function displayEventModal(event) {
    document.getElementById("eventTitle").textContent = event.title;
    document.getElementById("eventDetails").innerHTML =
        formatEventDetails(event);
    document.getElementById("eventModal").showModal();
}

function formatEventDetails(event) {
    const props = event.extendedProps;

    switch (props.type) {
        case "shift":
            return `
                <p><strong>Workplace:</strong> ${props.workplace}</p>
                <p><strong>Workstation:</strong> ${props.workstation}</p>
                <p><strong>Duration:</strong> ${props.duration}</p>
            `;
        case "attendance":
            return `
                <p><strong>Clock In:</strong> ${props.clockIn}</p>
                <p><strong>Clock Out:</strong> ${props.clockOut}</p>
                <p><strong>Duration:</strong> ${props.duration}</p>
                <p><strong>Status:</strong> ${props.status}</p>
            `;
        // ... other types
    }
}

5. Data Models & Relationships

5.1 Key Models

// UserShift model
class UserShift extends Model
{
    protected $dates = ['date'];

    public function shift() {
        return $this->belongsTo(Shift::class);
    }

    public function workplace() {
        return $this->belongsTo(WorkPlace::class);
    }

    public function workstation() {
        return $this->belongsTo(WorkStation::class);
    }
}

// AttendanceRecord model
class AttendanceRecord extends Model
{
    protected $dates = ['clock_in', 'clock_out'];

    public function getDurationMinutesAttribute()
    {
        return $this->clock_in->diffInMinutes($this->clock_out);
    }
}

// LeaveRequest model
class LeaveRequest extends Model
{
    public function leave_type() {
        return $this->belongsTo(LeaveType::class);
    }

    public function getDaysAttribute()
    {
        return $this->start_date->diffInDays($this->end_date);
    }
}

6. API Endpoints

6.1 Get Calendar Events

Endpoint: GET /api/v1/calendar/events

Parameters:

startDate: 2025-12-01
endDate: 2025-12-31
filters: shift,attendance,leave,overtime

Response:

{
    "events": [
        {
            "id": "shift-1",
            "title": "Morning (08:00-17:00)",
            "start": "2025-12-04",
            "color": "/docs/1.0/employee/calendar#3B82F6",
            "type": "shift"
        }
    ]
}

7. Export Functionality

7.1 Export as ICS

public function exportICS()
{
    $events = $this->formatCalendarEvents([...]);

    $ics = new ICal('DTR Calendar');

    foreach ($events as $event) {
        $ics->addEvent([
            'title' => $event['title'],
            'description' => json_encode($event['extendedProps']),
            'dtstart' => $event['start'],
            'dtend' => $event['end'] ?? $event['start'],
            'categories' => $event['type']
        ]);
    }

    return response($ics->get())
        ->header('Content-Type', 'text/calendar')
        ->header('Content-Disposition', 'attachment; filename="dtr-calendar.ics"');
}

Documentation Version: 1.0
Last Updated: December 4, 2025
Status: βœ… Complete