@@ -391,34 +391,20 @@ public function lenses(NovaRequest $request)
391391 public function actions (NovaRequest $ request )
392392 {
393393 $ actions = [];
394- if (Policy::make ()->allowedFor ('all ' )->get ()) {
395- $ actions [] =
396- Download::make ('spj ' , 'Unduh SPJ ' )
397- ->showInline ()
398- ->showOnDetail ()
399- ->exceptOnIndex ()
400- ->confirmButtonText ('Unduh ' );
401- $ actions [] =
402- ExportTemplateBos::make ()
403- ->showInline ()
404- ->showOnDetail ()
405- ->exceptOnIndex ()
406- ->confirmButtonText ('Export ' );
407- $ actions [] =
408- Download::make ('st ' , 'Unduh Surat Tugas ' )
409- ->showInline ()
410- ->showOnDetail ()
411- ->exceptOnIndex ()
412- ->confirmButtonText ('Unduh ' )
413- ->canSee (function ($ request ) {
414- if ($ request instanceof ActionRequest) {
415- return true ;
416- }
417-
418- return $ this ->resource instanceof Model && $ this ->resource ->st_naskah_keluar_id !== null ;
419- });
420- $ actions [] =
421- Download::make ('sk ' , 'Unduh SK ' )
394+ $ actions [] =
395+ Download::make ('spj ' , 'Unduh SPJ ' )
396+ ->showInline ()
397+ ->showOnDetail ()
398+ ->exceptOnIndex ()
399+ ->confirmButtonText ('Unduh ' );
400+ $ actions [] =
401+ ExportTemplateBos::make ()
402+ ->showInline ()
403+ ->showOnDetail ()
404+ ->exceptOnIndex ()
405+ ->confirmButtonText ('Export ' );
406+ $ actions [] =
407+ Download::make ('st ' , 'Unduh Surat Tugas ' )
422408 ->showInline ()
423409 ->showOnDetail ()
424410 ->exceptOnIndex ()
@@ -428,9 +414,21 @@ public function actions(NovaRequest $request)
428414 return true ;
429415 }
430416
431- return $ this ->resource instanceof Model && $ this ->resource ->sk_naskah_keluar_id !== null ;
417+ return $ this ->resource instanceof Model && $ this ->resource ->st_naskah_keluar_id !== null ;
432418 });
433- }
419+ $ actions [] =
420+ Download::make ('sk ' , 'Unduh SK ' )
421+ ->showInline ()
422+ ->showOnDetail ()
423+ ->exceptOnIndex ()
424+ ->confirmButtonText ('Unduh ' )
425+ ->canSee (function ($ request ) {
426+ if ($ request instanceof ActionRequest) {
427+ return true ;
428+ }
429+
430+ return $ this ->resource instanceof Model && $ this ->resource ->sk_naskah_keluar_id !== null ;
431+ });
434432 if (Policy::make ()->allowedFor ('bendahara ' )->get ()) {
435433 $ actions [] =
436434 ExportTemplateCmsBri::make ($ this ->kegiatan , 'ft ' )
0 commit comments