Reindex the collections in CollectionType to prevent issues related of changing the order between the requests.

This commit is contained in:
Jan Böhmer 2020-04-01 15:10:06 +02:00
parent b3805277b9
commit f0a3e9b5af
6 changed files with 128 additions and 1 deletions

View file

@ -114,6 +114,7 @@ class OrderdetailType extends AbstractType
'allow_add' => $this->security->isGranted('@parts_prices.create'),
'allow_delete' => $this->security->isGranted('@parts_prices.delete'),
'label' => false,
'reindex_enable' => true,
'prototype_data' => $dummy_pricedetail,
'by_reference' => false,
'entry_options' => [

View file

@ -224,6 +224,7 @@ class PartBaseType extends AbstractType
'entry_type' => PartLotType::class,
'allow_add' => $this->security->isGranted('lots.create', $part),
'allow_delete' => $this->security->isGranted('lots.delete', $part),
'reindex_enable' => true,
'label' => false,
'entry_options' => [
'measurement_unit' => $part->getPartUnit(),
@ -237,6 +238,7 @@ class PartBaseType extends AbstractType
'entry_type' => AttachmentFormType::class,
'allow_add' => $this->security->isGranted('attachments.create', $part),
'allow_delete' => $this->security->isGranted('attachments.delete', $part),
'reindex_enable' => true,
'label' => false,
'entry_options' => [
'data_class' => PartAttachment::class,
@ -257,6 +259,7 @@ class PartBaseType extends AbstractType
'entry_type' => OrderdetailType::class,
'allow_add' => $this->security->isGranted('orderdetails.create', $part),
'allow_delete' => $this->security->isGranted('orderdetails.delete', $part),
'reindex_enable' => true,
'label' => false,
'by_reference' => false,
'prototype_data' => new Orderdetail(),
@ -271,6 +274,7 @@ class PartBaseType extends AbstractType
'allow_add' => $this->security->isGranted('parameters.create', $part),
'allow_delete' => $this->security->isGranted('parameters.delete', $part),
'label' => false,
'reindex_enable' => true,
'by_reference' => false,
'prototype_data' => new PartParameter(),
'entry_options' => [