up routes and schema

This commit is contained in:
Tykayn 2025-02-14 11:00:20 +01:00 committed by tykayn
parent e23013825b
commit 1c700917b3
23 changed files with 1959 additions and 89 deletions

View file

@ -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',
]);
}
}