diff --git a/cookbook/helper/fdc_helper.py b/cookbook/helper/fdc_helper.py index 09e0f292..b09e7bfa 100644 --- a/cookbook/helper/fdc_helper.py +++ b/cookbook/helper/fdc_helper.py @@ -8,12 +8,12 @@ def get_all_nutrient_types(): nutrients = {} for food in json_data['FoundationFoods']: for entry in food['foodNutrients']: - nutrients[entry['nutrient']['id']] = entry['nutrient']['name'] + nutrients[entry['nutrient']['id']] = {'name': entry['nutrient']['name'], 'unit': entry['nutrient']['unitName']} nutrient_ids = list(nutrients.keys()) nutrient_ids.sort() for nid in nutrient_ids: - print('{', f'value: {nid}, text: "{nutrients[nid]} ({nid})"', '},') + print('{', f'value: {nid}, text: "{nutrients[nid]["name"]} [{nutrients[nid]["unit"]}] ({nid})"', '},') get_all_nutrient_types() diff --git a/vue/src/apps/PropertyEditorView/PropertyEditorView.vue b/vue/src/apps/PropertyEditorView/PropertyEditorView.vue index 79bce381..076628c3 100644 --- a/vue/src/apps/PropertyEditorView/PropertyEditorView.vue +++ b/vue/src/apps/PropertyEditorView/PropertyEditorView.vue @@ -29,7 +29,7 @@ {{ pt.name }} ({{ pt.unit }})
- {{ pt.order}} + {{ pt.order}} FDC FDC
diff --git a/vue/src/components/PropertyViewComponent.vue b/vue/src/components/PropertyViewComponent.vue index 7aa8c218..2c566e52 100644 --- a/vue/src/components/PropertyViewComponent.vue +++ b/vue/src/components/PropertyViewComponent.vue @@ -24,7 +24,7 @@ - + @@ -41,14 +41,18 @@ - -
{{ $t('per_serving') }} {{ $t('total') }} - - + + + +
+ +
+ {{ $t('Property_Editor') }} +
@@ -79,7 +83,7 @@