mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 23:24:36 -04:00
Design controller bulk actions
This commit is contained in:
parent
c2211bf2f0
commit
8ddbfa662a
@ -482,8 +482,13 @@ class DesignController extends BaseController
|
|||||||
$ids = request()->input('ids');
|
$ids = request()->input('ids');
|
||||||
$designs = Design::withTrashed()->find($this->transformKeys($ids));
|
$designs = Design::withTrashed()->find($this->transformKeys($ids));
|
||||||
|
|
||||||
|
info($designs);
|
||||||
|
info(auth()->user()->id);
|
||||||
|
info(auth()->user()->getCompany()->id);
|
||||||
|
|
||||||
$designs->each(function ($design, $key) use ($action) {
|
$designs->each(function ($design, $key) use ($action) {
|
||||||
if (auth()->user()->can('edit', $design)) {
|
if (auth()->user()->can('edit', $design)) {
|
||||||
|
info("authed");
|
||||||
$this->design_repo->{$action}($design);
|
$this->design_repo->{$action}($design);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -73,6 +73,8 @@ class BaseRepository
|
|||||||
|
|
||||||
$entity->delete();
|
$entity->delete();
|
||||||
|
|
||||||
|
info("archived");
|
||||||
|
|
||||||
$className = $this->getEventClass($entity, 'Archived');
|
$className = $this->getEventClass($entity, 'Archived');
|
||||||
|
|
||||||
if (class_exists($className)) {
|
if (class_exists($className)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user