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);
|
$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']));
|
sesssion()->flash('warning', trans( 'admin::app.response.last-delete-error', ['name' => 'Currency']));
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -708,7 +708,8 @@
|
||||||
_method : element.getAttribute('data-method')
|
_method : element.getAttribute('data-method')
|
||||||
}).then(function(response) {
|
}).then(function(response) {
|
||||||
this.result = response;
|
this.result = response;
|
||||||
// console.log(this.result);
|
location.reload();
|
||||||
|
}).catch(function (error) {
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ class RoleController extends Controller
|
||||||
$role = $this->role->findOrFail($id);
|
$role = $this->role->findOrFail($id);
|
||||||
|
|
||||||
if ($role->admins->count() >= 1) {
|
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) {
|
} else if($this->role->count() == 1) {
|
||||||
session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Role']));
|
session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Role']));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ class UserController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->user->delete($id);
|
$this->admin->delete($id);
|
||||||
|
|
||||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Admin']));
|
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Admin']));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue