Fix issue validating budget amounts.

This commit is contained in:
James Cole
2024-01-02 07:08:15 +01:00
parent 09a25957d0
commit 85bde79fd1
15 changed files with 5 additions and 32 deletions

View File

@@ -157,7 +157,6 @@ class CreateController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -182,7 +182,6 @@ class EditController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string) trans('firefly.no_att_demo_user'));
}

View File

@@ -117,7 +117,6 @@ class CreateController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -129,7 +129,6 @@ class EditController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string) trans('firefly.no_att_demo_user'));
}

View File

@@ -128,7 +128,6 @@ class CreateController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -138,7 +138,6 @@ class EditController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -101,7 +101,6 @@ class CreateController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -105,7 +105,6 @@ class EditController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -121,21 +121,4 @@ abstract class Controller extends BaseController
}
);
}
final protected function auditLogAttachmentInfo(?array $files): void
{
if (null === $files) {
Log::channel('audit')->info('No files found');
return;
}
/**
* @var int $index
* @var UploadedFile $file
*/
foreach ($files as $index => $file) {
Log::channel('audit')->info(sprintf('File [%d/%d] upload attachment "%s", mime is: "%s".', $index + 1, count($files), $file->getClientOriginalName(), $file->getMimeType()));
}
}
}

View File

@@ -108,7 +108,6 @@ class CreateController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -128,7 +128,6 @@ class EditController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -243,7 +243,6 @@ class CreateController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -181,7 +181,6 @@ class EditController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}

View File

@@ -306,7 +306,6 @@ class TagController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}
@@ -342,7 +341,6 @@ class TagController extends Controller
}
if (null !== $files && auth()->user()->hasRole('demo')) {
Log::channel('audit')->info(sprintf('The demo user is trying to upload attachments in %s.', __METHOD__));
$this->auditLogAttachmentInfo($files);
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
}