Added some basic DB fields for the new project system

This commit is contained in:
Jan Böhmer 2022-12-18 20:34:25 +01:00
parent 8ae4e9fe05
commit 0c7ec9f0c7
36 changed files with 281 additions and 130 deletions

View file

@ -24,7 +24,7 @@ namespace App\Services\Trees;
use App\Entity\Attachments\AttachmentType;
use App\Entity\Attachments\PartAttachment;
use App\Entity\Devices\Device;
use App\Entity\ProjectSystem\Project;
use App\Entity\LabelSystem\LabelProfile;
use App\Entity\Parts\Category;
use App\Entity\Parts\Footprint;
@ -156,7 +156,7 @@ class ToolsTreeBuilder
$this->urlGenerator->generate('category_new')
))->setIcon('fa-fw fa-treeview fa-solid fa-tags');
}
if ($this->security->isGranted('read', new Device())) {
if ($this->security->isGranted('read', new Project())) {
$nodes[] = (new TreeViewNode(
$this->translator->trans('tree.tools.edit.devices'),
$this->urlGenerator->generate('device_new')

View file

@ -25,7 +25,7 @@ namespace App\Services\Trees;
use App\Entity\Base\AbstractDBElement;
use App\Entity\Base\AbstractNamedDBElement;
use App\Entity\Base\AbstractStructuralDBElement;
use App\Entity\Devices\Device;
use App\Entity\ProjectSystem\Project;
use App\Entity\Parts\Category;
use App\Entity\Parts\Footprint;
use App\Entity\Parts\Manufacturer;
@ -161,7 +161,7 @@ class TreeViewGenerator
return $this->translator->trans('manufacturer.labelp');
case Supplier::class:
return $this->translator->trans('supplier.labelp');
case Device::class:
case Project::class:
return $this->translator->trans('device.labelp');
default:
return $this->translator->trans('tree.root_node.text');
@ -182,7 +182,7 @@ class TreeViewGenerator
return $icon . 'fa-industry';
case Supplier::class:
return $icon . 'fa-truck';
case Device::class:
case Project::class:
return $icon . 'fa-archive';
default:
return null;