diff --git a/src/Entity/ProjectSystem/ProjectBOMEntry.php b/src/Entity/ProjectSystem/ProjectBOMEntry.php index 053aea35..6d0a68da 100644 --- a/src/Entity/ProjectSystem/ProjectBOMEntry.php +++ b/src/Entity/ProjectSystem/ProjectBOMEntry.php @@ -207,6 +207,10 @@ class ProjectBOMEntry extends AbstractDBElement $this->quantity = round($this->quantity); } } + //Non-Part BOM entries are rounded + if ($this->part === null) { + $this->quantity = round($this->quantity); + } //Check that every part name in the mountnames list is unique (per bom_entry) $mountnames = explode(',', $this->mountnames); diff --git a/src/Form/ProjectSystem/ProjectBOMEntryType.php b/src/Form/ProjectSystem/ProjectBOMEntryType.php index 774eb6b1..99730375 100644 --- a/src/Form/ProjectSystem/ProjectBOMEntryType.php +++ b/src/Form/ProjectSystem/ProjectBOMEntryType.php @@ -5,6 +5,7 @@ namespace App\Form\ProjectSystem; use App\Entity\Parts\Part; use App\Entity\ProjectSystem\ProjectBOMEntry; use App\Form\Type\PartSelectType; +use App\Form\Type\RichTextEditorType; use App\Form\Type\SIUnitType; use Svg\Tag\Text; use Symfony\Bridge\Doctrine\Form\Type\EntityType; @@ -53,10 +54,14 @@ class ProjectBOMEntryType extends AbstractType 'data-controller' => 'elements--tagsinput', ] ]) - ->add('comment', TextType::class, [ + ->add('comment', RichTextEditorType::class, [ 'required' => false, 'label' => 'project.bom.comment', - 'empty_data' => '' + 'empty_data' => '', + 'mode' => 'markdown-single_line', + 'attr' => [ + 'rows' => 2, + ], ]) ; diff --git a/templates/AdminPages/DeviceAdmin.html.twig b/templates/AdminPages/DeviceAdmin.html.twig index e40efea6..869b3d95 100644 --- a/templates/AdminPages/DeviceAdmin.html.twig +++ b/templates/AdminPages/DeviceAdmin.html.twig @@ -25,18 +25,28 @@ {% form_theme form.bom_entries with ['Form/collection_types_layout.html.twig'] %} {% import 'components/collection_type.macro.html.twig' as collection %} -
{# expand button #} + | {% trans %}project.bom.quantity{% endtrans %} | +{% trans %}project.bom.part{% endtrans %} | +{% trans %}project.bom.name{% endtrans %} | +{# Remove button #} + |
---|