update murph
add inline form
This commit is contained in:
parent
a04eb7e35b
commit
6e8c5f2dbc
|
@ -9,7 +9,7 @@
|
||||||
"php": ">=8.0.0",
|
"php": ">=8.0.0",
|
||||||
"doctrine/orm": "2.11.*",
|
"doctrine/orm": "2.11.*",
|
||||||
"knplabs/knp-snappy": "^1.4",
|
"knplabs/knp-snappy": "^1.4",
|
||||||
"murph/murph-core": "^1.18",
|
"murph/murph-core": "dev-master",
|
||||||
"sabre/dav": "^4.4"
|
"sabre/dav": "^4.4"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|
29979
package-lock.json
generated
29979
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -25,6 +25,9 @@ use App\Repository\BillCategoryRepositoryQuery;
|
||||||
use App\Factory\BillCategoryFactory;
|
use App\Factory\BillCategoryFactory;
|
||||||
use App\Event\EntityManagerEvent;
|
use App\Event\EntityManagerEvent;
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||||
|
use App\Entity\BillPeer;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
class BillAdminController extends CrudController
|
class BillAdminController extends CrudController
|
||||||
{
|
{
|
||||||
|
@ -160,6 +163,12 @@ class BillAdminController extends CrudController
|
||||||
return $this->doDelete($entity, $entityManager, $request);
|
return $this->doDelete($entity, $entityManager, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route(path: "/admin/bill/inline_edit/{entity}/{context}/{label}", name: 'admin_bill_inline_edit', methods: ['GET', 'POST'])]
|
||||||
|
public function inlineEdit(string $context, string $label, Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||||
|
{
|
||||||
|
return $this->doInlineEdit($context, $label, $entity, $entityManager, $request);
|
||||||
|
}
|
||||||
|
|
||||||
protected function getConfiguration(): CrudConfiguration
|
protected function getConfiguration(): CrudConfiguration
|
||||||
{
|
{
|
||||||
return CrudConfiguration::create()
|
return CrudConfiguration::create()
|
||||||
|
@ -171,6 +180,7 @@ class BillAdminController extends CrudController
|
||||||
->setPageRoute('index', 'admin_bill_index')
|
->setPageRoute('index', 'admin_bill_index')
|
||||||
->setPageRoute('new', 'admin_bill_new')
|
->setPageRoute('new', 'admin_bill_new')
|
||||||
->setPageRoute('edit', 'admin_bill_edit')
|
->setPageRoute('edit', 'admin_bill_edit')
|
||||||
|
->setPageRoute('inline_edit', 'admin_bill_inline_edit')
|
||||||
->setPageRoute('show', 'admin_bill_show')
|
->setPageRoute('show', 'admin_bill_show')
|
||||||
->setPageRoute('sort', 'admin_bill_sort')
|
->setPageRoute('sort', 'admin_bill_sort')
|
||||||
->setPageRoute('batch', 'admin_bill_batch')
|
->setPageRoute('batch', 'admin_bill_batch')
|
||||||
|
@ -269,6 +279,12 @@ class BillAdminController extends CrudController
|
||||||
return ['class' => $classes[$entity->getStatus()]];
|
return ['class' => $classes[$entity->getStatus()]];
|
||||||
},
|
},
|
||||||
'sort' => ['status', '.status'],
|
'sort' => ['status', '.status'],
|
||||||
|
'inline_form' => function(FormBuilderInterface $builder) {
|
||||||
|
$builder->add('status', ChoiceType::class, [
|
||||||
|
'choices' => BillPeer::choices(),
|
||||||
|
'help' => 'Modifier cette valeur manuellement ne permet pas d\'envoyer des notifications par mail',
|
||||||
|
]);
|
||||||
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
// ->setBatchAction('index', 'delete', 'Delete', function(EntityInterface $entity, EntityManager $manager) {
|
// ->setBatchAction('index', 'delete', 'Delete', function(EntityInterface $entity, EntityManager $manager) {
|
||||||
|
|
Loading…
Reference in a new issue