diff --git a/CHANGELOG.md b/CHANGELOG.md index 57ecdf5a2..689c7d338 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,15 @@ and this project adheres to ## Unreleased + +## Test releases + +### 2021-04-26 + * [Datepickers] datepickers fixed when using keyboard to enter date (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/545) * [social_action] Display 'agents traitants' in parcours resumé and social action list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/568) * [Person_search] Closed parcours shown within an accordeon that can be opened/closed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/574) -## Test releases - ### 2021-04-24 * [notification email on course designation] allow raw string in email content generation diff --git a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php index f4a133e0a..4bbd95e3a 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php +++ b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php @@ -273,7 +273,7 @@ final class DocGeneratorTemplateController extends AbstractController if ($isTest && isset($form) && $form['show_data']->getData()) { // very ugly hack... - dd($datas); + dd($context->getData($template, $entity, $contextGenerationData)); } try { diff --git a/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php b/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php index 73a4ba9e0..e8d635453 100644 --- a/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php +++ b/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php @@ -14,8 +14,10 @@ namespace Chill\DocGeneratorBundle\GeneratorDriver; use Chill\DocGeneratorBundle\GeneratorDriver\Exception\TemplateException; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; +use Symfony\Component\HttpClient\Exception\ClientException; use Symfony\Component\Mime\Part\DataPart; use Symfony\Component\Mime\Part\Multipart\FormDataPart; +use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; @@ -54,7 +56,9 @@ final class RelatorioDriver implements DriverInterface 'headers' => $form->getPreparedHeaders()->toArray(), 'body' => $form->bodyToIterable(), ]); - } catch (HttpExceptionInterface $e) { + + return $response->getContent(); + } catch (ClientExceptionInterface $e) { $content = $e->getResponse()->getContent(false); if (400 === $e->getResponse()->getStatusCode()) { @@ -87,6 +91,18 @@ final class RelatorioDriver implements DriverInterface ]); throw $e; + } catch (Throwable $exception) { + $this + ->logger + ->error( + 'relatorio: Unable to get content from response.', + [ + 'msg' => $exception->getMessage(), + 'e' => $exception->getTraceAsString(), + ] + ); + + throw $exception; } try { diff --git a/src/Bundle/ChillDocStoreBundle/config/services.yaml b/src/Bundle/ChillDocStoreBundle/config/services.yaml index ff2818f6b..860495677 100644 --- a/src/Bundle/ChillDocStoreBundle/config/services.yaml +++ b/src/Bundle/ChillDocStoreBundle/config/services.yaml @@ -40,3 +40,8 @@ services: tags: - { name: 'serializer.normalizer', priority: 16 } + Chill\DocStoreBundle\Service\: + autowire: true + autoconfigure: true + resource: '../Service/' + diff --git a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php index 3f3b08f6c..b4ab74a25 100644 --- a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php @@ -56,7 +56,7 @@ final class NotificationRepository implements ObjectRepository if (null === $this->notificationByRelatedEntityAndUserAssociatedStatement) { $sql = 'SELECT - SUM((EXISTS (SELECT 1 AS c FROM chill_main_notification_addresses_unread cmnau JOIN chill_main_notification cmn ON cmnau.notification_id = cmn.id WHERE user_id = :userid and cmnau.notification_id = cmn.id and cmn.sender_id IS NOT NULL))::int) AS unread, + SUM((EXISTS (SELECT 1 AS c FROM chill_main_notification_addresses_unread cmnau WHERE user_id = :userid and cmnau.notification_id = cmn.id))::int) AS unread, SUM((cmn.sender_id = :userid)::int) AS sent, COUNT(cmn.*) AS total FROM chill_main_notification cmn diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js index 502704716..d5437b0a7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js @@ -69,7 +69,6 @@ const store = createStore({ return []; }, buildPayload(state) { - console.log('end date', state.endDate); return { type: 'accompanying_period_work', id: state.work.id, @@ -245,7 +244,7 @@ const store = createStore({ type: "accompanying_period_work_evaluation", key: state.evaluationsPicked.length + 1, evaluation: evaluation, - startDate: new Date(), + startDate: dateToISO(new Date()), endDate: null, maxDate: null, warningInterval: null, diff --git a/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php b/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php index 81ecb4e55..1dfb5e6af 100644 --- a/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php +++ b/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php @@ -9,11 +9,11 @@ declare(strict_types=1); -use Chill\WopiBundle\Controller\Test; +use Chill\WopiBundle\Controller\Editor; use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; return static function (RoutingConfigurator $routes) { $routes ->add('chill_wopi_file_edit', '/edit/{fileId}') - ->controller(Test::class); + ->controller(Editor::class); }; diff --git a/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.js b/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.js index 1acb88bec..e5fe20618 100644 --- a/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.js +++ b/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.js @@ -14,7 +14,10 @@ window.addEventListener('DOMContentLoaded', function(e) { office_frame.setAttribute('allowfullscreen', 'true'); // The sandbox attribute is needed to allow automatic redirection to the O365 sign-in page in the business user flow - office_frame.setAttribute('sandbox', 'allow-downloads allow-scripts allow-same-origin allow-forms allow-popups allow-top-navigation allow-popups-to-escape-sandbox'); + office_frame.setAttribute( + 'sandbox', + 'allow-downloads allow-scripts allow-same-origin allow-forms allow-modals allow-popups allow-top-navigation allow-popups-to-escape-sandbox' + ); frameholder.appendChild(office_frame); document.getElementById('office_form').submit();