fix bug login & delete

This commit is contained in:
Jagad R R
2025-01-10 17:10:45 +07:00
parent 3ffdb11d3a
commit 7aaa9d5370
3 changed files with 94 additions and 7 deletions
@@ -596,6 +596,7 @@ class FormUpCountryController extends Controller
public function destroy($id)
{
$this->checkAuthorization(auth()->user(), ['forms.country.delete']);
$role = auth()->user()->getRoleNames()[0];
$form = FormUpCountry::findOrfail($id);
if($form->status != 'On Progress' && $role == 'Medical Representatif') {