- Add custom border, background, and spacing utilities to base template - Enhance message notification styling and layout - Update delete modal button appearance and behavior - Refine comment card component with Tailwind classes and responsive behavior - Adjust sidebar responsiveness for mobile view
58 lines
3.1 KiB
HTML
58 lines
3.1 KiB
HTML
{% extends "base_authenticated.html" %}
|
|
{% block title %}Team Payments{% endblock %}
|
|
{% block content_inner %}
|
|
<div class="flex items-center justify-between mb-6">
|
|
<div>
|
|
<h1 class="text-2xl font-bold text-primary">Payroll</h1>
|
|
<p class="text-tertiary mt-1">Team member payments and salary records.</p>
|
|
</div>
|
|
{% if user.is_admin %}
|
|
<a href="{% url 'team_payment_create' %}" class="px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-600 text-white hover:bg-blue-700 transition-colors">
|
|
<svg class="w-4 h-4 mr-1 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
|
|
New Payment
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
<div class="card-surface overflow-hidden">
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full text-sm">
|
|
<thead>
|
|
<tr class="text-xs font-semibold text-muted uppercase tracking-wider bg-hover">
|
|
<th class="px-4 py-3 text-left">Member</th>
|
|
<th class="px-4 py-3 text-left">Period</th>
|
|
<th class="px-4 py-3 text-left">Amount</th>
|
|
<th class="px-4 py-3 text-left">Status</th>
|
|
{% if user.is_admin %}<th class="px-4 py-3 text-left"></th>{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for payment in payments %}
|
|
<tr class="hover:bg-hover transition-colors border-t border-subtle">
|
|
<td class="px-4 py-3">
|
|
<div class="flex items-center gap-2">
|
|
<div class="w-7 h-7 rounded-full bg-blue-500 flex items-center justify-center text-white text-xs font-bold">{{ payment.member.username|first|upper }}</div>
|
|
<span class="text-sm font-medium text-primary">{{ payment.member.username }}</span>
|
|
</div>
|
|
</td>
|
|
<td class="px-4 py-3 text-secondary">{{ payment.period|date:"F Y" }}</td>
|
|
<td class="px-4 py-3 text-sm font-semibold text-primary">${{ payment.amount }}</td>
|
|
<td class="px-4 py-3">
|
|
{% if payment.paid_at %}
|
|
<span class="text-xs px-2 py-1 rounded-full font-medium border bg-green-50 text-green-700 border-green-200">Paid</span>
|
|
{% else %}
|
|
<span class="text-xs px-2 py-1 rounded-full font-medium border bg-amber-50 text-amber-700 border-amber-200">Pending</span>
|
|
{% endif %}
|
|
</td>
|
|
{% if user.is_admin %}
|
|
<td class="px-4 py-3"><a href="{% url 'team_payment_delete' payment.pk %}" class="text-xs text-red-500 hover:text-red-700">Delete</a></td>
|
|
{% endif %}
|
|
</tr>
|
|
{% empty %}
|
|
<tr><td colspan="{% if user.is_admin %}5{% else %}4{% endif %}" class="text-center py-12 text-tertiary">No payments recorded.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|