A first VueJS component, get api datas, a simple button add person

* !! composer require serializer !!
* see: http://localhost:8001/fr/parcours/861/show
This commit is contained in:
2021-04-21 00:10:46 +02:00
parent 69ea88a4d5
commit e7df62b373
12 changed files with 193 additions and 88 deletions

View File

@@ -251,7 +251,7 @@ class AccompanyingPeriod
*
* @return \DateTime
*/
public function getClosingDate()
public function getClosingDate(): ?\DateTime
{
return $this->closingDate;
}
@@ -425,15 +425,17 @@ class AccompanyingPeriod
*
* @return boolean
*/
public function isClosingAfterOpening()
public function isClosingAfterOpening(): bool
{
$diff = $this->getOpeningDate()->diff($this->getClosingDate());
if ($diff->invert === 0) {
return true;
} else {
if (null === $this->getClosingDate()) {
return false;
}
$diff = $this->getOpeningDate()->diff($this->getClosingDate());
if ($diff->invert === 0) {
return true;
}
return false;
}
function getUser(): ?User
@@ -447,8 +449,8 @@ class AccompanyingPeriod
return $this;
}
public function getOrigin(): Origin
public function getOrigin(): ?Origin
{
return $this->origin;
}
@@ -539,8 +541,8 @@ class AccompanyingPeriod
return $this;
}
public function getStep(): string
public function getStep(): ?string
{
return $this->step;
}
@@ -551,8 +553,8 @@ class AccompanyingPeriod
return $this;
}
public function getIntensity(): string
public function getIntensity(): ?string
{
return $this->intensity;
}