added hourly and money budgets to activity, project and customer (#843)

This commit is contained in:
Kevin Papst
2019-06-11 13:18:57 +02:00
committed by GitHub
parent 833968a87d
commit 5702d7afa8
118 changed files with 1743 additions and 1077 deletions

View File

@@ -109,6 +109,21 @@ class CustomerController extends AbstractController
return $this->renderCustomerForm($customer, $request);
}
/**
* @Route(path="/{id}/budget", name="admin_customer_budget", methods={"GET"})
* @Security("is_granted('budget', customer)")
*
* @param Customer $customer
* @return \Symfony\Component\HttpFoundation\Response
*/
public function budgetAction(Customer $customer)
{
return $this->render('customer/budget.html.twig', [
'customer' => $customer,
'stats' => $this->getRepository()->getCustomerStatistics($customer)
]);
}
/**
* @Route(path="/{id}/edit", name="admin_customer_edit", methods={"GET", "POST"})
* @Security("is_granted('edit', customer)")
@@ -232,7 +247,8 @@ class CustomerController extends AbstractController
return $this->createForm(CustomerEditForm::class, $customer, [
'action' => $url,
'method' => 'POST'
'method' => 'POST',
'include_budget' => $this->isGranted('budget', $customer)
]);
}
}