support budget and timeBudget in API calls (#1658)

This commit is contained in:
Kevin Papst
2020-04-23 18:49:48 +02:00
committed by GitHub
parent f8331b74c7
commit 0debc70ead
6 changed files with 29 additions and 7 deletions

View File

@@ -175,7 +175,9 @@ class CustomerController extends BaseApiController
$event = new CustomerMetaDefinitionEvent($customer);
$this->dispatcher->dispatch($event);
$form = $this->createForm(CustomerApiEditForm::class, $customer);
$form = $this->createForm(CustomerApiEditForm::class, $customer, [
'include_budget' => $this->isGranted('budget', $customer),
]);
$form->submit($request->request->all());
@@ -237,7 +239,9 @@ class CustomerController extends BaseApiController
$event = new CustomerMetaDefinitionEvent($customer);
$this->dispatcher->dispatch($event);
$form = $this->createForm(CustomerApiEditForm::class, $customer);
$form = $this->createForm(CustomerApiEditForm::class, $customer, [
'include_budget' => $this->isGranted('budget', $customer),
]);
$form->setData($customer);
$form->submit($request->request->all(), false);