Skip to content

Commit

Permalink
Merge pull request afup#1526 from Mopolo/suppression-integration-trello
Browse files Browse the repository at this point in the history
Suppression de l'intégration Trello
  • Loading branch information
agallou authored Aug 24, 2024
2 parents ee7d30a + e4de5e2 commit 0214c82
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 266 deletions.
3 changes: 0 additions & 3 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ MAILCHIMP_TECHLETTER_LIST=
MAILCHIMP_TECHLETTER_API_KEY=
MAILCHIMP_TECHLETTER_WEBHOOK_KEY="abc"

TRELLO_API_KEY=
TRELLO_TOKEN=

GOOGLE_MAPS_API_KEY=

MEETUP_API_CONSUMER_KEY=
Expand Down
11 changes: 0 additions & 11 deletions app/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -585,17 +585,6 @@ services:
AppBundle\Event\Sponsorship\SponsorshipLeadMail:
arguments: ['@AppBundle\Email\Mailer\Mailer', "@translator", "@logger"]

Trello\Client:
calls: [["authenticate", ["%trello_api_key%", "%trello_token%", !php/const Trello\Client::AUTH_URL_CLIENT_ID]]]

Trello\Manager:
arguments: ['@Trello\Client']

AppBundle\Event\Model\Repository\LeadRepository:
arguments:
$logger: "@logger"
autowire: true

AppBundle\Event\AnonymousExport:
autowire: true

Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"beberlei/assert": "^2.9",
"captioning/captioning": "^2.6",
"ccmbenchmark/ting_bundle": "^3.0",
"cdaguerre/php-trello-api": "^0.9.3",
"cocur/slugify": "^2.3",
"doctrine/dbal": "^2.5",
"ekino/newrelic-bundle": "^1.4",
Expand Down
150 changes: 1 addition & 149 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions db/migrations/20240723155900_suppression_trello_list_id.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

use Phinx\Migration\AbstractMigration;

