first commit

This commit is contained in:
2026-01-10 23:14:51 -06:00
commit 389715b4b4
503 changed files with 98244 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
@model IEnumerable<Rs_system.Models.ConfiguracionSistema>
@{
ViewData["Title"] = "Configuración del Sistema";
var categorias = (List<string>)ViewBag.Categorias;
var selectedCategoria = (string)ViewBag.SelectedCategoria;
}
<div class="d-flex justify-content-between align-items-center mb-4">
<div>
<h2 class="mb-1">Configuración</h2>
<p class="text-muted small mb-0">Gestione los parámetros dinámicos y ajustes globales del sistema.</p>
</div>
</div>
<div class="row mb-4">
<div class="col-md-12">
<div class="card-custom py-2 px-3">
<div class="d-flex gap-2 overflow-auto">
<a asp-action="Index" class="btn btn-sm @(string.IsNullOrEmpty(selectedCategoria) ? "btn-primary-custom" : "btn-outline-secondary")">
Todas
</a>
@foreach (var cat in categorias)
{
<a asp-action="Index" asp-route-categoria="@cat"
class="btn btn-sm @(selectedCategoria == cat ? "btn-primary-custom" : "btn-outline-secondary")">
@cat
</a>
}
</div>
</div>
</div>
</div>
<div class="card-custom">
<div class="table-responsive">
<table class="table-custom">
<thead>
<tr>
<th>Clave</th>
<th>Valor</th>
<th>Categoría / Grupo</th>
<th>Descripción</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
@if (!Model.Any())
{
<tr>
<td colspan="5" class="text-center py-4 text-muted">No hay configuraciones registradas.</td>
</tr>
}
@foreach (var item in Model)
{
<tr>
<td class="fw-bold">
<code>@item.Clave</code>
</td>
<td>
@if (item.TipoDato == "BOOLEANO")
{
<span class="badge @(item.Valor?.ToLower() == "true" ? "bg-success" : "bg-danger")">
@(item.Valor?.ToLower() == "true" ? "Activado" : "Desactivado")
</span>
}
else
{
<span class="text-truncate d-inline-block" style="max-width: 200px;">@item.Valor</span>
}
</td>
<td>
<span class="badge bg-light text-dark border">@item.Categoria</span>
<span class="badge bg-light text-muted border">@item.Grupo</span>
</td>
<td class="small text-muted">@item.Descripcion</td>
<td>
@if (item.EsEditable)
{
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-sm btn-outline-secondary" title="Editar">
<i class="bi bi-pencil"></i>
</a>
}
else
{
<i class="bi bi-lock-fill text-muted" title="Solo lectura"></i>
}
</td>
</tr>
}
</tbody>
</table>
</div>
</div>