# Timeclock Entry

### Overview

The **TimeClock Entry** module enables users to record, manage, and monitor working time within the system. It provides controlled clock-in and clock-out functionality with role-based access, dynamic locking, and validation safeguards to maintain accurate time tracking.

The module is designed to support both individual time logging and administrative oversight. Regular users can manage their own entries within defined restrictions, while Time Managers and XAdmins have broader visibility and control across users.

The locking mechanism operates dynamically based on the configured system setting, ensuring that historical entries remain protected without requiring background jobs or schedulers.

### Key Features and Functionality

#### 1. Role-Based Access Control

* The module behavior changes based on user role:
  * Regular Users can clock in/out for themselves and edit their own entries until they are locked.
  * ​Time Managers can view, edit, delete, and clock out entries for any user within the same website.
  * XAdmins have global control across all websites.
* Access to administrative functionality is controlled via the **“Is Time Manager?”** toggle in the User module.

#### 2. Dual Tab Structure (My & Admin)

* The module is divided into two operational tabs:
  * **My Tab** – Visible to all users for managing personal entries.
  * **Admin Tab** – Visible only to Time Managers and XAdmins for managing all user entries.

#### 3. Clock In / Clock Out State Management

* Users can clock in using a single action button. Upon successful clock-in:
  * The **Clock In** button dynamically changes to **Clock Out**.
  * The new entry appears at the top of the table.
  * The system ensures only one open entry exists per user.
* If an entry is active, **Clock Out** becomes the available action.

#### 4. Dynamic Locking Logic

* Entries are automatically considered locked after 1 hour.
* Once locked:
  * Regular users cannot edit or delete the entry.
  * Regular users cannot clock out the entry.
  * Time Managers and XAdmins can override the lock.

#### 5. Cross-Date Handling

* If a shift spans across two dates (e.g., 10:00 PM to 6:00 AM next day), the entry intelligently appears in both date filters:
  * When filtering by the Clock In date
  * When filtering by the Clock Out date


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xorosoft.com/xoroerp-1/admin/timeclock-entry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
