eating-coleslaw / squittal.ScrimPlanetmans

An app for running, streaming, and collecting data for Planetside 2 scrims.
16 stars 11 forks source link

Not all Item Categories are available in the UI #4

Open Elec332 opened 1 year ago

Elec332 commented 1 year ago

Item Categories are hardcoded in https://github.com/eating-coleslaw/squittal.ScrimPlanetmans/blob/conquest-dev-improvements/squittal.ScrimPlanetmans.App/Models/Planetside/ItemCategoryDomain.cs because their meaning is not exposed in the API.

This would be fine (currently), but in the ruleset view and edit pages, only the first 4 are hardcoded to be included in the options: https://github.com/eating-coleslaw/squittal.ScrimPlanetmans/blob/conquest-dev-improvements/squittal.ScrimPlanetmans.App/Pages/Admin/Rulesets/EditRulesetItemCategoryRules.razor#L55

This causes categories like AMR's or Heavy Crossbow's to not be selectable in the interface, because they aren't in the first 4 hardcoded categories (for some reason they're in 5-Other, see DB-screenshot below).

image

Iterating through all available item categories would solve the issue of these settings being unavailable in the web-interface.

EDIT: This is also an issue on the main branch EDIT2: Adding <button type="button" title="View air vehicle item category rules" class="btn btn-link @GetViewTabStyle(ItemCategoryDomain.Other)" @onclick="@(() => OnSelectNewView(ItemCategoryDomain.Other))">Other</button> under line 58 is a quick-and-dirty solution

eating-coleslaw commented 1 year ago

@Elec332 - Sorry for the long delay on this, but the issue should be fixed now on the master branch. The new item categories have been assigned to the appropriate domains.