Merge branch 'api'

This commit is contained in:
Jan Böhmer 2023-10-06 12:29:53 +02:00
commit 8c9abce633
169 changed files with 8149 additions and 1887 deletions

View file

@ -32,7 +32,7 @@ use App\Entity\Attachments\FootprintAttachment;
use App\Entity\Attachments\GroupAttachment;
use App\Entity\Attachments\LabelAttachment;
use App\Entity\Attachments\PartAttachment;
use App\Entity\Attachments\StorelocationAttachment;
use App\Entity\Attachments\StorageLocationAttachment;
use App\Entity\Attachments\SupplierAttachment;
use App\Entity\Attachments\UserAttachment;
use App\Entity\Parts\Manufacturer;
@ -85,7 +85,7 @@ class AttachmentFilterType extends AbstractType
'label_profile.label' => LabelAttachment::class,
'manufacturer.label' => Manufacturer::class,
'measurement_unit.label' => MeasurementUnit::class,
'storelocation.label' => StorelocationAttachment::class,
'storelocation.label' => StorageLocationAttachment::class,
'supplier.label' => SupplierAttachment::class,
'user.label' => UserAttachment::class,
]

View file

@ -49,7 +49,7 @@ use App\Entity\Parts\Manufacturer;
use App\Entity\Parts\MeasurementUnit;
use App\Entity\Parts\Part;
use App\Entity\Parts\PartLot;
use App\Entity\Parts\Storelocation;
use App\Entity\Parts\StorageLocation;
use App\Entity\Parts\Supplier;
use App\Entity\PriceInformations\Currency;
use App\Entity\PriceInformations\Orderdetail;

View file

@ -29,7 +29,7 @@ use App\Entity\Parts\Category;
use App\Entity\Parts\Footprint;
use App\Entity\Parts\Manufacturer;
use App\Entity\Parts\MeasurementUnit;
use App\Entity\Parts\Storelocation;
use App\Entity\Parts\StorageLocation;
use App\Entity\Parts\Supplier;
use App\Form\Filters\Constraints\BooleanConstraintType;
use App\Form\Filters\Constraints\ChoiceConstraintType;
@ -191,7 +191,7 @@ class PartFilterType extends AbstractType
*/
$builder->add('storelocation', StructuralEntityConstraintType::class, [
'label' => 'storelocation.label',
'entity_class' => Storelocation::class
'entity_class' => StorageLocation::class
]);
$builder->add('minAmount', NumberConstraintType::class, [

View file

@ -50,7 +50,7 @@ use App\Entity\Parameters\FootprintParameter;
use App\Entity\Parameters\GroupParameter;
use App\Entity\Parameters\ManufacturerParameter;
use App\Entity\Parameters\PartParameter;
use App\Entity\Parameters\StorelocationParameter;
use App\Entity\Parameters\StorageLocationParameter;
use App\Entity\Parameters\SupplierParameter;
use App\Entity\Parts\MeasurementUnit;
use Symfony\Component\Form\AbstractType;
@ -163,7 +163,7 @@ class ParameterType extends AbstractType
GroupParameter::class => 'group',
ManufacturerParameter::class => 'manufacturer',
MeasurementUnit::class => 'measurement_unit',
StorelocationParameter::class => 'storelocation',
StorageLocationParameter::class => 'storelocation',
SupplierParameter::class => 'supplier',
];

View file

@ -25,7 +25,7 @@ namespace App\Form\Part;
use Symfony\Bundle\SecurityBundle\Security;
use App\Entity\Parts\MeasurementUnit;
use App\Entity\Parts\PartLot;
use App\Entity\Parts\Storelocation;
use App\Entity\Parts\StorageLocation;
use App\Form\Type\SIUnitType;
use App\Form\Type\StructuralEntityType;
use App\Form\Type\UserSelectType;
@ -54,7 +54,7 @@ class PartLotType extends AbstractType
]);
$builder->add('storage_location', StructuralEntityType::class, [
'class' => Storelocation::class,
'class' => StorageLocation::class,
'label' => 'part_lot.edit.location',
'required' => false,
'disable_not_selectable' => true,

View file

@ -22,7 +22,7 @@ declare(strict_types=1);
*/
namespace App\Form\Type;
use App\Entity\Parts\Storelocation;
use App\Entity\Parts\StorageLocation;
use App\Entity\Parts\Part;
use App\Entity\Parts\PartLot;
use Doctrine\ORM\EntityRepository;
@ -46,7 +46,7 @@ class PartLotSelectType extends AbstractType
$resolver->setDefaults([
'class' => PartLot::class,
'choice_label' => ChoiceList::label($this, static fn(PartLot $part_lot): string => ($part_lot->getStorageLocation() instanceof Storelocation ? $part_lot->getStorageLocation()->getFullPath() : '')
'choice_label' => ChoiceList::label($this, static fn(PartLot $part_lot): string => ($part_lot->getStorageLocation() instanceof StorageLocation ? $part_lot->getStorageLocation()->getFullPath() : '')
. ' (' . $part_lot->getName() . '): ' . $part_lot->getAmount()),
'query_builder' => fn(Options $options) => static fn(EntityRepository $er) => $er->createQueryBuilder('l')
->where('l.part = :part')