mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-10-09 17:02:47 +02:00
up routes and schema
This commit is contained in:
parent
e23013825b
commit
1c700917b3
23 changed files with 1959 additions and 89 deletions
|
@ -25,8 +25,83 @@ final class DefaultController extends AbstractController
|
|||
#[Route('/dashboard', name: 'dashboard')]
|
||||
public function dashboard(): Response
|
||||
{
|
||||
return $this->render('default/main-screen.html.twig', [
|
||||
return $this->render('logged/dashboard.html.twig', [
|
||||
'controller_name' => 'DefaultController',
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
#[Route('/export_all', name: 'export_all')]
|
||||
public function export_all(): Response
|
||||
{
|
||||
return $this->render('logged/export_all.html.twig', [
|
||||
'controller_name' => 'DefaultController',
|
||||
]);
|
||||
}
|
||||
|
||||
// export_all_json
|
||||
|
||||
#[Route('/export_all_json', name: 'export_all_json')]
|
||||
public function export_all_json(): Response
|
||||
{
|
||||
return $this->render('logged/export_all_json.html.twig', [
|
||||
'controller_name' => 'DefaultController',
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route('/history', name: 'history')]
|
||||
public function history(): Response
|
||||
{
|
||||
return $this->render('logged/history.html.twig', [
|
||||
'controller_name' => 'DefaultController',
|
||||
'chiffreAffaires' => 10000,
|
||||
'statisticsSoldProducts' => [
|
||||
[
|
||||
'name' => 'mock 1',
|
||||
'count' => 10,
|
||||
'value' => 10,
|
||||
],[
|
||||
'name' => 'mock 2',
|
||||
'count' => 1,
|
||||
'value' => 20,
|
||||
],
|
||||
],
|
||||
'activeFestival' => [
|
||||
'fondDeCaisseAvant' => 10,
|
||||
'chiffreAffaire' => 10,
|
||||
'clientsCount' => 10,
|
||||
'name' => 'demo festival mock dans default controller',
|
||||
],
|
||||
'allSellings' => 12,
|
||||
'recentSellings' => [],
|
||||
'recentSells' => [
|
||||
[
|
||||
'id' => '1234',
|
||||
'date' => date_create('now'),
|
||||
'comment' => 'blah',
|
||||
'amount' => 52,
|
||||
'productsSold' => [
|
||||
'name' => 'un truc de démo aussi làààà'
|
||||
],
|
||||
],
|
||||
],
|
||||
'activeSelling' => [],
|
||||
// 'sellingComment' => [],
|
||||
'statisticsFestivals' => 'todo',
|
||||
'recentSells' => ''
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
#[Route('/logged/get-my-products', name: 'get_my_products')]
|
||||
public function get_my_products(): Response
|
||||
{
|
||||
// TODO: replace this with actual logic to get products of the logged user
|
||||
// récupérer les produits de l'user connecté
|
||||
return $this->json([
|
||||
'mock_response' => 'TODO',
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue