Employee Attendance Documentation

Part 1: USER GUIDE - Attendance


Table of Contents


1. Overview

The Attendance Module is your complete record of all your work attendance, check-in/out times, and daily work hours.

What You Can Do

✅ View all daily attendance records
✅ See check-in and check-out times
✅ Track total hours worked
✅ View approval status
✅ Export records for payroll
✅ Filter by date range
✅ Search specific dates

Attendance Record Components

┌────────────────────────────────────────┐
│        ATTENDANCE RECORD                │
├────────────────────────────────────────┤
│                                        │
│ Date:         December 4, 2025         │
│ Day:          Wednesday                │
│                                        │
│ Shift:        Morning (08:00 - 17:00)  │
│ Check-In:     08:30 AM ✅              │
│ Check-Out:    17:15 PM ✅              │
│                                        │
│ Total Hours:  8 hours 45 minutes       │
│ Break Time:   1 hour (deducted)        │
│                                        │
│ Workplace:    Main Office - 3rd Floor  │
│ Workstation:  Desk 5-A                 │
│                                        │
│ Status:       APPROVED ✅              │
│ Verified By:  GPS Location             │
│                                        │
└────────────────────────────────────────┘

2. Accessing Attendance

2.1 Ways to Access

Option 1: From Dashboard

Dashboard → Left Menu → Attendance
    ↓
Attendance List Opens

Option 2: Direct URL

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

Option 3: From Navigation

Top Menu → Employee → Attendance
    ↓
Attendance Page Opens

2.2 Page Load

First time opening attendance page:

┌──────────────────────────────────┐
│  Loading Attendance Records...   │
│                                  │
│  ⏳ Fetching your records         │
│  ⏳ Processing data               │
│  ⏳ Generating summary            │
│                                  │
│  [Please wait]                   │
│                                  │
└──────────────────────────────────┘

Typical load time: 2-5 seconds


3. Attendance Records

3.1 Records List View

┌──────────────────────────────────────────────────────────────┐
│                ATTENDANCE RECORDS                            │
├──────────────────────────────────────────────────────────────┤
│                                                              │
│ [Date Range: Dec 1 - Dec 31, 2025] [Filter] [Export]       │
│                                                              │
│ ┌────────────────────────────────────────────────────────┐  │
│ │ Date     │ Shift    │ Check-In │ Check-Out │ Hours │ St│  │
│ ├────────────────────────────────────────────────────────┤  │
│ │ Dec 4    │ Morning  │ 08:30 AM │ 17:15 PM  │ 8:45  │ ✅ │  │
│ │ Dec 3    │ Morning  │ 08:15 AM │ 17:00 PM  │ 8:45  │ ✅ │  │
│ │ Dec 2    │ Afternoon│ 14:30 PM │ 23:00 PM  │ 8:30  │ ✅ │  │
│ │ Dec 1    │ Morning  │ 08:45 AM │ 17:30 PM  │ 8:45  │ ✅ │  │
│ │ Nov 30   │ OFF DAY  │    -     │    -      │  -    │ -  │  │
│ │ Nov 29   │ Night    │ 23:15 PM │ 08:00 AM  │ 8:45  │ ✅ │  │
│ │          │ (next)   │          │           │       │    │  │
│ │ ...      │ ...      │ ...      │ ...       │ ...   │... │  │
│ └────────────────────────────────────────────────────────┘  │
│                                                              │
│ [Previous Page] [1] [2] [3] [Next Page]                     │
│                                                              │
│ Total Records: 25 | Showing: 1-10 per page                 │
│                                                              │
└──────────────────────────────────────────────────────────────┘

3.2 Column Descriptions

Column What it Shows Example
Date Work date Dec 4, 2025
Shift Assigned shift Morning (08:00-17:00)
Check-In Time you arrived 08:30 AM
Check-Out Time you left 17:15 PM
Hours Total hours worked 8:45 (8 hours 45 min)
Status Approval status ✅ APPROVED

3.3 Status Indicators

Status Meaning Action
APPROVED Record confirmed No action needed
🟡 PENDING Awaiting approval Check back later
⚠️ LATE Checked in after shift May affect pay
🔴 ABSENT No check-in Contact Team Lead
📍 REMOTE Work from home Location verified

3.4 Record Details

Click any record to see full details:

