Skip to content

A free open source IT asset/license management system

more test work

akemidx2901ecbf4376
diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php
index 116b8b39f2..dec4b0912f 100644
--- a/app/Http/Requests/AssetCheckinRequest.php
+++ b/app/Http/Requests/AssetCheckinRequest.php
@@ -21,9 +21,9 @@ class AssetCheckinRequest extends Request
*/
public function rules()
{
- return [
+ 'note' => 'required|in:asset,',
- ];
+ return $rules;
}
public function response(array $errors)
diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php
index f48a7d5e53..0f42076c9b 100644
--- a/app/Http/Requests/AssetCheckoutRequest.php
+++ b/app/Http/Requests/AssetCheckoutRequest.php
@@ -27,6 +27,7 @@ class AssetCheckoutRequest extends Request
'assigned_location' => 'required_without_all:assigned_user,assigned_asset',
'status_id' => 'exists:status_labels,id,deployable,1',
'checkout_to_type' => 'required|in:asset,location,user',
+ 'note' => 'required|in:asset,',
'checkout_at' => [
'nullable',
'date',
diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php
index 496e899add..12c678e645 100755
--- a/resources/views/hardware/checkin.blade.php
+++ b/resources/views/hardware/checkin.blade.php
@@ -124,13 +124,6 @@
name="note">{{ old('note', $asset->note) }}</textarea>
{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
- @else
- <div class="col-md-8">
- <textarea class="col-md-6 form-control" id="note"
- name="note">{{ old('note', $asset->note) }}</textarea>
- {!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
- </div>
- @endif
</div>
</div> <!--/.box-body-->
</div> <!--/.box-body-->