iteracion 2

This commit is contained in:
Nachou-u
2026-09-07 18:44:32 -03:00
parent a103a47ae6
commit 09a3f6fb37
93 changed files with 7394 additions and 349 deletions
+60
View File
@@ -0,0 +1,60 @@
{% extends 'base.html' %}
{% load humanize %}
{% block content %}
<section class="page-view active">
<div class="view-header">
<div class="view-title">
<h2><i data-lucide="users" style="color:var(--efintel-blue);"></i> Maestro de Colaboradores — Remuneraciones</h2>
<p>Ficha del colaborador, contratos, previsión (AFP/Fonasa/Isapre), y cuenta bancaria de abono.</p>
</div>
<div>
<a href="{% url 'payroll:employee_create' %}" class="btn-primary" style="text-decoration:none;">
<i data-lucide="user-plus" style="width:16px;"></i> + Nuevo Colaborador
</a>
</div>
</div>
<div class="data-card" x-data="{ search: '' }">
<div style="padding:1rem; border-bottom:1px solid var(--border-color);">
<input type="text" x-model="search" placeholder="Buscar por Nombre, RUT o Cargo..." class="form-control" style="width:100%; max-width:400px;">
</div>
<table class="data-table">
<thead>
<tr>
<th>RUT</th>
<th>Colaborador</th>
<th>Cargo</th>
<th>Tipo Contrato</th>
<th>Sueldo Base (CLP)</th>
<th>Previsión (AFP / Salud)</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
{% for emp in employees %}
<tr x-show="search === '' || '{{ emp.full_name|lower }} {{ emp.rut|lower }} {{ emp.job_title|lower }}'.includes(search.toLowerCase())">
<td><strong>{{ emp.rut }}</strong></td>
<td>{{ emp.full_name }}</td>
<td>{{ emp.job_title }}</td>
<td><span class="badge badge-blue">{{ emp.get_contract_type_display }}</span></td>
<td>${{ emp.base_salary_clp|floatformat:"0"|intcomma }} CLP</td>
<td>{{ emp.get_afp_display }} / {{ emp.get_health_system_display }}</td>
<td>
<a href="{% url 'payroll:employee_edit' emp.pk %}" class="btn-primary" style="padding:0.25rem 0.5rem; font-size:0.75rem; text-decoration:none;">
Editar Ficha
</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="7" style="text-align:center; padding:2rem; color:var(--text-secondary);">
No hay colaboradores registrados. <a href="{% url 'payroll:employee_create' %}">Registrar el primero</a>.
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endblock %}