Files
project-managment/templates/pages/finance/invoice_list.html
T
sankalp 0537ea5e5e feat(templates): enrichUI with Tailwind styling and messaging component improvements
- 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
2026-05-28 00:51:41 +05:45

59 lines
3.4 KiB
HTML

{% extends "base_authenticated.html" %}
{% block title %}Invoices{% endblock %}
{% block content_inner %}
<div class="flex items-center justify-between mb-6">
<div>
<h1 class="text-2xl font-bold text-primary">Invoices</h1>
<p class="text-tertiary mt-1">Track billing and payments.</p>
</div>
{% if user.is_admin %}
<a href="{% url 'invoice_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 Invoice
</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">#</th>
<th class="px-4 py-3 text-left">Project</th>
<th class="px-4 py-3 text-left">Amount</th>
<th class="px-4 py-3 text-left">Due</th>
<th class="px-4 py-3 text-left">Status</th>
<th class="px-4 py-3 text-left"></th>
</tr>
</thead>
<tbody>
{% for invoice in invoices %}
<tr class="hover:bg-hover transition-colors border-t border-subtle">
<td class="px-4 py-3 font-mono text-sm font-medium text-primary">#{{ invoice.id }}</td>
<td class="px-4 py-3 text-secondary">{{ invoice.project.name }}</td>
<td class="px-4 py-3 text-sm font-semibold text-primary">${{ invoice.amount }}</td>
<td class="px-4 py-3 text-secondary">{{ invoice.due_date }}</td>
<td class="px-4 py-3">
<span class="text-xs px-2 py-1 rounded-full font-medium border {% if invoice.status == 'paid' %}bg-green-50 text-green-700 border-green-200{% elif invoice.status == 'overdue' %}bg-red-50 text-red-700 border-red-200{% else %}bg-amber-50 text-amber-700 border-amber-200{% endif %}">
{{ invoice.get_status_display }}
</span>
</td>
<td class="px-4 py-3">
<div class="flex gap-1">
<a href="{% url 'invoice_detail' invoice.pk %}" class="px-3 py-1.5 rounded-lg text-sm font-medium text-secondary hover:bg-hover border border-soft transition-colors">View</a>
{% if user.is_admin %}
<a href="{% url 'invoice_edit' invoice.pk %}" class="px-3 py-1.5 rounded-lg text-sm font-medium text-secondary hover:bg-hover border border-soft transition-colors">Edit</a>
<a href="{% url 'invoice_delete' invoice.pk %}" class="px-3 py-1.5 rounded-lg text-sm font-medium bg-red-50 text-red-700 hover:bg-red-100 border border-red-200 transition-colors">Delete</a>
{% endif %}
</div>
</td>
</tr>
{% empty %}
<tr><td colspan="6" class="text-center py-12 text-tertiary">No invoices found.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}