account menu pages

This commit is contained in:
Tykayn 2024-07-16 17:08:22 +02:00 committed by tykayn
parent 32dfa20583
commit 09a907d4e9
13 changed files with 261 additions and 30 deletions

View File

@ -24,9 +24,12 @@
<component name="ChangeListManager">
<list default="true" id="7b6ae3ea-b7de-4daa-94af-b6fb4f3c8b8e" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/assets/styles/_global.scss" beforeDir="false" afterPath="$PROJECT_DIR$/assets/styles/_global.scss" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Controller/AccountController.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Controller/AccountController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Controller/Admin/DashboardController.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Controller/Admin/DashboardController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Controller/Admin/UserCrudController.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Controller/Admin/UserCrudController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/DataFixtures/AppFixtures.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/DataFixtures/AppFixtures.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/account/history.html.twig" beforeDir="false" afterPath="$PROJECT_DIR$/templates/account/history.html.twig" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/account/index.html.twig" beforeDir="false" afterPath="$PROJECT_DIR$/templates/account/index.html.twig" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/account/nav.html.twig" beforeDir="false" afterPath="$PROJECT_DIR$/templates/account/nav.html.twig" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -248,26 +251,26 @@
<option name="openDirectoriesWithSingleClick" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;last_opened_file_path&quot;: &quot;/home/poule/encrypted/stockage-syncable/www/development/html/caisse&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;yarn&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"dart.analysis.tool.window.visible": "false",
"git-widget-placeholder": "master",
"last_opened_file_path": "/home/poule/encrypted/stockage-syncable/www/development/html/caisse/templates/account",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "yarn",
"vue.rearranger.settings.migration": "true"
}
}</component>
}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/templates/account" />
<recent name="$PROJECT_DIR$" />
<recent name="$PROJECT_DIR$/src/Controller" />
<recent name="$PROJECT_DIR$/public/assets" />
<recent name="$PROJECT_DIR$/translations" />
<recent name="$PROJECT_DIR$/src" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/nope" />
@ -311,7 +314,7 @@
<workItem from="1687943901322" duration="8313000" />
<workItem from="1721124162582" duration="4590000" />
<workItem from="1721135270174" duration="484000" />
<workItem from="1721135995908" duration="4298000" />
<workItem from="1721135995908" duration="6489000" />
</task>
<servers />
</component>

View File

@ -10,3 +10,12 @@ body {
min-height: 100vh;
background-color: $bg_main_color;
}
.todo{
background: #eed096;
border-left: solid 1rem #ccc;
color: black !important;
padding-left: 0.5rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}

View File

@ -0,0 +1,5 @@
easy_admin:
design:
menu:
main:
- { label: 'Accueil', route: 'app_index', icon: 'home' }

View File

@ -6,17 +6,43 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Doctrine\ORM\EntityManagerInterface;
use App\Entity\User;
use App\Entity\ExepenseConfig;
use App\Entity\SerieFestival;
use App\Entity\Festival;
use App\Entity\Product;
use App\Entity\ProductSold;
use App\Entity\ProductCategory;
class AccountController extends AbstractController
{
#[Route('/account', name: 'app_account')]
public function index(): Response
public function index(EntityManagerInterface $entityManager): Response
{
$currentFestival = "aucun";
$repository = $entityManager->getRepository(Product::class);
$productsOfOwner = $repository->findByOwner($this->getUser()->getId());
$repository = $entityManager->getRepository(ProductSold::class);
$productsSoldOfOwner = $repository->findByOwner($this->getUser()->getId());
return $this->render('account/index.html.twig'
, [
'productsOfOwner'=> $productsOfOwner,
'productsSoldOfOwner'=> $productsSoldOfOwner,
'currentFestival'=> $currentFestival,
]
);
return $this->render('account/index.html.twig', [
'controller_name' => 'AccountController',
]);
}
/***
page d'exemple
historique des ventes
**/
#[Route('/account/history', name: 'app_account_history')]
public function history(): Response
@ -24,4 +50,39 @@ class AccountController extends AbstractController
return $this->render('account/history.html.twig', [
]);
}
/***
gestion du pognon
**/
#[Route('/account/money', name: 'app_account_money')]
public function money(): Response
{
return $this->render('account/money.html.twig', [
]);
}
#[Route('/account/caisse', name: 'app_account_caisse')]
public function caisse(): Response
{
return $this->render('account/caisse.html.twig', [
]);
}
#[Route('/account/caisse-templates', name: 'app_account_caisse_templates')]
public function caisseTemplates(): Response
{
return $this->render('account/caisse.html.twig', [
]);
}
#[Route('/account/products', name: 'app_account_products')]
public function products(): Response
{
return $this->render('account/products.html.twig', [
]);
}
#[Route('/account/festivals', name: 'app_account_festivals')]
public function festivals(): Response
{
return $this->render('account/festivals.html.twig', [
]);
}
}

