feat(bovine) : page Vie du bovin + tabs réutilisables + parents EDNOTIF
- Nouvelle page /bovine/[id] avec tabs Mouvement / Passeport bovin / Santé - Composant UiTabs partagé, réutilisé sur réception et expédition - Champs père/mère (numéro national + type de race) sur Bovine, alimentés via la sync EDNOTIF - Inventaire : ligne cliquable vers le passeport Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -135,6 +135,24 @@ class Bovine
|
||||
#[Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'])]
|
||||
private ?DateTimeImmutable $exitedAt = null;
|
||||
|
||||
#[ORM\Column(length: 50, nullable: true)]
|
||||
#[Groups(['bovine:read'])]
|
||||
private ?string $motherNationalNumber = null;
|
||||
|
||||
#[ORM\ManyToOne]
|
||||
#[Groups(['bovine:read'])]
|
||||
#[ApiProperty(readableLink: true)]
|
||||
private ?BovineType $motherBovineType = null;
|
||||
|
||||
#[ORM\Column(length: 50, nullable: true)]
|
||||
#[Groups(['bovine:read'])]
|
||||
private ?string $fatherNationalNumber = null;
|
||||
|
||||
#[ORM\ManyToOne]
|
||||
#[Groups(['bovine:read'])]
|
||||
#[ApiProperty(readableLink: true)]
|
||||
private ?BovineType $fatherBovineType = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
@@ -329,6 +347,54 @@ class Bovine
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMotherNationalNumber(): ?string
|
||||
{
|
||||
return $this->motherNationalNumber;
|
||||
}
|
||||
|
||||
public function setMotherNationalNumber(?string $motherNationalNumber): static
|
||||
{
|
||||
$this->motherNationalNumber = $motherNationalNumber;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMotherBovineType(): ?BovineType
|
||||
{
|
||||
return $this->motherBovineType;
|
||||
}
|
||||
|
||||
public function setMotherBovineType(?BovineType $motherBovineType): static
|
||||
{
|
||||
$this->motherBovineType = $motherBovineType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFatherNationalNumber(): ?string
|
||||
{
|
||||
return $this->fatherNationalNumber;
|
||||
}
|
||||
|
||||
public function setFatherNationalNumber(?string $fatherNationalNumber): static
|
||||
{
|
||||
$this->fatherNationalNumber = $fatherNationalNumber;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFatherBovineType(): ?BovineType
|
||||
{
|
||||
return $this->fatherBovineType;
|
||||
}
|
||||
|
||||
public function setFatherBovineType(?BovineType $fatherBovineType): static
|
||||
{
|
||||
$this->fatherBovineType = $fatherBovineType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
#[ORM\PrePersist]
|
||||
#[ORM\PreUpdate]
|
||||
public function refreshAgeMonths(): void
|
||||
|
||||
@@ -99,6 +99,11 @@ final class BovineSyncInventoryProcessor implements ProcessorInterface
|
||||
$bovine->setBovineType($this->resolveBovineType($identification->breedType));
|
||||
$bovine->setWorkNumber($identification->workNumber);
|
||||
$bovine->setBirthDate($identification->birthDate?->date);
|
||||
|
||||
$bovine->setMotherNationalNumber($identification->motherCarrier?->bovin?->nationalNumber);
|
||||
$bovine->setMotherBovineType($this->resolveBovineType($identification->motherCarrier?->breedType));
|
||||
$bovine->setFatherNationalNumber($identification->fatherIpg?->bovin?->nationalNumber);
|
||||
$bovine->setFatherBovineType($this->resolveBovineType($identification->fatherIpg?->breedType));
|
||||
}
|
||||
|
||||
$latestEntry = null;
|
||||
|
||||
Reference in New Issue
Block a user