mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-26 00:24:59 +00:00
Compare commits
9 Commits
v3.11.0
...
366-pick-u
Author | SHA1 | Date | |
---|---|---|---|
1af3e4c7ec | |||
5d0fc7a189 | |||
483d50e776 | |||
b4c6ccf309 | |||
ac6a81cbd8 | |||
9503cb89b6 | |||
b130dbdcdc | |||
b2b1865837 | |||
ec5c4d51b3 |
@@ -1,19 +0,0 @@
|
|||||||
## v3.11.0 - 2025-04-17
|
|
||||||
### Feature
|
|
||||||
* ([#365](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/365)) Add counters of actions and activities, with 2 boxes to (1) show the number of active actions on total actions and (2) show the number of activities in a accompanying period, and pills in menus for showing the number of active actions and the number of activities.
|
|
||||||
* ([#364](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/364)) Added a second phone number "telephone2" to the thirdParty entity. Adapted twig templates and vuejs apps to handle this phone number
|
|
||||||
|
|
||||||
**Schema Change**: Add columns or tables
|
|
||||||
* Signature: add a button to go directly to the signature zone, even if there is only one
|
|
||||||
### Fixed
|
|
||||||
* Fixed wrong translations in the on-the-fly for creation of thirdParty
|
|
||||||
* Fixed update of phone number in on-the-fly edition of thirdParty
|
|
||||||
* Fixed closing of modal when editing thirdParty in accompanying course works
|
|
||||||
* Shorten the delay between two execution of AccompanyingPeriodStepChangeCronjob, to ensure at least one execution in a day
|
|
||||||
* ([#102](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/102)) Fix display of title in document list
|
|
||||||
* When cleaning the old stored object versions, do not throw an error if the stored object is not found on disk
|
|
||||||
* Add consistent log prefix and key to logs when stale workflows are automatically canceled
|
|
||||||
* ([#380](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/380)) Remove the "not null" validation constraint on recently added properties on HouseholdComposition
|
|
||||||
|
|
||||||
### DX
|
|
||||||
* Add new chill-col style for displaying title and aside in a flex table
|
|
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Chill\ActivityBundle\Menu;
|
namespace Chill\ActivityBundle\Menu;
|
||||||
|
|
||||||
use Chill\ActivityBundle\Entity\Activity;
|
|
||||||
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
|
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
|
||||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
@@ -24,30 +23,22 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(protected Security $security, protected TranslatorInterface $translator) {}
|
||||||
protected Security $security,
|
|
||||||
protected TranslatorInterface $translator,
|
|
||||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
|
||||||
) {}
|
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
{
|
{
|
||||||
$period = $parameters['accompanyingCourse'];
|
$period = $parameters['accompanyingCourse'];
|
||||||
|
|
||||||
$activities = $this->managerRegistry->getManager()->getRepository(Activity::class)->findBy(
|
|
||||||
['accompanyingPeriod' => $period]
|
|
||||||
);
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
AccompanyingPeriod::STEP_DRAFT !== $period->getStep()
|
AccompanyingPeriod::STEP_DRAFT !== $period->getStep()
|
||||||
&& $this->security->isGranted(ActivityVoter::SEE, $period)
|
&& $this->security->isGranted(ActivityVoter::SEE, $period)
|
||||||
) {
|
) {
|
||||||
$menu->addChild($this->translator->trans('Activities'), [
|
$menu->addChild($this->translator->trans('Activity'), [
|
||||||
'route' => 'chill_activity_activity_list',
|
'route' => 'chill_activity_activity_list',
|
||||||
'routeParameters' => [
|
'routeParameters' => [
|
||||||
'accompanying_period_id' => $period->getId(),
|
'accompanying_period_id' => $period->getId(),
|
||||||
], ])
|
], ])
|
||||||
->setExtras(['order' => 40, 'counter' => count($activities) > 0 ? count($activities) : null]);
|
->setExtras(['order' => 40]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Chill\ActivityBundle\Menu;
|
namespace Chill\ActivityBundle\Menu;
|
||||||
|
|
||||||
use Chill\ActivityBundle\Repository\ActivityACLAwareRepositoryInterface;
|
|
||||||
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
|
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
|
||||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
@@ -24,20 +23,13 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface
|
final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator) {}
|
||||||
private readonly ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
|
|
||||||
private AuthorizationCheckerInterface $authorizationChecker,
|
|
||||||
private TranslatorInterface $translator,
|
|
||||||
) {}
|
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
{
|
{
|
||||||
/** @var Person $person */
|
/** @var Person $person */
|
||||||
$person = $parameters['person'];
|
$person = $parameters['person'];
|
||||||
|
|
||||||
|
|
||||||
$count = $this->activityACLAwareRepository->countByPerson($person, ActivityVoter::SEE);
|
|
||||||
|
|
||||||
if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {
|
if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {
|
||||||
$menu->addChild(
|
$menu->addChild(
|
||||||
$this->translator->trans('Activities'),
|
$this->translator->trans('Activities'),
|
||||||
@@ -46,7 +38,7 @@ final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
'routeParameters' => ['person_id' => $person->getId()],
|
'routeParameters' => ['person_id' => $person->getId()],
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
->setExtras(['order' => 201, 'counter' => $count > 0 ? $count : null]);
|
->setExtra('order', 201);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -120,34 +120,3 @@ li.document-list-item {
|
|||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-activity-type-simple {
|
|
||||||
@extend .badge;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0.2rem 0;
|
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0.5rem;
|
|
||||||
|
|
||||||
border-left: 20px groove #9acd32;
|
|
||||||
border-radius: $badge-border-radius;
|
|
||||||
|
|
||||||
color: black;
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: unset;
|
|
||||||
max-width: 100%;
|
|
||||||
background-color: $gray-100;
|
|
||||||
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
text-indent: 5px hanging;
|
|
||||||
text-align: left;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
margin-right: 3px;
|
|
||||||
position: relative;
|
|
||||||
left: -0.5px;
|
|
||||||
font-family: ForkAwesome;
|
|
||||||
content: '\f04b';
|
|
||||||
color: #9acd32;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -13,44 +13,44 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-two-col-grid">
|
<div class="item-col" style="width: unset">
|
||||||
<div class="title">
|
{% if document.isPending %}
|
||||||
{% if document.isPending %}
|
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
|
||||||
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
|
{% elseif document.isFailure %}
|
||||||
{% elseif document.isFailure %}
|
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
|
||||||
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
{% if activity.accompanyingPeriod is not null and context == 'person' %}
|
||||||
<div class="badge-activity-type-simple">
|
<span class="badge bg-primary">
|
||||||
{{ activity.type.name | localize_translatable_string }}
|
<i class="fa fa-random"></i> {{ activity.accompanyingPeriod.id }}
|
||||||
</div>
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
<div class="badge-activity-type">
|
||||||
|
<span class="title_label"></span>
|
||||||
|
<span class="title_action">
|
||||||
|
{{ activity.type.name | localize_translatable_string }}
|
||||||
{% if activity.emergency %}
|
{% if activity.emergency %}
|
||||||
<span class="badge bg-danger rounded-pill fs-6 float-end">{{ 'Emergency'|trans|upper }}</span>
|
<span class="badge bg-danger rounded-pill fs-6 float-end">{{ 'Emergency'|trans|upper }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="denomination h2">
|
|
||||||
{{ document.title|chill_print_or_message("No title") }}
|
|
||||||
</div>
|
|
||||||
{% if document.hasTemplate %}
|
|
||||||
<div>
|
|
||||||
<p>{{ document.template.name|localize_translatable_string }}</p>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="aside">
|
<div class="denomination h2">
|
||||||
|
{{ document.title|chill_print_or_message("No title") }}
|
||||||
|
</div>
|
||||||
|
{% if document.hasTemplate %}
|
||||||
|
<div>
|
||||||
|
<p>{{ document.template.name|localize_translatable_string }}</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="item-col">
|
||||||
|
<div class="container">
|
||||||
<div class="dates row text-end">
|
<div class="dates row text-end">
|
||||||
<span>{{ document.createdAt|format_date('short') }}</span>
|
<span>{{ document.createdAt|format_date('short') }}</span>
|
||||||
</div>
|
</div>
|
||||||
{% if activity.accompanyingPeriod is not null and context == 'person' %}
|
|
||||||
<div class="text-end">
|
|
||||||
<span class="badge bg-primary">
|
|
||||||
<i class="fa fa-random"></i> {{ activity.accompanyingPeriod.id }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
@import '~ChillMainAssets/module/bootstrap/shared';
|
|
||||||
@import '~ChillPersonAssets/chill/scss/mixins.scss';
|
@import '~ChillPersonAssets/chill/scss/mixins.scss';
|
||||||
@import 'bootstrap/scss/_badge.scss';
|
@import '~ChillMainAssets/module/bootstrap/shared';
|
||||||
|
|
||||||
.badge-calendar {
|
.badge-calendar {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -24,35 +23,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-calendar-simple {
|
|
||||||
@extend .badge;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0.2rem 0;
|
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0.5rem;
|
|
||||||
|
|
||||||
border-left: 20px groove $chill-l-gray;
|
|
||||||
border-radius: $badge-border-radius;
|
|
||||||
|
|
||||||
max-width: 100%;
|
|
||||||
background-color: $gray-100;
|
|
||||||
|
|
||||||
color: black;
|
|
||||||
font-weight: normal;
|
|
||||||
overflow: hidden;
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: unset;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
text-indent: 5px hanging;
|
|
||||||
text-align: left;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
margin-right: 3px;
|
|
||||||
position: relative;
|
|
||||||
left: -0.5px;
|
|
||||||
font-family: ForkAwesome;
|
|
||||||
content: '\f04b';
|
|
||||||
color: $chill-l-gray;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@ div.calendar-list {
|
|||||||
}
|
}
|
||||||
|
|
||||||
& > a.calendar-list__global {
|
& > a.calendar-list__global {
|
||||||
display: inline-block;
|
display: inline-block;;
|
||||||
padding: 0.2rem;
|
padding: 0.2rem;
|
||||||
min-width: 2rem;
|
min-width: 2rem;
|
||||||
border: 1px solid var(--bs-chill-blue);
|
border: 1px solid var(--bs-chill-blue);
|
||||||
|
@@ -6,48 +6,50 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-two-col-grid">
|
<div class="item-col" style="width: unset">
|
||||||
<div class="title">
|
{% if document.storedObject.isPending %}
|
||||||
{% if document.storedObject.isPending %}
|
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.storedObject.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
|
||||||
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.storedObject.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
|
{% elseif document.storedObject.isFailure %}
|
||||||
{% elseif document.storedObject.isFailure %}
|
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
|
||||||
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
|
{% endif %}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{% if c.accompanyingPeriod is not null and context == 'person' %}
|
||||||
|
<span class="badge bg-primary">
|
||||||
|
<i class="fa fa-random"></i> {{ c.accompanyingPeriod.id }}
|
||||||
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div>
|
<span class="badge-calendar">
|
||||||
|
<span class="title_label"></span>
|
||||||
<span class="badge-calendar-simple">
|
<span class="title_action">
|
||||||
{{ 'Calendar'|trans }}
|
{{ 'Calendar'|trans }}
|
||||||
{% if c.endDate.diff(c.startDate).days >= 1 %}
|
{% if c.endDate.diff(c.startDate).days >= 1 %}
|
||||||
{{ c.startDate|format_datetime('short', 'short') }}
|
{{ c.startDate|format_datetime('short', 'short') }}
|
||||||
- {{ c.endDate|format_datetime('short', 'short') }}
|
- {{ c.endDate|format_datetime('short', 'short') }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ c.startDate|format_datetime('short', 'short') }}
|
{{ c.startDate|format_datetime('short', 'short') }}
|
||||||
- {{ c.endDate|format_datetime('none', 'short') }}
|
- {{ c.endDate|format_datetime('none', 'short') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="denomination h2">
|
|
||||||
{{ document.storedObject.title|chill_print_or_message("No title") }}
|
|
||||||
</div>
|
|
||||||
{% if document.storedObject.hasTemplate %}
|
|
||||||
<div>
|
|
||||||
<p>{{ document.storedObject.template.name|localize_translatable_string }}</p>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="aside">
|
|
||||||
|
<div class="denomination h2">
|
||||||
|
{{ document.storedObject.title|chill_print_or_message("No title") }}
|
||||||
|
</div>
|
||||||
|
{% if document.storedObject.hasTemplate %}
|
||||||
|
<div>
|
||||||
|
<p>{{ document.storedObject.template.name|localize_translatable_string }}</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="item-col">
|
||||||
|
<div class="container">
|
||||||
<div class="dates row text-end">
|
<div class="dates row text-end">
|
||||||
<span>{{ document.storedObject.createdAt|format_date('short') }}</span>
|
<span>{{ document.storedObject.createdAt|format_date('short') }}</span>
|
||||||
</div>
|
</div>
|
||||||
{% if c.accompanyingPeriod is not null and context == 'person' %}
|
|
||||||
<div class="text-end">
|
|
||||||
<span class="badge bg-primary">
|
|
||||||
<i class="fa fa-random"></i> {{ c.accompanyingPeriod.id }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -2,28 +2,26 @@
|
|||||||
<teleport to="body">
|
<teleport to="body">
|
||||||
<modal v-if="modalOpen" @close="modalOpen = false">
|
<modal v-if="modalOpen" @close="modalOpen = false">
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<h2>{{ trans(SIGNATURES_SIGNATURE_CONFIRMATION) }}</h2>
|
<h2>{{ $t("signature_confirmation") }}</h2>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
<div class="signature-modal-body text-center" v-if="loading">
|
<div class="signature-modal-body text-center" v-if="loading">
|
||||||
<p>
|
<p>{{ $t("electronic_signature_in_progress") }}</p>
|
||||||
{{ trans(SIGNATURES_ELECTRONIC_SIGNATURE_IN_PROGRESS) }}
|
|
||||||
</p>
|
|
||||||
<div class="loading">
|
<div class="loading">
|
||||||
<i
|
<i
|
||||||
class="fa fa-circle-o-notch fa-spin fa-3x"
|
class="fa fa-circle-o-notch fa-spin fa-3x"
|
||||||
:title="trans(SIGNATURES_LOADING)"
|
:title="$t('loading')"
|
||||||
></i>
|
></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="signature-modal-body text-center" v-else>
|
<div class="signature-modal-body text-center" v-else>
|
||||||
<p>{{ trans(SIGNATURES_YOU_ARE_GOING_TO_SIGN) }}</p>
|
<p>{{ $t("you_are_going_to_sign") }}</p>
|
||||||
<p>{{ trans(SIGNATURES_ARE_YOU_SURE) }}</p>
|
<p>{{ $t("are_you_sure") }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<button class="btn btn-action" @click.prevent="confirmSign">
|
<button class="btn btn-action" @click.prevent="confirmSign">
|
||||||
{{ trans(SIGNATURES_YES) }}
|
{{ $t("yes") }}
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</modal>
|
</modal>
|
||||||
@@ -84,39 +82,28 @@
|
|||||||
@change="toggleMultiPage"
|
@change="toggleMultiPage"
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label" for="checkboxMulti">
|
<label class="form-check-label" for="checkboxMulti">
|
||||||
{{ trans(SIGNATURES_ALL_PAGES) }}
|
{{ $t("all_pages") }}
|
||||||
</label>
|
</label>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="signature.zones.length === 1 && signedState !== 'signed'"
|
v-if="signature.zones.length > 0"
|
||||||
class="col-5 p-0 text-center turnSignature"
|
class="col-5 p-0 text-center turnSignature"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-light btn-sm"
|
:disabled="isFirstSignatureZone"
|
||||||
@click="goToSignatureZoneUnique"
|
|
||||||
>
|
|
||||||
{{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-if="signature.zones.length > 1"
|
|
||||||
class="col-5 p-0 text-center turnSignature"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
:disabled="isFirstSignatureZone()"
|
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(-1)"
|
@click="turnSignature(-1)"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_LAST_ZONE) }}
|
{{ $t("last_zone") }}
|
||||||
</button>
|
</button>
|
||||||
<span>|</span>
|
<span>|</span>
|
||||||
<button
|
<button
|
||||||
:disabled="isLastSignatureZone()"
|
:disabled="isLastSignatureZone"
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(1)"
|
@click="turnSignature(1)"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_NEXT_ZONE) }}
|
{{ $t("next_zone") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-end" v-if="signedState !== 'signed'">
|
<div class="col text-end" v-if="signedState !== 'signed'">
|
||||||
@@ -125,9 +112,9 @@
|
|||||||
:hidden="!userSignatureZone"
|
:hidden="!userSignatureZone"
|
||||||
@click="undoSign"
|
@click="undoSign"
|
||||||
v-if="signature.zones.length > 1"
|
v-if="signature.zones.length > 1"
|
||||||
:title="trans(SIGNATURES_CHOOSE_ANOTHER_SIGNATURE)"
|
:title="$t('choose_another_signature')"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_ANOTHER_ZONE) }}
|
{{ $t("another_zone") }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn btn-misc btn-sm"
|
class="btn btn-misc btn-sm"
|
||||||
@@ -135,7 +122,7 @@
|
|||||||
@click="undoSign"
|
@click="undoSign"
|
||||||
v-else
|
v-else
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_CANCEL) }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="userSignatureZone === null"
|
v-if="userSignatureZone === null"
|
||||||
@@ -147,7 +134,7 @@
|
|||||||
active: canvasEvent === 'add',
|
active: canvasEvent === 'add',
|
||||||
}"
|
}"
|
||||||
@click="toggleAddZone()"
|
@click="toggleAddZone()"
|
||||||
:title="trans(SIGNATURES_ADD_SIGN_ZONE)"
|
:title="$t('add_sign_zone')"
|
||||||
>
|
>
|
||||||
<template v-if="canvasEvent === 'add'">
|
<template v-if="canvasEvent === 'add'">
|
||||||
<div
|
<div
|
||||||
@@ -199,70 +186,48 @@
|
|||||||
@change="toggleMultiPage"
|
@change="toggleMultiPage"
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label" for="checkboxMulti">
|
<label class="form-check-label" for="checkboxMulti">
|
||||||
{{ trans(SIGNATURES_SEE_ALL_PAGES) }}
|
{{ $t("see_all_pages") }}
|
||||||
</label>
|
</label>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="signature.zones.length === 1 && signedState !== 'signed'"
|
v-if="signature.zones.length > 0 && signedState !== 'signed'"
|
||||||
class="col-4 d-xl-none text-center turnSignature p-0"
|
class="col-4 d-xl-none text-center turnSignature p-0"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-light btn-sm"
|
:disabled="!hasSignatureZoneSelected"
|
||||||
@click="goToSignatureZoneUnique"
|
|
||||||
>
|
|
||||||
{{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-if="signature.zones.length > 1 && signedState !== 'signed'"
|
|
||||||
class="col-4 d-xl-none text-center turnSignature p-0"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
:disabled="isFirstSignatureZone()"
|
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(-1)"
|
@click="turnSignature(-1)"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_LAST_ZONE) }}
|
{{ $t("last_zone") }}
|
||||||
</button>
|
</button>
|
||||||
<span>|</span>
|
<span>|</span>
|
||||||
<button
|
<button
|
||||||
:disabled="isLastSignatureZone()"
|
:disabled="isLastSignatureZone"
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(1)"
|
@click="turnSignature(1)"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_NEXT_ZONE) }}
|
{{ $t("next_zone") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="signature.zones.length === 1 && signedState !== 'signed'"
|
v-if="signature.zones.length > 0 && signedState !== 'signed'"
|
||||||
class="col-4 d-none d-xl-flex p-0 text-center turnSignature"
|
class="col-4 d-none d-xl-flex p-0 text-center turnSignature"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-light btn-sm"
|
:disabled="isFirstSignatureZone"
|
||||||
@click="goToSignatureZoneUnique"
|
|
||||||
>
|
|
||||||
{{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-if="signature.zones.length > 1 && signedState !== 'signed'"
|
|
||||||
class="col-4 d-none d-xl-flex p-0 text-center turnSignature"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
:disabled="isFirstSignatureZone()"
|
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(-1)"
|
@click="turnSignature(-1)"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_LAST_SIGN_ZONE) }}
|
{{ $t("last_sign_zone") }}
|
||||||
</button>
|
</button>
|
||||||
<span>|</span>
|
<span>|</span>
|
||||||
<button
|
<button
|
||||||
:disabled="isLastSignatureZone()"
|
:disabled="isLastSignatureZone"
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(1)"
|
@click="turnSignature(1)"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_NEXT_SIGN_ZONE) }}
|
{{ $t("next_sign_zone") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-end" v-if="signedState !== 'signed'">
|
<div class="col text-end" v-if="signedState !== 'signed'">
|
||||||
@@ -272,7 +237,7 @@
|
|||||||
@click="undoSign"
|
@click="undoSign"
|
||||||
v-if="signature.zones.length > 1"
|
v-if="signature.zones.length > 1"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_CHOOSE_ANOTHER_SIGNATURE) }}
|
{{ $t("choose_another_signature") }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn btn-misc btn-sm"
|
class="btn btn-misc btn-sm"
|
||||||
@@ -280,7 +245,7 @@
|
|||||||
@click="undoSign"
|
@click="undoSign"
|
||||||
v-else
|
v-else
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_CANCEL) }}
|
{{ $t("cancel") }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="userSignatureZone === null"
|
v-if="userSignatureZone === null"
|
||||||
@@ -292,13 +257,13 @@
|
|||||||
active: canvasEvent === 'add',
|
active: canvasEvent === 'add',
|
||||||
}"
|
}"
|
||||||
@click="toggleAddZone()"
|
@click="toggleAddZone()"
|
||||||
:title="trans(SIGNATURES_ADD_SIGN_ZONE)"
|
:title="$t('add_sign_zone')"
|
||||||
>
|
>
|
||||||
<template v-if="canvasEvent !== 'add'">
|
<template v-if="canvasEvent !== 'add'">
|
||||||
{{ trans(SIGNATURES_ADD_ZONE) }}
|
{{ $t("add_zone") }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ trans(SIGNATURES_CLICK_ON_DOCUMENT) }}
|
{{ $t("click_on_document") }}
|
||||||
<div
|
<div
|
||||||
class="spinner-border spinner-border-sm"
|
class="spinner-border spinner-border-sm"
|
||||||
role="status"
|
role="status"
|
||||||
@@ -332,10 +297,10 @@
|
|||||||
v-if="signedState !== 'signed'"
|
v-if="signedState !== 'signed'"
|
||||||
:href="getReturnPath()"
|
:href="getReturnPath()"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_CANCEL) }}
|
{{ $t("cancel") }}
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-misc" v-else :href="getReturnPath()">
|
<a class="btn btn-misc" v-else :href="getReturnPath()">
|
||||||
{{ trans(SIGNATURES_RETURN) }}
|
{{ $t("return") }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-end" v-if="signedState !== 'signed'">
|
<div class="col text-end" v-if="signedState !== 'signed'">
|
||||||
@@ -344,7 +309,7 @@
|
|||||||
:disabled="!userSignatureZone"
|
:disabled="!userSignatureZone"
|
||||||
@click="sign"
|
@click="sign"
|
||||||
>
|
>
|
||||||
{{ trans(SIGNATURES_SIGN) }}
|
{{ $t("sign") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4" v-else></div>
|
<div class="col-4" v-else></div>
|
||||||
@@ -353,7 +318,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, Ref } from "vue";
|
import { ref, Ref, computed } from "vue";
|
||||||
import { useToast } from "vue-toast-notification";
|
import { useToast } from "vue-toast-notification";
|
||||||
import "vue-toast-notification/dist/theme-sugar.css";
|
import "vue-toast-notification/dist/theme-sugar.css";
|
||||||
import {
|
import {
|
||||||
@@ -364,38 +329,13 @@ import {
|
|||||||
SignedState,
|
SignedState,
|
||||||
ZoomLevel,
|
ZoomLevel,
|
||||||
} from "../../types";
|
} from "../../types";
|
||||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
import { makeFetch } from "../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods";
|
||||||
import * as pdfjsLib from "pdfjs-dist";
|
import * as pdfjsLib from "pdfjs-dist";
|
||||||
import {
|
import {
|
||||||
PDFDocumentProxy,
|
PDFDocumentProxy,
|
||||||
PDFPageProxy,
|
PDFPageProxy,
|
||||||
} from "pdfjs-dist/types/src/display/api";
|
} from "pdfjs-dist/types/src/display/api";
|
||||||
|
|
||||||
import {
|
|
||||||
SIGNATURES_YES,
|
|
||||||
SIGNATURES_ARE_YOU_SURE,
|
|
||||||
SIGNATURES_YOU_ARE_GOING_TO_SIGN,
|
|
||||||
SIGNATURES_SIGNATURE_CONFIRMATION,
|
|
||||||
SIGNATURES_SIGN,
|
|
||||||
SIGNATURES_CHOOSE_ANOTHER_SIGNATURE,
|
|
||||||
SIGNATURES_CANCEL,
|
|
||||||
SIGNATURES_LAST_SIGN_ZONE,
|
|
||||||
SIGNATURES_NEXT_SIGN_ZONE,
|
|
||||||
SIGNATURES_ADD_SIGN_ZONE,
|
|
||||||
SIGNATURES_CLICK_ON_DOCUMENT,
|
|
||||||
SIGNATURES_LAST_ZONE,
|
|
||||||
SIGNATURES_NEXT_ZONE,
|
|
||||||
SIGNATURES_ADD_ZONE,
|
|
||||||
SIGNATURES_ANOTHER_ZONE,
|
|
||||||
SIGNATURES_ELECTRONIC_SIGNATURE_IN_PROGRESS,
|
|
||||||
SIGNATURES_LOADING,
|
|
||||||
SIGNATURES_RETURN,
|
|
||||||
SIGNATURES_SEE_ALL_PAGES,
|
|
||||||
SIGNATURES_ALL_PAGES,
|
|
||||||
SIGNATURES_GO_TO_SIGNATURE_UNIQUE,
|
|
||||||
trans,
|
|
||||||
} from "translator";
|
|
||||||
|
|
||||||
// @ts-ignore incredible but the console.log is needed
|
// @ts-ignore incredible but the console.log is needed
|
||||||
import * as PdfWorker from "pdfjs-dist/build/pdf.worker.mjs";
|
import * as PdfWorker from "pdfjs-dist/build/pdf.worker.mjs";
|
||||||
console.log(PdfWorker);
|
console.log(PdfWorker);
|
||||||
@@ -476,15 +416,19 @@ const $toast = useToast();
|
|||||||
const signature = window.signature;
|
const signature = window.signature;
|
||||||
|
|
||||||
const isFirstSignatureZone = () =>
|
const isFirstSignatureZone = () =>
|
||||||
userSignatureZone.value?.index != null
|
userSignatureZone.value?.index ? userSignatureZone.value.index < 1 : false;
|
||||||
? userSignatureZone.value.index < 1
|
|
||||||
: false;
|
|
||||||
|
|
||||||
const isLastSignatureZone = () =>
|
const isLastSignatureZone = () =>
|
||||||
userSignatureZone.value?.index
|
userSignatureZone.value?.index
|
||||||
? userSignatureZone.value.index >= signature.zones.length - 1
|
? userSignatureZone.value.index >= signature.zones.length - 1
|
||||||
: false;
|
: false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if the user has selected a user zone (existing on the doc or created by the user)
|
||||||
|
*/
|
||||||
|
const hasSignatureZoneSelected = computed<boolean>(
|
||||||
|
() => userSignatureZone.value !== null,
|
||||||
|
);
|
||||||
|
|
||||||
const setZoomLevel = async (zoomLevel: string) => {
|
const setZoomLevel = async (zoomLevel: string) => {
|
||||||
zoom.value = Number.parseFloat(zoomLevel);
|
zoom.value = Number.parseFloat(zoomLevel);
|
||||||
await resetPages();
|
await resetPages();
|
||||||
@@ -656,15 +600,6 @@ const turnPage = async (upOrDown: number) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectZoneInCanvas = (signatureZone: SignatureZone) => {
|
|
||||||
page.value = signatureZone.PDFPage.index + 1;
|
|
||||||
const canvas = getCanvas(signatureZone.PDFPage.index + 1);
|
|
||||||
selectZone(signatureZone, canvas);
|
|
||||||
canvas.scrollIntoView();
|
|
||||||
};
|
|
||||||
|
|
||||||
const goToSignatureZoneUnique = () => selectZoneInCanvas(signature.zones[0]);
|
|
||||||
|
|
||||||
const turnSignature = async (upOrDown: number) => {
|
const turnSignature = async (upOrDown: number) => {
|
||||||
let zoneIndex = userSignatureZone.value?.index ?? -1;
|
let zoneIndex = userSignatureZone.value?.index ?? -1;
|
||||||
if (zoneIndex < -1) {
|
if (zoneIndex < -1) {
|
||||||
@@ -677,7 +612,10 @@ const turnSignature = async (upOrDown: number) => {
|
|||||||
}
|
}
|
||||||
let currentZone = signature.zones[zoneIndex];
|
let currentZone = signature.zones[zoneIndex];
|
||||||
if (currentZone) {
|
if (currentZone) {
|
||||||
selectZoneInCanvas(currentZone);
|
page.value = currentZone.PDFPage.index + 1;
|
||||||
|
const canvas = getCanvas(currentZone.PDFPage.index + 1);
|
||||||
|
selectZone(currentZone, canvas);
|
||||||
|
canvas.scrollIntoView();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ License * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
{{ encore_entry_link_tags("mod_document_action_buttons_group") }}
|
{{ encore_entry_link_tags("mod_document_action_buttons_group") }}
|
||||||
{% endblock %} {% block content %}
|
{% endblock %} {% block content %}
|
||||||
|
|
||||||
<div class="document-list">
|
<div class="col-md-10 col-xxl">
|
||||||
<h1>
|
<h1>
|
||||||
{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}
|
{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}
|
||||||
</h1>
|
</h1>
|
||||||
|
@@ -3,54 +3,54 @@
|
|||||||
{% import '@ChillPerson/Macro/updatedBy.html.twig' as mmm %}
|
{% import '@ChillPerson/Macro/updatedBy.html.twig' as mmm %}
|
||||||
|
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<!-- person document or accompanying course document -->
|
<div class="item-col" style="width: unset">
|
||||||
<div class="item-two-col-grid">
|
{% if document.object.isPending %}
|
||||||
<div class="title">
|
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.object.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
|
||||||
{% if document.object.isPending %}
|
{% elseif document.object.isFailure %}
|
||||||
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.object.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
|
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
|
||||||
{% elseif document.object.isFailure %}
|
{% endif %}
|
||||||
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="denomination h2">
|
{% if context == 'person' and accompanyingCourse is defined %}
|
||||||
{{ document.title|chill_print_or_message("No title") }}
|
|
||||||
</div>
|
|
||||||
{% if document.object.type is not empty %}
|
|
||||||
<div>
|
|
||||||
{{ mm.mimeIcon(document.object.type) }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div>
|
<div>
|
||||||
<p>{{ document.category.name|localize_translatable_string }}</p>
|
<span class="badge bg-primary">
|
||||||
|
<i class="fa fa-random"></i> {{ accompanyingCourse.id }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{% if document.object.hasTemplate %}
|
{% elseif context == 'accompanying-period' and person is defined %}
|
||||||
<div>
|
<div>
|
||||||
<p>{{ document.object.template.name|localize_translatable_string }}</p>
|
<span class="badge bg-primary">
|
||||||
</div>
|
{{ 'Document from person %name%'|trans({ '%name%': document.person|chill_entity_render_string }) }}
|
||||||
{% endif %}
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
<div class="denomination h2">
|
||||||
|
{{ document.title|chill_print_or_message("No title") }}
|
||||||
</div>
|
</div>
|
||||||
{% if document.date is not null %}
|
{% if document.object.type is not empty %}
|
||||||
<div class="aside">
|
<div>
|
||||||
<div class="dates row text-end">
|
{{ mm.mimeIcon(document.object.type) }}
|
||||||
<span>{{ document.date|format_date('short') }}</span>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% if context == 'person' and accompanyingCourse is defined %}
|
<div>
|
||||||
<div class="text-end">
|
<p>{{ document.category.name|localize_translatable_string }}</p>
|
||||||
<span class="badge bg-primary">
|
</div>
|
||||||
<i class="fa fa-random"></i> {{ accompanyingCourse.id }}
|
{% if document.object.hasTemplate %}
|
||||||
</span>
|
<div>
|
||||||
</div>
|
<p>{{ document.object.template.name|localize_translatable_string }}</p>
|
||||||
{% elseif context == 'accompanying-period' and person is defined %}
|
|
||||||
<div class="text-end">
|
|
||||||
<span class="badge bg-primary">
|
|
||||||
{{ document.person|chill_entity_render_string }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="item-col">
|
||||||
|
<div class="container">
|
||||||
|
{% if document.date is not null %}
|
||||||
|
<div class="dates row text-end">
|
||||||
|
<span>{{ document.date|format_date('short') }}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if document.description is not empty %}
|
{% if document.description is not empty %}
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
|
@@ -62,15 +62,7 @@ final readonly class RemoveOldVersionMessageHandler implements MessageHandlerInt
|
|||||||
|
|
||||||
$storedObject = $storedObjectVersion->getStoredObject();
|
$storedObject = $storedObjectVersion->getStoredObject();
|
||||||
|
|
||||||
if ($this->storedObjectManager->exists($storedObjectVersion)) {
|
$this->storedObjectManager->delete($storedObjectVersion);
|
||||||
$this->storedObjectManager->delete($storedObjectVersion);
|
|
||||||
} else {
|
|
||||||
$this->logger->notice(
|
|
||||||
self::LOG_PREFIX.'Stored object version does not exists any more.',
|
|
||||||
['storedObjectVersionName' => $storedObjectVersion->getFilename()],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// to ensure an immediate deletion
|
// to ensure an immediate deletion
|
||||||
$this->entityManager->remove($storedObjectVersion);
|
$this->entityManager->remove($storedObjectVersion);
|
||||||
|
|
||||||
|
@@ -44,7 +44,6 @@ class RemoveOldVersionMessageHandlerTest extends TestCase
|
|||||||
$entityManager->expects($this->once())->method('clear');
|
$entityManager->expects($this->once())->method('clear');
|
||||||
|
|
||||||
$storedObjectManager = $this->createMock(StoredObjectManagerInterface::class);
|
$storedObjectManager = $this->createMock(StoredObjectManagerInterface::class);
|
||||||
$storedObjectManager->expects($this->once())->method('exists')->willReturn(true);
|
|
||||||
$storedObjectManager->expects($this->once())->method('delete')->with($this->identicalTo($version));
|
$storedObjectManager->expects($this->once())->method('delete')->with($this->identicalTo($version));
|
||||||
|
|
||||||
$handler = new RemoveOldVersionMessageHandler($storedObjectVersionRepository, new NullLogger(), $entityManager, $storedObjectManager, new MockClock());
|
$handler = new RemoveOldVersionMessageHandler($storedObjectVersionRepository, new NullLogger(), $entityManager, $storedObjectManager, new MockClock());
|
||||||
@@ -52,29 +51,6 @@ class RemoveOldVersionMessageHandlerTest extends TestCase
|
|||||||
$handler(new RemoveOldVersionMessage(1));
|
$handler(new RemoveOldVersionMessage(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInvokeForVersionNotExisting(): void
|
|
||||||
{
|
|
||||||
$object = new StoredObject();
|
|
||||||
$version = $object->registerVersion();
|
|
||||||
$storedObjectVersionRepository = $this->createMock(StoredObjectVersionRepository::class);
|
|
||||||
$storedObjectVersionRepository->expects($this->once())->method('find')
|
|
||||||
->with($this->identicalTo(1))
|
|
||||||
->willReturn($version);
|
|
||||||
|
|
||||||
$entityManager = $this->createMock(EntityManagerInterface::class);
|
|
||||||
$entityManager->expects($this->once())->method('remove')->with($this->identicalTo($version));
|
|
||||||
$entityManager->expects($this->once())->method('flush');
|
|
||||||
$entityManager->expects($this->once())->method('clear');
|
|
||||||
|
|
||||||
$storedObjectManager = $this->createMock(StoredObjectManagerInterface::class);
|
|
||||||
$storedObjectManager->expects($this->once())->method('exists')->willReturn(false);
|
|
||||||
$storedObjectManager->expects($this->never())->method('delete')->with($this->identicalTo($version));
|
|
||||||
|
|
||||||
$handler = new RemoveOldVersionMessageHandler($storedObjectVersionRepository, new NullLogger(), $entityManager, $storedObjectManager, new MockClock());
|
|
||||||
|
|
||||||
$handler(new RemoveOldVersionMessage(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testInvokeWithStoredObjectToDelete(): void
|
public function testInvokeWithStoredObjectToDelete(): void
|
||||||
{
|
{
|
||||||
$object = new StoredObject();
|
$object = new StoredObject();
|
||||||
@@ -147,6 +123,6 @@ class DummyStoredObjectManager implements StoredObjectManagerInterface
|
|||||||
|
|
||||||
public function exists(StoredObject|StoredObjectVersion $document): bool
|
public function exists(StoredObject|StoredObjectVersion $document): bool
|
||||||
{
|
{
|
||||||
return true;
|
throw new \RuntimeException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -99,30 +99,3 @@ CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE: Modifier un document
|
|||||||
entity_display_title:
|
entity_display_title:
|
||||||
Document (n°%doc%): "Document (n°%doc%)"
|
Document (n°%doc%): "Document (n°%doc%)"
|
||||||
Doc for evaluation (n°%eval%): Document de l'évaluation n°%eval%
|
Doc for evaluation (n°%eval%): Document de l'évaluation n°%eval%
|
||||||
|
|
||||||
|
|
||||||
# SIGNATURES
|
|
||||||
|
|
||||||
signatures:
|
|
||||||
yes: Oui
|
|
||||||
are_you_sure: Êtes-vous sûr·e?
|
|
||||||
you_are_going_to_sign: Vous allez signer le document
|
|
||||||
signature_confirmation: Confirmation de la signature
|
|
||||||
sign: Signer
|
|
||||||
choose_another_signature: Choisir une autre zone
|
|
||||||
cancel: Annuler
|
|
||||||
last_sign_zone: Zone de signature précédente
|
|
||||||
next_sign_zone: Zone de signature suivante
|
|
||||||
add_sign_zone: Ajouter une zone de signature
|
|
||||||
click_on_document: Cliquer sur le document
|
|
||||||
last_zone: Zone précédente
|
|
||||||
next_zone: Zone suivante
|
|
||||||
add_zone: Ajouter une zone
|
|
||||||
another_zone: Autre zone
|
|
||||||
electronic_signature_in_progress: Signature électronique en cours...
|
|
||||||
loading: Chargement...
|
|
||||||
remove_sign_zone: Enlever la zone
|
|
||||||
return: Retour
|
|
||||||
see_all_pages: Voir toutes les pages
|
|
||||||
all_pages: Toutes les pages
|
|
||||||
go_to_signature_unique: Aller à la zone de signature
|
|
||||||
|
@@ -66,8 +66,11 @@ class EntityToJsonTransformer implements DataTransformerInterface
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function denormalizeOne(array $item)
|
private function denormalizeOne(array|string $item)
|
||||||
{
|
{
|
||||||
|
if ('me' === $item) {
|
||||||
|
return $item;
|
||||||
|
}
|
||||||
if (!\array_key_exists('type', $item)) {
|
if (!\array_key_exists('type', $item)) {
|
||||||
throw new TransformationFailedException('the key "type" is missing on element');
|
throw new TransformationFailedException('the key "type" is missing on element');
|
||||||
}
|
}
|
||||||
@@ -98,5 +101,6 @@ class EntityToJsonTransformer implements DataTransformerInterface
|
|||||||
'json',
|
'json',
|
||||||
$context,
|
$context,
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Chill\MainBundle\Form\Type;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\MainBundle\Form\Type\DataTransformer\EntityToJsonTransformer;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Form\FormInterface;
|
||||||
|
use Symfony\Component\Form\FormView;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||||
|
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||||
|
use Symfony\Component\Serializer\SerializerInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pick user dymically, using vuejs module "AddPerson".
|
||||||
|
*
|
||||||
|
* Possible options:
|
||||||
|
*
|
||||||
|
* - `multiple`: pick one or more users
|
||||||
|
* - `suggested`: a list of suggested users
|
||||||
|
* - `suggest_myself`: append the current user to the list of suggested
|
||||||
|
* - `as_id`: only the id will be set in the returned data
|
||||||
|
* - `submit_on_adding_new_entity`: the browser will immediately submit the form when new users are checked
|
||||||
|
*/
|
||||||
|
class PickUserOrMeDynamicType extends AbstractType
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly DenormalizerInterface $denormalizer,
|
||||||
|
private readonly SerializerInterface $serializer,
|
||||||
|
private readonly NormalizerInterface $normalizer,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->addViewTransformer(new EntityToJsonTransformer($this->denormalizer, $this->serializer, $options['multiple'], 'user'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||||
|
{
|
||||||
|
$view->vars['multiple'] = $options['multiple'];
|
||||||
|
$view->vars['types'] = ['user'];
|
||||||
|
$view->vars['uniqid'] = uniqid('pick_user_or_me_dyn');
|
||||||
|
$view->vars['suggested'] = [];
|
||||||
|
$view->vars['as_id'] = true === $options['as_id'] ? '1' : '0';
|
||||||
|
$view->vars['submit_on_adding_new_entity'] = true === $options['submit_on_adding_new_entity'] ? '1' : '0';
|
||||||
|
|
||||||
|
foreach ($options['suggested'] as $user) {
|
||||||
|
$view->vars['suggested'][] = $this->normalizer->normalize($user, 'json', ['groups' => 'read']);
|
||||||
|
}
|
||||||
|
// $user = /* should come from context */ $options['context'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
{
|
||||||
|
$resolver
|
||||||
|
->setDefault('multiple', false)
|
||||||
|
->setAllowedTypes('multiple', ['bool'])
|
||||||
|
->setDefault('compound', false)
|
||||||
|
->setDefault('suggested', [])
|
||||||
|
// if set to true, only the id will be set inside the content. The denormalization will not work.
|
||||||
|
->setDefault('as_id', false)
|
||||||
|
->setAllowedTypes('as_id', ['bool'])
|
||||||
|
->setDefault('submit_on_adding_new_entity', false)
|
||||||
|
->setAllowedTypes('submit_on_adding_new_entity', ['bool']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBlockPrefix()
|
||||||
|
{
|
||||||
|
return 'pick_entity_dynamic';
|
||||||
|
}
|
||||||
|
}
|
@@ -25,34 +25,7 @@ div.flex-table {
|
|||||||
div.item-col:last-child {
|
div.item-col:last-child {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.item-two-col-grid {
|
|
||||||
display: grid;
|
|
||||||
width: 100%;
|
|
||||||
justify-content: stretch;
|
|
||||||
|
|
||||||
@include media-breakpoint-up(lg) {
|
|
||||||
grid-template-areas:
|
|
||||||
"title aside";
|
|
||||||
grid-template-columns: 1fr minmax(8rem, 1fr);
|
|
||||||
column-gap: 0.5em;
|
|
||||||
}
|
|
||||||
@include media-breakpoint-down(lg) {
|
|
||||||
grid-template-areas:
|
|
||||||
"aside"
|
|
||||||
"title";
|
|
||||||
}
|
|
||||||
|
|
||||||
& > div.title {
|
|
||||||
grid-area: title;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > div.aside {
|
|
||||||
grid-area: aside;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2, h3, h4, dl, p {
|
h2, h3, h4, dl, p {
|
||||||
|
@@ -12,6 +12,11 @@ function loadDynamicPicker(element) {
|
|||||||
let apps = element.querySelectorAll('[data-module="pick-dynamic"]');
|
let apps = element.querySelectorAll('[data-module="pick-dynamic"]');
|
||||||
|
|
||||||
apps.forEach(function (el) {
|
apps.forEach(function (el) {
|
||||||
|
let suggested;
|
||||||
|
let as_id;
|
||||||
|
let submit_on_adding_new_entity;
|
||||||
|
let label;
|
||||||
|
let isCurrentUserPicker;
|
||||||
const isMultiple = parseInt(el.dataset.multiple) === 1,
|
const isMultiple = parseInt(el.dataset.multiple) === 1,
|
||||||
uniqId = el.dataset.uniqid,
|
uniqId = el.dataset.uniqid,
|
||||||
input = element.querySelector(
|
input = element.querySelector(
|
||||||
@@ -22,12 +27,13 @@ function loadDynamicPicker(element) {
|
|||||||
? JSON.parse(input.value)
|
? JSON.parse(input.value)
|
||||||
: input.value === "[]" || input.value === ""
|
: input.value === "[]" || input.value === ""
|
||||||
? null
|
? null
|
||||||
: [JSON.parse(input.value)],
|
: [JSON.parse(input.value)];
|
||||||
suggested = JSON.parse(el.dataset.suggested),
|
suggested = JSON.parse(el.dataset.suggested);
|
||||||
as_id = parseInt(el.dataset.asId) === 1,
|
as_id = parseInt(el.dataset.asId) === 1;
|
||||||
submit_on_adding_new_entity =
|
submit_on_adding_new_entity =
|
||||||
parseInt(el.dataset.submitOnAddingNewEntity) === 1,
|
parseInt(el.dataset.submitOnAddingNewEntity) === 1;
|
||||||
label = el.dataset.label;
|
label = el.dataset.label;
|
||||||
|
isCurrentUserPicker = uniqId.startsWith("pick_user_or_me_dyn");
|
||||||
|
|
||||||
if (!isMultiple) {
|
if (!isMultiple) {
|
||||||
if (input.value === "[]") {
|
if (input.value === "[]") {
|
||||||
@@ -44,6 +50,7 @@ function loadDynamicPicker(element) {
|
|||||||
':uniqid="uniqid" ' +
|
':uniqid="uniqid" ' +
|
||||||
':suggested="notPickedSuggested" ' +
|
':suggested="notPickedSuggested" ' +
|
||||||
':label="label" ' +
|
':label="label" ' +
|
||||||
|
':isCurrentUserPicker="isCurrentUserPicker" ' +
|
||||||
'@addNewEntity="addNewEntity" ' +
|
'@addNewEntity="addNewEntity" ' +
|
||||||
'@removeEntity="removeEntity" ' +
|
'@removeEntity="removeEntity" ' +
|
||||||
'@addNewEntityProcessEnded="addNewEntityProcessEnded"' +
|
'@addNewEntityProcessEnded="addNewEntityProcessEnded"' +
|
||||||
@@ -61,6 +68,7 @@ function loadDynamicPicker(element) {
|
|||||||
as_id,
|
as_id,
|
||||||
submit_on_adding_new_entity,
|
submit_on_adding_new_entity,
|
||||||
label,
|
label,
|
||||||
|
isCurrentUserPicker,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -89,7 +97,8 @@ function loadDynamicPicker(element) {
|
|||||||
const ids = this.picked.map((el) => el.id);
|
const ids = this.picked.map((el) => el.id);
|
||||||
input.value = ids.join(",");
|
input.value = ids.join(",");
|
||||||
}
|
}
|
||||||
console.log(entity);
|
console.log(this.picked);
|
||||||
|
// console.log(entity);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
|
@@ -1,10 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<ul :class="listClasses" v-if="picked.length && displayPicked">
|
<ul :class="listClasses" v-if="picked.length && displayPicked">
|
||||||
<li v-for="p in picked" @click="removeEntity(p)" :key="p.type + p.id">
|
<li v-for="p in picked" @click="removeEntity(p)" :key="p.type + p.id">
|
||||||
<span class="chill_denomination">{{ p.text }}</span>
|
<span
|
||||||
|
v-if="'me' === p"
|
||||||
|
class="chill_denomination current-user updatedBy"
|
||||||
|
>{{ trans(USER_CURRENT_USER) }}</span
|
||||||
|
>
|
||||||
|
<span v-else class="chill_denomination">{{ p.text }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
|
<li v-if="isCurrentUserPicker" class="btn btn-sm btn-misc">
|
||||||
|
<label class="flex items-center gap-2">
|
||||||
|
<input
|
||||||
|
ref="itsMeCheckbox"
|
||||||
|
:type="multiple ? 'checkbox' : 'radio'"
|
||||||
|
@change="selectItsMe"
|
||||||
|
/>
|
||||||
|
{{ trans(USER_CURRENT_USER) }}
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
<li class="add-persons">
|
<li class="add-persons">
|
||||||
<add-persons
|
<add-persons
|
||||||
:options="addPersonsOptions"
|
:options="addPersonsOptions"
|
||||||
@@ -24,119 +39,83 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
import AddPersons from "ChillPersonAssets/vuejs/_components/AddPersons.vue";
|
import { ref, computed } from "vue";
|
||||||
|
import AddPersons from "ChillPersonAssets/vuejs/_components/AddPersons.vue"; // eslint-disable-line
|
||||||
import { appMessages } from "./i18n";
|
import { appMessages } from "./i18n";
|
||||||
|
import { trans, USER_CURRENT_USER } from "translator";
|
||||||
|
|
||||||
export default {
|
const props = defineProps({
|
||||||
name: "PickEntity",
|
multiple: Boolean,
|
||||||
props: {
|
types: Array,
|
||||||
multiple: {
|
picked: Array,
|
||||||
type: Boolean,
|
uniqid: String,
|
||||||
required: true,
|
removableIfSet: { type: Boolean, default: true },
|
||||||
},
|
displayPicked: { type: Boolean, default: true },
|
||||||
types: {
|
suggested: { type: Array, default: () => [] },
|
||||||
type: Array,
|
label: String,
|
||||||
required: true,
|
isCurrentUserPicker: { type: Boolean, default: false },
|
||||||
},
|
});
|
||||||
picked: {
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
uniqid: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
removableIfSet: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
displayPicked: {
|
|
||||||
// display picked entities.
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
suggested: {
|
|
||||||
type: Array,
|
|
||||||
default: [],
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
type: String,
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
emits: ["addNewEntity", "removeEntity", "addNewEntityProcessEnded"],
|
|
||||||
components: {
|
|
||||||
AddPersons,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
key: "",
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
addPersonsOptions() {
|
|
||||||
return {
|
|
||||||
uniq: !this.multiple,
|
|
||||||
type: this.types,
|
|
||||||
priority: null,
|
|
||||||
button: {
|
|
||||||
size: "btn-sm",
|
|
||||||
class: "btn-submit",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
translatedListOfTypes() {
|
|
||||||
if (this.label !== "") {
|
|
||||||
return this.label;
|
|
||||||
}
|
|
||||||
|
|
||||||
let trans = [];
|
const emit = defineEmits([
|
||||||
this.types.forEach((t) => {
|
"addNewEntity",
|
||||||
if (this.$props.multiple) {
|
"removeEntity",
|
||||||
trans.push(appMessages.fr.pick_entity[t].toLowerCase());
|
"addNewEntityProcessEnded",
|
||||||
} else {
|
]);
|
||||||
trans.push(
|
|
||||||
appMessages.fr.pick_entity[t + "_one"].toLowerCase(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this.$props.multiple) {
|
const itsMeCheckbox = ref(null);
|
||||||
return (
|
const addPersons = ref(null);
|
||||||
appMessages.fr.pick_entity.modal_title + trans.join(", ")
|
|
||||||
);
|
const addPersonsOptions = computed(() => ({
|
||||||
} else {
|
uniq: !props.multiple,
|
||||||
return (
|
type: props.types,
|
||||||
appMessages.fr.pick_entity.modal_title_one +
|
priority: null,
|
||||||
trans.join(", ")
|
button: { size: "btn-sm", class: "btn-submit" },
|
||||||
);
|
}));
|
||||||
}
|
|
||||||
},
|
const translatedListOfTypes = computed(() => {
|
||||||
listClasses() {
|
if (props.label) return props.label;
|
||||||
return {
|
let trans = props.types.map((t) =>
|
||||||
"list-suggest": true,
|
props.multiple
|
||||||
"remove-items": this.$props.removableIfSet,
|
? appMessages.fr.pick_entity[t].toLowerCase()
|
||||||
};
|
: appMessages.fr.pick_entity[t + "_one"].toLowerCase(),
|
||||||
},
|
);
|
||||||
},
|
return props.multiple
|
||||||
methods: {
|
? appMessages.fr.pick_entity.modal_title + trans.join(", ")
|
||||||
addNewSuggested(entity) {
|
: appMessages.fr.pick_entity.modal_title_one + trans.join(", ");
|
||||||
this.$emit("addNewEntity", { entity: entity });
|
});
|
||||||
},
|
|
||||||
addNewEntity({ selected, modal }) {
|
const listClasses = computed(() => ({
|
||||||
selected.forEach((item) => {
|
"list-suggest": true,
|
||||||
this.$emit("addNewEntity", { entity: item.result });
|
"remove-items": props.removableIfSet,
|
||||||
}, this);
|
}));
|
||||||
this.$refs.addPersons.resetSearch(); // to cast child method
|
|
||||||
modal.showModal = false;
|
const selectItsMe = (event) =>
|
||||||
this.$emit("addNewEntityProcessEnded");
|
event.target.checked ? addNewSuggested("me") : removeEntity("me");
|
||||||
},
|
|
||||||
removeEntity(entity) {
|
const addNewSuggested = (entity) => {
|
||||||
if (!this.$props.removableIfSet) {
|
emit("addNewEntity", { entity });
|
||||||
return;
|
};
|
||||||
}
|
|
||||||
this.$emit("removeEntity", { entity: entity });
|
const addNewEntity = ({ selected, modal }) => {
|
||||||
},
|
selected.forEach((item) => emit("addNewEntity", { entity: item.result }));
|
||||||
},
|
addPersons.value?.resetSearch();
|
||||||
|
modal.showModal = false;
|
||||||
|
emit("addNewEntityProcessEnded");
|
||||||
|
};
|
||||||
|
|
||||||
|
const removeEntity = (entity) => {
|
||||||
|
if (!props.removableIfSet) return;
|
||||||
|
if (entity === "me" && itsMeCheckbox.value) {
|
||||||
|
itsMeCheckbox.value.checked = false;
|
||||||
|
}
|
||||||
|
emit("removeEntity", { entity });
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.current-user {
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
background-color: var(--bs-chill-l-gray) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@@ -26,9 +26,9 @@
|
|||||||
trans(THIRDPARTY_CONTACT_OF)
|
trans(THIRDPARTY_CONTACT_OF)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="props.entity.kind === 'company'">{{
|
<span v-else-if="props.entity.kind === 'company'">{{
|
||||||
trans(THIRDPARTY_A_COMPANY)
|
trans(THIRDPARTY_A_CONTACT)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else>{{ trans(THIRDPARTY_A_CONTACT) }}</span>
|
<span v-else>{{ $t("thirdparty.contact") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@@ -54,7 +54,6 @@ import {
|
|||||||
ACCEPTED_USERS,
|
ACCEPTED_USERS,
|
||||||
THIRDPARTY_A_CONTACT,
|
THIRDPARTY_A_CONTACT,
|
||||||
THIRDPARTY_CONTACT_OF,
|
THIRDPARTY_CONTACT_OF,
|
||||||
THIRDPARTY_A_COMPANY,
|
|
||||||
PERSON,
|
PERSON,
|
||||||
THIRDPARTY,
|
THIRDPARTY,
|
||||||
} from "translator";
|
} from "translator";
|
||||||
|
@@ -136,59 +136,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Fix the title in the flex table</h2>
|
|
||||||
|
|
||||||
<p>This will fix the layout of the row, with a "title" element, and an aside element. Using <code>css grid</code>, this is quite safe and won't overflow</p>
|
|
||||||
|
|
||||||
<xmp>
|
|
||||||
<div class="flex-table">
|
|
||||||
<div class="item-bloc">
|
|
||||||
<div class="item-row">
|
|
||||||
<div class="item-two-col-grid">
|
|
||||||
<div class="title">This is my title</div>
|
|
||||||
<div class="aside">Aside value</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="item-bloc">
|
|
||||||
<div class="item-row">
|
|
||||||
<div class="item-two-col-grid">
|
|
||||||
<div class="title">
|
|
||||||
<div><h3>This is my title, which can be very long and take a lot of place. But it is wrapped successfully, and won't disturb the placement of the aside block</h3></div>
|
|
||||||
<div>This is a second line</div>
|
|
||||||
</div>
|
|
||||||
<div class="aside">Aside value</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</xmp>
|
|
||||||
|
|
||||||
<p>will render:</p>
|
|
||||||
|
|
||||||
<div class="flex-table">
|
|
||||||
<div class="item-bloc">
|
|
||||||
<div class="item-row">
|
|
||||||
<div class="item-two-col-grid">
|
|
||||||
<div class="title">This is my title</div>
|
|
||||||
<div class="aside">Aside value</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="item-bloc">
|
|
||||||
<div class="item-row">
|
|
||||||
<div class="item-two-col-grid">
|
|
||||||
<div class="title">
|
|
||||||
<div><h3>This is my title, which can be very long and take a lot of place. But it is wrapped successfully, and won't disturb the placement of the aside block</h3></div>
|
|
||||||
<div>This is a second line</div>
|
|
||||||
</div>
|
|
||||||
<div class="aside">Aside value</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Wrap-list</h2>
|
<h2>Wrap-list</h2>
|
||||||
<p>Une liste inline qui s'aligne, puis glisse sous son titre.</p>
|
<p>Une liste inline qui s'aligne, puis glisse sous son titre.</p>
|
||||||
<div class="wrap-list debug">
|
<div class="wrap-list debug">
|
||||||
@@ -445,12 +392,4 @@ Toutes les classes btn-* de bootstrap sont fonctionnelles
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<h1>Badges</h1>
|
|
||||||
|
|
||||||
<span class="badge-accompanying-work-type-simple">Action d'accompagnement</span>
|
|
||||||
<span class="badge-activity-type-simple">Type d'échange</span>
|
|
||||||
<span class="badge-calendar-simple">Rendez-vous</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -25,8 +25,6 @@ use Symfony\Component\Workflow\Transition;
|
|||||||
#[AsMessageHandler]
|
#[AsMessageHandler]
|
||||||
final readonly class CancelStaleWorkflowHandler
|
final readonly class CancelStaleWorkflowHandler
|
||||||
{
|
{
|
||||||
private const LOG_PREFIX = '[CancelStaleWorkflowHandler] ';
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private EntityWorkflowRepository $workflowRepository,
|
private EntityWorkflowRepository $workflowRepository,
|
||||||
private Registry $registry,
|
private Registry $registry,
|
||||||
@@ -42,13 +40,13 @@ final readonly class CancelStaleWorkflowHandler
|
|||||||
|
|
||||||
$workflow = $this->workflowRepository->find($message->getWorkflowId());
|
$workflow = $this->workflowRepository->find($message->getWorkflowId());
|
||||||
if (null === $workflow) {
|
if (null === $workflow) {
|
||||||
$this->logger->alert(self::LOG_PREFIX.'Workflow was not found!', ['entityWorkflowId' => $workflowId]);
|
$this->logger->alert('Workflow was not found!', [$workflowId]);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false === $workflow->isStaledAt($olderThanDate)) {
|
if (false === $workflow->isStaledAt($olderThanDate)) {
|
||||||
$this->logger->alert(self::LOG_PREFIX.'Workflow has transitioned in the meantime.', ['entityWorkflowId' => $workflowId]);
|
$this->logger->alert('Workflow has transitioned in the meantime.', [$workflowId]);
|
||||||
|
|
||||||
throw new UnrecoverableMessageHandlingException('the workflow is not staled any more');
|
throw new UnrecoverableMessageHandlingException('the workflow is not staled any more');
|
||||||
}
|
}
|
||||||
@@ -69,14 +67,14 @@ final readonly class CancelStaleWorkflowHandler
|
|||||||
'transitionAt' => $this->clock->now(),
|
'transitionAt' => $this->clock->now(),
|
||||||
'transition' => $transition->getName(),
|
'transition' => $transition->getName(),
|
||||||
]);
|
]);
|
||||||
$this->logger->info(self::LOG_PREFIX.'EntityWorkflow has been cancelled automatically.', ['entityWorkflowId' => $workflowId]);
|
$this->logger->info('EntityWorkflow has been cancelled automatically.', [$workflowId]);
|
||||||
$transitionApplied = true;
|
$transitionApplied = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$transitionApplied) {
|
if (!$transitionApplied) {
|
||||||
$this->logger->error(self::LOG_PREFIX.'No valid transition found for EntityWorkflow.', ['entityWorkflowId' => $workflowId]);
|
$this->logger->error('No valid transition found for EntityWorkflow.', [$workflowId]);
|
||||||
throw new UnrecoverableMessageHandlingException(sprintf('No valid transition found for EntityWorkflow %d.', $workflowId));
|
throw new UnrecoverableMessageHandlingException(sprintf('No valid transition found for EntityWorkflow %d.', $workflowId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -49,6 +49,7 @@ Name: Nom
|
|||||||
Label: Nom
|
Label: Nom
|
||||||
|
|
||||||
user:
|
user:
|
||||||
|
current_user: Utilisateur courant
|
||||||
profile:
|
profile:
|
||||||
title: Mon profil
|
title: Mon profil
|
||||||
Phonenumber successfully updated!: Numéro de téléphone mis à jour!
|
Phonenumber successfully updated!: Numéro de téléphone mis à jour!
|
||||||
|
@@ -26,7 +26,7 @@ readonly class AccompanyingPeriodStepChangeCronjob implements CronJobInterface
|
|||||||
{
|
{
|
||||||
$now = $this->clock->now();
|
$now = $this->clock->now();
|
||||||
|
|
||||||
if (null !== $cronJobExecution && $now->sub(new \DateInterval('PT23H45M')) < $cronJobExecution->getLastStart()) {
|
if (null !== $cronJobExecution && $now->sub(new \DateInterval('P1D')) < $cronJobExecution->getLastStart()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -204,25 +204,20 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
|
|||||||
['date' => 'DESC', 'id' => 'DESC'],
|
['date' => 'DESC', 'id' => 'DESC'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$activities = \array_slice($activities, 0, 3);
|
||||||
|
|
||||||
$works = $this->workRepository->findByAccompanyingPeriod(
|
$works = $this->workRepository->findByAccompanyingPeriod(
|
||||||
$accompanyingCourse,
|
$accompanyingCourse,
|
||||||
['startDate' => 'DESC', 'endDate' => 'DESC'],
|
['startDate' => 'DESC', 'endDate' => 'DESC'],
|
||||||
3
|
3
|
||||||
);
|
);
|
||||||
|
|
||||||
$counters = [
|
|
||||||
'activities' => count($activities),
|
|
||||||
'openWorks' => count($accompanyingCourse->getOpenWorks()),
|
|
||||||
'works' => count($works),
|
|
||||||
];
|
|
||||||
|
|
||||||
return $this->render('@ChillPerson/AccompanyingCourse/index.html.twig', [
|
return $this->render('@ChillPerson/AccompanyingCourse/index.html.twig', [
|
||||||
'accompanyingCourse' => $accompanyingCourse,
|
'accompanyingCourse' => $accompanyingCourse,
|
||||||
'withoutHousehold' => $withoutHousehold,
|
'withoutHousehold' => $withoutHousehold,
|
||||||
'participationsByHousehold' => $accompanyingCourse->actualParticipationsByHousehold(),
|
'participationsByHousehold' => $accompanyingCourse->actualParticipationsByHousehold(),
|
||||||
'works' => $works,
|
'works' => $works,
|
||||||
'activities' => \array_slice($activities, 0, 3),
|
'activities' => $activities,
|
||||||
'counters' => $counters,
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -511,14 +511,6 @@ class AccompanyingPeriod implements
|
|||||||
return $this->getParticipationsContainsPerson($person)->count() > 0;
|
return $this->getParticipationsContainsPerson($person)->count() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOpenWorks(): Collection
|
|
||||||
{
|
|
||||||
return $this->getWorks()->filter(
|
|
||||||
static fn (AccompanyingPeriodWork $work): bool => null === $work->getEndDate()
|
|
||||||
or $work->getEndDate() > new \DateTimeImmutable('today')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a new participation for a person.
|
* Open a new participation for a person.
|
||||||
*/
|
*/
|
||||||
|
@@ -58,11 +58,13 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
||||||
private ?int $numberOfChildren = null;
|
private ?int $numberOfChildren = null;
|
||||||
|
|
||||||
|
#[Assert\NotNull]
|
||||||
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
|
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
|
||||||
#[Serializer\Groups(['docgen:read'])]
|
#[Serializer\Groups(['docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
||||||
private ?int $numberOfDependents = null;
|
private ?int $numberOfDependents = null;
|
||||||
|
|
||||||
|
#[Assert\NotNull]
|
||||||
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
|
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
|
||||||
#[Serializer\Groups(['docgen:read'])]
|
#[Serializer\Groups(['docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
||||||
|
@@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters;
|
|||||||
|
|
||||||
use Chill\MainBundle\Export\FilterInterface;
|
use Chill\MainBundle\Export\FilterInterface;
|
||||||
use Chill\MainBundle\Form\Type\PickRollingDateType;
|
use Chill\MainBundle\Form\Type\PickRollingDateType;
|
||||||
use Chill\MainBundle\Form\Type\PickUserDynamicType;
|
use Chill\MainBundle\Form\Type\PickUserOrMeDynamicType;
|
||||||
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
||||||
use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface;
|
use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface;
|
||||||
use Chill\PersonBundle\Export\Declarations;
|
use Chill\PersonBundle\Export\Declarations;
|
||||||
@@ -66,7 +66,7 @@ class ReferrerFilter implements FilterInterface
|
|||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('accepted_referrers', PickUserDynamicType::class, [
|
->add('accepted_referrers', PickUserOrMeDynamicType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
])
|
])
|
||||||
->add('date_calc', PickRollingDateType::class, [
|
->add('date_calc', PickRollingDateType::class, [
|
||||||
|
@@ -71,7 +71,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
->setExtras(['order' => 30]);
|
->setExtras(['order' => 30]);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$menu->addChild($this->translator->trans('Accompanying Course Comments'), [
|
$menu->addChild($this->translator->trans('Accompanying Course Comment'), [
|
||||||
'route' => 'chill_person_accompanying_period_comment_list',
|
'route' => 'chill_person_accompanying_period_comment_list',
|
||||||
'routeParameters' => [
|
'routeParameters' => [
|
||||||
'accompanying_period_id' => $period->getId(),
|
'accompanying_period_id' => $period->getId(),
|
||||||
@@ -80,15 +80,12 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->security->isGranted(AccompanyingPeriodWorkVoter::SEE, $period)) {
|
if ($this->security->isGranted(AccompanyingPeriodWorkVoter::SEE, $period)) {
|
||||||
$menu->addChild($this->translator->trans('Accompanying Course Actions'), [
|
$menu->addChild($this->translator->trans('Accompanying Course Action'), [
|
||||||
'route' => 'chill_person_accompanying_period_work_list',
|
'route' => 'chill_person_accompanying_period_work_list',
|
||||||
'routeParameters' => [
|
'routeParameters' => [
|
||||||
'id' => $period->getId(),
|
'id' => $period->getId(),
|
||||||
], ])
|
], ])
|
||||||
->setExtras([
|
->setExtras(['order' => 40]);
|
||||||
'order' => 40,
|
|
||||||
'counter' => count($period->getOpenWorks()) > 0 ? count($period->getOpenWorks()) : null,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$workflow = $this->registry->get($period, 'accompanying_period_lifecycle');
|
$workflow = $this->registry->get($period, 'accompanying_period_lifecycle');
|
||||||
|
@@ -304,14 +304,5 @@ div#dashboards {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div.count-item {
|
|
||||||
font-size: 3rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
div.count-item-label {
|
|
||||||
font-size: 90%;
|
|
||||||
font-variant: all-small-caps;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,36 +20,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-accompanying-work-type-simple {
|
|
||||||
@extend .badge;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0.2rem 0;
|
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0.5rem;
|
|
||||||
|
|
||||||
border-left: 20px groove $orange;
|
|
||||||
border-radius: $badge-border-radius;
|
|
||||||
|
|
||||||
max-width: 100%;
|
|
||||||
background-color: $gray-100;
|
|
||||||
|
|
||||||
color: black;
|
|
||||||
font-weight: normal;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
text-indent: 5px hanging;
|
|
||||||
text-align: left;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
margin-right: 3px;
|
|
||||||
position: relative;
|
|
||||||
left: -0.5px;
|
|
||||||
font-family: ForkAwesome;
|
|
||||||
content: '\f04b';
|
|
||||||
color: #e2793d;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// AccompanyingCourse Work Pages
|
/// AccompanyingCourse Work Pages
|
||||||
div.accompanying-course-work {
|
div.accompanying-course-work {
|
||||||
|
|
||||||
|
@@ -204,8 +204,7 @@ export default {
|
|||||||
} else if (payload.type === "thirdparty") {
|
} else if (payload.type === "thirdparty") {
|
||||||
body.name = payload.data.text;
|
body.name = payload.data.text;
|
||||||
body.email = payload.data.email;
|
body.email = payload.data.email;
|
||||||
body.telephone = payload.data.telephone;
|
body.telephone = payload.data.phonenumber;
|
||||||
body.telephone2 = payload.data.telephone2;
|
|
||||||
body.address = { id: payload.data.address.address_id };
|
body.address = { id: payload.data.address.address_id };
|
||||||
|
|
||||||
makeFetch(
|
makeFetch(
|
||||||
|
@@ -385,8 +385,7 @@ export default {
|
|||||||
} else if (payload.type === "thirdparty") {
|
} else if (payload.type === "thirdparty") {
|
||||||
body.name = payload.data.text;
|
body.name = payload.data.text;
|
||||||
body.email = payload.data.email;
|
body.email = payload.data.email;
|
||||||
body.telephone = payload.data.telephone;
|
body.telephone = payload.data.phonenumber;
|
||||||
body.telephone2 = payload.data.telephone2;
|
|
||||||
if (payload.data.address) {
|
if (payload.data.address) {
|
||||||
body.address = { id: payload.data.address.address_id };
|
body.address = { id: payload.data.address.address_id };
|
||||||
}
|
}
|
||||||
|
@@ -194,7 +194,6 @@ export default {
|
|||||||
body.name = payload.data.name;
|
body.name = payload.data.name;
|
||||||
body.email = payload.data.email;
|
body.email = payload.data.email;
|
||||||
body.telephone = payload.data.telephone;
|
body.telephone = payload.data.telephone;
|
||||||
body.telephone2 = payload.data.telephone2;
|
|
||||||
body.address = payload.data.address
|
body.address = payload.data.address
|
||||||
? { id: payload.data.address.address_id }
|
? { id: payload.data.address.address_id }
|
||||||
: null;
|
: null;
|
||||||
|
@@ -745,8 +745,7 @@ export default {
|
|||||||
let body = { type: payload.type };
|
let body = { type: payload.type };
|
||||||
body.name = payload.data.text;
|
body.name = payload.data.text;
|
||||||
body.email = payload.data.email;
|
body.email = payload.data.email;
|
||||||
body.telephone = payload.data.telephone;
|
body.telephone = payload.data.phonenumber;
|
||||||
body.telephone2 = payload.data.telephone2;
|
|
||||||
body.address = { id: payload.data.address.address_id };
|
body.address = { id: payload.data.address.address_id };
|
||||||
|
|
||||||
makeFetch(
|
makeFetch(
|
||||||
@@ -756,9 +755,7 @@ export default {
|
|||||||
)
|
)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.$store.dispatch("updateThirdParty", response);
|
this.$store.dispatch("updateThirdParty", response);
|
||||||
for (let otf of this.$refs.onTheFly) {
|
this.$refs.onTheFly.closeModal();
|
||||||
otf.closeModal();
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error.name === "ValidationException") {
|
if (error.name === "ValidationException") {
|
||||||
|
@@ -201,7 +201,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if accompanyingCourse.step != 'DRAFT' %}
|
{% if accompanyingCourse.step != 'DRAFT' %}
|
||||||
<div class="mbloc col col-sm-6 col-lg-8 col-xxl-4">
|
<div class="mbloc col col-sm-6 col-lg-4">
|
||||||
<div class="notification-counter">
|
<div class="notification-counter">
|
||||||
<h4 class="item-key">{{ 'notification.Notifications'|trans }}</h4>
|
<h4 class="item-key">{{ 'notification.Notifications'|trans }}</h4>
|
||||||
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', accompanyingCourse.id) %}
|
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', accompanyingCourse.id) %}
|
||||||
@@ -238,31 +238,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if counters.activities > 0 %}
|
|
||||||
<div class="mbloc col col-sm-6 col-lg-4">
|
|
||||||
<div class="count-activities">
|
|
||||||
<div class="count-item">{{ counters.activities }}</div>
|
|
||||||
<div class="count-item-label">
|
|
||||||
{% if counters.activities == 1 %}
|
|
||||||
{{ 'Activity'|trans }}
|
|
||||||
{% else %}
|
|
||||||
{{ 'Activities'|trans }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if counters.works > 0 %}
|
|
||||||
<div class="mbloc col col-sm-6 col-lg-4">
|
|
||||||
<div class="count-works">
|
|
||||||
<div class="count-item">{{ counters.openWorks }} / {{ counters.works }}</div>
|
|
||||||
<div class="count-item-label">{{ 'accompanying_course_work.On-going works over total'|trans }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="social-actions my-4">
|
<div class="social-actions my-4">
|
||||||
|
@@ -5,49 +5,44 @@
|
|||||||
{% set w = document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork %}
|
{% set w = document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork %}
|
||||||
|
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<!-- evaluation document -->
|
<div class="item-col" style="width: unset">
|
||||||
<div class="item-two-col-grid" style="width: unset">
|
{% if document.storedObject.isPending %}
|
||||||
<div class="title">
|
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.storedObject.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
|
||||||
{% if document.storedObject.isPending %}
|
{% elseif document.storedObject.isFailure %}
|
||||||
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.storedObject.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
|
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
|
||||||
{% elseif document.storedObject.isFailure %}
|
{% endif %}
|
||||||
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
|
<div>
|
||||||
|
{% if context == 'person' %}
|
||||||
|
<span class="badge bg-primary">
|
||||||
|
<i class="fa fa-random"></i> {{ w.accompanyingPeriod.id }}
|
||||||
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div>
|
<div class="badge-accompanying-work-type">
|
||||||
<div>
|
<span class="title_label"></span>
|
||||||
<div class="badge-accompanying-work-type-simple">
|
<span class="title_action">{{ w.socialAction|chill_entity_render_string }} > {{ document.accompanyingPeriodWorkEvaluation.evaluation.title|localize_translatable_string }}</span>
|
||||||
{{ w.socialAction|chill_entity_render_string }} > {{ document.accompanyingPeriodWorkEvaluation.evaluation.title|localize_translatable_string }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="denomination h2">
|
|
||||||
{{ document.title|chill_print_or_message("No title") }}
|
|
||||||
</div>
|
|
||||||
{% if document.storedObject.type is not empty %}
|
|
||||||
<div>
|
|
||||||
{{ mm.mimeIcon(document.storedObject.type) }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% if document.storedObject.hasTemplate %}
|
|
||||||
<div>
|
|
||||||
<p>{{ document.storedObject.template.name|localize_translatable_string }}</p>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% if document.storedObject.createdAt is not null %}
|
<div class="denomination h2">
|
||||||
<div class="aside">
|
{{ document.title|chill_print_or_message("No title") }}
|
||||||
<div class="dates row text-end">
|
</div>
|
||||||
<span>{{ document.storedObject.createdAt|format_date('short') }}</span>
|
{% if document.storedObject.type is not empty %}
|
||||||
</div>
|
<div>
|
||||||
{% if context == 'person' %}
|
{{ mm.mimeIcon(document.storedObject.type) }}
|
||||||
<div class="text-end">
|
|
||||||
<span class="badge bg-primary">
|
|
||||||
<i class="fa fa-random"></i> {{ w.accompanyingPeriod.id }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if document.storedObject.hasTemplate %}
|
||||||
|
<div>
|
||||||
|
<p>{{ document.storedObject.template.name|localize_translatable_string }}</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="item-col">
|
||||||
|
<div class="container">
|
||||||
|
<div class="dates row text-end">
|
||||||
|
<span>{{ document.storedObject.createdAt|format_date('short') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -804,7 +804,7 @@ person_admin:
|
|||||||
|
|
||||||
# specific to accompanying period
|
# specific to accompanying period
|
||||||
accompanying_period:
|
accompanying_period:
|
||||||
deleted: Parcours d'accompagnement supprimé
|
deleted: Parcours d'accompagnment supprimé
|
||||||
dates: Période
|
dates: Période
|
||||||
dates_from_%opening_date%: Ouvert depuis le %opening_date%
|
dates_from_%opening_date%: Ouvert depuis le %opening_date%
|
||||||
dates_from_%opening_date%_to_%closing_date%: Ouvert du %opening_date% au %closing_date%
|
dates_from_%opening_date%_to_%closing_date%: Ouvert du %opening_date% au %closing_date%
|
||||||
@@ -843,7 +843,6 @@ accompanying_course:
|
|||||||
administrative_location: Localisation administrative
|
administrative_location: Localisation administrative
|
||||||
comment is pinned: Le commentaire est épinglé
|
comment is pinned: Le commentaire est épinglé
|
||||||
comment is unpinned: Le commentaire est désépinglé
|
comment is unpinned: Le commentaire est désépinglé
|
||||||
|
|
||||||
show: Montrer
|
show: Montrer
|
||||||
hide: Masquer
|
hide: Masquer
|
||||||
closed periods: parcours clôturés
|
closed periods: parcours clôturés
|
||||||
@@ -852,7 +851,6 @@ Social work configuration: Gestion des actions d'accompagnement social
|
|||||||
|
|
||||||
# Accompanying Course comments
|
# Accompanying Course comments
|
||||||
Accompanying Course Comment: Commentaire
|
Accompanying Course Comment: Commentaire
|
||||||
Accompanying Course Comments: Commentaires
|
|
||||||
Accompanying Course Comment list: Commentaires du parcours
|
Accompanying Course Comment list: Commentaires du parcours
|
||||||
pinned: épinglé
|
pinned: épinglé
|
||||||
Pin comment: Épingler
|
Pin comment: Épingler
|
||||||
@@ -921,7 +919,6 @@ accompanying_course_work:
|
|||||||
date_filter: Filtrer par date
|
date_filter: Filtrer par date
|
||||||
types_filter: Filtrer par type d'action
|
types_filter: Filtrer par type d'action
|
||||||
user_filter: Filtrer par intervenant
|
user_filter: Filtrer par intervenant
|
||||||
On-going works over total: Actions en cours / Actions du parcours
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -65,7 +65,6 @@ class ThirdpartyCSVExportController extends AbstractController
|
|||||||
'Name',
|
'Name',
|
||||||
'Profession',
|
'Profession',
|
||||||
'Telephone',
|
'Telephone',
|
||||||
'Telephone2',
|
|
||||||
'Email',
|
'Email',
|
||||||
'Address',
|
'Address',
|
||||||
'Comment',
|
'Comment',
|
||||||
@@ -77,7 +76,6 @@ class ThirdpartyCSVExportController extends AbstractController
|
|||||||
'Contact name',
|
'Contact name',
|
||||||
'Contact firstname',
|
'Contact firstname',
|
||||||
'Contact phone',
|
'Contact phone',
|
||||||
'Contact phone2',
|
|
||||||
'Contact email',
|
'Contact email',
|
||||||
'Contact address',
|
'Contact address',
|
||||||
'Contact profession',
|
'Contact profession',
|
||||||
|
@@ -209,11 +209,6 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
|||||||
#[PhonenumberConstraint(type: 'any')]
|
#[PhonenumberConstraint(type: 'any')]
|
||||||
private ?PhoneNumber $telephone = null;
|
private ?PhoneNumber $telephone = null;
|
||||||
|
|
||||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
|
||||||
#[ORM\Column(name: 'telephone2', type: 'phone_number', nullable: true)]
|
|
||||||
#[PhonenumberConstraint(type: 'any')]
|
|
||||||
private ?PhoneNumber $telephone2 = null;
|
|
||||||
|
|
||||||
#[ORM\Column(name: 'types', type: \Doctrine\DBAL\Types\Types::JSON, nullable: true)]
|
#[ORM\Column(name: 'types', type: \Doctrine\DBAL\Types\Types::JSON, nullable: true)]
|
||||||
private ?array $thirdPartyTypes = [];
|
private ?array $thirdPartyTypes = [];
|
||||||
|
|
||||||
@@ -434,11 +429,6 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
|||||||
return $this->telephone;
|
return $this->telephone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTelephone2(): ?PhoneNumber
|
|
||||||
{
|
|
||||||
return $this->telephone2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get type.
|
* Get type.
|
||||||
*/
|
*/
|
||||||
@@ -722,13 +712,6 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTelephone2(?PhoneNumber $telephone2 = null): self
|
|
||||||
{
|
|
||||||
$this->telephone2 = $telephone2;
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set type.
|
* Set type.
|
||||||
*
|
*
|
||||||
|
@@ -59,10 +59,6 @@ class ThirdPartyType extends AbstractType
|
|||||||
'label' => 'Phonenumber',
|
'label' => 'Phonenumber',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
])
|
])
|
||||||
->add('telephone2', ChillPhoneNumberType::class, [
|
|
||||||
'label' => 'telephone2',
|
|
||||||
'required' => false,
|
|
||||||
])
|
|
||||||
->add('email', EmailType::class, [
|
->add('email', EmailType::class, [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
])
|
])
|
||||||
|
@@ -42,7 +42,6 @@ class ThirdPartyRepository implements ObjectRepository
|
|||||||
parent.name AS name,
|
parent.name AS name,
|
||||||
parent.profession AS profession,
|
parent.profession AS profession,
|
||||||
parent.telephone AS telephone,
|
parent.telephone AS telephone,
|
||||||
parent.telephone2 AS telephone2,
|
|
||||||
parent.email AS email,
|
parent.email AS email,
|
||||||
CONCAT_WS(' ', parent_address.street, parent_address.streetnumber, parent_postal.code, parent_postal.label) AS address,
|
CONCAT_WS(' ', parent_address.street, parent_address.streetnumber, parent_postal.code, parent_postal.label) AS address,
|
||||||
parent.comment AS comment,
|
parent.comment AS comment,
|
||||||
@@ -56,7 +55,6 @@ class ThirdPartyRepository implements ObjectRepository
|
|||||||
contact.name AS contact_name,
|
contact.name AS contact_name,
|
||||||
contact.firstname AS contact_firstname,
|
contact.firstname AS contact_firstname,
|
||||||
contact.telephone AS contact_phone,
|
contact.telephone AS contact_phone,
|
||||||
contact.telephone2 AS contact_phone2,
|
|
||||||
contact.email AS contact_email,
|
contact.email AS contact_email,
|
||||||
contact.profession AS contact_profession,
|
contact.profession AS contact_profession,
|
||||||
CONCAT_WS(' ', contact_address.street, contact_address.streetnumber, contact_postal.code, contact_postal.label) AS contact_address
|
CONCAT_WS(' ', contact_address.street, contact_address.streetnumber, contact_postal.code, contact_postal.label) AS contact_address
|
||||||
|
@@ -91,18 +91,6 @@
|
|||||||
}}</a
|
}}</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="thirdparty.telephone2">
|
|
||||||
<i class="fa fa-li fa-mobile" />
|
|
||||||
<a
|
|
||||||
:href="
|
|
||||||
'tel: ' +
|
|
||||||
thirdparty.telephone2
|
|
||||||
"
|
|
||||||
>{{
|
|
||||||
thirdparty.telephone2
|
|
||||||
}}</a
|
|
||||||
>
|
|
||||||
</li>
|
|
||||||
<li v-if="thirdparty.email">
|
<li v-if="thirdparty.email">
|
||||||
<i
|
<i
|
||||||
class="fa fa-li fa-envelope-o"
|
class="fa fa-li fa-envelope-o"
|
||||||
@@ -133,12 +121,6 @@
|
|||||||
thirdparty.telephone
|
thirdparty.telephone
|
||||||
}}</a>
|
}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="thirdparty.telephone2">
|
|
||||||
<i class="fa fa-li fa-mobile" />
|
|
||||||
<a :href="'tel: ' + thirdparty.telephone2"
|
|
||||||
>{{ thirdparty.telephone2 }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li v-if="thirdparty.email">
|
<li v-if="thirdparty.email">
|
||||||
<i class="fa fa-li fa-envelope-o" />
|
<i class="fa fa-li fa-envelope-o" />
|
||||||
<a :href="'mailto: ' + thirdparty.email">{{
|
<a :href="'mailto: ' + thirdparty.email">{{
|
||||||
|
@@ -223,19 +223,6 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group mb-3">
|
|
||||||
<span class="input-group-text" id="phonenumber2"
|
|
||||||
><i class="fa fa-fw fa-phone"
|
|
||||||
/></span>
|
|
||||||
<input
|
|
||||||
class="form-control form-control-lg"
|
|
||||||
v-model="thirdparty.telephone2"
|
|
||||||
:placeholder="$t('thirdparty.phonenumber2')"
|
|
||||||
:aria-label="$t('thirdparty.phonenumber2')"
|
|
||||||
aria-describedby="phonenumber2"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="parent">
|
<div v-if="parent">
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<span class="input-group-text" id="comment"
|
<span class="input-group-text" id="comment"
|
||||||
@@ -276,7 +263,6 @@ export default {
|
|||||||
firstname: "",
|
firstname: "",
|
||||||
name: "",
|
name: "",
|
||||||
telephone: "",
|
telephone: "",
|
||||||
telephone2: "",
|
|
||||||
civility: null,
|
civility: null,
|
||||||
profession: "",
|
profession: "",
|
||||||
},
|
},
|
||||||
@@ -382,11 +368,9 @@ export default {
|
|||||||
addQueryItem(field, queryItem) {
|
addQueryItem(field, queryItem) {
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case "name":
|
case "name":
|
||||||
if (this.thirdparty.name) {
|
this.thirdparty.name
|
||||||
this.thirdparty.name += ` ${queryItem}`;
|
? (this.thirdparty.name += ` ${queryItem}`)
|
||||||
} else {
|
: (this.thirdparty.name = queryItem);
|
||||||
this.thirdparty.name = queryItem;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case "firstName":
|
case "firstName":
|
||||||
this.thirdparty.firstname = queryItem;
|
this.thirdparty.firstname = queryItem;
|
||||||
|
@@ -6,7 +6,6 @@ const thirdpartyMessages = {
|
|||||||
name: "Dénomination",
|
name: "Dénomination",
|
||||||
email: "Courriel",
|
email: "Courriel",
|
||||||
phonenumber: "Téléphone",
|
phonenumber: "Téléphone",
|
||||||
phonenumber2: "Autre numéro de téléphone",
|
|
||||||
comment: "Commentaire",
|
comment: "Commentaire",
|
||||||
profession: "Qualité",
|
profession: "Qualité",
|
||||||
civility: "Civilité",
|
civility: "Civilité",
|
||||||
|
@@ -115,10 +115,6 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if thirdparty.telephone2 is not null %}
|
|
||||||
{% if thirdparty.telephone is not null %}, {% endif %}
|
|
||||||
<a href="{{ 'tel:' ~ thirdparty.telephone2|phone_number_format('E164') }}">{{ thirdparty.telephone2|chill_format_phonenumber }}</a>
|
|
||||||
{% endif %}
|
|
||||||
</li>
|
</li>
|
||||||
<li><i class="fa fa-li fa-envelope-o"></i>
|
<li><i class="fa fa-li fa-envelope-o"></i>
|
||||||
<a href="{{ 'mailto:' ~ thirdparty.email }}">
|
<a href="{{ 'mailto:' ~ thirdparty.email }}">
|
||||||
@@ -139,14 +135,8 @@
|
|||||||
}) }}
|
}) }}
|
||||||
</li>
|
</li>
|
||||||
<li><i class="fa fa-li fa-phone"></i>
|
<li><i class="fa fa-li fa-phone"></i>
|
||||||
{% if thirdparty.telephone or thirdparty.telephone2 %}
|
{% if thirdparty.telephone %}
|
||||||
{% if thirdparty.telephone is not null %}
|
<a href="{{ 'tel:' ~ thirdparty.telephone|phone_number_format('E164') }}">{{ thirdparty.telephone|chill_format_phonenumber }}</a>
|
||||||
<a href="{{ 'tel:' ~ thirdparty.telephone|phone_number_format('E164') }}">{{ thirdparty.telephone|chill_format_phonenumber }}</a>
|
|
||||||
{% endif %}
|
|
||||||
{% if thirdparty.telephone2 is not null %}
|
|
||||||
{% if thirdparty.telephone is not null %}, {% endif %}
|
|
||||||
<a href="{{ 'tel:' ~ thirdparty.telephone2|phone_number_format('E164') }}">{{ thirdparty.telephone2|chill_format_phonenumber }}</a>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
{{ form_row(form.typesAndCategories) }}
|
{{ form_row(form.typesAndCategories) }}
|
||||||
|
|
||||||
{{ form_row(form.telephone) }}
|
{{ form_row(form.telephone) }}
|
||||||
{{ form_row(form.telephone2) }}
|
|
||||||
{{ form_row(form.email) }}
|
{{ form_row(form.email) }}
|
||||||
|
|
||||||
{% if form.contactDataAnonymous is defined %}
|
{% if form.contactDataAnonymous is defined %}
|
||||||
|
@@ -24,24 +24,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6 mb-3">
|
<div class="form-group col-md-5 mb-3">
|
||||||
{{ form_widget(form.telephone) }}
|
{{ form_widget(form.telephone) }}
|
||||||
{{ form_errors(form.telephone) }}
|
{{ form_errors(form.telephone) }}
|
||||||
{{ form_label(form.telephone) }}
|
{{ form_label(form.telephone) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6 mb-3">
|
<div class="form-group col-md-5 mb-3">
|
||||||
{{ form_widget(form.telephone2) }}
|
|
||||||
{{ form_errors(form.telephone2) }}
|
|
||||||
{{ form_label(form.telephone2) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-md-6 mb-3">
|
|
||||||
{{ form_widget(form.email) }}
|
{{ form_widget(form.email) }}
|
||||||
{{ form_errors(form.email) }}
|
{{ form_errors(form.email) }}
|
||||||
{{ form_label(form.email) }}
|
{{ form_label(form.email) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6 mb-3">
|
<div class="form-group col-md-2 mb-3">
|
||||||
{{ form_widget(form.contactDataAnonymous) }}
|
{{ form_widget(form.contactDataAnonymous) }}
|
||||||
{{ form_label(form.contactDataAnonymous) }}
|
{{ form_label(form.contactDataAnonymous) }}
|
||||||
{{ form_errors(form.contactDataAnonymous) }}
|
{{ form_errors(form.contactDataAnonymous) }}
|
||||||
|
@@ -76,18 +76,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
<dt>{{ 'Phonenumber2'|trans }}</dt>
|
|
||||||
<dd>
|
|
||||||
{% if thirdParty.telephone2 == null %}
|
|
||||||
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
|
||||||
{% else %}
|
|
||||||
<a href="{{ 'tel:' ~ thirdParty.telephone2|phone_number_format('E164') }}">
|
|
||||||
{{ thirdParty.telephone2|chill_format_phonenumber }}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>{{ 'email'|trans }}<dt>
|
<dt>{{ 'email'|trans }}<dt>
|
||||||
<dd>
|
<dd>
|
||||||
{% if thirdParty.email == null %}
|
{% if thirdParty.email == null %}
|
||||||
|
@@ -55,7 +55,6 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
|
|||||||
'profession' => $this->normalizer->normalize($thirdParty->getProfession(), $format, $context),
|
'profession' => $this->normalizer->normalize($thirdParty->getProfession(), $format, $context),
|
||||||
'address' => $this->normalizer->normalize($thirdParty->getAddress(), $format, ['address_rendering' => 'short']),
|
'address' => $this->normalizer->normalize($thirdParty->getAddress(), $format, ['address_rendering' => 'short']),
|
||||||
'telephone' => $this->normalizer->normalize($thirdParty->getTelephone(), $format, $context),
|
'telephone' => $this->normalizer->normalize($thirdParty->getTelephone(), $format, $context),
|
||||||
'telephone2' => $this->normalizer->normalize($thirdParty->getTelephone2(), $format, $context),
|
|
||||||
'email' => $thirdParty->getEmail(),
|
'email' => $thirdParty->getEmail(),
|
||||||
'isChild' => $thirdParty->isChild(),
|
'isChild' => $thirdParty->isChild(),
|
||||||
'parent' => $this->normalizer->normalize($thirdParty->getParent(), $format, $context),
|
'parent' => $this->normalizer->normalize($thirdParty->getParent(), $format, $context),
|
||||||
|
@@ -28,8 +28,6 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
telephone:
|
telephone:
|
||||||
type: string
|
type: string
|
||||||
telephone2:
|
|
||||||
type: string
|
|
||||||
address:
|
address:
|
||||||
$ref: "#/components/schemas/Address"
|
$ref: "#/components/schemas/Address"
|
||||||
Address:
|
Address:
|
||||||
|
@@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Chill is a software for social workers
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Chill\Migrations\ThirdParty;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Doctrine\Migrations\AbstractMigration;
|
|
||||||
|
|
||||||
final class Version20250325085950 extends AbstractMigration
|
|
||||||
{
|
|
||||||
public function getDescription(): string
|
|
||||||
{
|
|
||||||
return 'Add a second telephone number to ThirdParty';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
$this->addSql('ALTER TABLE chill_3party.third_party ADD telephone2 VARCHAR(35) DEFAULT NULL');
|
|
||||||
$this->addSql('COMMENT ON COLUMN chill_3party.third_party.telephone2 IS \'(DC2Type:phone_number)\'');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
$this->addSql('ALTER TABLE chill_3party.third_party DROP telephone2');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -4,7 +4,6 @@ third parties: tiers
|
|||||||
firstname: Prénom
|
firstname: Prénom
|
||||||
name: Nom
|
name: Nom
|
||||||
telephone: Téléphone
|
telephone: Téléphone
|
||||||
telephone2: Autre numéro de téléphone
|
|
||||||
adress: Adresse
|
adress: Adresse
|
||||||
email: Courriel
|
email: Courriel
|
||||||
comment: Commentaire
|
comment: Commentaire
|
||||||
@@ -40,7 +39,7 @@ thirdparty.A contact: Une personne physique
|
|||||||
thirdparty.contact: Personne physique
|
thirdparty.contact: Personne physique
|
||||||
thirdparty.Contact of: Contact de
|
thirdparty.Contact of: Contact de
|
||||||
thirdparty.a_company_explanation: >-
|
thirdparty.a_company_explanation: >-
|
||||||
Les personnes morales peuvent compter un ou plusieurs contacts, interne à l'institution. Il est également possible de
|
Les personnes morales peuvent compter un ou plusieurs contacts, interne à l'instution. Il est également possible de
|
||||||
leur associer un acronyme, et le nom d'un service.
|
leur associer un acronyme, et le nom d'un service.
|
||||||
thirdparty.a_contact_explanation: >-
|
thirdparty.a_contact_explanation: >-
|
||||||
Les personnes physiques ne disposent pas d'acronyme, de service, ou de contacts sous-jacents. Il est possible de leur
|
Les personnes physiques ne disposent pas d'acronyme, de service, ou de contacts sous-jacents. Il est possible de leur
|
||||||
@@ -150,8 +149,6 @@ Contact id: Identifiant du contact
|
|||||||
Contact name: Nom du contact
|
Contact name: Nom du contact
|
||||||
Contact firstname: Prénom du contact
|
Contact firstname: Prénom du contact
|
||||||
Contact phone: Téléphone du contact
|
Contact phone: Téléphone du contact
|
||||||
Contact phone2: Autre téléphone du contact
|
|
||||||
Telephone2: Autre téléphone
|
|
||||||
Contact email: Courrier électronique du contact
|
Contact email: Courrier électronique du contact
|
||||||
Contact address: Adresse du contact
|
Contact address: Adresse du contact
|
||||||
Contact profession: Profession du contact
|
Contact profession: Profession du contact
|
||||||
|
Reference in New Issue
Block a user