View File

@ -23,6 +23,7 @@ use App\Entity\ProductCategory;
class DashboardController extends AbstractDashboardController
{
#[Route('/admin', name: 'admin')]
public function index(): Response
{
return $this->render('admin/dashboard.html.twig' );

View File

@ -0,0 +1,20 @@
{% extends 'account/base.html.twig' %}
{% block title %}Caisse{% endblock %}
{#Ici on fait les ventes pendant un festival#}
{% block account_body %}
<div id="account_history">
<h1>
Templates de caisse
</h1>
<p>
Réalisez le design de vos écrans de caisse pour mieux correspondre à des contextes de vente précis.
Il vous suffira ensuite d'assigner un template par défaut, ou à un festival.
</p>
<p class="todo">
todo
</p>
</div>
</div>
{% endblock account_body %}

View File

@ -0,0 +1,16 @@
{% extends 'account/base.html.twig' %}
{% block title %}Caisse{% endblock %}
{#Ici on fait les ventes pendant un festival#}
{% block account_body %}
<div id="account_history">
<h1>
Caisse
</h1>
<p class="todo">
todo
</p>
</div>
</div>
{% endblock account_body %}

View File

@ -0,0 +1,27 @@
{% extends 'account/base.html.twig' %}
{% block title %}Votre historique{% endblock %}
{% block account_body %}
<div id="account_history">
<h1>
Festivals
</h1>
<h2>Actuel:</h2>
<p class="todo">
todo
</p>
<hr>
<h2>Liste des festivals</h2>
<p class="todo">
todo
</p>
<hr>
<h2>Séries de Festivals</h2>
<p class="todo">
todo
</p>
</div>
</div>
{% endblock account_body %}

View File

@ -12,7 +12,7 @@
Page historique
</p>
<article>
<h1>Votre historique d'actions</h1>
<h1>Votre historique de ventes</h1>
<p>
Blah blah blah.
</p>

View File

@ -17,6 +17,33 @@
Votre description:
{{ app.user.description }}
</p>
<div class="current">
Festival en cours: {{ currentFestival }}
</div>
<div class="data">
<table>
<tr>
<td>
Produits
</td>
<td>
{{ productsOfOwner|length }}
</td>
</tr>
<tr>
<td>
Ventes
</td>
<td>
{{ productsSoldOfOwner|length }}
</td>
</tr>
</table>
</div>
<footer>
<p>

View File

@ -0,0 +1,17 @@
{% extends 'account/base.html.twig' %}
{% block title %}Votre historique{% endblock %}
{% block account_body %}
<div id="account_history">
<h1>
Pognon
</h1>
<p class="todo">
todo
</p>
</div>
</div>
{% endblock account_body %}

View File

@ -6,12 +6,40 @@
Tableau de bord
</a>
</li>
<li>
<a class="todo" href="{{ path('app_account_caisse') }}">
Caisse
</a>
</li>
<li>
<a class="todo" href="{{ path('app_account_caisse_templates') }}">
Templates
</a>
</li>
<li>
<a class="todo" href="{{ path('app_account_products') }}">
Produits
</a>
</li>
<li>
<a href="{{ path('app_account_history') }}">
Historique
</a>
</li>
<li>un autre</li>
<li>un bidule</li>
<li>
<a class="todo" href="{{ path('app_account_money') }}">
Ventes
</a>
</li>
<li>
<a class="todo" href="{{ path('app_account_caisse_templates') }}">
Templates
</a>
</li>
<li>
<a class="todo" href="{{ path('app_account_festivals') }}">
Festivals
</a>
</li>
</ul>
</menu>

View File

@ -0,0 +1,17 @@
{% extends 'account/base.html.twig' %}
{% block title %}Votre historique{% endblock %}
{% block account_body %}
<div id="account_history">
<h1>
Produits
</h1>
<p class="todo">
todo
</p>
</div>
</div>
{% endblock account_body %}