Add per-ledger acquisitions view + ledger column #10

Closed
opened 2026-07-04 14:47:43 +02:00 by Sirttas · 0 comments
Owner

Follow-up to mammon #17 (Bind acquisitions to ledgers). Once acquisitions are bound to a ledger and GET /acquisitions is owner-scoped with a ledgerId filter + ledgerId in the response, the frontend catches up.

Why

After mammon #17 each acquisition belongs to a ledger (cost basis from realized ISK), and the rule book no longer has a usedForAcquisitions toggle. We want to see acquisitions in the context of a ledger without losing the existing account-wide view.

Scope

  1. Keep the existing account-wide acquisitions page (src/pages/market/Acquisitions.vue) as-is. Do not remove it — it stays the cross-ledger, account-wide view.
  2. New per-ledger acquisitions tab under a ledger. Add an "Acquisitions" tab in src/pages/ledger/ViewLedger.vue (alongside Balance / Transactions), a new route/routeName under /ledgers/:ledgerId, and a new page that reuses AcquisitionResultTable filtered to that ledger (via the new ledgerId param on GET /acquisitions).
  3. Optional ledger column on AcquisitionResultTable.vue. Add a ledger column (rendered with LedgerLabel) toggleable through the existing ignoredColums mechanism. It is only meaningful on ungrouped rows, so it is hidden whenever showAll is false (grouped-by-type mode collapses across ledgers) as well as when explicitly ignored. Shown on the account-wide page, ignored on the per-ledger tab (redundant there). Surface ledgerId in acquisition.ts / AcquiredType.ts accordingly.
  4. Rule-book form (src/pages/rules/EditRuleBook.vue): remove the usedForAcquisitions toggle (field dropped from the mammon API).
  5. Regenerate the API client from the updated mammon OpenAPI spec (src/generated/mammon/, docs/mammon-api.yml) and fix up mammonService.ts / store call sites (findAllAcquisitions gains a ledgerId filter; AcquisitionResponse gains ledgerId).

Acceptance criteria

  • Account-wide acquisitions page still works, now with a ledger column.
  • Each ledger has an Acquisitions tab listing that ledger's acquisitions.
  • Ledger column is toggleable, hidden on the per-ledger tab, and hidden whenever showAll is false.
  • usedForAcquisitions toggle removed from the rule-book editor.
  • API client regenerated; no references to removed fields.

Blocked on mammon #17.

Follow-up to mammon #17 (*Bind acquisitions to ledgers*). Once acquisitions are bound to a ledger and `GET /acquisitions` is owner-scoped with a `ledgerId` filter + `ledgerId` in the response, the frontend catches up. ## Why After mammon #17 each acquisition belongs to a **ledger** (cost basis from realized ISK), and the rule book no longer has a `usedForAcquisitions` toggle. We want to see acquisitions in the context of a ledger without losing the existing account-wide view. ## Scope 1. **Keep the existing account-wide acquisitions page** (`src/pages/market/Acquisitions.vue`) as-is. Do **not** remove it — it stays the cross-ledger, account-wide view. 2. **New per-ledger acquisitions tab** under a ledger. Add an "Acquisitions" tab in `src/pages/ledger/ViewLedger.vue` (alongside Balance / Transactions), a new route/`routeName` under `/ledgers/:ledgerId`, and a new page that reuses `AcquisitionResultTable` filtered to that ledger (via the new `ledgerId` param on `GET /acquisitions`). 3. **Optional ledger column** on `AcquisitionResultTable.vue`. Add a `ledger` column (rendered with `LedgerLabel`) toggleable through the existing `ignoredColums` mechanism. It is only meaningful on ungrouped rows, so it is **hidden whenever `showAll` is false** (grouped-by-type mode collapses across ledgers) as well as when explicitly ignored. Shown on the account-wide page, ignored on the per-ledger tab (redundant there). Surface `ledgerId` in `acquisition.ts` / `AcquiredType.ts` accordingly. 4. **Rule-book form** (`src/pages/rules/EditRuleBook.vue`): remove the `usedForAcquisitions` toggle (field dropped from the mammon API). 5. **Regenerate the API client** from the updated mammon OpenAPI spec (`src/generated/mammon/`, `docs/mammon-api.yml`) and fix up `mammonService.ts` / store call sites (`findAllAcquisitions` gains a `ledgerId` filter; `AcquisitionResponse` gains `ledgerId`). ## Acceptance criteria - [x] Account-wide acquisitions page still works, now with a ledger column. - [x] Each ledger has an Acquisitions tab listing that ledger's acquisitions. - [x] Ledger column is toggleable, hidden on the per-ledger tab, and hidden whenever `showAll` is false. - [x] `usedForAcquisitions` toggle removed from the rule-book editor. - [x] API client regenerated; no references to removed fields. _Blocked on mammon #17._
Sirttas changed title from Move acquisitions UI from account-wide to per-ledger to Add per-ledger acquisitions view + ledger column 2026-07-05 00:26:16 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Depends on
You do not have permission to read 1 dependency
Reference: eveal/gemory#10