Several pages fetch market prices without passing a locationId, which silently defaults to Jita server-side. Add a market location selector, persisted to localStorage, so users can price against a location of their choosing instead of the implicit Jita default.
Scope
New useMarketLocationStore in src/market/location/location.ts (alongside the existing MarketLocation.ts), following the useMarketTaxStore (src/market/tax/tax.ts) localStorage-backed Pinia pattern.
Holds a single global selection — one MarketLocation shared by all call sites below, not a per-page choice.
The ref is non-optional (MarketLocation, not MarketLocation | undefined) and seeded on first use with a hardcoded Jita stub:
{id: 60003760,name:'Jita IV - Moon 4 - Caldari Navy Assembly Plant',systemId: 30000142,systemName:'Jita',regionId: 10000002,regionName:'The Forge'}
The selector is never clearable back to "no selection" — it always holds a concrete location.
Add a MarketLocationInput (existing component, currently only used locally in CompareAppraisal.vue) bound to this store directly on each of the 4 pages below — not a shared sidebar/topbar control:
TypeInfo.vue — wire store.location.id into getPrice(item)
Appraise.vue — wire store.location.id into appraise(items)
AcquisitionsPanel.vue — wire store.location.id into getPrices(types) (shared by Acquisitions.vue and ViewLedgerAcquisitions.vue)
ViewLedger.vue — wire store.location.id into appraiseItemBalances's getPrices call
All four call sites already accept an optional locationId param — no backend/API changes needed.
Price refresh on location change happens through each page's existing reactivity/refresh mechanism only — no new auto-refresh watchers are added:
TypeInfo.vue / ViewLedger.vue: naturally reactive via existing computedAsync.
AcquisitionsPanel.vue: picked up on the existing manual "Refresh" button / auto-refresh toggle.
Appraise.vue: picked up on the existing "Send" button.
Explicitly out of scope
CompareAppraisal.vue's own from/to selectors — those are already explicit per-comparison inputs, not the Jita-default path this issue targets.
Endpoints with no locationId parameter at all (scanMarketType, scanMarket, findQuartiles) — server-fixed location, unaffected by a client-side selector.
Any new reactivity/auto-refresh plumbing beyond what each page already has.
Acceptance criteria
useMarketLocationStore exists, persists to localStorage, and is seeded with the Jita stub on first use.
All four call sites pass store.location.id as locationId and show a MarketLocationInput bound to the store.
Changing the location on one page updates the same global selection reflected by the input on the other three pages.
CompareAppraisal.vue behavior is unchanged.
Related
Part of the item-comparison epic (appraise & compare items across market locations).
## Summary
Several pages fetch market prices without passing a `locationId`, which silently defaults to Jita server-side. Add a market location selector, persisted to localStorage, so users can price against a location of their choosing instead of the implicit Jita default.
## Scope
- New `useMarketLocationStore` in `src/market/location/location.ts` (alongside the existing `MarketLocation.ts`), following the `useMarketTaxStore` (`src/market/tax/tax.ts`) localStorage-backed Pinia pattern.
- Holds a single **global** selection — one `MarketLocation` shared by all call sites below, not a per-page choice.
- The ref is **non-optional** (`MarketLocation`, not `MarketLocation | undefined`) and seeded on first use with a hardcoded Jita stub:
```ts
{ id: 60003760, name: 'Jita IV - Moon 4 - Caldari Navy Assembly Plant', systemId: 30000142, systemName: 'Jita', regionId: 10000002, regionName: 'The Forge' }
```
- The selector is never clearable back to "no selection" — it always holds a concrete location.
- Add a `MarketLocationInput` (existing component, currently only used locally in `CompareAppraisal.vue`) bound to this store directly on each of the 4 pages below — not a shared sidebar/topbar control:
- `TypeInfo.vue` — wire `store.location.id` into `getPrice(item)`
- `Appraise.vue` — wire `store.location.id` into `appraise(items)`
- `AcquisitionsPanel.vue` — wire `store.location.id` into `getPrices(types)` (shared by `Acquisitions.vue` and `ViewLedgerAcquisitions.vue`)
- `ViewLedger.vue` — wire `store.location.id` into `appraiseItemBalances`'s `getPrices` call
- All four call sites already accept an optional `locationId` param — no backend/API changes needed.
- Price refresh on location change happens through each page's **existing** reactivity/refresh mechanism only — no new auto-refresh watchers are added:
- `TypeInfo.vue` / `ViewLedger.vue`: naturally reactive via existing `computedAsync`.
- `AcquisitionsPanel.vue`: picked up on the existing manual "Refresh" button / auto-refresh toggle.
- `Appraise.vue`: picked up on the existing "Send" button.
## Explicitly out of scope
- `CompareAppraisal.vue`'s own `from`/`to` selectors — those are already explicit per-comparison inputs, not the Jita-default path this issue targets.
- Endpoints with no `locationId` parameter at all (`scanMarketType`, `scanMarket`, `findQuartiles`) — server-fixed location, unaffected by a client-side selector.
- Any new reactivity/auto-refresh plumbing beyond what each page already has.
## Acceptance criteria
- [x] `useMarketLocationStore` exists, persists to localStorage, and is seeded with the Jita stub on first use.
- [x] All four call sites pass `store.location.id` as `locationId` and show a `MarketLocationInput` bound to the store.
- [x] Changing the location on one page updates the same global selection reflected by the input on the other three pages.
- [x] `CompareAppraisal.vue` behavior is unchanged.
## Related
Part of the `item-comparison` epic (appraise & compare items across market locations).
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.
Summary
Several pages fetch market prices without passing a
locationId, which silently defaults to Jita server-side. Add a market location selector, persisted to localStorage, so users can price against a location of their choosing instead of the implicit Jita default.Scope
useMarketLocationStoreinsrc/market/location/location.ts(alongside the existingMarketLocation.ts), following theuseMarketTaxStore(src/market/tax/tax.ts) localStorage-backed Pinia pattern.MarketLocationshared by all call sites below, not a per-page choice.MarketLocation, notMarketLocation | undefined) and seeded on first use with a hardcoded Jita stub:MarketLocationInput(existing component, currently only used locally inCompareAppraisal.vue) bound to this store directly on each of the 4 pages below — not a shared sidebar/topbar control:TypeInfo.vue— wirestore.location.idintogetPrice(item)Appraise.vue— wirestore.location.idintoappraise(items)AcquisitionsPanel.vue— wirestore.location.idintogetPrices(types)(shared byAcquisitions.vueandViewLedgerAcquisitions.vue)ViewLedger.vue— wirestore.location.idintoappraiseItemBalances'sgetPricescalllocationIdparam — no backend/API changes needed.TypeInfo.vue/ViewLedger.vue: naturally reactive via existingcomputedAsync.AcquisitionsPanel.vue: picked up on the existing manual "Refresh" button / auto-refresh toggle.Appraise.vue: picked up on the existing "Send" button.Explicitly out of scope
CompareAppraisal.vue's ownfrom/toselectors — those are already explicit per-comparison inputs, not the Jita-default path this issue targets.locationIdparameter at all (scanMarketType,scanMarket,findQuartiles) — server-fixed location, unaffected by a client-side selector.Acceptance criteria
useMarketLocationStoreexists, persists to localStorage, and is seeded with the Jita stub on first use.store.location.idaslocationIdand show aMarketLocationInputbound to the store.CompareAppraisal.vuebehavior is unchanged.Related
Part of the
item-comparisonepic (appraise & compare items across market locations).