Files
project-managment/templates/pages/finance/expense_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

45 lines
2.4 KiB
HTML

{% extends "base_authenticated.html" %}
{% block title %}Expenses{% endblock %}
{% block content_inner %}
<div class="flex items-center justify-between mb-6">
<div>
<h1 class="text-2xl font-bold text-primary">Expenses</h1>
<p class="text-tertiary mt-1">Track project expenses.</p>
</div>
<a href="{% url 'expense_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 Expense
</a>
</div>
<div class="card-surface overflow-hidden">
<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">Category</th>
<th class="px-4 py-3 text-left">Amount</th>
<th class="px-4 py-3 text-left">Project</th>
<th class="px-4 py-3 text-left">Raised By</th>
<th class="px-4 py-3 text-left">Date</th>
{% if user.is_admin %}<th class="px-4 py-3 text-left"></th>{% endif %}
</tr>
</thead>
<tbody>
{% for expense in expenses %}
<tr class="hover:bg-hover transition-colors border-t border-subtle">
<td class="px-4 py-3 text-sm font-medium text-primary">{{ expense.category }}</td>
<td class="px-4 py-3 text-sm font-semibold text-primary">${{ expense.amount }}</td>
<td class="px-4 py-3 text-secondary">{{ expense.project.name }}</td>
<td class="px-4 py-3 text-secondary">{{ expense.raised_by.username }}</td>
<td class="px-4 py-3 text-tertiary">{{ expense.date|date:"M d" }}</td>
{% if user.is_admin %}
<td class="px-4 py-3"><a href="{% url 'expense_delete' expense.pk %}" class="text-xs text-red-500 hover:text-red-700">Delete</a></td>
{% endif %}
</tr>
{% empty %}
<tr><td colspan="{% if user.is_admin %}6{% else %}5{% endif %}" class="text-center py-12 text-tertiary">No expenses recorded.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}