diff --git a/api/src/Controller/FruitController.php b/api/src/Controller/FruitController.php index 33a68b7..5635980 100644 --- a/api/src/Controller/FruitController.php +++ b/api/src/Controller/FruitController.php @@ -232,7 +232,7 @@ private function serializedForm(Request $request, Fruit $fruit): Fruit return $fruit->setName($data['name'] ?? $fruit->getName() ?: '') ->setGenus($data['genus'] ?? $fruit->getGenus() ?: '') ->setFamily($data['family'] ?? $fruit->getFamily() ?: '') - ->setFruitOrder($data['fruit_order'] ?? $fruit->getFruitOrder() ?: '') + ->setFruitOrder($data['fruitOrder'] ?? $fruit->getFruitOrder() ?: '') ->setCarbohydrates($data['carbohydrates'] ?? $fruit->getCarbohydrates() ?: 0) ->setFat($data['fat'] ?? $fruit->getFat() ?: 0) ->setProtein($data['protein'] ?? $fruit->getProtein() ?: 0) diff --git a/app/src/types/Fruit.ts b/app/src/types/Fruit.ts index 32bf4ae..2f5e0ff 100644 --- a/app/src/types/Fruit.ts +++ b/app/src/types/Fruit.ts @@ -1,15 +1,12 @@ export default interface Fruit { - id: null|number, + id: number, name: string, - genus: string + genus: string, family: string, fruitOrder: string, carbohydrates: number, - fat: number, protein: number, + fat: number, sugar: number, calories: number, - source: string, - createdAt: Date, - updatedAt: Date } diff --git a/app/src/views/Form.vue b/app/src/views/Form.vue new file mode 100644 index 0000000..a3d67ec --- /dev/null +++ b/app/src/views/Form.vue @@ -0,0 +1,98 @@ + + + +