Fix issue with renamed field.

This commit is contained in:
James Cole
2022-05-04 05:53:47 +02:00
parent cba3590dec
commit 51e23dae21
20 changed files with 82 additions and 82 deletions

View File

@@ -49,9 +49,9 @@ class StoreRequest extends FormRequest
public function getAll(): array
{
$fields = [
'type' => ['type', 'string'],
'title' => ['title', 'string'],
'description' => ['description', 'string'],
'type' => ['type', 'convertString'],
'title' => ['title', 'convertString'],
'description' => ['description', 'convertString'],
'first_date' => ['first_date', 'date'],
'repeat_until' => ['repeat_until', 'date'],
'nr_of_repetitions' => ['nr_of_repetitions', 'integer'],

View File

@@ -51,14 +51,14 @@ class UpdateRequest extends FormRequest
{
// this is the way:
$fields = [
'title' => ['title', 'string'],
'description' => ['description', 'string'],
'title' => ['title', 'convertString'],
'description' => ['description', 'convertString'],
'first_date' => ['first_date', 'date'],
'repeat_until' => ['repeat_until', 'date'],
'nr_of_repetitions' => ['nr_of_repetitions', 'integer'],
'apply_rules' => ['apply_rules', 'boolean'],
'active' => ['active', 'boolean'],
'notes' => ['notes', 'string'],
'notes' => ['notes', 'convertString'],
];
$reps = $this->getRepetitionData();
$transactions = $this->getTransactionData();