Simplify bill and invoice detail card templates#327
Open
billkhiz-bit wants to merge 1 commit intoarrobalytics:masterfrom
Open
Simplify bill and invoice detail card templates#327billkhiz-bit wants to merge 1 commit intoarrobalytics:masterfrom
billkhiz-bit wants to merge 1 commit intoarrobalytics:masterfrom
Conversation
Collapse 4 near-identical status blocks (draft, review, approved, paid)
into a single unified block with conditional CSS classes. This removes
~90 lines of duplicated markup while preserving all visual behaviour.
Changes:
- card_bill.html: 219 → 155 lines (-29%)
- card_invoice.html: 203 → 155 lines (-24%)
- New: components/accrual_icon.html (shared accrual status icon)
Also fixes:
- Unclosed <p> tags in dashboard accrual section
- Missing {% trans %} tags on several user-facing strings
- Duplicate id attributes on footer action buttons
Addresses arrobalytics#250
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #250 — lightens the bill and invoice card templates by collapsing duplicated status blocks into a single unified structure.
Problem
Both
card_bill.htmlandcard_invoice.htmlcontained 4 near-identical blocks for each status state (draft, review, approved, paid). Each block repeated the same amount, due date, and accrual markup with only minor differences (CSS colour classes and which fields to show).Changes
card_bill.html: 219 → 155 lines (-29%). Four status blocks collapsed into one with conditional CSS classes.card_invoice.html: 203 → 155 lines (-24%). Same treatment.components/accrual_icon.html: Extracted the accrual status icon (check/block) into a reusable include, used by both cards.Additional fixes found during cleanup
<p>tags in the dashboard accrual section (both bill and invoice){% trans %}tags ("You Still Owe","Amount Paid","Progressed","Is Accrued")idattributes on footer action buttons (copy-paste artefact)What's preserved
{% trans %}tags are kept