feat : ajout de la gestion des heures chauffeurs
All checks were successful
Auto Tag Develop / tag (push) Successful in 8s
All checks were successful
Auto Tag Develop / tag (push) Successful in 8s
This commit is contained in:
@@ -88,6 +88,9 @@ class Employee
|
||||
#[Groups(['employee:write'])]
|
||||
private ?string $contractComment = null;
|
||||
|
||||
#[Groups(['employee:write'])]
|
||||
private ?bool $isDriverInput = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->createdAt = new DateTimeImmutable();
|
||||
@@ -245,6 +248,24 @@ class Employee
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getIsDriverInput(): ?bool
|
||||
{
|
||||
return $this->isDriverInput;
|
||||
}
|
||||
|
||||
public function setIsDriverInput(?bool $isDriverInput): self
|
||||
{
|
||||
$this->isDriverInput = $isDriverInput;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
#[Groups(['employee:read'])]
|
||||
public function getIsDriver(): bool
|
||||
{
|
||||
return $this->resolveCurrentContractPeriod()?->getIsDriver() ?? false;
|
||||
}
|
||||
|
||||
#[Groups(['employee:read'])]
|
||||
public function getCurrentContractNature(): string
|
||||
{
|
||||
@@ -329,6 +350,7 @@ class Employee
|
||||
comment: $period->getComment(),
|
||||
periodId: $period->getId(),
|
||||
suspensions: $suspensionData,
|
||||
isDriver: $period->getIsDriver(),
|
||||
);
|
||||
},
|
||||
$periods
|
||||
|
||||
@@ -39,6 +39,9 @@ class EmployeeContractPeriod
|
||||
#[ORM\Column(type: 'string', length: 20, options: ['default' => ContractNature::CDI->value])]
|
||||
private string $contractNature = ContractNature::CDI->value;
|
||||
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => false])]
|
||||
private bool $isDriver = false;
|
||||
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => false])]
|
||||
private bool $paidLeaveSettled = false;
|
||||
|
||||
@@ -137,6 +140,18 @@ class EmployeeContractPeriod
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
||||
public function getIsDriver(): bool
|
||||
{
|
||||
return $this->isDriver;
|
||||
}
|
||||
|
||||
public function setIsDriver(bool $isDriver): self
|
||||
{
|
||||
$this->isDriver = $isDriver;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isPaidLeaveSettled(): bool
|
||||
{
|
||||
return $this->paidLeaveSettled;
|
||||
|
||||
@@ -99,6 +99,26 @@ class WorkHour
|
||||
#[Groups(['work_hour:read'])]
|
||||
private bool $isPresentAfternoon = false;
|
||||
|
||||
#[ORM\Column(type: 'integer', nullable: true)]
|
||||
#[Groups(['work_hour:read'])]
|
||||
private ?int $dayHoursMinutes = null;
|
||||
|
||||
#[ORM\Column(type: 'integer', nullable: true)]
|
||||
#[Groups(['work_hour:read'])]
|
||||
private ?int $nightHoursMinutes = null;
|
||||
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => false])]
|
||||
#[Groups(['work_hour:read'])]
|
||||
private bool $hasBreakfast = false;
|
||||
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => false])]
|
||||
#[Groups(['work_hour:read'])]
|
||||
private bool $hasLunch = false;
|
||||
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => false])]
|
||||
#[Groups(['work_hour:read'])]
|
||||
private bool $hasOvernight = false;
|
||||
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => false])]
|
||||
#[Groups(['work_hour:read', 'work_hour:validate'])]
|
||||
private bool $isValid = false;
|
||||
@@ -212,6 +232,66 @@ class WorkHour
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDayHoursMinutes(): ?int
|
||||
{
|
||||
return $this->dayHoursMinutes;
|
||||
}
|
||||
|
||||
public function setDayHoursMinutes(?int $dayHoursMinutes): self
|
||||
{
|
||||
$this->dayHoursMinutes = $dayHoursMinutes;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getNightHoursMinutes(): ?int
|
||||
{
|
||||
return $this->nightHoursMinutes;
|
||||
}
|
||||
|
||||
public function setNightHoursMinutes(?int $nightHoursMinutes): self
|
||||
{
|
||||
$this->nightHoursMinutes = $nightHoursMinutes;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getHasBreakfast(): bool
|
||||
{
|
||||
return $this->hasBreakfast;
|
||||
}
|
||||
|
||||
public function setHasBreakfast(bool $hasBreakfast): self
|
||||
{
|
||||
$this->hasBreakfast = $hasBreakfast;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getHasLunch(): bool
|
||||
{
|
||||
return $this->hasLunch;
|
||||
}
|
||||
|
||||
public function setHasLunch(bool $hasLunch): self
|
||||
{
|
||||
$this->hasLunch = $hasLunch;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getHasOvernight(): bool
|
||||
{
|
||||
return $this->hasOvernight;
|
||||
}
|
||||
|
||||
public function setHasOvernight(bool $hasOvernight): self
|
||||
{
|
||||
$this->hasOvernight = $hasOvernight;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isPresentMorning(): bool
|
||||
{
|
||||
return $this->isPresentMorning;
|
||||
|
||||
Reference in New Issue
Block a user