class SuppressionTrelloListId extends AbstractMigration
{
public function change()
{
$this->execute('ALTER TABLE afup_forum DROP COLUMN trello_list_id');
}
}
1 change: 0 additions & 1 deletion db/seeds/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public function run()
'id' => self::ID_FORUM,
'titre' => 'forum',
'path' => 'forum',
'trello_list_id' => null,
'logo_url' => 'http://78.media.tumblr.com/tumblr_lgkqc0mz9d1qfyzelo1_1280.jpg', // oui, c'est un chat
'nb_places' => 500,
'date_debut' => date('Y-m-d', $event),
Expand Down
4 changes: 0 additions & 4 deletions htdocs/pages/administration/forum_gestion.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
$formulaire->addElement('text', 'path', 'Chemin du template', ['size' => 30, 'maxlength' => 100]);
$formulaire->addElement('static', 'info', '',
'<i>Le path sert également à déterminer le nom du template de mail à utiliser sur mandrill, sous la forme confirmation-inscription-{PATH}</i>');
$formulaire->addElement('text', 'trello_list_id', 'Liste trello pour les leads',
['size' => 30, 'maxlength' => 100]);
$formulaire->addElement('text', 'logo_url', "URL du logo de l'évènement", ['size' => 30, 'maxlength' => 255]);
$formulaire->addElement('text', 'nb_places', 'Nombre de places', ['size' => 30, 'maxlength' => 100]);
$formulaire->addElement('text', 'place_name', 'Nom du lieu', ['size' => 30, 'maxlength' => 255]);
Expand Down Expand Up @@ -205,7 +203,6 @@
'mail_inscription_content' => $formulaire->exportValue('mail_inscription_content'),
'become_sponsor_description' => $formulaire->exportValue('become_sponsor_description'),
],
$formulaire->exportValue('trello_list_id'),
$formulaire->exportValue('logo_url'),
$formulaire->exportValue('place_name'),
$formulaire->exportValue('place_address'),
Expand Down Expand Up @@ -246,7 +243,6 @@
'mail_inscription_content' => $formulaire->exportValue('mail_inscription_content'),
'become_sponsor_description' => $formulaire->exportValue('become_sponsor_description'),
],
$formulaire->exportValue('trello_list_id'),
$formulaire->exportValue('logo_url'),
$formulaire->exportValue('place_name'),
$formulaire->exportValue('place_address'),
Expand Down
6 changes: 1 addition & 5 deletions sources/Afup/Forum/Forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ function ajouter(
$date_annonce_planning,
$chemin_template,
array $text,
$trello_list_id,
$logoUrl,
$placeName,
$placeAddress,
Expand All @@ -615,7 +614,7 @@ function ajouter(
) {
$requete = 'INSERT INTO ';
$requete .= ' afup_forum (id, titre, nb_places, date_debut, date_fin, annee, date_fin_appel_projet,';
$requete .= ' date_fin_appel_conferencier, date_fin_vote, date_fin_prevente, date_fin_vente, date_fin_vente_token_sponsor, date_fin_saisie_repas_speakers, date_fin_saisie_nuites_hotel, date_annonce_planning, path, `text`, `trello_list_id`,
$requete .= ' date_fin_appel_conferencier, date_fin_vote, date_fin_prevente, date_fin_vente, date_fin_vente_token_sponsor, date_fin_saisie_repas_speakers, date_fin_saisie_nuites_hotel, date_annonce_planning, path, `text`,
`logo_url`, `place_name`, `has_prices_defined_with_vat`, `vote_enabled`, `speakers_diner_enabled`, `accomodation_enabled`, `waiting_list_url`, `place_address`, `transport_information_enabled`) ';
$requete .= 'VALUES (null,';
$requete .= $this->_bdd->echapper($titre) . ',';
Expand All @@ -634,7 +633,6 @@ function ajouter(
$requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_annonce_planning, true) . ',';
$requete .= $this->_bdd->echapper($chemin_template, true) . ',';
$requete .= $this->_bdd->echapper(json_encode($text)) . ', ';
$requete .= $this->_bdd->echapper($trello_list_id) . ',';
$requete .= $this->_bdd->echapper($logoUrl) . ',';
$requete .= $this->_bdd->echapper($placeName) . ',';
$requete .= $this->_bdd->echapper($hasPricesDefinedWithVat ? 1 : 0) . ',';
Expand Down Expand Up @@ -667,7 +665,6 @@ function modifier(
$date_annonce_planning,
$chemin_template,
array $text,
$trello_list_id = null,
$logoUrl = null,
$placeName = null,
$placeAddress = null,
Expand Down Expand Up @@ -697,7 +694,6 @@ function modifier(
$requete .= ' date_annonce_planning=' . $this->_bdd->echapperSqlDateFromQuickForm($date_annonce_planning, true) . ',';
$requete .= ' path=' . $this->_bdd->echapper($chemin_template, true) . ', ';
$requete .= ' `text` = ' . $this->_bdd->echapper(json_encode($text)) . ', ';
$requete .= ' `trello_list_id` = ' . $this->_bdd->echapper($trello_list_id) . ',';
$requete .= ' `logo_url` = ' . $this->_bdd->echapper($logoUrl) . ', ';
$requete .= ' `place_name` = ' . $this->_bdd->echapper($placeName) . ', ';
$requete .= ' `vote_enabled` = ' . $this->_bdd->echapper($voteEnabled ? 1 : 0) . ', ';
Expand Down
5 changes: 1 addition & 4 deletions sources/AppBundle/Controller/LeadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ public function becomeSponsorAction($eventSlug, Request $request)
$leadForm->handleRequest($request);

if ($leadForm->isSubmitted() && $leadForm->isValid()) {
//$repository = $this->get(\AppBundle\Event\Model\Repository\LeadRepository::class);
//$repository->save($lead);

$sponsorshipLeadMail = $this->get(\AppBundle\Event\Sponsorship\SponsorshipLeadMail::class);
$this->get('event_dispatcher')->addListener(KernelEvents::TERMINATE, function () use ($lead, $sponsorshipLeadMail) {
$sponsorshipLeadMail->sendSponsorshipFile($lead);
Expand Down Expand Up @@ -84,7 +81,7 @@ private function sendMailToTeamSponsor(Event $event, Lead $lead)
$content =
sprintf(
"Une nouvelle demande de dosssier de sponsoring vient d'être effectuée sur le site. Voici les informations saisies :
- Société: %s
- Intitulé du poste: %s
- Nom: %s
Expand Down
24 changes: 0 additions & 24 deletions sources/AppBundle/Event/Model/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ class Event implements NotifyPropertyInterface
*/
private $path;

/**
* @var string
*/
private $trelloListId;

/**
* @var string
*/
Expand Down Expand Up @@ -461,25 +456,6 @@ public function getBecomeSponsorText()
return $cfp[$key];
}

/**
* @return string
*/
public function getTrelloListId()
{
return $this->trelloListId;
}

/**
* @param string $trelloListId
* @return Event
*/
public function setTrelloListId($trelloListId)
{
$this->propertyChanged('trelloListId', $this->trelloListId, $trelloListId);
$this->trelloListId = $trelloListId;
return $this;
}

/**
* @return string
*/
Expand Down
5 changes: 0 additions & 5 deletions sources/AppBundle/Event/Model/Repository/EventRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,6 @@ public static function initMetadata(SerializerFactoryInterface $serializerFactor
'fieldName' => 'path',
'type' => 'string'
])
->addField([
'columnName' => 'trello_list_id',
'fieldName' => 'trelloListId',
'type' => 'string'
])
->addField([
'columnName' => 'logo_url',
'fieldName' => 'logoUrl',
Expand Down
Loading

0 comments on commit 0214c82

Please sign in to comment.