The API endpoint for the `getAttendance` method is: `GET /api/dashboard/attendance` Here are the parameters you can use: 1. **`id_user`** (Required) * **Description:** The ID of the user (employee) whose attendance records you want to fetch. * **Type:** Integer * **Example:** `?id_user=123` 2. **`start_date`** (Optional) * **Description:** The start date for filtering attendance records. * **Type:** String (format: `YYYY-MM-DD`) * **Example:** `?start_date=2025-10-01` * **Note:** This parameter is ignored if `status_punch` is provided. 3. **`end_date`** (Optional) * **Description:** The end date for filtering attendance records. * **Type:** String (format: `YYYY-MM-DD`) * **Example:** `?end_date=2025-10-31` * **Note:** This parameter is ignored if `status_punch` is provided. 4. **`status_punch`** (Optional) * **Description:** Filters attendance records based on their calculated punch status. If this parameter is provided, the query will automatically filter for **today's date only**, ignoring `start_date` and `end_date`. * **Type:** String * **Allowed Values:** * `'punch_in'`: Returns today's attendance record if the status is 'punch_in' or 'completed'. * `'punch_out'`: Returns today's attendance record if the status is 'punch_out'. * `'overtime'`: Returns today's attendance record if the status is 'overtime'. * **Example:** `?status_punch=punch_in` --- **Example API Calls:** * **Get all attendance for user 123 for the current month (default date range):** `GET /api/dashboard/attendance?id_user=123` * **Get all attendance for user 123 between October 1st and October 15th, 2025:** `GET /api/dashboard/attendance?id_user=123&start_date=2025-10-01&end_date=2025-10-15` * **Get today's attendance for user 123 where the status is 'punch_in' (or 'completed'):** `GET /api/dashboard/attendance?id_user=123&status_punch=punch_in` * **Get today's attendance for user 123 where the status is 'punch_out':** `GET /api/dashboard/attendance?id_user=123&status_punch=punch_out` * **Get today's attendance for user 123 where the status is 'overtime':** `GET /api/dashboard/attendance?id_user=123&status_punch=overtime`