Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: parti-renaissance/espace-adherent
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6468156a15fd767c48b71bed55ba2660e5981c49
Choose a base ref
..
head repository: parti-renaissance/espace-adherent
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 23c63adaeea76f8c0d93c668aec39e3606c71de8
Choose a head ref
Showing 516 changed files with 5,121 additions and 4,860 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ db: db-init
db-init: vendor wait-for-db ## Init the database
$(CONSOLE) doctrine:database:drop --force --if-exists --no-debug
$(CONSOLE) doctrine:database:create --if-not-exists --no-debug
$(CONSOLE) doctrine:database:import -n --no-debug -- dump/dump-2022.sql
$(DOCKER_COMPOSE) exec -T app mysql -h db -uroot -proot --quick enmarche < ./dump/dump-2022.sql
$(CONSOLE) doctrine:migrations:migrate -n --no-debug

db-diff: vendor wait-for-db ## Generate a migration by comparing your current database to your mapping information
@@ -154,7 +154,7 @@ tfp-rabbitmq: wait-for-rabbitmq
tfp-db-init: wait-for-db ## Init databases for tests
$(CONSOLE) doctrine:database:drop --force --if-exists --env=test --no-debug
$(CONSOLE) doctrine:database:create --env=test --no-debug
$(CONSOLE) doctrine:database:import --env=test -n --no-debug -- dump/dump-2022.sql
$(DOCKER_COMPOSE) exec -T app mysql -h db -uroot -proot --quick enmarche_test < ./dump/dump-2022.sql
$(CONSOLE) doctrine:migration:migrate -n --no-debug --env=test
$(CONSOLE) doctrine:schema:validate --no-debug --env=test

54 changes: 54 additions & 0 deletions assets/listeners/confirm-modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
import Modal from '../components/Modal';

function contentCallback(element, closeCallback) {
return (
<div className="font-roboto">
<div className="font-bold text-xl">
{element.dataset.confirmTitle ? element.dataset.confirmTitle : 'Confirmation'}
</div>
<p className="mt-5">
{element.dataset.confirmContent || 'Êtes-vous sûr ?'}
</p>
<div className="mt-5 flex justify-between">
<a href={'#'} onClick={closeCallback}
className="px-3 py-2 rounded-md border text-sm leading-5 text-re-blue-800"
>
Annuler
</a>

<a href={element.href} className={'px-3 py-2 rounded-md text-sm leading-5 bg-re-blue-50 text-re-blue-800 hover:bg-re-blue-100'}>{element.dataset.confirmAction || 'Confirmer'}</a>
</div>
</div>
);
}

export default () => {
on(document, 'click', (event) => {
const element = event.target;

if (!hasClass(element, 'em-confirm--trigger')) {
return;
}

event.preventDefault();

let modalWrapper = dom('#modal-wrapper');

if (!modalWrapper) {
modalWrapper = document.createElement('div');
element.parentNode.insertBefore(modalWrapper, element);
}

const root = createRoot(modalWrapper);
const closeCallback = () => root.unmount();

root.render(
<Modal
contentCallback={() => contentCallback(element, closeCallback)}
closeCallback={closeCallback}
/>
);
});
};
2 changes: 2 additions & 0 deletions assets/main.js
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ import registerServices from './services';
import amountChooser from './listeners/amount-chooser'
import addressAutocomplete from './listeners/address-autocomplete'
import carousel from './listeners/carousel'
import confirmModal from './listeners/confirm-modal'

class Main {
constructor() {
@@ -12,6 +13,7 @@ class Main {
amountChooser,
addressAutocomplete,
carousel,
confirmModal,
];
}

4 changes: 4 additions & 0 deletions assets/style/main.scss
Original file line number Diff line number Diff line change
@@ -208,6 +208,10 @@
color: theme('colors.dark-blue');
}
}

&.custom-amount-donation {
padding: 0.75rem 3rem;
}
}

.renaissance-amount-chooser {
2 changes: 2 additions & 0 deletions behat.yml.dist
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ default:
screenshotDir: 'var/behat'
- Behatch\Context\XmlContext
- Behat\MinkExtension\Context\MinkContext
- Tests\App\Behat\Context\AppContext
- Tests\App\Behat\Context\DIContext
- Tests\App\Behat\Context\TransactionalDatabaseContext
- Tests\App\Behat\Context\RestContext
@@ -52,6 +53,7 @@ default:
- Behatch\Context\DebugContext:
screenshotDir: 'var/behat'
- Behat\MinkExtension\Context\MinkContext
- Tests\App\Behat\Context\AppContext
- Tests\App\Behat\Context\DIContext
- Tests\App\Behat\Context\FixtureContext
- Tests\App\Behat\Context\RestContext
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -44,8 +44,7 @@
"cocur/slugify": "^4.0",
"creof/doctrine2-spatial": "^1.2",
"danhunsaker/flysystem-redis": "^1.0",
"doctrine/dbal": "^2.13.0",
"doctrine/doctrine-bundle": "^2.2",
"doctrine/doctrine-bundle": "^2.8",
"doctrine/doctrine-migrations-bundle": "^3.0",
"egulias/email-validator": "^3.0",
"endroid/qr-code-bundle": "^4.2",
@@ -60,7 +59,7 @@
"google/cloud-recaptcha-enterprise": "^1.2",
"google/cloud-storage": "^1.23",
"google/cloud-vision": "^1.2",
"knplabs/doctrine-behaviors": "^2.0.0",
"knplabs/doctrine-behaviors": "^2.6",
"knplabs/knp-time-bundle": "^1.7",
"kreait/firebase-bundle": "^5.0",
"league/commonmark": "1.6.6",
@@ -85,7 +84,7 @@
"sabre/dav": "^4.1",
"scheb/2fa-bundle": "^6.3",
"scheb/2fa-google-authenticator": "^6.3",
"scienta/doctrine-json-functions": "^4.3",
"scienta/doctrine-json-functions": "^5.2",
"sensio/framework-extra-bundle": "^6.0",
"sentry/sentry-symfony": "^4.2",
"snc/redis-bundle": "^4.3",
@@ -145,7 +144,7 @@
"behatch/contexts": "^3.3",
"bex/behat-skip-tests": "^1.2",
"coduo/php-matcher": "^6.0",
"dama/doctrine-test-bundle": "^6.5",
"dama/doctrine-test-bundle": "^7.2",
"doctrine/doctrine-fixtures-bundle": "^3.3",
"fakerphp/faker": "^1.13",
"friends-of-behat/mink": "^1.10",
Loading