Merge branch 'master' into feat/add-document-encrypter-service

This commit is contained in:
Julien Fastré 2022-04-26 14:52:13 +02:00
commit faf1559770
8 changed files with 36 additions and 10 deletions

View File

@ -11,12 +11,15 @@ and this project adheres to
## Unreleased
<!-- write down unreleased development here -->
## 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

View File

@ -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 {

View File

@ -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 {

View File

@ -40,3 +40,8 @@ services:
tags:
- { name: 'serializer.normalizer', priority: 16 }
Chill\DocStoreBundle\Service\:
autowire: true
autoconfigure: true
resource: '../Service/'

View File

@ -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

View File

@ -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,

View File

@ -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);
};

View File

@ -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();