diff --git a/assets/styles/_utilities.scss b/assets/styles/_utilities.scss index 247a372..9aab182 100644 --- a/assets/styles/_utilities.scss +++ b/assets/styles/_utilities.scss @@ -65,12 +65,14 @@ border-radius: 50%; object-fit: cover; } + .img-avatar { display: inline-block; background-size: cover; background-position: center center; border-radius: 50% } + .bg-secondary-subtle { background: $gray-100; } @@ -87,7 +89,7 @@ width: fit-content; } -.white-space-normal{ +.white-space-normal { white-space: normal; } @@ -95,6 +97,7 @@ > input { border-right: 0; } + &-button { border: 1px solid #ced4da; border-left: none; @@ -105,6 +108,34 @@ border-top-right-radius: var(--bs-border-radius-sm) !important; } } + +p > strong { + > a { + color: $blue-500;; + position: relative; + text-decoration: none; + transition: .5s; + + &:after { + background-color: $blue-500; + content: ""; + height: 2px; + left: 0; + position: absolute; + top: 100%; + transform: scaleX(0); + transform-origin: right; + transition: transform .5s; + width: 100%; + } + + &:hover:after { + transform: scaleX(1); + transform-origin: left; + } + } +} + @media screen and (max-width: 992px) { .img-funding { width: 100%; diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index 2f79c6a..cdbf4c2 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -1,6 +1,6 @@ api_platform: - title: 'PlateformCoop API' - description: 'List of PlateformCoop API endpoints. Most of them require to be logged.' + title: 'Plateforme EBS API' + description: 'List of Plateforme EBS API endpoints. Most of them require to be logged.' # The version of the API. version: '%app_version%' diff --git a/config/services.yaml b/config/services.yaml index b787fb7..f7f3d95 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -5,7 +5,7 @@ # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: app_version: 0.7.2 - brand: PlateformCoop + brand: Plateforme EBS # https://symfony.com/doc/current/performance.html#dump-the-service-container-into-a-single-file container.dumper.inline_factories: true diff --git a/fixtures/test/category.yaml b/fixtures/test/category.yaml index 40949da..f2eccb1 100644 --- a/fixtures/test/category.yaml +++ b/fixtures/test/category.yaml @@ -26,6 +26,7 @@ App\Entity\Category: category_service_4_0 (extends category_object): parent: '@category_object_4' name: Guitare + image: 'de945081-21b6-46c2-864d-db6ed6b43311.png' category_object_5 (extends category_object): name: Entretien de la maison @@ -35,6 +36,7 @@ App\Entity\Category: category_object_7 (extends category_object): name: Images & son + image: 'd1fdbb3f-a5ca-4019-b488-fe6d8b06a4d3.png' category_object_8 (extends category_object): name: Informatique - téléphonie consoles et jeux vidéos @@ -44,12 +46,13 @@ App\Entity\Category: category_object_10 (extends category_object): name: Livres - + image: '87c1aa88-1937-4a71-b4d9-325086783193.png' category_object_11 (extends category_object): name: Loisirs divers category_object_12 (extends category_object): name: Matériel de sports + image: '04f41100-e963-4f33-8aaf-f1c774e0d42f.png' category_object_13 (extends category_object): name: Matériel de vacances et weekend diff --git a/fixtures/test/group.yaml b/fixtures/test/group.yaml index 3800ee2..26f4aa0 100644 --- a/fixtures/test/group.yaml +++ b/fixtures/test/group.yaml @@ -3,7 +3,7 @@ App\Entity\Group: group_1 (extends group_template): id: - name: Groupe 1 + name: Groupe 1 - adhésion payante description: > Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean velit erat, fringilla sit amet dui in, vehicula ultrices dui. @@ -12,7 +12,7 @@ App\Entity\Group: invitation_by_admin: true group_2 (extends group_template): - name: Groupe 2 + name: Groupe 2 - adhésion gratuite description: > Mauris varius vitae nunc ac maximus. Aliquam quis placerat nisi. Pellentesque aliquam magna sed elit interdum, sed elementum erat posuere. diff --git a/fixtures/test/menu_item.yaml b/fixtures/test/menu_item.yaml index 5898126..8a55523 100644 --- a/fixtures/test/menu_item.yaml +++ b/fixtures/test/menu_item.yaml @@ -32,12 +32,6 @@ App\Entity\MenuItem: parent: '@menu_item_account' position: 0 - menu_item_forgotten_password (extends menu_item): - name: 'Mot de passe oublié' - link: '/fr/compte/mot-de-passe-oublie' - parent: '@menu_item_account' - position: 1 - menu_item_logout (extends menu_item): name: 'Se déconnecter' link: '/logout' diff --git a/fixtures/test/page.yaml b/fixtures/test/page.yaml index 1eb920e..54fd53f 100644 --- a/fixtures/test/page.yaml +++ b/fixtures/test/page.yaml @@ -57,8 +57,83 @@ App\Entity\Page: name: Accueil home: true content: | - \

Nulla fermentum justo sed magna rutrum, eget fermentum dolor accumsan.

- + \

Bienvenue sur la démo de la plateforme d'échange de biens et services EBS

+

 

+

Contexte

+

Le logiciel est destiné aux porteurs de projets qui souhaitent développer une plateforme coopérative à une échelle territoriale locale (ville, EPCI, département, région Hauts-de-France) et ce dans une fédération d’instances de plateformes coopératives.

+

Ce logiciel propose une plateforme d'échange de biens et services au sein d'une communauté. La plateforme propose un moyen de rentrer en contact avec quelqu’un pour permettre cet échange : soit en tant que prêteur, qui propose un objet, soit en tant qu’emprunteur, qui l’utilise.

+

Pour les administrateur·rice·s de la plateforme, elle est personnalisable en configurant les fonctionnalités disponibles et en personnalisant les contenus via l’espace d’administration.

+

La plateforme a été conçue au format responsive pour être utilisée tant sur ordinateur qu’appareil mobile (tablette ou smartphone).

+

Le code est disponible sous licence AGPL (Affero General Public License).

+

 

+
+

Dépôt

+

Toutes les informations sur le projet et le code sont disponibles sur le dépôt public.

+

 

+
+

Démo

+

Vous pouvez tester la plateforme sur cet environnement de démo.

+

Utilisez les identifiants ci-dessous pour naviguez, ou crééz vous un compte :

+ + + + + + + + + + + + + + + + + + + + + + + + + +
RôleIdentifiantMot de passe
Adminsarah@example.comapesebs
Utilisateur de type individuelloic@example.comapesebs
Utilisateur de type lieucompte+lieu@apes-hdf.orgapesebs
+

 

+

Testez les paiements avec les cartes de test suivantes :

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNuméro de carteExpirationCVV
American Express3782 822463 10005TousTous
Mastercard2223 0000 1047 9399TousTous
VISA4543 4740 0224 9996TousTous
+

 

+ cgu: id: name: CGU diff --git a/fixtures/test/product.yaml b/fixtures/test/product.yaml index 3a0fc0a..c1f6de9 100644 --- a/fixtures/test/product.yaml +++ b/fixtures/test/product.yaml @@ -43,7 +43,8 @@ App\Entity\Product: name: Guitare électrique description: > Guitare en bon état. - age: 2010 + age: 2010 + images: ["d51c66ad-9e02-4fa9-8f37-5c84d928226e.jpg"] loic_service_1 (extends service): id: @@ -53,7 +54,8 @@ App\Entity\Product: description: > Initiation aux échecs pour débutants (1 heure). duration: > - Une ou deux heures si besoin. + Une ou deux heures si besoin. + images: ["e2140911-4689-47df-a9cd-f87cef342cdd.jpg"] # Kevin ——————————————————————————————————————————————————————————————————— kevin_object_1 (extends object): @@ -64,6 +66,7 @@ App\Entity\Product: description: > Très bien pour les déménagements, même proches. age: Acheté en 2012. + images: ["d4a5f2fb-57bb-4e6a-95eb-0614e8f62d45.jpg"] kevin_object_2 (extends object): owner: '@admin_kevin' @@ -72,6 +75,7 @@ App\Entity\Product: description: > Très bien pour percer des trous dans la maison. age: Acheté en 2015. + images: ["d75f07b1-52cb-4e39-929d-9da35e722627.jpg"] # Camille ————————————————————————————————————————————————————————————————————— camille_object_1 (extends object): @@ -109,6 +113,7 @@ App\Entity\Product: Pour transporter son enfant ou son chat. age: 2022 deposit: 5000 + images: ["335dbbc1-3660-4f82-a529-fe79eb1a9a87.jpg"] # user 16 ————————————————————————————————————————————————————————————————————— user_16_service_1 (extends service): @@ -129,6 +134,7 @@ App\Entity\Product: Très belle guitare électrique en bon état. age: 2013 deposit: 2000 + images: ["e5889470-abfd-432c-aa96-0838608b936a.jpg"] user_16_object_2 (extends object): owner: '@user_16' @@ -136,7 +142,8 @@ App\Entity\Product: name: Piano description: > Piano en bon état. - age: 2010 + age: 2010 + images: ["f3fa0285-2b3c-4235-a618-9092ee55cae4.jpg"] # place apes ————————————————————————————————————————————————————————————————————— place_apes_service_1 (extends service): @@ -163,7 +170,8 @@ App\Entity\Product: description: > Cours de rattrapage en histoire, aide aux devoirs, remise à niveau. duration: > - Une journée. + Une journée. + images: ["c594de44-8999-46ed-89f0-6688c7d7c087.jpg"] # Place 6 ——————————————————————————————————————————————————————————————————— place_6_object_1 (extends object): @@ -175,6 +183,7 @@ App\Entity\Product: duration: Une journée. age: De 2 à 10 ans deposit: 0 + images: ["434a9bb7-c140-4776-93e8-b8d018cd28f0.jpg"] place_6_object_2 (extends object): id: diff --git a/fixtures/test/user.yaml b/fixtures/test/user.yaml index 17baa41..5fc4cc2 100644 --- a/fixtures/test/user.yaml +++ b/fixtures/test/user.yaml @@ -2,7 +2,7 @@ App\Entity\User: base_user_template (template): enabled: true mainAdminAccount: false - password: '\$2y\$13\$LOIpgrMmOysCysIwkILTl.qD8psPxn9U9/V03p3odlqztLb7Aewze' # 35DVDj8ir3Buc7 + password: '\$2y\$13\$TQ31DwKCMXXDX4.vV8R10OLUIT8rDgtbUCywwtoT/gB72Ei46AOQ.' # apesebs emailConfirmed: true phoneNumber: '+33600000000' smsNotifications: true @@ -25,6 +25,7 @@ App\Entity\User: lastname: 'Croteau' mainAdminAccount: true address: '@address_camille' + avatar: 'a9a9bf49-24e4-4b3e-bdbd-86808c32939e.jpg' admin_loic (extends admin_template): id: @@ -33,17 +34,19 @@ App\Entity\User: lastname: 'Duclos' devAccount: true address: '@address_loic' + avatar: '7c732ddb-9c13-45eb-aea0-e614f2340e6d.jpg' admin_kevin (extends admin_template): id: email: 'kevin@example.com' firstname: 'Kevin' lastname: 'Pirouet' + avatar: '7c732ddb-9c13-45eb-aea0-e614f2340e6d.jpg' admin_apes (extends admin_template): id: address: '@address_loic' - email: 'plateformcoop@apes-hdf.org' + email: 'plateformeebs@apes-hdf.org' firstname: 'APES' lastname: 'APES' @@ -55,6 +58,7 @@ App\Entity\User: devAccount: true address: '@address_region_hauts_de_france' category: '@category_object_16' + avatar: 'a9a9bf49-24e4-4b3e-bdbd-86808c32939e.jpg' # —— Places ———————————————————————————————————————————————————————————————— place_{6} (extends place_template): @@ -156,7 +160,7 @@ App\Entity\User: firstname: lastname: address: null - avatar: 'ba827ea0-b140-4cbf-9786-77ac980c648c.jpg' + avatar: 'a9a9bf49-24e4-4b3e-bdbd-86808c32939e.jpg' # user with an address and a preferred category set user_{17} (extends user_template): @@ -173,3 +177,4 @@ App\Entity\User: email: 'john.doe@example.com' firstname: 'John' lastname: 'Doe' + avatar: '7c732ddb-9c13-45eb-aea0-e614f2340e6d.jpg' diff --git a/src/Controller/Admin/DashboardController.php b/src/Controller/Admin/DashboardController.php index 6909cf8..36db687 100755 --- a/src/Controller/Admin/DashboardController.php +++ b/src/Controller/Admin/DashboardController.php @@ -4,7 +4,6 @@ declare(strict_types=1); namespace App\Controller\Admin; -use App\Controller\Admin\Dev\DevToolsController; use App\Controller\User\MyAccountAction; use App\Entity\Group; use App\Entity\Page; @@ -211,12 +210,6 @@ final class DashboardController extends AbstractDashboardController yield MenuItem::linkToCrud('menu.loans', 'fas fa-link', ServiceRequest::class)->setPermission(User::ROLE_ADMIN); - // ————————————————————————————————————————————————————————————————————— - if ($user->isDevAccount()) { - yield MenuItem::section('menu.devtools')->setPermission(User::ROLE_ADMIN); - yield MenuItem::linkToRoute('menu.dev_tools', 'fas fa-wrench', DevToolsController::ROUTE_NAME)->setPermission(User::ROLE_ADMIN); - } - // ————————————————————————————————————————————————————————————————————— yield MenuItem::section('menu.public'); yield MenuItem::linkToUrl('menu.home', 'fa fa-home', '/')->setLinkTarget('_blank'); diff --git a/src/Controller/Admin/ServiceCrudController.php b/src/Controller/Admin/ServiceCrudController.php index 63754c2..bccc265 100644 --- a/src/Controller/Admin/ServiceCrudController.php +++ b/src/Controller/Admin/ServiceCrudController.php @@ -10,6 +10,7 @@ use App\Enum\Product\ProductType; use App\Enum\Product\ProductVisibility; use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField; +use EasyCorp\Bundle\EasyAdminBundle\Field\ImageField; /** * Specific page for services. @@ -53,15 +54,19 @@ final class ServiceCrudController extends AbstractProductCrudController 'nameField' => $nameField, 'descriptionField' => $descriptionField, 'durationField' => $durationField, + 'imageField' => $imageField, 'createdAt' => $createdAt, 'updatedAt' => $updatedAt, ] = $this->getFields($pageName); // list if ($pageName === Crud::PAGE_INDEX) { - return [$nameField, $ownerField, $categoryField, $statusField, $visibilityField, $createdAt]; + return [$nameField, $ownerField, $categoryField, $statusField, $visibilityField, $imageField, $createdAt]; } + /** @var ImageField $imageField */ + $imageField->setCustomOption('first_image_only', false); + // forms if ($pageName === Crud::PAGE_NEW || $pageName === Crud::PAGE_EDIT) { /** @var ChoiceField $statusField */ @@ -69,7 +74,7 @@ final class ServiceCrudController extends AbstractProductCrudController /** @var ChoiceField $visibilityField */ $visibilityField->setChoices(ProductVisibility::cases()); - return [$nameField, $ownerField, $categoryField, $statusField, $visibilityField, $descriptionField, $durationField]; + return [$nameField, $ownerField, $categoryField, $statusField, $visibilityField, $descriptionField, $imageField, $durationField]; } // detail @@ -83,7 +88,7 @@ final class ServiceCrudController extends AbstractProductCrudController $nameField, $descriptionField, $durationField, - + $imageField, $panels['tech_information'], $idField, $typeField, diff --git a/src/Controller/User/Product/ObjectController.php b/src/Controller/User/Product/ObjectController.php index db8b52d..5da2808 100644 --- a/src/Controller/User/Product/ObjectController.php +++ b/src/Controller/User/Product/ObjectController.php @@ -61,7 +61,7 @@ final class ObjectController extends AbstractController return $this->redirectToRoute('app_product_show', $product->getRoutingParameters()); } - return $this->render('pages/product/new_object.html.twig', compact('form')); + return $this->render('pages/product/new_object.html.twig', compact('form', 'product')); } #[Route(path: [ diff --git a/src/Controller/User/Product/ServiceController.php b/src/Controller/User/Product/ServiceController.php index f5fbe9b..dad5958 100644 --- a/src/Controller/User/Product/ServiceController.php +++ b/src/Controller/User/Product/ServiceController.php @@ -66,7 +66,7 @@ final class ServiceController extends AbstractController return $this->redirectToRoute('app_product_show', $product->getRoutingParameters()); } - return $this->render('pages/product/new_service.html.twig', compact('form')); + return $this->render('pages/product/new_service.html.twig', compact('form', 'product')); } else { throw new GoneHttpException(); } diff --git a/templates/components/footer/_links.html.twig b/templates/components/footer/_links.html.twig index 3cb9ec8..83bad04 100644 --- a/templates/components/footer/_links.html.twig +++ b/templates/components/footer/_links.html.twig @@ -13,7 +13,7 @@ {% endfor %} {% else %} -
+
    {% for item in links %}
  • diff --git a/templates/components/product/_address_form.html.twig b/templates/components/product/_address_form.html.twig index 0d1e669..afa1c1e 100644 --- a/templates/components/product/_address_form.html.twig +++ b/templates/components/product/_address_form.html.twig @@ -1,7 +1,7 @@ {% if app.user.address is not null %} {% include 'components/layout/_title_5.html.twig' with { rowClass: 'border-top', - title: 'product.form.recover'|trans, + title: product.type.value == "object" ? 'product.form.recover'|trans : 'product.form.service_location'|trans, colClass: 'col-md-8 col-lg-6 col-xl-5 mt-4' } %} {% include 'components/product/_address.html.twig' with { diff --git a/tests/Integration/Command/NotifyMembershipExpirationCommandTest.php b/tests/Integration/Command/NotifyMembershipExpirationCommandTest.php index 04d0045..594d824 100644 --- a/tests/Integration/Command/NotifyMembershipExpirationCommandTest.php +++ b/tests/Integration/Command/NotifyMembershipExpirationCommandTest.php @@ -28,7 +28,7 @@ final class NotifyMembershipExpirationCommandTest extends KernelTestCase $commandTester->assertCommandIsSuccessful(); $output = $commandTester->getDisplay(); self::assertStringContainsString(sprintf('%d notification', 1), $output); - self::assertStringContainsString('Groupe 1 of Camille', $output); + self::assertMatchesRegularExpression('/Groupe 1 - adhésion payante of[\s\/\\n]*Camille/', $output); self::assertEmailCount(1); self::assertNotificationCount(1); diff --git a/tests/TestReference.php b/tests/TestReference.php index a1387d0..dc43b23 100644 --- a/tests/TestReference.php +++ b/tests/TestReference.php @@ -33,7 +33,7 @@ final class TestReference // users public const USER_COUNT = 18; - public const PASSWORD_FIXTURES = '35DVDj8ir3Buc7'; + public const PASSWORD_FIXTURES = 'apesebs'; public const PASSWORD = '12345678'; public const USER_17_EMAIL = 'user17@example.com'; @@ -101,7 +101,7 @@ final class TestReference // menu and footer public const MENU_COUNT = 2; - public const MENU_ITEMS_COUNT = 16; + public const MENU_ITEMS_COUNT = 15; public const MENU_HEADER_ITEM_FIRST = '58a72426-57e4-4251-9c32-d29603bdcf5b'; public const MENU_HEADER_ITEM_LAST = 'ac678c07-421f-4968-b2f8-74c9f2f22fcf'; diff --git a/translations/product/messages.fr.xlf b/translations/product/messages.fr.xlf index 78dcc31..a165e60 100644 --- a/translations/product/messages.fr.xlf +++ b/translations/product/messages.fr.xlf @@ -151,6 +151,11 @@ A récupérer + + product.form.service_location + Lieu de la prestation + + product.form.address Adresse diff --git a/translations/templates/pages/account/index/messages.fr.xlf b/translations/templates/pages/account/index/messages.fr.xlf index bb3c94e..cafb149 100644 --- a/translations/templates/pages/account/index/messages.fr.xlf +++ b/translations/templates/pages/account/index/messages.fr.xlf @@ -40,7 +40,7 @@ templates.pages.account.index.mail.subject - PlatformCoop : demande de création de groupe + Platforme EBS : demande de création de groupe