mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 10:12:21 +00:00
Handle empty market category on Drops page (#7959)
* fix(market): hide category in view * refactor(view): if, not hide * fix(test): allow empty market cat
This commit is contained in:
parent
75eb1b11cf
commit
cb1417ea58
3 changed files with 2 additions and 7 deletions
|
|
@ -78,6 +78,7 @@ shops.getMarketCategories = function getMarket (user, language) {
|
|||
purchaseType: 'hatchingPotions',
|
||||
};
|
||||
}).sortBy('key').value();
|
||||
categories.push(premiumHatchingPotionsCategory);
|
||||
|
||||
let foodCategory = {
|
||||
identifier: 'food',
|
||||
|
|
|
|||
|
|
@ -19,12 +19,6 @@ describe('shops', () => {
|
|||
expect(identifiers.length).to.eql(shopCategories.length);
|
||||
});
|
||||
|
||||
it('does not contain an empty category', () => {
|
||||
_.each(shopCategories, (category) => {
|
||||
expect(category.items.length).to.be.greaterThan(0);
|
||||
});
|
||||
});
|
||||
|
||||
it('items contain required fields', () => {
|
||||
_.each(shopCategories, (category) => {
|
||||
_.each(category.items, (item) => {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
|
||||
menu.inventory-list(type='list')
|
||||
li.customize-menu(ng-repeat='category in marketShopCategories')
|
||||
menu.pets-menu(label='{{category.text}}')
|
||||
menu.pets-menu(label='{{category.text}}', ng-if='category.items.length > 0')
|
||||
p.muted(ng-bind-html='category.notes')
|
||||
|
||||
div(ng-repeat='item in category.items')
|
||||
|
|
|
|||
Loading…
Reference in a new issue