Files
Andros Fenollosa 1e24c43484 Add edit and delete expense actions to Week view
- Dropdown menu (Edit/Delete) on each expense row
- Inline edit with concept, category, subcategory, amount fields
- Delete removes expense and refreshes table via LiveView
- Extract week content into reusable partial
2026-03-18 09:18:27 +01:00

42 lines
1.8 KiB
HTML

{% extends "layouts/base.html" %}
{% block title %}Kakebo - Week{% endblock %}
{% block content %}
<div class="px-4 py-6 max-w-2xl mx-auto">
<h1 class="text-2xl font-bold mb-4">Week</h1>
<div class="flex w-full items-center justify-between mb-8 py-3">
<a data-liveview-function="navigate"
data-action="click->page#run"
data-data-url="/week/?offset={{ prev_offset }}"
class="btn btn-ghost btn-sm">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
</svg>
</a>
<span class="text-base-content/70 font-medium">{{ monday|date:"M d" }} - {{ sunday|date:"M d, Y" }}</span>
{% if is_current_week %}
<span class="btn btn-ghost btn-sm btn-disabled opacity-0">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
</svg>
</span>
{% else %}
<a data-liveview-function="navigate"
data-action="click->page#run"
data-data-url="/week/?offset={{ next_offset }}"
class="btn btn-ghost btn-sm">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
</svg>
</a>
{% endif %}
</div>
<div id="week-content">
{% include "pages/expenses/partials/week_content.html" %}
</div>
</div>
{% endblock %}