Overview
GIMA uses TypeScript types to ensure type safety for user-related data throughout the application. The user types define the structure of user objects and their possible states.User Interface
The mainUser interface represents a user entity in the GIMA system.
Properties
Unique identifier for the user.Example:
"1", "2"User’s initials, typically used for avatar displays.Example:
"FC" for Frank Chacon, "NE" for Nour EhabFull name of the user.Example:
"Frank Chacon", "Nour Ehab"User’s email address.Example:
"[email protected]"User’s role or job title within the organization.Example:
"Engineer", "Doctor", "Graduated"Department or area where the user works.Example:
"frontend", "cardiology", "pediatrics"Current availability status of the user. See UserEstado for possible values.
UserEstado Type
TheUserEstado type defines the possible availability states for a user.
Values
User is currently available for tasks or assignments.
User is currently unavailable (e.g., on leave, busy, or offline).
Usage Examples
Creating a User Object
Working with User Arrays
The mock data insrc/utils/mockUsers.ts demonstrates how to work with arrays of users:
Type Guards
You can create type guards to check user status:Related Types
- See Asset Types for asset management types
- See Category Types for category-related types
Source Files
- Type definitions:
src/types/user.ts - Mock data:
src/utils/mockUsers.ts