┌──────────────────────────────────────┐
│      DECEMBER 4, 2025 - WEDNESDAY    │
├──────────────────────────────────────┤
│                                      │
│ SHIFT INFORMATION                    │
│ ─────────────────────────────────    │
│ Shift:       Morning (08:00-17:00)   │
│ Workplace:   Main Office - 3rd Flr   │
│ Workstation: Desk 5-A                │
│                                      │
│ ATTENDANCE DETAILS                   │
│ ─────────────────────────────────    │
│ Check-In:    08:30:15 AM ✅          │
│ Check-Out:   17:15:42 PM ✅          │
│ Total Time:  8 hours 45 minutes      │
│ Break Time:  1 hour (deducted)       │
│ Work Hours:  7 hours 45 minutes      │
│                                      │
│ LOCATION VERIFICATION                │
│ ─────────────────────────────────    │
│ GPS Distance: 42.5 meters            │
│ Location Verified: ✅                 │
│ Verification Method: GPS              │
│                                      │
│ APPROVAL STATUS                      │
│ ─────────────────────────────────    │
│ Status:      APPROVED                │
│ Approved By: System Auto             │
│ Approval Date: Dec 4, 2025           │
│                                      │
│ [Print] [Export] [Close]             │
│                                      │
└──────────────────────────────────────┘

4. Viewing Details

4.1 Click Record to Expand

Step 1: Click any attendance record row

Dec 4 | Morning | 08:30 AM | 17:15 PM | 8:45 | ✅
  ↓ Click

Step 2: Details Modal Opens

Full details of that day's attendance display in a modal dialog.

4.2 Information Available

Work Time Details:

Check-In Time:      08:30:15 AM (exact timestamp)
Check-Out Time:     17:15:42 PM (exact timestamp)
Total Duration:     8 hours 45 minutes 27 seconds
Break Deducted:     1 hour (standard break)
Net Work Hours:     7 hours 45 minutes
Overtime Hours:     1 hour 45 minutes (if any)

Location Details:

Workplace:          Main Office - 3rd Floor
Workstation:        Desk 5-A
GPS Accuracy:       ±5 meters
Distance from HQ:   42.5 meters
Location Status:    ✅ Within office premises

Approval Information:

Current Status:     APPROVED
Approved Date:      Dec 4, 2025
Approved By:        Automated System
Final Approver:     System (within policy)

5. Filtering & Searching

5.1 Filter by Date Range

Step 1: Click Date Range Selector

[Date Range: Dec 1 - Dec 31, 2025] ▼

Step 2: Select Date Range

┌──────────────────────────────────┐
│     SELECT DATE RANGE             │
├──────────────────────────────────┤
│                                  │
│ From Date: [12/01/2025] ▼       │
│ To Date:   [12/31/2025] ▼       │
│                                  │
│ Quick Select:                    │
│ ☐ This Month                     │
│ ☐ Last Month                     │
│ ☐ Last 3 Months                  │
│ ☐ Last 6 Months                  │
│ ☐ This Year                      │
│                                  │
│ [Apply] [Cancel]                 │
│                                  │
└──────────────────────────────────┘

Step 3: Records Update

Calendar filters to show only records in selected date range.

5.2 Filter by Status

Available Filters:

[Status Filter ▼]
  ☑ Approved
  ☑ Pending
  ☑ Late Arrivals
  ☐ Absences
  ☐ Remote Work

Example:

Before: Show 25 records
After filtering (show only "Approved"):
Show 23 records (2 pending hidden)

5.3 Search Records

Search by Date:

[Search Date] 🔍
Enter: Dec 4, 2025
    ↓
Shows only December 4 record

5.4 Sort Records

Sort by Column:

Click on column header to sort:

Date ▲        - Newest first
Check-In ▼    - Earliest time first
Hours ▲       - Most hours first
Status        - Approved first

6. Reports & Export

6.1 Export Records

Step 1: Click Export Button

[Export ▼]
  ├─ PDF Report
  ├─ Excel (CSV)
  ├─ Print
  └─ Email Summary

6.2 Export as PDF

Step 1: Click "PDF Report"

[Export] → [PDF Report]
    ↓
PDF Processing...

Step 2: PDF Generated

Attendance Report - December 2025
Company: [Your Company]
Employee: Juan Dela Cruz
ID: EMP-005

Date     Shift    In      Out    Hours  Status
Dec 4    Morning  08:30   17:15  8:45   ✅
Dec 3    Morning  08:15   17:00  8:45   ✅
...

Summary:
Total Working Days: 22
Total Hours: 176.5
Average Hours/Day: 8.02

Step 3: Download PDF

