mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-13 13:49:33 +00:00
Merge remote-tracking branch 'origin/feature/create-assemblies' into feature/all-features
# Conflicts: # .env # config/parameters.yaml # docs/configuration.md # migrations/Version20250304081039.php # migrations/Version20250304154507.php # src/Controller/AdminPages/BaseAdminController.php # src/Controller/ProjectController.php # src/Controller/TypeaheadController.php # src/DataTables/AssemblyBomEntriesDataTable.php # src/DataTables/PartsDataTable.php # src/Entity/AssemblySystem/AssemblyBOMEntry.php # src/Entity/Attachments/Attachment.php # src/Entity/Base/AbstractDBElement.php # src/Entity/LogSystem/CollectionElementDeleted.php # src/Entity/Parameters/AbstractParameter.php # src/Form/AssemblySystem/AssemblyBOMEntryType.php # src/Helpers/Assemblies/AssemblyPartAggregator.php # src/Security/Voter/AttachmentVoter.php # src/Services/AssemblySystem/AssemblyBuildHelper.php # src/Services/ImportExportSystem/BOMImporter.php # src/Services/ImportExportSystem/EntityExporter.php # src/Services/Trees/ToolsTreeBuilder.php # src/Services/Trees/TreeViewGenerator.php # src/Settings/BehaviorSettings/AssemblyBomTableColumns.php # src/Settings/BehaviorSettings/TableSettings.php # src/Validator/Constraints/AssemblySystem/AssemblyCycleValidator.php # templates/admin/assembly_admin.html.twig # templates/assemblies/build/_form.html.twig # templates/assemblies/import_bom.html.twig # templates/assemblies/info/_info_card.html.twig # templates/assemblies/info/info.html.twig # templates/components/tree_macros.html.twig # templates/form/collection_types_layout_assembly.html.twig # translations/messages.cs.xlf # translations/messages.da.xlf # translations/messages.de.xlf # translations/messages.el.xlf # translations/messages.en.xlf # translations/messages.es.xlf # translations/messages.fr.xlf # translations/messages.it.xlf # translations/messages.ja.xlf # translations/messages.nl.xlf # translations/messages.pl.xlf # translations/messages.ru.xlf # translations/messages.zh.xlf # translations/validators.cs.xlf # translations/validators.en.xlf
This commit is contained in:
commit
f7ec130010
42 changed files with 1272 additions and 2273 deletions
|
|
@ -36,8 +36,6 @@ use ApiPlatform\OpenApi\Model\Operation;
|
|||
use ApiPlatform\Serializer\Filter\PropertyFilter;
|
||||
use App\ApiPlatform\Filter\LikeFilter;
|
||||
use App\Entity\Contracts\TimeStampableInterface;
|
||||
use App\Entity\ProjectSystem\Project;
|
||||
use App\Entity\AssemblySystem\Assembly;
|
||||
use App\Repository\DBElementRepository;
|
||||
use App\Validator\Constraints\AssemblySystem\AssemblyCycle;
|
||||
use App\Validator\Constraints\AssemblySystem\AssemblyInvalidBomEntry;
|
||||
|
|
@ -86,7 +84,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
|||
normalizationContext: ['groups' => ['bom_entry:read', 'api:basic:read'], 'openapi_definition_name' => 'Read']
|
||||
)]
|
||||
#[ApiFilter(PropertyFilter::class)]
|
||||
#[ApiFilter(LikeFilter::class, properties: ["name", "comment", 'mountnames'])]
|
||||
#[ApiFilter(LikeFilter::class, properties: ["name", 'mountnames', 'designator', "comment"])]
|
||||
#[ApiFilter(RangeFilter::class, properties: ['quantity'])]
|
||||
#[ApiFilter(OrderFilter::class, properties: ['name', 'id', 'addedDate', 'lastModified', 'quantity'])]
|
||||
class AssemblyBOMEntry extends AbstractDBElement implements UniqueValidatableInterface, TimeStampableInterface
|
||||
|
|
@ -105,6 +103,13 @@ class AssemblyBOMEntry extends AbstractDBElement implements UniqueValidatableInt
|
|||
#[Groups(['bom_entry:read', 'bom_entry:write', 'import', 'simple', 'extended', 'full'])]
|
||||
protected string $mountnames = '';
|
||||
|
||||
/**
|
||||
* @var string Reference mark on the circuit diagram/PCB
|
||||
*/
|
||||
#[ORM\Column(name: 'designator', type: Types::TEXT)]
|
||||
#[Groups(['bom_entry:read', 'bom_entry:write', 'import', 'simple', 'extended', 'full'])]
|
||||
protected string $designator = '';
|
||||
|
||||
/**
|
||||
* @var string|null An optional name describing this BOM entry (useful for non-part entries)
|
||||
*/
|
||||
|
|
@ -192,6 +197,16 @@ class AssemblyBOMEntry extends AbstractDBElement implements UniqueValidatableInt
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getDesignator(): string
|
||||
{
|
||||
return $this->designator;
|
||||
}
|
||||
|
||||
public function setDesignator(string $designator): void
|
||||
{
|
||||
$this->designator = $designator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -61,9 +61,9 @@ use App\Entity\Attachments\UserAttachment;
|
|||
use App\Entity\Base\AbstractDBElement;
|
||||
use App\Entity\Contracts\LogWithEventUndoInterface;
|
||||
use App\Entity\Contracts\NamedElementInterface;
|
||||
use App\Entity\Parameters\AssemblyParameter;
|
||||
use App\Entity\Parameters\PartCustomStateParameter;
|
||||
use App\Entity\Parts\PartCustomState;
|
||||
use App\Entity\Parameters\AssemblyParameter;
|
||||
use App\Entity\ProjectSystem\Project;
|
||||
use App\Entity\Parameters\AbstractParameter;
|
||||
use App\Entity\Parameters\AttachmentTypeParameter;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ declare(strict_types=1);
|
|||
*/
|
||||
namespace App\Entity\LogSystem;
|
||||
|
||||
use App\Entity\AssemblySystem\Assembly;
|
||||
use App\Entity\AssemblySystem\AssemblyBOMEntry;
|
||||
use App\Entity\Attachments\Attachment;
|
||||
use App\Entity\Attachments\AttachmentType;
|
||||
use App\Entity\InfoProviderSystem\BulkInfoProviderImportJob;
|
||||
|
|
@ -78,6 +80,9 @@ enum LogTargetType: int
|
|||
case ASSEMBLY_BOM_ENTRY = 24;
|
||||
case PART_CUSTOM_STATE = 25;
|
||||
|
||||
case ASSEMBLY = 23;
|
||||
case ASSEMBLY_BOM_ENTRY = 24;
|
||||
|
||||
/**
|
||||
* Returns the class name of the target type or null if the target type is NONE.
|
||||
* @return string|null
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\Parts;
|
||||
|
||||
use App\Entity\Parts\PartTraits\AssemblyTrait;
|
||||
use ApiPlatform\Doctrine\Common\Filter\DateFilterInterface;
|
||||
use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter;
|
||||
use ApiPlatform\Doctrine\Orm\Filter\DateFilter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue