mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
information about creation and update displayed on person detail page. Vendee person and mineur still to do
This commit is contained in:
parent
5606b714cd
commit
96b44ede3c
@ -37,7 +37,7 @@ Choose an user: Choisir un utilisateur
|
||||
No value: Aucune information
|
||||
Last updated by: Dernière mise à jour par
|
||||
Last updated on: Dernière mise à jour le
|
||||
on: le
|
||||
on: "le "
|
||||
|
||||
Edit: Modifier
|
||||
Update: Mettre à jour
|
||||
|
@ -50,6 +50,7 @@ use Chill\PersonBundle\Validator\Constraints\Person\Birthdate;
|
||||
use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint;
|
||||
use Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter;
|
||||
use Chill\PersonBundle\Validator\Constraints\Household\HouseholdMembershipSequential;
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Person Class
|
||||
@ -390,19 +391,19 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true, options={"default": NULL})
|
||||
*/
|
||||
private \DateTimeInterface $createdAt;
|
||||
private $createdAt;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity=User::class
|
||||
* )
|
||||
*/
|
||||
private User $updatedBy;
|
||||
private $updatedBy;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true, options={"default": NULL})
|
||||
*/
|
||||
private \DateTimeInterface $updatedAt;
|
||||
private $updatedAt;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
@ -1823,6 +1824,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCreatedAt(): ?DateTimeInterface
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
||||
public function setCreatedAt(\DateTimeInterface $datetime): self
|
||||
{
|
||||
$this->createdAt = $datetime;
|
||||
@ -1830,6 +1836,16 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUpdatedBy(): ?User
|
||||
{
|
||||
return $this->updatedBy;
|
||||
}
|
||||
|
||||
public function getUpdatedAt(): ?DateTimeInterface
|
||||
{
|
||||
return $this->updatedAt;
|
||||
}
|
||||
|
||||
public function setUpdatedBy(User $user): self
|
||||
{
|
||||
$this->updatedBy = $user;
|
||||
|
@ -237,8 +237,13 @@ abbr.referrer { // still used ?
|
||||
align-self: center; // in flex context
|
||||
}
|
||||
|
||||
.updatedBy {
|
||||
.updatedBy, .createdBy {
|
||||
margin-top: 0.3rem;
|
||||
font-size: 0.9rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.created-updated {
|
||||
border: 1px solid black;
|
||||
padding: 10px;
|
||||
}
|
@ -259,6 +259,21 @@ This view should receive those arguments:
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="created-updated">
|
||||
{% if person.createdBy %}
|
||||
<div class="createdBy">
|
||||
{{ 'Created by'|trans}}: <b>{{ person.createdBy|chill_entity_render_box }}</b>,<br>
|
||||
{{ 'on'|trans ~ person.createdAt|format_datetime('long', 'short') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if person.updatedBy %}
|
||||
<div class="updatedBy">
|
||||
{{ 'Last updated by'|trans}}: <b>{{ person.updatedBy|chill_entity_render_box }}</b>,<br>
|
||||
{{ 'on'|trans ~ person.updatedAt|format_datetime('long', 'short') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<ul class="sticky-form-buttons record_actions">
|
||||
<li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user