-
Finished the planner end to end. Corrected rollover and yearly accounting, recurring targets, savings rules, and targeted dormant restorations. Added editing/deletion for income, expenses, targets, and categories. Rebuilt dashboard, analytics, calendar, settings, exports, authentication, and responsive mobile UI. Added original artwork at [financial-flow.png](/Users/tyemeclifford/Documents/GH/budget/public/assets/images/financial-flow.png), generated with built-in Imagegen using an abstract financial-momentum landscape prompt. Added [self-test.php](/Users/tyemeclifford/Documents/GH/budget/scripts/self-test.php). Verification passed: automated accounting/export tests, full browser workflow, responsive 390px layout, light/dark themes, and no console errors. Tested with FrankenPHP v1.12.4. Live Mailgun delivery was not attempted without credentials.
This commit is contained in:
+17
-2
@@ -96,12 +96,27 @@
|
||||
</section>
|
||||
|
||||
<article class="card">
|
||||
<div class="card-heading"><div><p class="eyebrow">Organize spending</p><h2>Add an expense category</h2></div></div>
|
||||
<div class="card-heading"><div><p class="eyebrow">Organize spending</p><h2>Expense categories</h2><p class="heading-note">Searchable records use these names, colors, and optional monthly guardrails.</p></div></div>
|
||||
<form method="post" class="inline-fields">
|
||||
<?= csrf_field() ?><input type="hidden" name="action" value="category.add">
|
||||
<?= csrf_field() ?><input type="hidden" name="action" value="category.add"><input type="hidden" name="return_route" value="settings">
|
||||
<label>Name<input type="text" name="name" required placeholder="Utilities"></label>
|
||||
<label>Color<input type="color" name="color" value="#7c5cff"></label>
|
||||
<label>Optional monthly limit<input type="number" name="monthly_limit" min="0" step="0.01" value="0"></label>
|
||||
<button class="button primary" type="submit">Add category</button>
|
||||
</form>
|
||||
<?php if ($categories !== []): ?>
|
||||
<div class="category-admin-list">
|
||||
<?php foreach ($categories as $category): ?>
|
||||
<form method="post">
|
||||
<?= csrf_field() ?><input type="hidden" name="action" value="category.update"><input type="hidden" name="id" value="<?= (int) $category['id'] ?>">
|
||||
<span class="category-swatch" style="--dot:<?= h($category['color']) ?>"></span>
|
||||
<input aria-label="Category name" type="text" name="name" value="<?= h($category['name']) ?>" required>
|
||||
<input aria-label="Category color" type="color" name="color" value="<?= h($category['color']) ?>">
|
||||
<div class="money-input"><span><?= h((string) $s['app.currency_symbol']) ?></span><input aria-label="Monthly limit" type="number" name="monthly_limit" min="0" step="0.01" value="<?= h((string) $category['monthly_limit']) ?>"></div>
|
||||
<button class="icon-button" type="submit" aria-label="Save <?= h($category['name']) ?>"><?= icon('edit') ?></button>
|
||||
<button class="icon-button danger" type="submit" name="action" value="category.archive" formnovalidate data-confirm-button="Archive this category? Historical records will keep their category data." aria-label="Archive <?= h($category['name']) ?>"><?= icon('trash') ?></button>
|
||||
</form>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user