Added branding and updated layouts using base_authenticated.html; applied consistent Tailwind styling across authentication and ticket pages; improved usability with hover effects and clearer typography. New Features: - Enhancements: - Refactored login page layout to use a centered card with branding and modern styling. - Updated profile page to use the authenticated base template and a refined card design. - Enhanced ticket list page with a descriptive subtitle, SVG icon, and refined table styling including hover states and better typography. Bug Fixes: - Fixed template inheritance to use base_authenticated.html for profile and tickets pages. - Corrected form button text and styling for consistency.
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-gray-900">Payroll</h1>
|
|
<p class="text-gray-500 mt-1">Team member payments and salary records.</p>
|
|
</div>
|
|
{% if user.is_admin %}
|
|
<a href="{% url 'team_payment_create' %}" class="btn bg-blue-600 text-white hover:bg-blue-700 border-0">
|
|
<svg class="w-4 h-4 mr-1" 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="bg-white rounded-2xl shadow-sm border border-gray-100 overflow-hidden">
|
|
<div class="overflow-x-auto">
|
|
<table class="table w-full">
|
|
<thead>
|
|
<tr class="bg-gray-50">
|
|
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Member</th>
|
|
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Period</th>
|
|
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Amount</th>
|
|
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Status</th>
|
|
{% if user.is_admin %}<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider"></th>{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for payment in payments %}
|
|
<tr class="hover:bg-gray-50 transition-colors">
|
|
<td>
|
|
<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-gray-900">{{ payment.member.username }}</span>
|
|
</div>
|
|
</td>
|
|
<td class="text-sm text-gray-600">{{ payment.period|date:"F Y" }}</td>
|
|
<td class="text-sm font-semibold text-gray-900">${{ payment.amount }}</td>
|
|
<td>
|
|
{% if payment.paid_at %}
|
|
<span class="text-xs px-2.5 py-1 rounded-full font-medium bg-green-100 text-green-700">Paid</span>
|
|
{% else %}
|
|
<span class="text-xs px-2.5 py-1 rounded-full font-medium bg-amber-100 text-amber-700">Pending</span>
|
|
{% endif %}
|
|
</td>
|
|
{% if user.is_admin %}
|
|
<td><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-gray-500">No payments recorded.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|