diff --git a/app/Http/Requests/Bo/Invoices/StoreInvoiceRequest.php b/app/Http/Requests/Bo/Invoices/StoreInvoiceRequest.php index d20ddd9..0bb858d 100644 --- a/app/Http/Requests/Bo/Invoices/StoreInvoiceRequest.php +++ b/app/Http/Requests/Bo/Invoices/StoreInvoiceRequest.php @@ -49,8 +49,8 @@ class StoreInvoiceRequest extends FormRequest 'object' => 'required|string|min:3|max:255', 'tasks' => 'required|array|min:1', 'tasks.*' => 'required|array', - 'tasks.*.days' => 'required|numeric|min:0.125', - 'tasks.*.amount' => 'required|numeric|min:0.125', + 'tasks.*.days' => 'required|numeric', + 'tasks.*.amount' => 'required|numeric', 'tasks.*.desc' => 'required|string|min:10', 'tasks.*.type' => [ 'required', new Enum(TaskTypeEnum::class) diff --git a/resources/ts/bo/components/InvoiceTasksComponent.vue b/resources/ts/bo/components/InvoiceTasksComponent.vue index 0a5ee13..02028b8 100644 --- a/resources/ts/bo/components/InvoiceTasksComponent.vue +++ b/resources/ts/bo/components/InvoiceTasksComponent.vue @@ -97,7 +97,6 @@ v-model="task.amount" type="number" step="0.01" - min="0" > € diff --git a/resources/views/bo/pages/packages/form-inputs.blade.php b/resources/views/bo/pages/packages/form-inputs.blade.php index 47a7226..b41edb1 100644 --- a/resources/views/bo/pages/packages/form-inputs.blade.php +++ b/resources/views/bo/pages/packages/form-inputs.blade.php @@ -1,7 +1,7 @@
{{-- NAME --}}
-
+
{{ Str::ucfirst(__('validation.attributes.name')) }}
@@ -21,7 +21,7 @@ 'model' => Str::singular(__('models.classes.packages')), ]), 'min' => 3, - 'max' => 255 + 'max' => 255, ]), 'placeholder' => __(':field du :model', [ 'field' => Str::ucfirst(__('validation.attributes.name')), @@ -34,14 +34,14 @@
{{-- AMOUNT --}}
-
- {{ Str::ucfirst(__('validation.attributes.amount.day')) }} +
+ {{ Str::ucfirst(__('validation.attributes.day')) }}
@include('bo.partials.inputs.int-number', [ 'id' => 'packageAmount', 'label' => __(':field du :model', [ - 'field' => Str::ucfirst(__('validation.attributes.amount.day')), + 'field' => Str::ucfirst(__('validation.attributes.day')), 'model' => Str::singular(__('models.classes.packages')), ]), 'hasWordCounter' => true, @@ -50,12 +50,12 @@ 'model' => $packageModel ?? null, 'helper' => __('validation.min.numeric', [ 'attribute' => __(':field du :model', [ - 'field' => Str::ucfirst(__('validation.attributes.amount.day')), + 'field' => Str::ucfirst(__('validation.attributes.day')), 'model' => Str::singular(__('models.classes.packages')), ]), 'min' => 0, ]), - 'step' => 0.01 + 'step' => 0.01, ])
@@ -64,15 +64,15 @@
@push('scripts') - + submitClone.addEventListener('click', (event) => { + event.preventDefault(); + submit.click(''); + }) + }); + @endpush diff --git a/resources/views/bo/pages/packages/index.blade.php b/resources/views/bo/pages/packages/index.blade.php index 7b44b4c..7628674 100644 --- a/resources/views/bo/pages/packages/index.blade.php +++ b/resources/views/bo/pages/packages/index.blade.php @@ -4,63 +4,54 @@ @section('description', __('Liste de tous les :model', ['model' => __('models.classes.packages')])) @section('content') -
- @include('breadcrumbs.breadcrumb-body') - - - -
-@include('bo.modules.search-bar') - - @if (count($packageModels) > 0) - - @include('bo.modules.table-col-sorter', [ - 'cols' => [ - 'name' => Str::ucfirst(__('validation.attributes.name')), - 'amount' => Str::ucfirst(__('validation.attributes.amount.day')), - ], - ]) - - - @foreach ($packageModels as $packageModel) - - - - - - @endforeach - - @else - - - - @endif -
{{ $packageModel->name }}{{ $packageModel->amount }} -
- - - - @csrf - @method('DELETE') - -
-
{{ __('crud.other.no_model_found', ['model' => Str::singular(__('models.classes.packages'))]) }}
-{!! $packageModels->links() !!} +
+ @include('breadcrumbs.breadcrumb-body') + + + +
+ @include('bo.modules.search-bar') + + @if (count($packageModels) > 0) + + @include('bo.modules.table-col-sorter', [ + 'cols' => [ + 'name' => Str::ucfirst(__('validation.attributes.name')), + 'amount' => Str::ucfirst(__('validation.attributes.day')), + ], + ]) + + + @foreach ($packageModels as $packageModel) + + + + + + @endforeach + + @else + + + + @endif +
{{ $packageModel->name }}{{ $packageModel->amount }} +
+ + + + @csrf + @method('DELETE') + +
+
+ {{ __('crud.other.no_model_found', ['model' => Str::singular(__('models.classes.packages'))]) }}
+ {!! $packageModels->links() !!} @endsection