diff --git a/app/Http/Controllers/Licenses/LicenseCheckinController.php b/app/Http/Controllers/Licenses/LicenseCheckinController.php index 53c9a2f611..a78b548723 100644 --- a/app/Http/Controllers/Licenses/LicenseCheckinController.php +++ b/app/Http/Controllers/Licenses/LicenseCheckinController.php @@ -76,7 +76,7 @@ class LicenseCheckinController extends Controller // Declare the rules for the form validation $rules = [ - 'note' => 'string|nullable', + 'notes' => 'string|nullable', ]; // Create a new validator instance from our validation rules @@ -97,6 +97,7 @@ class LicenseCheckinController extends Controller // Update the asset data $licenseSeat->assigned_to = null; $licenseSeat->asset_id = null; + $licenseSeat->notes = $request->input('notes'); // Was the asset updated? if ($licenseSeat->save()) { diff --git a/app/Http/Controllers/Licenses/LicenseCheckoutController.php b/app/Http/Controllers/Licenses/LicenseCheckoutController.php index 3a0f806584..ec6b4bbac8 100644 --- a/app/Http/Controllers/Licenses/LicenseCheckoutController.php +++ b/app/Http/Controllers/Licenses/LicenseCheckoutController.php @@ -63,6 +63,7 @@ class LicenseCheckoutController extends Controller $licenseSeat = $this->findLicenseSeatToCheckout($license, $seatId); $licenseSeat->user_id = Auth::id(); + $licenseSeat->notes = $request->input('notes'); $checkoutMethod = 'checkoutTo'.ucwords(request('checkout_to_type')); diff --git a/app/Http/Transformers/LicenseSeatsTransformer.php b/app/Http/Transformers/LicenseSeatsTransformer.php index f82fd3a49f..62614db4d3 100644 --- a/app/Http/Transformers/LicenseSeatsTransformer.php +++ b/app/Http/Transformers/LicenseSeatsTransformer.php @@ -45,6 +45,7 @@ class LicenseSeatsTransformer 'name'=> e($seat->location()->name), ] : null, 'reassignable' => (bool) $seat->license->reassignable, + 'notes' => e($seat->notes), 'user_can_checkout' => (($seat->assigned_to == '') && ($seat->asset_id == '')), ]; diff --git a/app/Presenters/LicensePresenter.php b/app/Presenters/LicensePresenter.php index f2d54549e1..e76c9152cb 100644 --- a/app/Presenters/LicensePresenter.php +++ b/app/Presenters/LicensePresenter.php @@ -254,6 +254,14 @@ class LicensePresenter extends Presenter 'visible' => true, 'formatter' => 'locationsLinkObjFormatter', ], + [ + 'field' => 'notes', + 'searchable' => false, + 'sortable' => false, + 'visible' => false, + 'title' => trans('general.notes'), + 'formatter' => 'notesFormatter' + ], [ 'field' => 'checkincheckout', 'searchable' => false, diff --git a/resources/views/licenses/checkin.blade.php b/resources/views/licenses/checkin.blade.php index c0cc94cabe..075eaa6206 100755 --- a/resources/views/licenses/checkin.blade.php +++ b/resources/views/licenses/checkin.blade.php @@ -49,11 +49,11 @@ -
+
- - {!! $errors->first('note', '') !!} + + {!! $errors->first('notes', '') !!}