feat(nutrition): add categories list and template to root catalog
- Add Categories (m0031_ct0003) and Food Items (m0031_ct0002) to data/list.json - Add data/categories.json with 14 food categories and item counts - Update m0031_ct0001.json template with content_count and content_label - Update m0031_ct0003.json template for nutrition categories collection - Update module.json default_template_code to m0031_ct0001
This commit is contained in:
parent
45da723ee2
commit
8f61cef526
|
|
@ -0,0 +1,117 @@
|
||||||
|
{
|
||||||
|
"contents": [
|
||||||
|
{
|
||||||
|
"source_id": "1",
|
||||||
|
"name": "Beverages",
|
||||||
|
"code": "beverages",
|
||||||
|
"content_count": 14,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "2",
|
||||||
|
"name": "Common Supplements",
|
||||||
|
"code": "common_supplements",
|
||||||
|
"content_count": 3,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "3",
|
||||||
|
"name": "Condiments",
|
||||||
|
"code": "condiments",
|
||||||
|
"content_count": 14,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "4",
|
||||||
|
"name": "Culinary Herbs/Spices",
|
||||||
|
"code": "culinary_herbs_spices",
|
||||||
|
"content_count": 40,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "5",
|
||||||
|
"name": "Dairy",
|
||||||
|
"code": "dairy",
|
||||||
|
"content_count": 20,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "6",
|
||||||
|
"name": "Fish",
|
||||||
|
"code": "fish",
|
||||||
|
"content_count": 26,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "7",
|
||||||
|
"name": "Fruit",
|
||||||
|
"code": "fruit",
|
||||||
|
"content_count": 48,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "8",
|
||||||
|
"name": "Grains",
|
||||||
|
"code": "grains",
|
||||||
|
"content_count": 17,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "9",
|
||||||
|
"name": "Legumes",
|
||||||
|
"code": "legumes",
|
||||||
|
"content_count": 21,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "10",
|
||||||
|
"name": "Meat",
|
||||||
|
"code": "meat",
|
||||||
|
"content_count": 24,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "11",
|
||||||
|
"name": "Medicinal Herbs/Spices",
|
||||||
|
"code": "medicinal_herbs_spices",
|
||||||
|
"content_count": 122,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "12",
|
||||||
|
"name": "Nuts, Seeds",
|
||||||
|
"code": "nuts_seeds",
|
||||||
|
"content_count": 18,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "13",
|
||||||
|
"name": "Oils, Fats",
|
||||||
|
"code": "oils_fats",
|
||||||
|
"content_count": 12,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source_id": "14",
|
||||||
|
"name": "Vegetables",
|
||||||
|
"code": "vegetables",
|
||||||
|
"content_count": 62,
|
||||||
|
"content_label": "items",
|
||||||
|
"sort_order": 14
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
{
|
{
|
||||||
"name": "Food Items",
|
"name": "Food Items",
|
||||||
"sort_order": 0,
|
"sort_order": 0,
|
||||||
|
"content_count": 441,
|
||||||
|
"content_label": "items",
|
||||||
"link": {
|
"link": {
|
||||||
"type": "template_ref",
|
"type": "template_ref",
|
||||||
"label": "Food Items",
|
"label": "Food Items",
|
||||||
|
|
@ -14,17 +16,19 @@
|
||||||
"code": "food_items"
|
"code": "food_items"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Effects",
|
"name": "Categories",
|
||||||
"sort_order": 1,
|
"sort_order": 1,
|
||||||
|
"content_count": 14,
|
||||||
|
"content_label": "categories",
|
||||||
"link": {
|
"link": {
|
||||||
"type": "template_ref",
|
"type": "template_ref",
|
||||||
"label": "Effects",
|
"label": "Categories",
|
||||||
"target": {
|
"target": {
|
||||||
"module_code": "m0031",
|
"module_code": "m0031",
|
||||||
"template_code": "m0031_ct0003"
|
"template_code": "m0031_ct0003"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"code": "effects"
|
"code": "categories"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
"description": "Traditional Chinese dietary therapy, food thermal energetics (cold, cool, neutral, warm, hot), and therapeutic effects.",
|
"description": "Traditional Chinese dietary therapy, food thermal energetics (cold, cool, neutral, warm, hot), and therapeutic effects.",
|
||||||
"short_description": "TCM dietary therapy and food thermal energetics.",
|
"short_description": "TCM dietary therapy and food thermal energetics.",
|
||||||
"code": "m0031",
|
"code": "m0031",
|
||||||
"default_template_code": "m0031_ct0002",
|
"default_template_code": "m0031_ct0001",
|
||||||
"kind": "nutrition",
|
"kind": "nutrition",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"status": "draft",
|
"status": "active",
|
||||||
"entry_template_code": "m0031_ct0002"
|
"entry_template_code": "m0031_ct0001"
|
||||||
},
|
},
|
||||||
"content_mapping": [
|
"content_mapping": [
|
||||||
{
|
{
|
||||||
|
|
@ -26,10 +26,10 @@
|
||||||
"template_path": "templates/m0031_ct0002.json"
|
"template_path": "templates/m0031_ct0002.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Effects List",
|
"name": "Categories",
|
||||||
"code": "m0031_ct0003",
|
"code": "m0031_ct0003",
|
||||||
"content_kind": "nutrition",
|
"content_kind": "nutrition",
|
||||||
"data_path": "data/effects_master.json",
|
"data_path": "data/categories.json",
|
||||||
"template_path": "templates/m0031_ct0003.json"
|
"template_path": "templates/m0031_ct0003.json"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,22 @@
|
||||||
"definition_kind": "scalar",
|
"definition_kind": "scalar",
|
||||||
"is_multivalue": false
|
"is_multivalue": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Content Count",
|
||||||
|
"code": "content_count",
|
||||||
|
"data_type": "number",
|
||||||
|
"default": 0,
|
||||||
|
"definition_kind": "scalar",
|
||||||
|
"is_multivalue": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Content Label",
|
||||||
|
"code": "content_label",
|
||||||
|
"data_type": "text",
|
||||||
|
"default": "",
|
||||||
|
"definition_kind": "scalar",
|
||||||
|
"is_multivalue": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Content Link",
|
"name": "Content Link",
|
||||||
"code": "link",
|
"code": "link",
|
||||||
|
|
@ -232,6 +248,18 @@
|
||||||
"empty_behavior": "hide",
|
"empty_behavior": "hide",
|
||||||
"visibility": "hide"
|
"visibility": "hide"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"attribute_key": "m0031_ct0001.content_count",
|
||||||
|
"empty_behavior": "hide",
|
||||||
|
"visibility": "show",
|
||||||
|
"display_order": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"attribute_key": "m0031_ct0001.content_label",
|
||||||
|
"empty_behavior": "hide",
|
||||||
|
"visibility": "show",
|
||||||
|
"display_order": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"attribute_key": "m0031_ct0001.code",
|
"attribute_key": "m0031_ct0001.code",
|
||||||
"empty_behavior": "hide",
|
"empty_behavior": "hide",
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "nutrition_effect_content",
|
"name": "nutrition_category_content",
|
||||||
"code": "m0031_ct0003",
|
"code": "m0031_ct0003",
|
||||||
"description": "",
|
"description": "Nutrition categories classification",
|
||||||
"content_kind": "nutrition",
|
"content_kind": "nutrition",
|
||||||
"is_searchable": false,
|
"is_searchable": true,
|
||||||
"is_filterable": false,
|
"is_filterable": true,
|
||||||
"attribute_prefix_code": "m0031_ct0003",
|
"attribute_prefix_code": "m0031_ct0003",
|
||||||
"attribute_prefix_name": "nutrition_effect",
|
"attribute_prefix_name": "nutrition_category",
|
||||||
"attribute_defs": [
|
"attribute_defs": [
|
||||||
{
|
{
|
||||||
"name": "Source ID",
|
"name": "Source ID",
|
||||||
|
|
@ -28,8 +28,8 @@
|
||||||
"is_searchable": true
|
"is_searchable": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Effect Name",
|
"name": "Name",
|
||||||
"code": "effect_name",
|
"code": "name",
|
||||||
"data_type": "text",
|
"data_type": "text",
|
||||||
"default": "",
|
"default": "",
|
||||||
"definition_kind": "scalar",
|
"definition_kind": "scalar",
|
||||||
|
|
@ -38,6 +38,22 @@
|
||||||
"is_filterable": true,
|
"is_filterable": true,
|
||||||
"is_searchable": true
|
"is_searchable": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Content Count",
|
||||||
|
"code": "content_count",
|
||||||
|
"data_type": "number",
|
||||||
|
"default": 0,
|
||||||
|
"definition_kind": "scalar",
|
||||||
|
"is_multivalue": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Content Label",
|
||||||
|
"code": "content_label",
|
||||||
|
"data_type": "text",
|
||||||
|
"default": "items",
|
||||||
|
"definition_kind": "scalar",
|
||||||
|
"is_multivalue": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Sort Order",
|
"name": "Sort Order",
|
||||||
"code": "sort_order",
|
"code": "sort_order",
|
||||||
|
|
@ -54,9 +70,9 @@
|
||||||
"is_active": true,
|
"is_active": true,
|
||||||
"mode": "collection",
|
"mode": "collection",
|
||||||
"renderers": {
|
"renderers": {
|
||||||
"collection": "nutrition_effect_collection",
|
"collection": "nutrition_category_collection",
|
||||||
"collection_item": "nutrition_effect_card",
|
"collection_item": "nutrition_category_card",
|
||||||
"detail": "nutrition_effect_detail"
|
"detail": "nutrition_category_detail"
|
||||||
},
|
},
|
||||||
"link": {
|
"link": {
|
||||||
"renderer": "content_link"
|
"renderer": "content_link"
|
||||||
|
|
@ -73,7 +89,19 @@
|
||||||
"visibility": "hide"
|
"visibility": "hide"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attribute_key": "m0031_ct0003.effect_name",
|
"attribute_key": "m0031_ct0003.name",
|
||||||
|
"empty_behavior": "hide",
|
||||||
|
"visibility": "show",
|
||||||
|
"display_order": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"attribute_key": "m0031_ct0003.content_count",
|
||||||
|
"empty_behavior": "hide",
|
||||||
|
"visibility": "show",
|
||||||
|
"display_order": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"attribute_key": "m0031_ct0003.content_label",
|
||||||
"empty_behavior": "hide",
|
"empty_behavior": "hide",
|
||||||
"visibility": "show",
|
"visibility": "show",
|
||||||
"display_order": 0
|
"display_order": 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue