Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QR Code Sponsor : command de génération des QR Codes pour les visiteurs #1495

Open
wants to merge 2 commits into
base: feat/sponsor-scan
Choose a base branch
from

Conversation

jerlio
Copy link
Contributor

@jerlio jerlio commented Apr 24, 2024

Ajout d'une commande de génération des QR Codes pour les tickets visiteurs n'ayant pas encore de QR code.

A définir : j'ai pour le moment filtré sur la date à partir du 1er janvier 2024 pour éviter de rétro générer les codes des précédents events. A voir si on laisse comme cela ou si on fait autrement.

La commande

bin/console generate-qr-codes

@jerlio jerlio self-assigned this Apr 24, 2024
$io = new SymfonyStyle($input, $output);
$io->title('Génération des QR codes pour les badges des participant.e.s pour les évènements.');

if (!$this->lock()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

le lock est géré par quelle classe ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je me suis inspiré d'une autre commande, mais ici pas vraiment besoin du lock, je l'enlève.


if (count($tickets) === 0) {
$io->text('Aucun nouveau code à générer');
return 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pour moi ce n'est pas une erreur, on pourrait renvoyer 0


$io->progressFinish();
$io->success('Terminé avec succès');
return 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ici il n'y a pas d'erreur, j'aurais plutôt vu un return 0

AND afup_inscription_forum.date > :date';

return $this->getPreparedQuery($sql)
->setParams(['date' => (new \DateTime('2024-01-01 00:00:00'))->getTimestamp()]) //TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a qui correspond ce TODO ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour voir ensemble quelle date mettre ici. L'ouverture des inscriptions pour le forum 2024 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

est-ce qu'on a besoin d'une date ? je ne pense doit pouvoir s'en passer, ce n'est pas gênant si on génère le QR code sur les anciens événements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants