fixed some bugs
This commit is contained in:
parent
1ca1ae5b61
commit
1ec1c5d83c
|
|
@ -134,7 +134,7 @@ class CurrencyController extends Controller
|
|||
{
|
||||
$currency = $this->currency->findOrFail($id);
|
||||
|
||||
if ($this->currency()->count == 1) {
|
||||
if ($this->currency->count() == 1) {
|
||||
sesssion()->flash('warning', trans( 'admin::app.response.last-delete-error', ['name' => 'Currency']));
|
||||
} else {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -708,7 +708,8 @@
|
|||
_method : element.getAttribute('data-method')
|
||||
}).then(function(response) {
|
||||
this.result = response;
|
||||
// console.log(this.result);
|
||||
location.reload();
|
||||
}).catch(function (error) {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ class RoleController extends Controller
|
|||
$role = $this->role->findOrFail($id);
|
||||
|
||||
if ($role->admins->count() >= 1) {
|
||||
session()->flash('error', trans('admin::app.response.being-used', ['name' => 'Role', 'source' => 'Admin']));
|
||||
session()->flash('error', trans('admin::app.response.being-used', ['name' => 'Role', 'source' => 'Admin User']));
|
||||
} else if($this->role->count() == 1) {
|
||||
session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Role']));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class UserController extends Controller
|
|||
}
|
||||
|
||||
try {
|
||||
$this->user->delete($id);
|
||||
$this->admin->delete($id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Admin']));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue