fix changelog issue

This commit is contained in:
Chris Smith
2025-02-19 22:49:26 +01:00
parent 05cadf7fc3
commit ad82544bc4
5 changed files with 13 additions and 15 deletions

View File

@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Changed
* User view text to be more consistant
### Removed
* Form fields not needed
## [0.1.0] - 2025-02-10 ## [0.1.0] - 2025-02-10

View File

@@ -12,7 +12,7 @@ use yii\widgets\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'file_name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'file_name')->hiddenInput(['maxlength' => true]) ?>
<?= $form->field($model, 'calories')->textInput() ?> <?= $form->field($model, 'calories')->textInput() ?>
@@ -24,11 +24,6 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'fiber')->textInput() ?> <?= $form->field($model, 'fiber')->textInput() ?>
<?= $form->field($model, 'meal')->textInput() ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<div class="form-group"> <div class="form-group">
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?> <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>

View File

@@ -17,7 +17,7 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<p> <p>
<?= Html::a('Create Meal', ['create'], ['class' => 'btn btn-success']) ?> <?= Html::a('Capture Meal', ['upload'], ['class' => 'btn btn-success']) ?>
</p> </p>

View File

@@ -5,9 +5,9 @@ use yii\helpers\Html;
/** @var yii\web\View $this */ /** @var yii\web\View $this */
/** @var common\models\Meal $model */ /** @var common\models\Meal $model */
$this->title = 'Update Meal: ' . $model->id; $this->title = 'Update Meal: ' . $model->food_name;
$this->params['breadcrumbs'][] = ['label' => 'Meals', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Meals', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]]; $this->params['breadcrumbs'][] = ['label' => $model->food_name, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update'; $this->params['breadcrumbs'][] = 'Update';
?> ?>
<div class="meal-update"> <div class="meal-update">

View File

@@ -6,7 +6,7 @@ use yii\widgets\DetailView;
/** @var yii\web\View $this */ /** @var yii\web\View $this */
/** @var common\models\Meal $model */ /** @var common\models\Meal $model */
$this->title = $model->id; $this->title = $model->food_name;
$this->params['breadcrumbs'][] = ['label' => 'Meals', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Meals', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this); \yii\web\YiiAsset::register($this);
@@ -29,16 +29,12 @@ $this->params['breadcrumbs'][] = $this->title;
<?= DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
'id',
'file_name',
'calories', 'calories',
'protein', 'protein',
'fat', 'fat',
'carbohydrates', 'carbohydrates',
'fiber', 'fiber',
'meal', 'created_at:datetime',
'created_at',
'updated_at',
], ],
]) ?> ]) ?>