mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Updated export routine.
This commit is contained in:
@@ -38,20 +38,19 @@ class ExportFormRequest extends Request
|
||||
public function rules()
|
||||
{
|
||||
$sessionFirst = clone session('first');
|
||||
|
||||
$first = $sessionFirst->subDay()->format('Y-m-d');
|
||||
$today = Carbon::create()->addDay()->format('Y-m-d');
|
||||
$formats = join(',', array_keys(config('firefly.export_formats')));
|
||||
$first = $sessionFirst->subDay()->format('Y-m-d');
|
||||
$today = Carbon::create()->addDay()->format('Y-m-d');
|
||||
$formats = join(',', array_keys(config('firefly.export_formats')));
|
||||
|
||||
return [
|
||||
'export_start_range' => 'required|date|after:' . $first,
|
||||
'export_end_range' => 'required|date|before:' . $today,
|
||||
'accounts' => 'required',
|
||||
'job' => 'required|belongsToUser:export_jobs,key',
|
||||
'accounts.*' => 'required|exists:accounts,id|belongsToUser:accounts',
|
||||
'include_attachments' => 'in:0,1',
|
||||
'include_config' => 'in:0,1',
|
||||
'exportFormat' => 'in:' . $formats,
|
||||
// 'export_start_range' => 'required|date|after:' . $first,
|
||||
// 'export_end_range' => 'required|date|before:' . $today,
|
||||
// 'accounts' => 'required',
|
||||
// 'job' => 'required|belongsToUser:export_jobs,key',
|
||||
// 'accounts.*' => 'required|exists:accounts,id|belongsToUser:accounts',
|
||||
// 'include_attachments' => 'in:0,1',
|
||||
// 'include_config' => 'in:0,1',
|
||||
// 'exportFormat' => 'in:' . $formats,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class Request extends FormRequest
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function boolean(string $field): bool
|
||||
public function boolean(string $field): bool
|
||||
{
|
||||
return intval($this->input($field)) === 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user