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
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.
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).
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.
Rule-book form (src/pages/rules/EditRuleBook.vue): remove the usedForAcquisitions toggle (field dropped from the mammon API).
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.
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
added a new dependency 2026-07-04 14:49:26 +02:00
Sirttas
changed title from Move acquisitions UI from account-wide to per-ledger to Add per-ledger acquisitions view + ledger column2026-07-05 00:26:16 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to mammon #17 (Bind acquisitions to ledgers). Once acquisitions are bound to a ledger and
GET /acquisitionsis owner-scoped with aledgerIdfilter +ledgerIdin 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
usedForAcquisitionstoggle. We want to see acquisitions in the context of a ledger without losing the existing account-wide view.Scope
src/pages/market/Acquisitions.vue) as-is. Do not remove it — it stays the cross-ledger, account-wide view.src/pages/ledger/ViewLedger.vue(alongside Balance / Transactions), a new route/routeNameunder/ledgers/:ledgerId, and a new page that reusesAcquisitionResultTablefiltered to that ledger (via the newledgerIdparam onGET /acquisitions).AcquisitionResultTable.vue. Add aledgercolumn (rendered withLedgerLabel) toggleable through the existingignoredColumsmechanism. It is only meaningful on ungrouped rows, so it is hidden whenevershowAllis 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). SurfaceledgerIdinacquisition.ts/AcquiredType.tsaccordingly.src/pages/rules/EditRuleBook.vue): remove theusedForAcquisitionstoggle (field dropped from the mammon API).src/generated/mammon/,docs/mammon-api.yml) and fix upmammonService.ts/ store call sites (findAllAcquisitionsgains aledgerIdfilter;AcquisitionResponsegainsledgerId).Acceptance criteria
showAllis false.usedForAcquisitionstoggle removed from the rule-book editor.Blocked on mammon #17.
Move acquisitions UI from account-wide to per-ledgerto Add per-ledger acquisitions view + ledger column