File saves as: attendance_Dec_2025.pdf

6.3 Export as Excel

Step 1: Click "Excel (CSV)"

[Export] → [Excel (CSV)]
    ↓
Excel File Generated

Step 2: Open in Excel

Spreadsheet Format:
┌──────┬─────────┬──────────┬──────────┬───────┬────────┐
│ Date │  Shift  │ Check-In │ Check-Out│ Hours │ Status │
├──────┼─────────┼──────────┼──────────┼───────┼────────┤
│ 4-Dec│ Morning │ 08:30 AM │ 17:15 PM │ 8:45  │ APPR   │
│ 3-Dec│ Morning │ 08:15 AM │ 17:00 PM │ 8:45  │ APPR   │
└──────┴─────────┴──────────┴──────────┴───────┴────────┘

Can edit in Excel and use for payroll, reports, analysis

6.4 Print Records

Step 1: Click Print

[Export] → [Print]
    ↓
Print dialog opens

Step 2: Configure Print

Printer: [Default Printer ▼]
Pages: [All v] or [1-5]
Paper Size: A4
Orientation: Portrait ○ Landscape ●

Step 3: Print

[Print] button
    ↓
Printer starts printing

7. Troubleshooting

Issue 1: "Missing Attendance Record"

Symptom: Expected record not in list

Solutions:

  1. Check date range filter
    Is the date within selected range?
    Adjust filter to see more dates
  2. Check status filter
    Is record pending? Filter may hide it
    Uncheck filters to see all
  3. Verify check-in was completed
    Records only appear after check-out
    Wait for end of shift

Issue 2: "Incorrect Check-In Time"

Symptom: Timestamp doesn't match when you arrived

Solutions:

  1. Check system time
    Device time may be wrong
    Verify your phone/computer time
  2. Check location
    Were you inside office premises?
    GPS may not lock outside
  3. Report to Team Lead
    Contact: manager@company.com
    Provide: Date and correct time
    May need manual adjustment

Issue 3: "Cannot Export"

Symptom: Export button doesn't work

Solutions:

  1. Try different format
    If PDF fails, try Excel
    If Excel fails, try Print
  2. Check permissions
    Ensure you have export rights
    Contact IT if restricted
  3. Check file size
    Large exports may take time
    Wait 30+ seconds

FAQ

Q: How long does it take for records to appear?
A: Immediately after check-out. Records are real-time.

Q: Can I see previous years' attendance?
A: Yes, set date range to past year. Usually available for 3 years.

Q: What if I forgot to check out?
A: Contact your Team Lead or HR to manually close the record.

Q: Are my attendance records private?
A: Yes, visible only to you and authorized managers.

Q: Can I edit my attendance record?
A: No, records are immutable after approval. Request adjustment via Team Lead.

Q: What time zone is used for records?
A: Company time zone (usually UTC+8).


END OF USER GUIDE - ATTENDANCE


PART 2: DEVELOPER GUIDE - Attendance

Architecture

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

public function index(AttendanceRecordServices $services)
{
    $userId = auth()->user()->id;

    // Get paginated attendance records
    $attendances = $services->getRecords(
        $userId,
        request('start_date'),
        request('end_date'),
        request('status')
    );

    return view('users.employee.attendance.index', [
        'attendances' => $attendances,
        'summary' => $services->getSummary($userId)
    ]);
}

public function show(AttendanceRecord $attendance)
{
    $this->authorize('view', $attendance);

    return view('users.employee.attendance.show', [
        'attendance' => $attendance->load(['shift', 'workplace', 'workstation'])
    ]);
}

Database Query

SELECT * FROM attendance_records
WHERE user_id = ?
  AND clock_in >= ?
  AND clock_in <= ?
ORDER BY clock_in DESC

Blade Template

@foreach ($attendances as $record)
    <tr @click="showDetails('{{ $record->id }}')">
        <td>{{ $record->clock_in->format('M d, Y') }}</td>
        <td>{{ $record->shift->name }}</td>
        <td>{{ $record->clock_in->format('h:i A') }}</td>
        <td>{{ $record->clock_out->format('h:i A') }}</td>
        <td>{{ intdiv($record->duration_minutes, 60) }}:{{ str_pad($record->duration_minutes % 60, 2, '0', STR_PAD_LEFT) }}</td>
        <td><span class="badge badge-success">{{ $record->status }}</span></td>
    </tr>
@endforeach

Documentation Version: 1.0
Last Updated: December 4, 2025