DEV: Indicate whether categories are missing on categories page (#27608)
This commit is contained in:
parent
f3a89620a1
commit
0d6bd5207d
|
@ -40,6 +40,12 @@
|
||||||
@listType={{this.listType}}
|
@listType={{this.listType}}
|
||||||
/>
|
/>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
{{#if (gt this.category.unloadedSubcategoryCount 0)}}
|
||||||
|
{{i18n
|
||||||
|
"category_row.subcategory_count"
|
||||||
|
count=this.category.unloadedSubcategoryCount
|
||||||
|
}}
|
||||||
|
{{/if}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{else if this.category.subcategories}}
|
{{else if this.category.subcategories}}
|
||||||
|
@ -50,6 +56,12 @@
|
||||||
@listType={{this.listType}}
|
@listType={{this.listType}}
|
||||||
/>
|
/>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
{{#if (gt this.category.unloadedSubcategoryCount 0)}}
|
||||||
|
{{i18n
|
||||||
|
"category_row.subcategory_count"
|
||||||
|
count=this.category.unloadedSubcategoryCount
|
||||||
|
}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -491,6 +491,11 @@ export default class Category extends RestModel {
|
||||||
return this.site.categories.filterBy("parent_category_id", this.id);
|
return this.site.categories.filterBy("parent_category_id", this.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@computed("subcategories")
|
||||||
|
get unloadedSubcategoryCount() {
|
||||||
|
return this.subcategory_count - this.subcategories.length;
|
||||||
|
}
|
||||||
|
|
||||||
@computed("subcategory_list")
|
@computed("subcategory_list")
|
||||||
get serializedSubcategories() {
|
get serializedSubcategories() {
|
||||||
return this.subcategory_list?.map((c) => Category.create(c));
|
return this.subcategory_list?.map((c) => Category.create(c));
|
||||||
|
|
Loading…
Reference in New Issue