Fixes some typos

This commit is contained in:
Till Deeke 2018-07-28 00:41:31 +02:00
parent 72b43b6526
commit 39e6b59335
4 changed files with 7 additions and 7 deletions

View file

@ -80,7 +80,7 @@ class AccessoryCheckoutController extends Controller
DB::table('accessories_users')->where('assigned_to', '=', $accessory->assigned_to)->where('accessory_id', '=', $accessory->id)->first();
event(new AccessoryCheckedOut($accessory, $user, Auth::user(), $request->input('note'));
event(new AccessoryCheckedOut($accessory, $user, Auth::user(), $request->input('note')));
// Redirect to the new accessory page
return redirect()->route('accessories.index')->with('success', trans('admin/accessories/message.checkout.success'));

View file

@ -94,7 +94,7 @@ class ComponentCheckinController extends Controller
DB::table('components_assets')->where('id', '=', $component_asset_id)->delete();
}
event(new ComponentCheckedIn($component, $component_assets, $request->input('checkin_qty'), $request->input('note')));
event(new ComponentCheckedIn($component, $component_assets, Auth::user(), $request->input('checkin_qty'), $request->input('note')));
return redirect()->route('components.index')->with('success',
trans('admin/components/message.checkout.success'));

View file

@ -47,7 +47,8 @@ class LogListener
}
public function onComponentCheckedOut(ComponentCheckedOut $event) {
$event->component->logCheckout($event->note, $event->checkedOutTo);
// Since components don't have a "note" field, submit empty note
$event->component->logCheckout(null, $event->checkedOutTo);
}
public function onConsumableCheckedOut(ConsumableCheckedOut $event) {
@ -71,7 +72,7 @@ class LogListener
{
$list = [
'AccessoryCheckedIn',
'AccessoryCheckedout',
'AccessoryCheckedOut',
'AssetCheckedIn',
'AssetCheckedOut',
'ComponentCheckedIn',

View file

@ -20,15 +20,14 @@ class CheckoutAccessoryNotification extends Notification
/**
* Create a new notification instance.
*/
public function __construct(Accessory $accessory, $checkedOutTo, User $checkedOutBy, $acceptance, $note)
public function __construct(Accessory $accessory, $checkedOutTo, User $checkedOutBy, $note)
{
$this->item = $accessory;
$this->admin = $checkedOutBy;
$this->note = $note;
$this->target = $checkedOutTo;
$this->acceptance = $acceptance;
$this->settings = Setting::getSettings();
}