diff --git a/assets/app.js b/assets/app.js index 8725cc58..785edf21 100644 --- a/assets/app.js +++ b/assets/app.js @@ -5,6 +5,6 @@ import './bootstrap.js'; * This file will be included onto the page via the importmap() Twig function, * which should already be in your base.html.twig. */ -import './styles/app.css'; +import './styles/app.scss'; console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉'); diff --git a/assets/styles/app.scss b/assets/styles/app.scss new file mode 100644 index 00000000..e2268aac --- /dev/null +++ b/assets/styles/app.scss @@ -0,0 +1,4 @@ +body{ + margin: 0 auto; + padding: 4rem; +} \ No newline at end of file diff --git a/src/Controller/CategoryController.php b/src/Controller/CategoryController.php new file mode 100644 index 00000000..735542b7 --- /dev/null +++ b/src/Controller/CategoryController.php @@ -0,0 +1,81 @@ +render('category/index.html.twig', [ + 'categories' => $categoryRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_category_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $category = new Category(); + $form = $this->createForm(CategoryType::class, $category); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($category); + $entityManager->flush(); + + return $this->redirectToRoute('app_category_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('category/new.html.twig', [ + 'category' => $category, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_category_show', methods: ['GET'])] + public function show(Category $category): Response + { + return $this->render('category/show.html.twig', [ + 'category' => $category, + ]); + } + + #[Route('/{id}/edit', name: 'app_category_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Category $category, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(CategoryType::class, $category); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_category_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('category/edit.html.twig', [ + 'category' => $category, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_category_delete', methods: ['POST'])] + public function delete(Request $request, Category $category, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$category->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($category); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_category_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/ExpenseController.php b/src/Controller/ExpenseController.php new file mode 100644 index 00000000..bd71f49e --- /dev/null +++ b/src/Controller/ExpenseController.php @@ -0,0 +1,81 @@ +render('expense/index.html.twig', [ + 'expenses' => $expenseRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_expense_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $expense = new Expense(); + $form = $this->createForm(ExpenseType::class, $expense); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($expense); + $entityManager->flush(); + + return $this->redirectToRoute('app_expense_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('expense/new.html.twig', [ + 'expense' => $expense, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_expense_show', methods: ['GET'])] + public function show(Expense $expense): Response + { + return $this->render('expense/show.html.twig', [ + 'expense' => $expense, + ]); + } + + #[Route('/{id}/edit', name: 'app_expense_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Expense $expense, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(ExpenseType::class, $expense); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_expense_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('expense/edit.html.twig', [ + 'expense' => $expense, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_expense_delete', methods: ['POST'])] + public function delete(Request $request, Expense $expense, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$expense->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($expense); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_expense_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/FestivalController.php b/src/Controller/FestivalController.php new file mode 100644 index 00000000..3ca4be3f --- /dev/null +++ b/src/Controller/FestivalController.php @@ -0,0 +1,81 @@ +render('festival/index.html.twig', [ + 'festivals' => $festivalRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_festival_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $festival = new Festival(); + $form = $this->createForm(FestivalType::class, $festival); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($festival); + $entityManager->flush(); + + return $this->redirectToRoute('app_festival_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('festival/new.html.twig', [ + 'festival' => $festival, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_festival_show', methods: ['GET'])] + public function show(Festival $festival): Response + { + return $this->render('festival/show.html.twig', [ + 'festival' => $festival, + ]); + } + + #[Route('/{id}/edit', name: 'app_festival_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Festival $festival, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(FestivalType::class, $festival); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_festival_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('festival/edit.html.twig', [ + 'festival' => $festival, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_festival_delete', methods: ['POST'])] + public function delete(Request $request, Festival $festival, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$festival->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($festival); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_festival_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/GroupOfProductsController.php b/src/Controller/GroupOfProductsController.php new file mode 100644 index 00000000..d782bb4f --- /dev/null +++ b/src/Controller/GroupOfProductsController.php @@ -0,0 +1,81 @@ +render('group_of_products/index.html.twig', [ + 'group_of_products' => $groupOfProductsRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_group_of_products_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $groupOfProduct = new GroupOfProducts(); + $form = $this->createForm(GroupOfProductsType::class, $groupOfProduct); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($groupOfProduct); + $entityManager->flush(); + + return $this->redirectToRoute('app_group_of_products_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('group_of_products/new.html.twig', [ + 'group_of_product' => $groupOfProduct, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_group_of_products_show', methods: ['GET'])] + public function show(GroupOfProducts $groupOfProduct): Response + { + return $this->render('group_of_products/show.html.twig', [ + 'group_of_product' => $groupOfProduct, + ]); + } + + #[Route('/{id}/edit', name: 'app_group_of_products_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, GroupOfProducts $groupOfProduct, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(GroupOfProductsType::class, $groupOfProduct); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_group_of_products_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('group_of_products/edit.html.twig', [ + 'group_of_product' => $groupOfProduct, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_group_of_products_delete', methods: ['POST'])] + public function delete(Request $request, GroupOfProducts $groupOfProduct, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$groupOfProduct->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($groupOfProduct); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_group_of_products_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/ProductController.php b/src/Controller/ProductController.php new file mode 100644 index 00000000..b4b90b18 --- /dev/null +++ b/src/Controller/ProductController.php @@ -0,0 +1,81 @@ +render('product/index.html.twig', [ + 'products' => $productRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_product_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $product = new Product(); + $form = $this->createForm(ProductType::class, $product); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($product); + $entityManager->flush(); + + return $this->redirectToRoute('app_product_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('product/new.html.twig', [ + 'product' => $product, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_product_show', methods: ['GET'])] + public function show(Product $product): Response + { + return $this->render('product/show.html.twig', [ + 'product' => $product, + ]); + } + + #[Route('/{id}/edit', name: 'app_product_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Product $product, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(ProductType::class, $product); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_product_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('product/edit.html.twig', [ + 'product' => $product, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_product_delete', methods: ['POST'])] + public function delete(Request $request, Product $product, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$product->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($product); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_product_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/SellingController.php b/src/Controller/SellingController.php new file mode 100644 index 00000000..3375a47f --- /dev/null +++ b/src/Controller/SellingController.php @@ -0,0 +1,81 @@ +render('selling/index.html.twig', [ + 'sellings' => $sellingRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_selling_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $selling = new Selling(); + $form = $this->createForm(SellingType::class, $selling); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($selling); + $entityManager->flush(); + + return $this->redirectToRoute('app_selling_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('selling/new.html.twig', [ + 'selling' => $selling, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_selling_show', methods: ['GET'])] + public function show(Selling $selling): Response + { + return $this->render('selling/show.html.twig', [ + 'selling' => $selling, + ]); + } + + #[Route('/{id}/edit', name: 'app_selling_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Selling $selling, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(SellingType::class, $selling); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_selling_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('selling/edit.html.twig', [ + 'selling' => $selling, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_selling_delete', methods: ['POST'])] + public function delete(Request $request, Selling $selling, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$selling->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($selling); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_selling_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Form/CategoryType.php b/src/Form/CategoryType.php new file mode 100644 index 00000000..8e4de0ee --- /dev/null +++ b/src/Form/CategoryType.php @@ -0,0 +1,25 @@ +add('name') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Category::class, + ]); + } +} diff --git a/src/Form/ExpenseType.php b/src/Form/ExpenseType.php new file mode 100644 index 00000000..22093745 --- /dev/null +++ b/src/Form/ExpenseType.php @@ -0,0 +1,26 @@ +add('name') + ->add('price') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Expense::class, + ]); + } +} diff --git a/src/Form/FestivalType.php b/src/Form/FestivalType.php new file mode 100644 index 00000000..088ecd69 --- /dev/null +++ b/src/Form/FestivalType.php @@ -0,0 +1,31 @@ +add('name') + ->add('date_start', null, [ + 'widget' => 'single_text', + ]) + ->add('date_end', null, [ + 'widget' => 'single_text', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Festival::class, + ]); + } +} diff --git a/src/Form/GroupOfProductsType.php b/src/Form/GroupOfProductsType.php new file mode 100644 index 00000000..c5b33ec3 --- /dev/null +++ b/src/Form/GroupOfProductsType.php @@ -0,0 +1,33 @@ +add('name') + ->add('products', EntityType::class, [ + 'class' => Product::class, + 'choice_label' => 'id', + 'multiple' => true, + 'required' => false, + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => GroupOfProducts::class, + ]); + } +} diff --git a/src/Form/ProductType.php b/src/Form/ProductType.php new file mode 100644 index 00000000..2d5981ea --- /dev/null +++ b/src/Form/ProductType.php @@ -0,0 +1,35 @@ +add('name') + ->add('price') + ->add('stock') + ->add('groupOfProducts', EntityType::class, [ + 'class' => GroupOfProducts::class, + 'choice_label' => 'id', + 'multiple' => true, + 'required' => false, + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Product::class, + ]); + } +} diff --git a/src/Form/SellingType.php b/src/Form/SellingType.php new file mode 100644 index 00000000..2594f091 --- /dev/null +++ b/src/Form/SellingType.php @@ -0,0 +1,28 @@ +add('note') + ->add('products') + ->add('sum') + ->add('reduction') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Selling::class, + ]); + } +} diff --git a/templates/category/_delete_form.html.twig b/templates/category/_delete_form.html.twig new file mode 100644 index 00000000..535a698e --- /dev/null +++ b/templates/category/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/category/_form.html.twig b/templates/category/_form.html.twig new file mode 100644 index 00000000..bf20b98f --- /dev/null +++ b/templates/category/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/category/edit.html.twig b/templates/category/edit.html.twig new file mode 100644 index 00000000..2be34898 --- /dev/null +++ b/templates/category/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Category{% endblock %} + +{% block body %} +

Edit Category

+ + {{ include('category/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('category/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/category/index.html.twig b/templates/category/index.html.twig new file mode 100644 index 00000000..d361559e --- /dev/null +++ b/templates/category/index.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}Category index{% endblock %} + +{% block body %} +

Category index

+ + + + + + + + + + + {% for category in categories %} + + + + + + {% else %} + + + + {% endfor %} + +
IdNameactions
{{ category.id }}{{ category.name }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/category/new.html.twig b/templates/category/new.html.twig new file mode 100644 index 00000000..bab5f3c9 --- /dev/null +++ b/templates/category/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Category{% endblock %} + +{% block body %} +

Create new Category

+ + {{ include('category/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/category/show.html.twig b/templates/category/show.html.twig new file mode 100644 index 00000000..d86f086b --- /dev/null +++ b/templates/category/show.html.twig @@ -0,0 +1,26 @@ +{% extends 'base.html.twig' %} + +{% block title %}Category{% endblock %} + +{% block body %} +

Category

+ + + + + + + + + + + + +
Id{{ category.id }}
Name{{ category.name }}
+ + back to list + + edit + + {{ include('category/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/expense/_delete_form.html.twig b/templates/expense/_delete_form.html.twig new file mode 100644 index 00000000..1b307a9f --- /dev/null +++ b/templates/expense/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/expense/_form.html.twig b/templates/expense/_form.html.twig new file mode 100644 index 00000000..bf20b98f --- /dev/null +++ b/templates/expense/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/expense/edit.html.twig b/templates/expense/edit.html.twig new file mode 100644 index 00000000..9f4a860a --- /dev/null +++ b/templates/expense/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Expense{% endblock %} + +{% block body %} +

Edit Expense

+ + {{ include('expense/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('expense/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/expense/index.html.twig b/templates/expense/index.html.twig new file mode 100644 index 00000000..70501b74 --- /dev/null +++ b/templates/expense/index.html.twig @@ -0,0 +1,37 @@ +{% extends 'base.html.twig' %} + +{% block title %}Expense index{% endblock %} + +{% block body %} +

Expense index

+ + + + + + + + + + + + {% for expense in expenses %} + + + + + + + {% else %} + + + + {% endfor %} + +
IdNamePriceactions
{{ expense.id }}{{ expense.name }}{{ expense.price }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/expense/new.html.twig b/templates/expense/new.html.twig new file mode 100644 index 00000000..1c4acb54 --- /dev/null +++ b/templates/expense/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Expense{% endblock %} + +{% block body %} +

Create new Expense

+ + {{ include('expense/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/expense/show.html.twig b/templates/expense/show.html.twig new file mode 100644 index 00000000..3aacb3b9 --- /dev/null +++ b/templates/expense/show.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}Expense{% endblock %} + +{% block body %} +

Expense

+ + + + + + + + + + + + + + + + +
Id{{ expense.id }}
Name{{ expense.name }}
Price{{ expense.price }}
+ + back to list + + edit + + {{ include('expense/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/festival/_delete_form.html.twig b/templates/festival/_delete_form.html.twig new file mode 100644 index 00000000..4ef5e0e7 --- /dev/null +++ b/templates/festival/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/festival/_form.html.twig b/templates/festival/_form.html.twig new file mode 100644 index 00000000..bf20b98f --- /dev/null +++ b/templates/festival/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/festival/edit.html.twig b/templates/festival/edit.html.twig old mode 100755 new mode 100644 index 20df02e4..f8ee634f --- a/templates/festival/edit.html.twig +++ b/templates/festival/edit.html.twig @@ -1,25 +1,13 @@ {% extends 'base.html.twig' %} +{% block title %}Edit Festival{% endblock %} + {% block body %} -

Festival edit

+

Edit Festival

- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} - - {{ form_end(edit_form) }} + {{ include('festival/_form.html.twig', {'button_label': 'Update'}) }} - + back to list + + {{ include('festival/_delete_form.html.twig') }} {% endblock %} diff --git a/templates/festival/index.html.twig b/templates/festival/index.html.twig old mode 100755 new mode 100644 index df538898..76359492 --- a/templates/festival/index.html.twig +++ b/templates/festival/index.html.twig @@ -1,95 +1,39 @@ {% extends 'base.html.twig' %} +{% block title %}Festival index{% endblock %} + {% block body %} -
-
-

Festivals

-
- Nouveau festival -
-
+

Festival index

- - +
- - - - - - - - - - - - - - + + + + + + + - - {% for festival in festivals %} - - + + - - - - - - - - - - + + + {% else %} + + + {% endfor %}
IdNameDatecreationTous FraisClientsfond caisse avantfond caisse apreschiffre affairefond caisse + CAdiffbénefices CA - fraisActions
IdNameDate_startDate_endactions
- {{ festival.id }} -
{{ festival.id }} {{ festival.name }}{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}{{ festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement }} -  € - {{ festival.sellRecords|length }}{{ festival.fondDeCaisseAvant }}€{{ festival.fondDeCaisseApres }}€{{ festival.chiffreAffaire }}€{{ festival.fondDeCaisseAvant + festival.chiffreAffaire }}€{{ festival.chiffreAffaire - festival.fondDeCaisseApres }}€ - {{ festival.chiffreAffaire - (festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement ) }}{{ festival.dateStart ? festival.dateStart|date('Y-m-d') : '' }}{{ festival.dateEnd ? festival.dateEnd|date('Y-m-d') : '' }} - {% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %} - - Actuel - - {% else %} - - choisir comme actuel - - {% endif %} - - {% if festival.user|length %} - {% for u in festival.user %} - {{ u.username }} - {% endfor %} - {% else %} -
- - pas d'owner. -
- {% endif %} - - - Modifier - + show + edit
no records found
- Nouveau festival + Create new {% endblock %} diff --git a/templates/festival/new.html.twig b/templates/festival/new.html.twig old mode 100755 new mode 100644 index dafecb74..832e6871 --- a/templates/festival/new.html.twig +++ b/templates/festival/new.html.twig @@ -1,16 +1,11 @@ {% extends 'base.html.twig' %} +{% block title %}New Festival{% endblock %} + {% block body %} -

Festival creation

+

Create new Festival

- {{ form_start(form) }} - {{ form_widget(form) }} - - {{ form_end(form) }} + {{ include('festival/_form.html.twig') }} - + back to list {% endblock %} diff --git a/templates/festival/show.html.twig b/templates/festival/show.html.twig old mode 100755 new mode 100644 index 65734eef..1d8f06b3 --- a/templates/festival/show.html.twig +++ b/templates/festival/show.html.twig @@ -1,39 +1,34 @@ {% extends 'base.html.twig' %} +{% block title %}Festival{% endblock %} + {% block body %}

Festival

- +
- - - - - - - - - - - - + + + + + + + + + + + + + + + +
Id{{ festival.id }}
Name{{ festival.name }}
Datecreation{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}
Id{{ festival.id }}
Name{{ festival.name }}
Date_start{{ festival.dateStart ? festival.dateStart|date('Y-m-d') : '' }}
Date_end{{ festival.dateEnd ? festival.dateEnd|date('Y-m-d') : '' }}
- + back to list + + edit + + {{ include('festival/_delete_form.html.twig') }} {% endblock %} diff --git a/templates/group_of_products/_delete_form.html.twig b/templates/group_of_products/_delete_form.html.twig new file mode 100644 index 00000000..3aca94fc --- /dev/null +++ b/templates/group_of_products/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/group_of_products/_form.html.twig b/templates/group_of_products/_form.html.twig new file mode 100644 index 00000000..bf20b98f --- /dev/null +++ b/templates/group_of_products/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/group_of_products/edit.html.twig b/templates/group_of_products/edit.html.twig new file mode 100644 index 00000000..78be4a75 --- /dev/null +++ b/templates/group_of_products/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit GroupOfProducts{% endblock %} + +{% block body %} +

Edit GroupOfProducts

+ + {{ include('group_of_products/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('group_of_products/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/group_of_products/index.html.twig b/templates/group_of_products/index.html.twig new file mode 100644 index 00000000..ad1eba20 --- /dev/null +++ b/templates/group_of_products/index.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}GroupOfProducts index{% endblock %} + +{% block body %} +

GroupOfProducts index

+ + + + + + + + + + + {% for group_of_product in group_of_products %} + + + + + + {% else %} + + + + {% endfor %} + +
IdNameactions
{{ group_of_product.id }}{{ group_of_product.name }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/group_of_products/new.html.twig b/templates/group_of_products/new.html.twig new file mode 100644 index 00000000..21035157 --- /dev/null +++ b/templates/group_of_products/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New GroupOfProducts{% endblock %} + +{% block body %} +

Create new GroupOfProducts

+ + {{ include('group_of_products/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/group_of_products/show.html.twig b/templates/group_of_products/show.html.twig new file mode 100644 index 00000000..2c0abe6f --- /dev/null +++ b/templates/group_of_products/show.html.twig @@ -0,0 +1,26 @@ +{% extends 'base.html.twig' %} + +{% block title %}GroupOfProducts{% endblock %} + +{% block body %} +

GroupOfProducts

+ + + + + + + + + + + + +
Id{{ group_of_product.id }}
Name{{ group_of_product.name }}
+ + back to list + + edit + + {{ include('group_of_products/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/product/_delete_form.html.twig b/templates/product/_delete_form.html.twig new file mode 100644 index 00000000..00b9a7ef --- /dev/null +++ b/templates/product/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/product/_form.html.twig b/templates/product/_form.html.twig new file mode 100644 index 00000000..bf20b98f --- /dev/null +++ b/templates/product/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/product/edit.html.twig b/templates/product/edit.html.twig old mode 100755 new mode 100644 index 9ff52d27..84f44184 --- a/templates/product/edit.html.twig +++ b/templates/product/edit.html.twig @@ -1,24 +1,13 @@ {% extends 'base.html.twig' %} +{% block title %}Edit Product{% endblock %} + {% block body %} -

Product edit

+

Edit Product

- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} - - {{ form_end(edit_form) }} + {{ include('product/_form.html.twig', {'button_label': 'Update'}) }} - + back to list + + {{ include('product/_delete_form.html.twig') }} {% endblock %} diff --git a/templates/product/index.html.twig b/templates/product/index.html.twig old mode 100755 new mode 100644 index 98ffe6b4..82c7c810 --- a/templates/product/index.html.twig +++ b/templates/product/index.html.twig @@ -1,74 +1,39 @@ {% extends 'base.html.twig' %} +{% block title %}Product index{% endblock %} + {% block body %} -
-
-

Produits

-
+

Product index

- Nouveau produit - - astuce: Utilisez - - - - l'import de masse - - - pour créer plusieurs produits et catégories à la fois - -
-
- - - - - - - - - - - - - - - +
IdCategoryNameImagePriceStocksVendusCommentActions
+ + + + + + + + {% for product in products %} - - - - + + - - - + + {% else %} + + + {% endfor %}
IdNamePriceStockactions
- {{ product.id }} - - - {{ product.category.name }} - - - - - - {{ product.name }} - - {{ product.image }}{{ product.id }}{{ product.name }} {{ product.price }}{{ product.stockCount }}{{ product.productsSold | length }}{{ product.comment }}{{ product.stock }} - - - + show + edit
no records found
- Nouveau produit + Create new {% endblock %} diff --git a/templates/product/new.html.twig b/templates/product/new.html.twig old mode 100755 new mode 100644 index 55e347a7..d3ba64f7 --- a/templates/product/new.html.twig +++ b/templates/product/new.html.twig @@ -1,19 +1,11 @@ {% extends 'base.html.twig' %} +{% block title %}New Product{% endblock %} + {% block body %} -

Product creation

+

Create new Product

- {{ form_start(form) }} - {{ form_widget(form) }} - - {{ form_end(form) }} + {{ include('product/_form.html.twig') }} - + back to list {% endblock %} diff --git a/templates/product/show.html.twig b/templates/product/show.html.twig old mode 100755 new mode 100644 index 29d39258..33d7a9af --- a/templates/product/show.html.twig +++ b/templates/product/show.html.twig @@ -1,47 +1,34 @@ {% extends 'base.html.twig' %} +{% block title %}Product{% endblock %} + {% block body %}

Product

- +
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
Id{{ product.id }}
Name{{ product.name }}
Image{{ product.image }}
Price{{ product.price }}
Comment{{ product.comment }}
Id{{ product.id }}
Name{{ product.name }}
Price{{ product.price }}
Stock{{ product.stock }}
- + back to list + + edit + + {{ include('product/_delete_form.html.twig') }} {% endblock %} diff --git a/templates/selling/_delete_form.html.twig b/templates/selling/_delete_form.html.twig new file mode 100644 index 00000000..3e7dec32 --- /dev/null +++ b/templates/selling/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/selling/_form.html.twig b/templates/selling/_form.html.twig new file mode 100644 index 00000000..bf20b98f --- /dev/null +++ b/templates/selling/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/selling/edit.html.twig b/templates/selling/edit.html.twig new file mode 100644 index 00000000..ea40d1b5 --- /dev/null +++ b/templates/selling/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Selling{% endblock %} + +{% block body %} +

Edit Selling

+ + {{ include('selling/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('selling/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/selling/index.html.twig b/templates/selling/index.html.twig new file mode 100644 index 00000000..1c57758c --- /dev/null +++ b/templates/selling/index.html.twig @@ -0,0 +1,41 @@ +{% extends 'base.html.twig' %} + +{% block title %}Selling index{% endblock %} + +{% block body %} +

Selling index

+ + + + + + + + + + + + + + {% for selling in sellings %} + + + + + + + + + {% else %} + + + + {% endfor %} + +
IdNoteProductsSumReductionactions
{{ selling.id }}{{ selling.note }}{{ selling.products }}{{ selling.sum }}{{ selling.reduction }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/selling/new.html.twig b/templates/selling/new.html.twig new file mode 100644 index 00000000..0b6eca28 --- /dev/null +++ b/templates/selling/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Selling{% endblock %} + +{% block body %} +

Create new Selling

+ + {{ include('selling/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/selling/show.html.twig b/templates/selling/show.html.twig new file mode 100644 index 00000000..2c953f1d --- /dev/null +++ b/templates/selling/show.html.twig @@ -0,0 +1,38 @@ +{% extends 'base.html.twig' %} + +{% block title %}Selling{% endblock %} + +{% block body %} +

Selling

+ + + + + + + + + + + + + + + + + + + + + + + + +
Id{{ selling.id }}
Note{{ selling.note }}
Products{{ selling.products }}
Sum{{ selling.sum }}
Reduction{{ selling.reduction }}
+ + back to list + + edit + + {{ include('selling/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/toMigrate/festival/edit.html.twig b/templates/toMigrate/festival/edit.html.twig new file mode 100755 index 00000000..20df02e4 --- /dev/null +++ b/templates/toMigrate/festival/edit.html.twig @@ -0,0 +1,25 @@ +{% extends 'base.html.twig' %} + +{% block body %} +

Festival edit

+ + {{ form_start(edit_form) }} + {{ form_widget(edit_form) }} + + {{ form_end(edit_form) }} + + +{% endblock %} diff --git a/templates/toMigrate/festival/index.html.twig b/templates/toMigrate/festival/index.html.twig new file mode 100755 index 00000000..df538898 --- /dev/null +++ b/templates/toMigrate/festival/index.html.twig @@ -0,0 +1,95 @@ +{% extends 'base.html.twig' %} + +{% block body %} +
+
+

Festivals

+
+ Nouveau festival +
+
+ + + + + + + + + + + + + + + + + + + + + + + {% for festival in festivals %} + + + + + + + + + + + + + + + + {% endfor %} + +
IdNameDatecreationTous FraisClientsfond caisse avantfond caisse apreschiffre affairefond caisse + CAdiffbénefices CA - fraisActions
+ {{ festival.id }} + {{ festival.name }}{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}{{ festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement }} +  € + {{ festival.sellRecords|length }}{{ festival.fondDeCaisseAvant }}€{{ festival.fondDeCaisseApres }}€{{ festival.chiffreAffaire }}€{{ festival.fondDeCaisseAvant + festival.chiffreAffaire }}€{{ festival.chiffreAffaire - festival.fondDeCaisseApres }}€ + {{ festival.chiffreAffaire - (festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement ) }} + {% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %} + + Actuel + + {% else %} + + choisir comme actuel + + {% endif %} + + {% if festival.user|length %} + {% for u in festival.user %} + {{ u.username }} + {% endfor %} + {% else %} +
+ + pas d'owner. +
+ {% endif %} + + + Modifier + +
+ + Nouveau festival +{% endblock %} diff --git a/templates/toMigrate/festival/new.html.twig b/templates/toMigrate/festival/new.html.twig new file mode 100755 index 00000000..dafecb74 --- /dev/null +++ b/templates/toMigrate/festival/new.html.twig @@ -0,0 +1,16 @@ +{% extends 'base.html.twig' %} + +{% block body %} +

Festival creation

+ + {{ form_start(form) }} + {{ form_widget(form) }} + + {{ form_end(form) }} + + +{% endblock %} diff --git a/templates/toMigrate/festival/show.html.twig b/templates/toMigrate/festival/show.html.twig new file mode 100755 index 00000000..65734eef --- /dev/null +++ b/templates/toMigrate/festival/show.html.twig @@ -0,0 +1,39 @@ +{% extends 'base.html.twig' %} + +{% block body %} +

Festival

+ + + + + + + + + + + + + + + + +
Id{{ festival.id }}
Name{{ festival.name }}
Datecreation{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}
+ + +{% endblock %} diff --git a/templates/toMigrate/product/edit.html.twig b/templates/toMigrate/product/edit.html.twig new file mode 100755 index 00000000..9ff52d27 --- /dev/null +++ b/templates/toMigrate/product/edit.html.twig @@ -0,0 +1,24 @@ +{% extends 'base.html.twig' %} + +{% block body %} +

Product edit

+ + {{ form_start(edit_form) }} + {{ form_widget(edit_form) }} + + {{ form_end(edit_form) }} + + +{% endblock %} diff --git a/templates/toMigrate/product/index.html.twig b/templates/toMigrate/product/index.html.twig new file mode 100755 index 00000000..98ffe6b4 --- /dev/null +++ b/templates/toMigrate/product/index.html.twig @@ -0,0 +1,74 @@ +{% extends 'base.html.twig' %} + +{% block body %} +
+
+

Produits

+
+ + Nouveau produit + + astuce: Utilisez + + + + l'import de masse + + + pour créer plusieurs produits et catégories à la fois + +
+
+ + + + + + + + + + + + + + + + + + {% for product in products %} + + + + + + + + + + + + {% endfor %} + +
IdCategoryNameImagePriceStocksVendusCommentActions
+ {{ product.id }} + + + {{ product.category.name }} + + + + + + {{ product.name }} + + {{ product.image }}{{ product.price }}{{ product.stockCount }}{{ product.productsSold | length }}{{ product.comment }} + + + +
+ + Nouveau produit +{% endblock %} diff --git a/templates/toMigrate/product/new.html.twig b/templates/toMigrate/product/new.html.twig new file mode 100755 index 00000000..55e347a7 --- /dev/null +++ b/templates/toMigrate/product/new.html.twig @@ -0,0 +1,19 @@ +{% extends 'base.html.twig' %} + +{% block body %} +

Product creation

+ + {{ form_start(form) }} + {{ form_widget(form) }} + + {{ form_end(form) }} + + +{% endblock %} diff --git a/templates/toMigrate/product/show.html.twig b/templates/toMigrate/product/show.html.twig new file mode 100755 index 00000000..29d39258 --- /dev/null +++ b/templates/toMigrate/product/show.html.twig @@ -0,0 +1,47 @@ +{% extends 'base.html.twig' %} + +{% block body %} +

Product

+ + + + + + + + + + + + + + + + + + + + + + + + +
Id{{ product.id }}
Name{{ product.name }}
Image{{ product.image }}
Price{{ product.price }}
Comment{{ product.comment }}
+ + +{% endblock %} diff --git a/templates/product/test.html.twig b/templates/toMigrate/product/test.html.twig similarity index 100% rename from templates/product/test.html.twig rename to templates/toMigrate/product/test.html.twig diff --git a/templates/productcategory/edit.html.twig b/templates/toMigrate/productcategory/edit.html.twig similarity index 100% rename from templates/productcategory/edit.html.twig rename to templates/toMigrate/productcategory/edit.html.twig diff --git a/templates/productcategory/index.html.twig b/templates/toMigrate/productcategory/index.html.twig similarity index 100% rename from templates/productcategory/index.html.twig rename to templates/toMigrate/productcategory/index.html.twig diff --git a/templates/productcategory/new.html.twig b/templates/toMigrate/productcategory/new.html.twig similarity index 100% rename from templates/productcategory/new.html.twig rename to templates/toMigrate/productcategory/new.html.twig diff --git a/templates/productcategory/show.html.twig b/templates/toMigrate/productcategory/show.html.twig similarity index 100% rename from templates/productcategory/show.html.twig rename to templates/toMigrate/productcategory/show.html.twig diff --git a/templates/sellrecord/edit.html.twig b/templates/toMigrate/sellrecord/edit.html.twig similarity index 100% rename from templates/sellrecord/edit.html.twig rename to templates/toMigrate/sellrecord/edit.html.twig diff --git a/templates/sellrecord/index.html.twig b/templates/toMigrate/sellrecord/index.html.twig similarity index 100% rename from templates/sellrecord/index.html.twig rename to templates/toMigrate/sellrecord/index.html.twig diff --git a/templates/sellrecord/new.html.twig b/templates/toMigrate/sellrecord/new.html.twig similarity index 100% rename from templates/sellrecord/new.html.twig rename to templates/toMigrate/sellrecord/new.html.twig diff --git a/templates/sellrecord/show.html.twig b/templates/toMigrate/sellrecord/show.html.twig similarity index 100% rename from templates/sellrecord/show.html.twig rename to templates/toMigrate/sellrecord/show.html.twig diff --git a/templates/seriefestival/edit.html.twig b/templates/toMigrate/seriefestival/edit.html.twig similarity index 100% rename from templates/seriefestival/edit.html.twig rename to templates/toMigrate/seriefestival/edit.html.twig diff --git a/templates/seriefestival/index.html.twig b/templates/toMigrate/seriefestival/index.html.twig similarity index 100% rename from templates/seriefestival/index.html.twig rename to templates/toMigrate/seriefestival/index.html.twig diff --git a/templates/seriefestival/new.html.twig b/templates/toMigrate/seriefestival/new.html.twig similarity index 100% rename from templates/seriefestival/new.html.twig rename to templates/toMigrate/seriefestival/new.html.twig diff --git a/templates/seriefestival/show.html.twig b/templates/toMigrate/seriefestival/show.html.twig similarity index 100% rename from templates/seriefestival/show.html.twig rename to templates/toMigrate/seriefestival/show.html.twig