diff --git a/config/parameters.yaml b/config/parameters.yaml index 3931729d..ec80e052 100644 --- a/config/parameters.yaml +++ b/config/parameters.yaml @@ -14,8 +14,6 @@ parameters: partdb.db.emulate_natural_sort: '%env(bool:DATABASE_EMULATE_NATURAL_SORT)%' # If this is set to true, natural sorting is emulated on platforms that do not support it natively. This can be slow on large datasets. - partdb.create_assembly_use_ipn_placeholder_in_name: '%env(bool:CREATE_ASSEMBLY_USE_IPN_PLACEHOLDER_IN_NAME)%' # Use an %%ipn%% placeholder in the name of an assembly. Placeholder is replaced with the ipn input while saving. - ###################################################################################################################### # Users and Privacy ###################################################################################################################### diff --git a/src/Controller/AdminPages/BaseAdminController.php b/src/Controller/AdminPages/BaseAdminController.php index bae817de..d928deb4 100644 --- a/src/Controller/AdminPages/BaseAdminController.php +++ b/src/Controller/AdminPages/BaseAdminController.php @@ -234,13 +234,6 @@ abstract class BaseAdminController extends AbstractController $repo = $this->entityManager->getRepository($this->entity_class); - $showParameters = true; - if ($this instanceof AssemblyAdminController) { - //currently not needed for assemblies - - $showParameters = false; - } - return $this->render($this->twig_template, [ 'entity' => $entity, 'form' => $form, @@ -250,7 +243,6 @@ abstract class BaseAdminController extends AbstractController 'timeTravel' => $timeTravel_timestamp, 'repo' => $repo, 'partsContainingElement' => $repo instanceof PartsContainingRepositoryInterface, - 'showParameters' => $showParameters, ]); } @@ -404,20 +396,12 @@ abstract class BaseAdminController extends AbstractController } } - $showParameters = true; - if ($this instanceof AssemblyAdminController) { - //currently not needed for assemblies - - $showParameters = false; - } - return $this->render($this->twig_template, [ 'entity' => $new_entity, 'form' => $form, 'import_form' => $import_form, 'mass_creation_form' => $mass_creation_form, 'route_base' => $this->route_base, - 'showParameters' => $showParameters, ]); } diff --git a/src/Services/ImportExportSystem/BOMImporter.php b/src/Services/ImportExportSystem/BOMImporter.php index 5ed8c388..cf495a89 100644 --- a/src/Services/ImportExportSystem/BOMImporter.php +++ b/src/Services/ImportExportSystem/BOMImporter.php @@ -857,7 +857,7 @@ class BOMImporter if (isset($entry['name'])) { $givenName = trim($entry['name']) === '' ? null : trim ($entry['name']); - if ($givenName !== null && $bomEntry->getPart() !== null && $bomEntry->getPart()->getName() !== $givenName) { + if ($givenName !== null && $part !== null && $part->getName() !== $givenName) { //Apply different names for parts list entry $bomEntry->setName(trim($entry['name']) === '' ? null : trim ($entry['name'])); } diff --git a/templates/admin/base_admin.html.twig b/templates/admin/base_admin.html.twig index e9fc0fb9..b3d5af5f 100644 --- a/templates/admin/base_admin.html.twig +++ b/templates/admin/base_admin.html.twig @@ -86,7 +86,7 @@
| {% trans %}name.label{% endtrans %} | +{% trans %}description.label{% endtrans %} | +# {% trans %}assembly.info.bom_entries_count{% endtrans %} | +# {% trans %}assembly.info.sub_assemblies_count{% endtrans %} | +
|---|---|---|---|
| {# Name #} + {{ assembly.name }} + | +{# Description #} + {{ assembly.description | format_markdown }} + | ++ {{ assembly.bomEntries | length }} + | ++ {{ assembly.children | length }} + | +