diff --git a/app/Http/Controllers/Components/ComponentCheckinController.php b/app/Http/Controllers/Components/ComponentCheckinController.php index b42cdca9eb..eee0f15827 100644 --- a/app/Http/Controllers/Components/ComponentCheckinController.php +++ b/app/Http/Controllers/Components/ComponentCheckinController.php @@ -8,6 +8,7 @@ use App\Http\Controllers\Controller; use App\Models\Asset; use App\Models\Component; use Illuminate\Http\Request; +use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Validator; @@ -96,12 +97,12 @@ class ComponentCheckinController extends Controller $asset = Asset::find($component_assets->asset_id); - event(new CheckoutableCheckedIn($component, $asset, Auth::user(), $request->input('note'))); + event(new CheckoutableCheckedIn($component, $asset, Auth::user(), $request->input('note'), Carbon::now())); return redirect()->route('components.index')->with('success', - trans('admin/components/message.checkout.success')); + trans('admin/components/message.checkin.success')); } - return redirect()->route('components.index')->with('error', trans('admin/components/message.not_found')); + return redirect()->route('components.index')->with('error', trans('admin/components/message.does_not_exist')); } } diff --git a/resources/views/components/checkout.blade.php b/resources/views/components/checkout.blade.php index d1338f4f8c..2bebc06d6a 100644 --- a/resources/views/components/checkout.blade.php +++ b/resources/views/components/checkout.blade.php @@ -42,7 +42,7 @@