Merge remote-tracking branch 'origin/feature/custom-part-status' into feature/all-features

# Conflicts:
#	docs/configuration.md
#	migrations/Version20250321141740.php
#	src/Entity/Attachments/Attachment.php
#	src/Entity/Base/AbstractDBElement.php
#	src/Entity/LogSystem/CollectionElementDeleted.php
#	src/Entity/LogSystem/LogTargetType.php
#	src/Entity/Parameters/AbstractParameter.php
#	src/Entity/Parts/PartCustomState.php
#	src/Security/Voter/AttachmentVoter.php
#	templates/parts/edit/_advanced.html.twig
#	tests/Controller/AdminPages/PartCustomStateControllerTest.php
#	translations/messages.cs.xlf
#	translations/messages.el.xlf
#	translations/messages.fr.xlf
#	translations/messages.ja.xlf
#	translations/messages.nl.xlf
This commit is contained in:
Marcel Diegelmann 2025-10-01 09:15:53 +02:00
commit 73a2b16332
7 changed files with 170 additions and 176 deletions

View file

@ -107,7 +107,7 @@ class PartCustomState extends AbstractPartsContainingDBElement
/** @var Collection<int, PartCustomStateAttachment>
*/
#[Assert\Valid]
#[ORM\OneToMany(mappedBy: 'element', targetEntity: PartCustomStateAttachment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'element', targetEntity: PartCustomStateParameter::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
#[ORM\OrderBy(['name' => 'ASC'])]
#[Groups(['part_custom_state:read', 'part_custom_state:write'])]
protected Collection $parameters;

View file

@ -46,6 +46,7 @@ enum PartTableColumns : string implements TranslatableInterface
case FAVORITE = "favorite";
case MANUFACTURING_STATUS = "manufacturing_status";
case MPN = "manufacturer_product_number";
case CUSTOM_PART_STATE = 'partCustomState';
case MASS = "mass";
case TAGS = "tags";
case ATTACHMENTS = "attachments";
@ -63,4 +64,4 @@ enum PartTableColumns : string implements TranslatableInterface
return $translator->trans($key, locale: $locale);
}
}
}

View file

@ -67,7 +67,7 @@ class TableSettings
#[Assert\All([new Assert\Type(PartTableColumns::class)])]
public array $partsDefaultColumns = [PartTableColumns::NAME, PartTableColumns::DESCRIPTION,
PartTableColumns::CATEGORY, PartTableColumns::FOOTPRINT, PartTableColumns::MANUFACTURER,
PartTableColumns::LOCATION, PartTableColumns::AMOUNT];
PartTableColumns::LOCATION, PartTableColumns::AMOUNT, PartTableColumns::CUSTOM_PART_STATE];
/** @var AssemblyTableColumns[] */
#[SettingsParameter(ArrayType::class,