mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-19 16:49:34 +00:00
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:
commit
73a2b16332
7 changed files with 170 additions and 176 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue