1313use App \Models \Contracts \Acceptable ;
1414use App \Models \Setting ;
1515use App \Models \User ;
16- use App \Notifications \AcceptanceAssetAcceptedNotification ;
17- use App \Notifications \AcceptanceAssetAcceptedToUserNotification ;
18- use App \Notifications \AcceptanceAssetDeclinedNotification ;
16+ use App \Notifications \AcceptanceItemAcceptedNotification ;
17+ use App \Notifications \AcceptanceItemAcceptedToUserNotification ;
18+ use App \Notifications \AcceptanceItemDeclinedNotification ;
1919use Exception ;
2020use Illuminate \Http \Request ;
2121use Illuminate \Support \Facades \Mail ;
@@ -145,7 +145,7 @@ public function store(Request $request, $id) : RedirectResponse
145145 // Get the data array ready for the notifications and PDF generation
146146 $ data = [
147147 'item_tag ' => $ item ->asset_tag ,
148- 'item_name ' => $ item ->name , // this handles licenses seats, which don't have a 'name' field
148+ 'item_name ' => $ item ->display_name , // this handles licenses seats, which don't have a 'name' field
149149 'item_model ' => $ item ->model ?->name,
150150 'item_serial ' => $ item ->serial ,
151151 'item_status ' => $ item ->assetstatus ?->name,
@@ -183,13 +183,13 @@ public function store(Request $request, $id) : RedirectResponse
183183 // Add the attachment for the signing user into the $data array
184184 $ data ['file ' ] = $ pdf_filename ;
185185 try {
186- $ assigned_user ->notify ((new AcceptanceAssetAcceptedToUserNotification ($ data ))->locale ($ assigned_user ->locale ));
186+ $ assigned_user ->notify ((new AcceptanceItemAcceptedToUserNotification ($ data ))->locale ($ assigned_user ->locale ));
187187 } catch (\Exception $ e ) {
188188 Log::warning ($ e );
189189 }
190190 }
191191 try {
192- $ acceptance ->notify ((new AcceptanceAssetAcceptedNotification ($ data ))->locale (Setting::getSettings ()->locale ));
192+ $ acceptance ->notify ((new AcceptanceItemAcceptedNotification ($ data ))->locale (Setting::getSettings ()->locale ));
193193 } catch (\Exception $ e ) {
194194 Log::warning ($ e );
195195 }
@@ -204,7 +204,7 @@ public function store(Request $request, $id) : RedirectResponse
204204 $ acceptance ->decline ($ sig_filename , $ request ->input ('note ' ));
205205 }
206206
207- $ acceptance ->notify (new AcceptanceAssetDeclinedNotification ($ data ));
207+ $ acceptance ->notify (new AcceptanceItemDeclinedNotification ($ data ));
208208 Log::debug ('New event acceptance. ' );
209209 event (new CheckoutDeclined ($ acceptance ));
210210 $ return_msg = trans ('admin/users/message.declined ' );
0 commit comments