Documentation Index
Fetch the complete documentation index at: https://mintlify.com/EdgarJr30/proyecto-de-grado-cms/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Technicians (referred to as Assignees in the codebase) are individuals who can be assigned to work orders and maintenance tasks. Unlike users, technicians are not necessarily system users and may include external contractors or third-party service providers.Managing technicians requires
assignees:full_access. Viewing technicians only requires assignees:read.Assignee vs. User
| Aspect | User | Assignee (Technician) |
|---|---|---|
| System login | Yes | Optional |
| Has permissions | Yes (via role) | No |
| Can be assigned to work orders | Yes (if linked) | Yes |
| Location assignment | Yes | No (at work order level) |
| Typical use | Internal staff | Technicians, contractors, vendors |
user_id field. This allows system users to also function as assignees.
Assignee Data Model
| Field | Type | Description |
|---|---|---|
id | Integer | Unique assignee identifier |
name | String | First name |
last_name | String | Last name |
section | Enum | Assignee category (see below) |
email | String | Optional contact email |
phone | String | Optional contact phone |
user_id | UUID | Optional link to a user account |
is_active | Boolean | Whether the assignee is available |
created_at | Timestamp | Creation date |
Assignee Sections
Assignees are categorized into sections:| Section | Description |
|---|---|
SIN ASIGNAR | Unassigned (placeholder) |
Internos | Internal staff/employees |
TERCEROS | Third-party contractors/vendors |
OTROS | Other/miscellaneous |
The section field is used for filtering and reporting. Choose the section that best represents the assignee’s relationship to your organization.
Technician Management Workflows
Creating a Technician
Fill in Required Fields
- Name: First name (required)
- Last Name: Surname (required)
- Section: Select the appropriate category (required)
- Email (optional): Contact email
- Phone (optional): Contact phone
- Link to User (optional): If the technician is also a system user, select their user account
Editing a Technician
Modify Fields
Update any of the following:
- Name and last name
- Section
- Email and phone
- User link
- Active status
Activating/Deactivating a Technician
Deactivating a technician prevents them from being assigned to new work orders:- Single Technician
- Bulk Deactivation
- Click the “Desactivar” or “Activar” button on the technician’s row
- Confirm the action if prompted
- The
is_activeflag is toggled
Requires
assignees:cancel permission.- Technician no longer appears in work order assignment dropdowns
- Existing work order assignments remain unchanged
- Historical data is preserved
- Technician can be reactivated at any time
Deleting a Technician
Requires
assignees:delete permission.
Filtering and Search
The technician management interface supports:- Search: By name, last name, email, or phone (minimum 2 characters)
- Section Filter: Show only technicians from a specific section (Internos, TERCEROS, OTROS, or TODOS)
- Include Inactive: Toggle to include deactivated technicians
Pagination
Technicians are paginated with a configurable page size. Use the navigation buttons to browse pages.Search results show all matching technicians without pagination.
Assigning Technicians to Work Orders
Technicians are assigned to work orders through the work order creation or edit interface:- Open the work order form
- In the “Assignee” or “Técnico” dropdown, select the technician
- Save the work order
assignee_id field is set to the selected technician’s ID.
Multiple Assignees
Some work order types support multiple assignees. Consult the work order module documentation for details.Linking Technicians to Users
If a technician also has a system user account, link them by setting theuser_id field:
Benefits of Linking:
- Linked users can view “their” work orders using the
work_orders:read_ownpermission - Contact information (email, phone) can be synced between user and assignee records
- Reporting and analytics can associate work with specific users
Service Layer Reference
Technician operations are handled byassigneeService.ts:
Key Functions
Example: Fetching Active Technicians for Dropdown
Example: Creating a Technician
Database Schema
assignees Table
RLS Policies
Helper Functions
TheassigneeService.ts includes utility functions:
Format Full Name
Get Initials
Group by Section
Best Practices
Use Sections Consistently
Adopt clear criteria for categorizing technicians (Internos vs. TERCEROS).
Link Users When Possible
If a technician has a system account, link the assignee record to the user for better tracking.
Deactivate Instead of Delete
Preserve historical work order assignments by deactivating unused technicians.
Maintain Contact Information
Keep email and phone fields up to date for communication purposes.
Review Assignees Regularly
Audit the technician list periodically to remove duplicates or outdated entries.
Use Descriptive Names
Ensure names are spelled correctly and include sufficient detail to identify the technician.
Permissions Required
| Action | Permission Code |
|---|---|
| View technicians | assignees:read |
| Create/edit technicians | assignees:full_access |
| Activate/deactivate | assignees:cancel |
| Delete technicians | assignees:delete |
Troubleshooting
Technician Not Appearing in Dropdown
Cause: The technician is marked asis_active = false.
Solution: Activate the technician or use the “Include inactive” filter.
Cannot Link Technician to User
Possible causes:- The user account does not exist → Create the user first
- The user is already linked to another technician → Unlink the existing assignee
Duplicate Technicians
Cause: Technicians were created multiple times with similar names. Solution:- Review the technician list
- Deactivate or delete duplicate entries
- Reassign work orders to the correct technician
Section Filter Not Working
Cause: The section value in the database does not match the expected enum values. Solution: Verify that the section is one of:SIN ASIGNAR, Internos, TERCEROS, OTROS.