Registro y elevación de componentes base (ADN, Scripts, Servicios)

This commit is contained in:
Ricardo Monla
2026-02-15 20:37:53 -03:00
parent 9e9bf62c68
commit c865a7772b
25279 changed files with 3354766 additions and 0 deletions
@@ -0,0 +1,596 @@
entities:
tecnicos:
name: "Técnicos"
title: "Gestión de Técnicos"
subtitle: "Administra los técnicos relacionados a recursos del sistema DTIC Bitácoras"
icon: "fa-users"
api:
endpoint: "/api/tecnicos"
methods:
fetch: "GET"
create: "POST"
update: "PUT"
delete: "DELETE"
toggleStatus: "PATCH"
fields:
- name: "first_name"
label: "Nombre"
type: "text"
required: true
- name: "last_name"
label: "Apellido"
type: "text"
required: true
- name: "email"
label: "Email"
type: "email"
required: true
- name: "role"
label: "Rol"
type: "select"
required: true
options:
- value: "admin"
label: "Administrador"
- value: "technician"
label: "Técnico"
- value: "viewer"
label: "Visualizador"
- name: "department"
label: "Departamento"
type: "select"
required: true
options:
- value: "dtic"
label: "DTIC"
- value: "sistemas"
label: "Sistemas"
- value: "redes"
label: "Redes"
- value: "seguridad"
label: "Seguridad"
- name: "phone"
label: "Teléfono"
type: "tel"
- name: "assigned_resources"
label: "Recursos Relacionados"
type: "resource_assignment"
resourceAssignmentConfig:
entityType: "tecnico"
entityId: "{{id}}"
required: false
description: "Gestión de recursos relacionados a este técnico con funcionalidad de agregar/quitar"
table:
columns:
- key: "role"
label: "Rol"
formatter: "formatRole"
- key: "full_name"
label: "Nombre"
- key: "email"
label: "Email"
- key: "department"
label: "Departamento"
formatter: "formatDepartment"
- key: "updated_at"
label: "Último Acceso"
formatter: "formatDate"
- key: "is_active"
label: "Estado"
formatter: "formatStatus"
filters:
- key: "role"
label: "Rol"
type: "select"
options:
- value: ""
label: "Todos"
- value: "admin"
label: "Admin"
- value: "technician"
label: "Técnico"
- value: "viewer"
label: "Viewer"
- key: "status"
label: "Estado"
type: "select"
options:
- value: ""
label: "Todos"
- value: "active"
label: "Activo"
- value: "inactive"
label: "Inactivo"
- value: "all"
label: "Todos (incluyendo inactivos)"
- key: "department"
label: "Depto"
type: "select"
options:
- value: ""
label: "Todos"
- value: "dtic"
label: "DTIC"
- value: "sistemas"
label: "Sistemas"
- value: "redes"
label: "Redes"
- value: "seguridad"
label: "Seguridad"
actions:
- key: "view"
label: "Ver Perfil"
icon: "fa-eye"
color: "primary"
modal: "profile"
- key: "edit"
label: "Editar"
icon: "fa-edit"
color: "warning"
- key: "changePassword"
label: "Cambiar contraseña"
icon: "fa-key"
color: "info"
modal: "changePassword"
- key: "delete"
label: "Eliminar técnico"
icon: "fa-trash"
color: "danger"
- key: "toggleStatus"
label: "Desactivar/Reactivar"
icon: "fa-ban/fa-check"
color: "danger/success"
condition: "is_active"
stats:
- title: "Total Técnicos"
value: "entities.length"
subtitle: "Registrados en el sistema"
color: "primary"
- title: "Activos"
value: "entities.filter(t => t.is_active).length"
subtitle: "Con acceso al sistema"
color: "success"
- title: "Inactivos"
value: "entities.filter(t => !t.is_active).length"
subtitle: "Acceso suspendido"
color: "warning"
- title: "Administradores"
value: "entities.filter(t => t.role === 'admin').length"
subtitle: "Acceso completo"
color: "danger"
modals:
- key: "profile"
component: "TecnicoProfileModal"
- key: "changePassword"
component: "ChangePasswordModal"
recursos:
name: "Recursos"
title: "Gestión de Recursos"
subtitle: "Administra el inventario de recursos del sistema DTIC Bitácoras"
icon: "fa-boxes"
api:
endpoint: "/api/recursos"
methods:
fetch: "GET"
create: "POST"
update: "PUT"
delete: "DELETE"
assign: "POST"
unassign: "DELETE"
fields:
- name: "name"
label: "Nombre"
type: "text"
required: true
- name: "description"
label: "Descripción"
type: "textarea"
rows: 3
- name: "category"
label: "Categoría"
type: "select"
required: true
options:
- value: "hardware"
label: "Hardware"
- value: "software"
label: "Software"
- value: "network"
label: "Redes"
- value: "security"
label: "Seguridad"
- value: "tools"
label: "Herramientas"
- value: "facilities"
label: "Instalaciones"
- name: "status"
label: "Estado"
type: "select"
required: true
options:
- value: "available"
label: "Disponible"
- value: "assigned"
label: "Relacionado"
- value: "maintenance"
label: "Mantenimiento"
- value: "retired"
label: "Retirado"
- name: "location"
label: "Ubicación"
type: "text"
- name: "model"
label: "Modelo"
type: "text"
- name: "serial_number"
label: "Número de Serie"
type: "text"
table:
columns:
- key: "status_category"
label: "Estado/Categoría"
formatter: "statusCategory"
- key: "recurso_modelo_serie"
label: "Recurso"
- key: "assigned_users"
label: "Usuarios"
formatter: "formatRelatedUsers"
- key: "related_tasks"
label: "Tareas"
formatter: "formatRelatedTasks"
filters:
- key: "category"
label: "Categoría"
type: "select"
options:
- value: ""
label: "Todas"
- value: "hardware"
label: "Hardware"
- value: "software"
label: "Software"
- value: "network"
label: "Redes"
- value: "security"
label: "Seguridad"
- value: "tools"
label: "Herramientas"
- value: "facilities"
label: "Instalaciones"
- key: "status"
label: "Estado"
type: "select"
options:
- value: ""
label: "Todos"
- value: "available"
label: "Disponible"
- value: "assigned"
label: "Relacionado"
- value: "maintenance"
label: "Mantenimiento"
- value: "retired"
label: "Retirado"
- key: "location"
label: "Ubicación"
type: "text"
placeholder: "Ubicación..."
actions:
- key: "view"
label: "Ver Detalles"
icon: "fa-eye"
color: "primary"
modal: "profile"
- key: "edit"
label: "Editar"
icon: "fa-edit"
color: "warning"
- key: "assign"
label: "Relacionar Usuario"
icon: "fa-user-plus"
color: "success"
modal: "assign"
- key: "delete"
label: "Eliminar recurso"
icon: "fa-trash"
color: "danger"
stats:
- title: "Total Recursos"
value: "entities.length"
subtitle: "En inventario"
color: "primary"
- title: "Disponibles"
value: "entities.filter((r) => r.status === 'available').length"
subtitle: "Listos para asignar"
color: "success"
- title: "Relacionados"
value: "entities.filter((r) => r.status === 'assigned').length"
subtitle: "En uso actualmente"
color: "info"
- title: "En Mantenimiento"
value: "entities.filter((r) => r.status === 'maintenance').length"
subtitle: "Fuera de servicio"
color: "warning"
modals:
- key: "profile"
component: "RecursoProfileModal"
- key: "assign"
component: "AssignUserModal"
usuarios:
name: "Usuarios Relacionados"
title: "Gestión de Usuarios Relacionados"
subtitle: "Administra usuarios que pueden tener recursos relacionados del sistema DTIC Bitácoras"
icon: "fa-user-cog"
api:
endpoint: "/api/usuarios_relacionados"
methods:
fetch: "GET"
create: "POST"
update: "PUT"
delete: "DELETE"
fields:
- name: "first_name"
label: "Nombre"
type: "text"
required: true
- name: "last_name"
label: "Apellido"
type: "text"
required: true
- name: "dtic_id"
label: "ID DTIC"
type: "text"
required: true
- name: "email"
label: "Email"
type: "email"
- name: "phone"
label: "Teléfono"
type: "tel"
- name: "department"
label: "Departamento"
type: "select"
options:
- value: "dtic"
label: "DTIC"
- value: "sistemas"
label: "Sistemas"
- value: "redes"
label: "Redes"
- value: "seguridad"
label: "Seguridad"
- name: "position"
label: "Cargo"
type: "text"
- name: "assigned_resources"
label: "Recursos Relacionados"
type: "resource_assignment"
resourceAssignmentConfig:
entityType: "usuario"
entityId: "{{id}}"
required: false
description: "Gestión de recursos relacionados a este usuario con funcionalidad de agregar/quitar"
table:
columns:
- key: "department"
label: "Departamento"
- key: "full_name"
label: "Nombre"
- key: "email"
label: "Email"
- key: "position"
label: "Cargo"
- key: "assigned_resources_count"
label: "Recursos Relacionados"
- key: "status"
label: "Estado"
formatter: "formatStatus"
filters:
- key: "department"
label: "Departamento"
type: "select"
options:
- value: ""
label: "Todos"
- value: "dtic"
label: "DTIC"
- value: "sistemas"
label: "Sistemas"
- value: "redes"
label: "Redes"
- value: "seguridad"
label: "Seguridad"
actions:
- key: "view"
label: "Ver Perfil"
icon: "fa-eye"
color: "primary"
modal: "profile"
- key: "edit"
label: "Editar"
icon: "fa-edit"
color: "warning"
- key: "delete"
label: "Eliminar usuario"
icon: "fa-trash"
color: "danger"
stats:
- title: "Total Usuarios"
value: "entities.length"
subtitle: "Registrados en el sistema"
color: "primary"
- title: "Con Recursos"
value: "entities.filter((u) => (u.assigned_resources_count || 0) > 0).length"
subtitle: "Tienen recursos relacionados"
color: "success"
- title: "Sin Recursos"
value: "entities.filter((u) => (u.assigned_resources_count || 0) === 0).length"
subtitle: "Sin asignaciones activas"
color: "warning"
- title: "Recursos Totales"
value: "entities.reduce((total, u) => total + (u.assigned_resources_count || 0), 0)"
subtitle: "Relacionados actualmente"
color: "info"
modals:
- key: "profile"
component: "UsuarioProfileModal"
tareas:
name: "Tareas"
title: "Gestión de Tareas"
subtitle: "Administra las tareas relacionadas a los técnicos del sistema DTIC Bitácoras"
icon: "fa-tasks"
api:
endpoint: "/api/tareas"
methods:
fetch: "GET"
create: "POST"
update: "PUT"
delete: "DELETE"
fields:
- name: "title"
label: "Título"
type: "text"
required: true
- name: "description"
label: "Descripción"
type: "textarea"
rows: 3
- name: "technician_id"
label: "Técnico Relacionado"
type: "select"
dynamicOptions:
endpoint: "/api/tecnicos"
labelField: "full_name"
valueField: "id"
params:
status: "active"
options:
- value: ""
label: "Sin relacionar"
- name: "priority"
label: "Prioridad"
type: "select"
required: true
options:
- value: "low"
label: "Baja"
- value: "medium"
label: "Media"
- value: "high"
label: "Alta"
- value: "urgent"
label: "Urgente"
- name: "status"
label: "Estado"
type: "select"
required: true
options:
- value: "pending"
label: "Pendiente"
- value: "in_progress"
label: "En Progreso"
- value: "completed"
label: "Completada"
- value: "cancelled"
label: "Cancelada"
- name: "due_date"
label: "Fecha Límite"
type: "date"
- name: "assigned_resources"
label: "Recursos Relacionados"
type: "resource_assignment"
resourceAssignmentConfig:
entityType: "tarea"
entityId: "{{id}}"
required: false
description: "Gestión de recursos relacionados a esta tarea con funcionalidad de agregar/quitar"
table:
columns:
- key: "status_priority"
label: "Estado/Prioridad"
formatter: "formatStatusPriority"
- key: "title"
label: "Tarea"
- key: "assigned_resources"
label: "Recurso/s"
formatter: "formatAssignedResources"
- key: "technician_name"
label: "Técnico"
filters:
- key: "technician_id"
label: "Técnico"
type: "select"
dynamicOptions:
endpoint: "/api/tecnicos"
labelField: "full_name"
valueField: "id"
params:
status: "active"
options:
- value: ""
label: "Todos"
- key: "status"
label: "Estado"
type: "select"
options:
- value: ""
label: "Todos"
- value: "pending"
label: "Pendiente"
- value: "in_progress"
label: "En Progreso"
- value: "completed"
label: "Completada"
- value: "cancelled"
label: "Cancelada"
- key: "priority"
label: "Prioridad"
type: "select"
options:
- value: ""
label: "Todas"
- value: "low"
label: "Baja"
- value: "medium"
label: "Media"
- value: "high"
label: "Alta"
- value: "urgent"
label: "Urgente"
actions:
- key: "view"
label: "Ver Detalles"
icon: "fa-eye"
color: "primary"
modal: "profile"
- key: "edit"
label: "Editar"
icon: "fa-edit"
color: "warning"
- key: "delete"
label: "Eliminar tarea"
icon: "fa-trash"
color: "danger"
stats:
- title: "Total Tareas"
value: "entities.length"
subtitle: "Registradas en el sistema"
color: "primary"
- title: "Pendientes"
value: "entities.filter((t) => t.status === 'pending').length"
subtitle: "Esperando relación"
color: "warning"
- title: "En Progreso"
value: "entities.filter((t) => t.status === 'in_progress').length"
subtitle: "Siendo trabajadas"
color: "info"
- title: "Completadas"
value: "entities.filter((t) => t.status === 'completed').length"
subtitle: "Finalizadas exitosamente"
color: "success"
modals:
- key: "profile"
component: "TareaProfileModal"