mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-11 22:58:26 +00:00
Compare commits
7 Commits
v4.6.0
...
456-doc-ge
| Author | SHA1 | Date | |
|---|---|---|---|
| 24a66e4985 | |||
| bf38ec22c9 | |||
| 9c2abb2dfa | |||
| 94744b9542 | |||
| f42bb498e4 | |||
| 01889ac671 | |||
| 62e5842311 |
7
.changes/unreleased/DX-20251027-150053.yaml
Normal file
7
.changes/unreleased/DX-20251027-150053.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
kind: DX
|
||||||
|
body: |
|
||||||
|
Send notifications log to dedicated channel, if it exists
|
||||||
|
time: 2025-10-27T15:00:53.309372316+01:00
|
||||||
|
custom:
|
||||||
|
Issue: ""
|
||||||
|
SchemaChange: No schema change
|
||||||
6
.changes/unreleased/UX-20251103-161910.yaml
Normal file
6
.changes/unreleased/UX-20251103-161910.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: UX
|
||||||
|
body: Display whether doc generation template is active or not in admin and order templates alphabetically
|
||||||
|
time: 2025-11-03T16:19:10.051947925+01:00
|
||||||
|
custom:
|
||||||
|
Issue: "456"
|
||||||
|
SchemaChange: No schema change
|
||||||
3
.changes/v4.6.1.md
Normal file
3
.changes/v4.6.1.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## v4.6.1 - 2025-10-27
|
||||||
|
### Fixed
|
||||||
|
* Fix export case where no 'reason' is picked within the PersonHavingActivityBetweenDateFilter.php
|
||||||
@@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||||
|
|
||||||
|
|
||||||
|
## v4.6.1 - 2025-10-27
|
||||||
|
### Fixed
|
||||||
|
* Fix export case where no 'reason' is picked within the PersonHavingActivityBetweenDateFilter.php
|
||||||
|
|
||||||
## v4.6.0 - 2025-10-15
|
## v4.6.0 - 2025-10-15
|
||||||
### Feature
|
### Feature
|
||||||
* ([#423](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/423)) Create environment banner that can be activated and configured depending on the image deployed
|
* ([#423](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/423)) Create environment banner that can be activated and configured depending on the image deployed
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"ext-openssl": "*",
|
"ext-openssl": "*",
|
||||||
"ext-redis": "*",
|
"ext-redis": "*",
|
||||||
"ext-zlib": "*",
|
"ext-zlib": "*",
|
||||||
"champs-libres/wopi-bundle": "dev-master@dev",
|
"champs-libres/wopi-bundle": "dev-master#1be045ee95310d2037683859ecefdbf3a10f7be6 as 0.4.x-dev",
|
||||||
"champs-libres/wopi-lib": "dev-master@dev",
|
"champs-libres/wopi-lib": "dev-master@dev",
|
||||||
"doctrine/data-fixtures": "^1.8",
|
"doctrine/data-fixtures": "^1.8",
|
||||||
"doctrine/doctrine-bundle": "^2.1",
|
"doctrine/doctrine-bundle": "^2.1",
|
||||||
|
|||||||
@@ -90,7 +90,9 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
|||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
return [];
|
return [
|
||||||
|
'reasons' => [],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, ExportGenerationContext $context): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
public function describeAction($data, ExportGenerationContext $context): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
|||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, ExportGenerationContext $exportGenerationContext): void
|
public function alterQuery(QueryBuilder $qb, $data, ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
|
error_log('alterQuery called with data: '.json_encode(array_keys($data)));
|
||||||
|
|
||||||
// create a subquery for activity
|
// create a subquery for activity
|
||||||
$sqb = $qb->getEntityManager()->createQueryBuilder();
|
$sqb = $qb->getEntityManager()->createQueryBuilder();
|
||||||
$sqb->select('1')
|
$sqb->select('1')
|
||||||
@@ -59,7 +61,6 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
|||||||
if (\in_array('activity', $qb->getAllAliases(), true)) {
|
if (\in_array('activity', $qb->getAllAliases(), true)) {
|
||||||
$sqb->andWhere('activity_person_having_activity.id = activity.id');
|
$sqb->andWhere('activity_person_having_activity.id = activity.id');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($data['reasons']) && [] !== $data['reasons']) {
|
if (isset($data['reasons']) && [] !== $data['reasons']) {
|
||||||
// add clause activity reason
|
// add clause activity reason
|
||||||
$sqb->join('activity_person_having_activity.reasons', 'reasons_person_having_activity');
|
$sqb->join('activity_person_having_activity.reasons', 'reasons_person_having_activity');
|
||||||
@@ -124,12 +125,38 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
|||||||
|
|
||||||
public function normalizeFormData(array $formData): array
|
public function normalizeFormData(array $formData): array
|
||||||
{
|
{
|
||||||
return ['date_from_rolling' => $formData['date_from_rolling']->normalize(), 'date_to_rolling' => $formData['date_to_rolling']->normalize()];
|
$normalized = [
|
||||||
|
'date_from_rolling' => $formData['date_from_rolling']->normalize(),
|
||||||
|
'date_to_rolling' => $formData['date_to_rolling']->normalize(),
|
||||||
|
'reasons' => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
if (isset($formData['reasons']) && [] !== $formData['reasons']) {
|
||||||
|
$normalized['reasons'] = array_map(
|
||||||
|
fn (ActivityReason $reason) => $reason->getId(),
|
||||||
|
$formData['reasons']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $normalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function denormalizeFormData(array $formData, int $fromVersion): array
|
public function denormalizeFormData(array $formData, int $fromVersion): array
|
||||||
{
|
{
|
||||||
return ['date_from_rolling' => RollingDate::fromNormalized($formData['date_from_rolling']), 'date_to_rolling' => RollingDate::fromNormalized($formData['date_to_rolling'])];
|
$denormalized = [
|
||||||
|
'date_from_rolling' => RollingDate::fromNormalized($formData['date_from_rolling']),
|
||||||
|
'date_to_rolling' => RollingDate::fromNormalized($formData['date_to_rolling']),
|
||||||
|
'reasons' => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
if (isset($formData['reasons']) && [] !== $formData['reasons']) {
|
||||||
|
$denormalized['reasons'] = array_map(
|
||||||
|
fn ($id) => $this->activityReasonRepository->find($id),
|
||||||
|
$formData['reasons']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $denormalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
@@ -143,10 +170,12 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
|||||||
|
|
||||||
public function describeAction($data, ExportGenerationContext $context): array
|
public function describeAction($data, ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
|
$reasons = $data['reasons'] ?? [];
|
||||||
|
|
||||||
return [
|
return [
|
||||||
[] === $data['reasons'] ?
|
[] === $reasons ?
|
||||||
'export.filter.person_between_dates.describe_action_with_no_subject'
|
'export.filter.activity.describe_action_with_no_subject'
|
||||||
: 'export.filter.person_between_dates.describe_action_with_subject',
|
: 'export.filter.activity.describe_action_with_subject',
|
||||||
[
|
[
|
||||||
'date_from' => $this->rollingDateConverter->convert($data['date_from_rolling']),
|
'date_from' => $this->rollingDateConverter->convert($data['date_from_rolling']),
|
||||||
'date_to' => $this->rollingDateConverter->convert($data['date_to_rolling']),
|
'date_to' => $this->rollingDateConverter->convert($data['date_to_rolling']),
|
||||||
@@ -154,7 +183,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
|||||||
', ',
|
', ',
|
||||||
array_map(
|
array_map(
|
||||||
fn (ActivityReason $r): string => '"'.$this->translatableStringHelper->localize($r->getName()).'"',
|
fn (ActivityReason $r): string => '"'.$this->translatableStringHelper->localize($r->getName()).'"',
|
||||||
$data['reasons']
|
$reasons
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -168,6 +197,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
|||||||
|
|
||||||
public function validateForm($data, ExecutionContextInterface $context): void
|
public function validateForm($data, ExecutionContextInterface $context): void
|
||||||
{
|
{
|
||||||
|
error_log('validateForm called with data: '.json_encode(array_keys($data)));
|
||||||
if ($this->rollingDateConverter->convert($data['date_from_rolling'])
|
if ($this->rollingDateConverter->convert($data['date_from_rolling'])
|
||||||
>= $this->rollingDateConverter->convert($data['date_to_rolling'])) {
|
>= $this->rollingDateConverter->convert($data['date_to_rolling'])) {
|
||||||
$context->buildViolation('export.filter.activity.person_between_dates.date mismatch')
|
$context->buildViolation('export.filter.activity.person_between_dates.date mismatch')
|
||||||
|
|||||||
@@ -25,12 +25,24 @@
|
|||||||
<div class="item-bloc">
|
<div class="item-bloc">
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-col" style="flex-basis:100%;">
|
<div class="item-col" style="flex-basis:100%;">
|
||||||
<h2>{{ entity.name|localize_translatable_string }}</h2>
|
<h2>{{ entity.name|localize_translatable_string }} </h2>
|
||||||
|
<p style="margin-left: 1rem;"><span class="badge bg-chill-gray">
|
||||||
|
{% if entity.active %}
|
||||||
|
{{ 'admin.active'|trans }}
|
||||||
|
{% else %}
|
||||||
|
{{ 'admin.not active'|trans }}
|
||||||
|
{% endif %}
|
||||||
|
</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<p><span class="badge bg-chill-green-dark">{{ contextManager.getContextByKey(entity.context).name|trans }}</span></p>
|
<p><span class="badge bg-chill-green-dark">{{ contextManager.getContextByKey(entity.context).name|trans }}</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
{# <div class="item-row">#}
|
||||||
|
{# <div class="item-col" style="flex-basis:100%;">#}
|
||||||
|
{##}
|
||||||
|
{# </div>#}
|
||||||
|
{# </div>#}
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-col"></div>
|
<div class="item-col"></div>
|
||||||
<ul class="record_actions item-col flex-shrink-1">
|
<ul class="record_actions item-col flex-shrink-1">
|
||||||
|
|||||||
@@ -49,3 +49,7 @@ crud:
|
|||||||
|
|
||||||
|
|
||||||
Template file: Fichier modèle
|
Template file: Fichier modèle
|
||||||
|
|
||||||
|
admin:
|
||||||
|
active: Actif
|
||||||
|
not active: Non-actif
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ class ChillImportUsersCommand extends Command
|
|||||||
|
|
||||||
protected function loadUsers()
|
protected function loadUsers()
|
||||||
{
|
{
|
||||||
$reader = Reader::createFromPath($this->tempInput->getArgument('csvfile'));
|
$reader = Reader::from($this->tempInput->getArgument('csvfile'));
|
||||||
$reader->setHeaderOffset(0);
|
$reader->setHeaderOffset(0);
|
||||||
|
|
||||||
foreach ($reader->getRecords() as $line => $r) {
|
foreach ($reader->getRecords() as $line => $r) {
|
||||||
@@ -362,7 +362,7 @@ class ChillImportUsersCommand extends Command
|
|||||||
|
|
||||||
protected function prepareGroupingCenters()
|
protected function prepareGroupingCenters()
|
||||||
{
|
{
|
||||||
$reader = Reader::createFromPath($this->tempInput->getOption('grouping-centers'));
|
$reader = Reader::from($this->tempInput->getOption('grouping-centers'));
|
||||||
$reader->setHeaderOffset(0);
|
$reader->setHeaderOffset(0);
|
||||||
|
|
||||||
foreach ($reader->getRecords() as $r) {
|
foreach ($reader->getRecords() as $r) {
|
||||||
@@ -378,7 +378,7 @@ class ChillImportUsersCommand extends Command
|
|||||||
|
|
||||||
protected function prepareWriter()
|
protected function prepareWriter()
|
||||||
{
|
{
|
||||||
$this->output = $output = Writer::createFromPath($this->tempInput
|
$this->output = $output = Writer::from($this->tempInput
|
||||||
->getOption('csv-dump'), 'a+');
|
->getOption('csv-dump'), 'a+');
|
||||||
|
|
||||||
$output->insertOne([
|
$output->insertOne([
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ class ChillUserSendRenewPasswordCodeCommand extends Command
|
|||||||
protected function getReader()
|
protected function getReader()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$reader = Reader::createFromPath($this->input->getArgument('csvfile'));
|
$reader = Reader::from($this->input->getArgument('csvfile'));
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->logger->error('The csv file could not be read', [
|
$this->logger->error('The csv file could not be read', [
|
||||||
'path' => $this->input->getArgument('csvfile'),
|
'path' => $this->input->getArgument('csvfile'),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ final readonly class UserExportController
|
|||||||
|
|
||||||
$users = $this->userRepository->findAllAsArray($request->getLocale());
|
$users = $this->userRepository->findAllAsArray($request->getLocale());
|
||||||
|
|
||||||
$csv = Writer::createFromPath('php://temp', 'r+');
|
$csv = Writer::from('php://temp', 'r+');
|
||||||
$csv->insertOne(
|
$csv->insertOne(
|
||||||
array_map(
|
array_map(
|
||||||
fn (string $e) => $this->translator->trans('admin.users.export.'.$e),
|
fn (string $e) => $this->translator->trans('admin.users.export.'.$e),
|
||||||
@@ -104,7 +104,7 @@ final readonly class UserExportController
|
|||||||
|
|
||||||
$userPermissions = $this->userRepository->findAllUserACLAsArray();
|
$userPermissions = $this->userRepository->findAllUserACLAsArray();
|
||||||
|
|
||||||
$csv = Writer::createFromPath('php://temp', 'r+');
|
$csv = Writer::from('php://temp', 'r+');
|
||||||
$csv->insertOne(
|
$csv->insertOne(
|
||||||
array_map(
|
array_map(
|
||||||
fn (string $e) => $this->translator->trans('admin.users.export.'.$e),
|
fn (string $e) => $this->translator->trans('admin.users.export.'.$e),
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class AddressReferenceBEFromBestAddress
|
|||||||
|
|
||||||
$uncompressedStream = gzopen($tmpname, 'r');
|
$uncompressedStream = gzopen($tmpname, 'r');
|
||||||
|
|
||||||
$csv = Reader::createFromStream($uncompressedStream);
|
$csv = Reader::from($uncompressedStream);
|
||||||
$csv->setDelimiter(',');
|
$csv->setDelimiter(',');
|
||||||
$csv->setHeaderOffset(0);
|
$csv->setHeaderOffset(0);
|
||||||
|
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ final class AddressReferenceBaseImporter
|
|||||||
|
|
||||||
$filename = sprintf('%s-%s.csv', (new \DateTimeImmutable())->format('Ymd-His'), uniqid());
|
$filename = sprintf('%s-%s.csv', (new \DateTimeImmutable())->format('Ymd-His'), uniqid());
|
||||||
$path = Path::normalize(sprintf('%s%s%s', sys_get_temp_dir(), DIRECTORY_SEPARATOR, $filename));
|
$path = Path::normalize(sprintf('%s%s%s', sys_get_temp_dir(), DIRECTORY_SEPARATOR, $filename));
|
||||||
$writer = Writer::createFromPath($path, 'w+');
|
$writer = Writer::from($path, 'w+');
|
||||||
// insert headers
|
// insert headers
|
||||||
$writer->insertOne([
|
$writer->insertOne([
|
||||||
'postalcode',
|
'postalcode',
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class AddressReferenceFromBAN
|
|||||||
// re-open it to read it
|
// re-open it to read it
|
||||||
$csvDecompressed = gzopen($path, 'r');
|
$csvDecompressed = gzopen($path, 'r');
|
||||||
|
|
||||||
$csv = Reader::createFromStream($csvDecompressed);
|
$csv = Reader::from($csvDecompressed);
|
||||||
$csv->setDelimiter(';')->setHeaderOffset(0);
|
$csv->setDelimiter(';')->setHeaderOffset(0);
|
||||||
$stmt = new Statement();
|
$stmt = new Statement();
|
||||||
$stmt = $stmt->process($csv, [
|
$stmt = $stmt->process($csv, [
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class AddressReferenceFromBano
|
|||||||
|
|
||||||
fseek($file, 0);
|
fseek($file, 0);
|
||||||
|
|
||||||
$csv = Reader::createFromStream($file);
|
$csv = Reader::from($file);
|
||||||
$csv->setDelimiter(',');
|
$csv->setDelimiter(',');
|
||||||
$stmt = new Statement();
|
$stmt = new Statement();
|
||||||
$stmt = $stmt->process($csv, [
|
$stmt = $stmt->process($csv, [
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class AddressReferenceLU
|
|||||||
|
|
||||||
fseek($file, 0);
|
fseek($file, 0);
|
||||||
|
|
||||||
$csv = Reader::createFromStream($file);
|
$csv = Reader::from($file);
|
||||||
$csv->setDelimiter(';');
|
$csv->setDelimiter(';');
|
||||||
$csv->setHeaderOffset(0);
|
$csv->setHeaderOffset(0);
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class PostalCodeBEFromBestAddress
|
|||||||
|
|
||||||
$uncompressedStream = gzopen($tmpname, 'r');
|
$uncompressedStream = gzopen($tmpname, 'r');
|
||||||
|
|
||||||
$csv = Reader::createFromStream($uncompressedStream);
|
$csv = Reader::from($uncompressedStream);
|
||||||
$csv->setDelimiter(',');
|
$csv->setDelimiter(',');
|
||||||
$csv->setHeaderOffset(0);
|
$csv->setHeaderOffset(0);
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class PostalCodeFRFromOpenData
|
|||||||
|
|
||||||
fseek($tmpfile, 0);
|
fseek($tmpfile, 0);
|
||||||
|
|
||||||
$csv = Reader::createFromStream($tmpfile);
|
$csv = Reader::from($tmpfile);
|
||||||
$csv->setDelimiter(',');
|
$csv->setDelimiter(',');
|
||||||
$csv->setHeaderOffset(0);
|
$csv->setHeaderOffset(0);
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use Symfony\Component\Notifier\Event\SentMessageEvent;
|
|||||||
final readonly class SentMessageEventSubscriber implements EventSubscriberInterface
|
final readonly class SentMessageEventSubscriber implements EventSubscriberInterface
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private LoggerInterface $logger,
|
private LoggerInterface $notifierLogger, // will be send to "notifierLogger" if it exists
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public static function getSubscribedEvents()
|
public static function getSubscribedEvents()
|
||||||
@@ -33,9 +33,9 @@ final readonly class SentMessageEventSubscriber implements EventSubscriberInterf
|
|||||||
$message = $event->getMessage();
|
$message = $event->getMessage();
|
||||||
|
|
||||||
if (null === $message->getMessageId()) {
|
if (null === $message->getMessageId()) {
|
||||||
$this->logger->info('[sms] a sms message did not had any id after sending.', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId()]);
|
$this->notifierLogger->info('[sms] a sms message did not had any id after sending.', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId()]);
|
||||||
} else {
|
} else {
|
||||||
$this->logger->warning('[sms] a sms was sent', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId(), 'idsI' => $message->getMessageId()]);
|
$this->notifierLogger->warning('[sms] a sms was sent', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId(), 'idsI' => $message->getMessageId()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ final class ImportSocialWorkMetadata extends Command
|
|||||||
$filepath = $input->getOption('filepath');
|
$filepath = $input->getOption('filepath');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$csv = Reader::createFromPath($filepath);
|
$csv = Reader::from($filepath);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
throw new \Exception('Error while loading CSV.', 0, $e);
|
throw new \Exception('Error while loading CSV.', 0, $e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class LoadSocialWorkMetadata extends Fixture implements OrderedFixtureInterface
|
|||||||
public function load(ObjectManager $manager): void
|
public function load(ObjectManager $manager): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$csv = Reader::createFromPath(__DIR__.'/data/social_work_metadata.csv');
|
$csv = Reader::from(__DIR__.'/data/social_work_metadata.csv');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
throw new \Exception('Error while loading CSV.', 0, $e);
|
throw new \Exception('Error while loading CSV.', 0, $e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ import {
|
|||||||
EVALUATION_DOCUMENT_MOVE_SUCCESS,
|
EVALUATION_DOCUMENT_MOVE_SUCCESS,
|
||||||
} from "translator";
|
} from "translator";
|
||||||
import { useToast } from "vue-toast-notification";
|
import { useToast } from "vue-toast-notification";
|
||||||
|
import { buildLinkCreate as buildLinkCreateNotification } from "ChillMainAssets/lib/entity-notification/api";
|
||||||
|
|
||||||
const props = defineProps(["evaluation", "docAnchorId"]);
|
const props = defineProps(["evaluation", "docAnchorId"]);
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ final readonly class SocialActionCSVExportService
|
|||||||
array_keys($this->formatRow(new SocialAction()))
|
array_keys($this->formatRow(new SocialAction()))
|
||||||
);
|
);
|
||||||
|
|
||||||
$csv = Writer::createFromPath('php://temp', 'w+');
|
$csv = Writer::from('php://temp', 'w+');
|
||||||
$csv->insertOne($headers);
|
$csv->insertOne($headers);
|
||||||
|
|
||||||
foreach ($actions as $action) {
|
foreach ($actions as $action) {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ readonly class SocialIssueCSVExportService
|
|||||||
public function generateCsv(array $issues): Writer
|
public function generateCsv(array $issues): Writer
|
||||||
{
|
{
|
||||||
// CSV headers
|
// CSV headers
|
||||||
$csv = Writer::createFromPath('php://temp', 'r+');
|
$csv = Writer::from('php://temp', 'r+');
|
||||||
$csv->insertOne(
|
$csv->insertOne(
|
||||||
array_map(
|
array_map(
|
||||||
fn (string $e) => $this->translator->trans($e),
|
fn (string $e) => $this->translator->trans($e),
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class ThirdpartyCSVExportController extends AbstractController
|
|||||||
fwrite($output, "\xEF\xBB\xBF");
|
fwrite($output, "\xEF\xBB\xBF");
|
||||||
|
|
||||||
// Create CSV writer
|
// Create CSV writer
|
||||||
$csv = Writer::createFromStream($output);
|
$csv = Writer::from($output);
|
||||||
|
|
||||||
// Write header row
|
// Write header row
|
||||||
$header = array_map(
|
$header = array_map(
|
||||||
|
|||||||
Reference in New Issue
Block a user