Backing transaction ledger: Postings replace the applied field #20

Merged
claude-code merged 7 commits from feat/19-posting-ledger into main 2026-04-17 17:54:16 -06:00
3 changed files with 64 additions and 24 deletions
Showing only changes of commit 1384fae5e4 - Show all commits

View file

@ -421,6 +421,40 @@ tr.add-row td {
display: block; display: block;
} }
/* Add-entry disclosure: collapsed trigger, expanded form */
details.add-entry { margin: 0; }
details.add-entry > summary {
list-style: none;
cursor: pointer;
user-select: none;
display: inline-block;
padding: 0.1rem 0.25rem;
}
details.add-entry > summary::-webkit-details-marker { display: none; }
details.add-entry .add-trigger {
font-family: var(--sans);
font-size: 0.78rem;
font-weight: 500;
color: var(--muted);
letter-spacing: 0.18em;
text-transform: uppercase;
border-bottom: 1px dashed transparent;
padding-bottom: 1px;
transition: color 0.12s ease, border-color 0.12s ease;
}
details.add-entry > summary:hover .add-trigger {
color: var(--ink);
border-bottom-color: var(--rule);
}
details.add-entry[open] > summary .add-trigger {
color: var(--ink);
border-bottom-color: var(--ink);
}
details.add-entry > .add-form,
details.add-entry > .month-add-form {
margin-top: 0.45rem;
}
.entry-name { .entry-name {
font-family: var(--sans); font-family: var(--sans);
font-weight: 500; font-weight: 500;

View file

@ -203,6 +203,8 @@
{% endfor %} {% endfor %}
{% if editable %} {% if editable %}
<div class="add-row"> <div class="add-row">
<details class="add-entry">
<summary><span class="add-trigger">+ add {{ section.label|lower }}</span></summary>
<form <form
class="add-form month-add-form" class="add-form month-add-form"
hx-post="/month/{{ month.year_month }}/sections/{{ section.section.value }}/entries" hx-post="/month/{{ month.year_month }}/sections/{{ section.section.value }}/entries"
@ -215,6 +217,7 @@
<button type="submit">Add</button> <button type="submit">Add</button>
<input class="notes-input add-notes" type="text" name="notes" placeholder="notes (optional)"> <input class="notes-input add-notes" type="text" name="notes" placeholder="notes (optional)">
</form> </form>
</details>
</div> </div>
{% endif %} {% endif %}
</div> </div>

View file

@ -44,6 +44,8 @@
{% endfor %} {% endfor %}
<tr class="add-row"> <tr class="add-row">
<td colspan="4"> <td colspan="4">
<details class="add-entry">
<summary><span class="add-trigger">+ add {{ section.label|lower }}</span></summary>
<form <form
class="add-form" class="add-form"
hx-post="/sections/{{ section.section.value }}/entries" hx-post="/sections/{{ section.section.value }}/entries"
@ -56,6 +58,7 @@
<button type="submit">Add</button> <button type="submit">Add</button>
<input class="notes-input add-notes" type="text" name="notes" placeholder="notes (optional)"> <input class="notes-input add-notes" type="text" name="notes" placeholder="notes (optional)">
</form> </form>
</details>
</td> </td>
</tr> </tr>
</tbody> </tbody>