@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | Log::channel('cust')->info('New Customer - '.$request->name.' created by '.Auth::user()->full_name); |
| 52 | 52 | |
| 53 | - return redirect(route('customers.show',$newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']); |
|
| 53 | + return redirect(route('customers.show', $newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | ->with('CustomerFile.FileUpload') |
| 79 | 79 | // ->with('ParentFile') |
| 80 | 80 | ->firstOrFail(); |
| 81 | - $isFav = UserCustomerBookmark::where('user_id', Auth::user()->user_id) |
|
| 81 | + $isFav = UserCustomerBookmark::where('user_id', Auth::user()->user_id) |
|
| 82 | 82 | ->where('cust_id', $customer->cust_id) |
| 83 | 83 | ->count(); |
| 84 | 84 | |
@@ -90,13 +90,13 @@ discard block |
||
| 90 | 90 | 'phone_types' => PhoneNumberType::all(), |
| 91 | 91 | 'file_types' => CustomerFileType::all(), |
| 92 | 92 | 'user_functions' => [ |
| 93 | - 'fav' => $isFav, // Customer is bookmarked by the user |
|
| 94 | - 'edit' => Auth::user()->can('update', $customer), // User is allowed to edit the customers basic details |
|
| 95 | - 'manage' => Auth::user()->can('manage', $customer), // User can recover deleted items |
|
| 96 | - 'deactivate' => Auth::user()->can('delete', $customer), // User can deactivate the customer profile |
|
| 93 | + 'fav' => $isFav, // Customer is bookmarked by the user |
|
| 94 | + 'edit' => Auth::user()->can('update', $customer), // User is allowed to edit the customers basic details |
|
| 95 | + 'manage' => Auth::user()->can('manage', $customer), // User can recover deleted items |
|
| 96 | + 'deactivate' => Auth::user()->can('delete', $customer), // User can deactivate the customer profile |
|
| 97 | 97 | 'equipment' => [ |
| 98 | - 'create' => Auth::user()->can('create', CustomerEquipment::class), // If user can add equipment |
|
| 99 | - 'update' => Auth::user()->can('edit', CustomerEquipment::class), // If user can edit equipment |
|
| 98 | + 'create' => Auth::user()->can('create', CustomerEquipment::class), // If user can add equipment |
|
| 99 | + 'update' => Auth::user()->can('edit', CustomerEquipment::class), // If user can edit equipment |
|
| 100 | 100 | ], |
| 101 | 101 | ], |
| 102 | 102 | ]); |