1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Design controller bulk actions

This commit is contained in:
David Bomba 2020-06-22 14:38:24 +10:00
parent c2211bf2f0
commit 8ddbfa662a
2 changed files with 7 additions and 0 deletions

View File

@ -482,8 +482,13 @@ class DesignController extends BaseController
$ids = request()->input('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) {
if (auth()->user()->can('edit', $design)) {
info("authed");
$this->design_repo->{$action}($design);
}
});

View File

@ -73,6 +73,8 @@ class BaseRepository
$entity->delete();
info("archived");
$className = $this->getEventClass($entity, 'Archived');
if (class_exists($className)) {