fix(machine) : add addConstructeur/removeConstructeur methods + fix fournisseur display
API Platform silently ignored the constructeurs field on PATCH because Machine was missing the add/remove methods (unlike Composant, Piece, Product). Also fixes the read-only fournisseur display overflow in MachineInfoCard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Submodule Inventory_frontend updated: b0124c11ba...5c31045e83
@@ -210,6 +210,22 @@ class Machine
|
|||||||
return $this->constructeurs;
|
return $this->constructeurs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addConstructeur(Constructeur $constructeur): static
|
||||||
|
{
|
||||||
|
if (!$this->constructeurs->contains($constructeur)) {
|
||||||
|
$this->constructeurs->add($constructeur);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeConstructeur(Constructeur $constructeur): static
|
||||||
|
{
|
||||||
|
$this->constructeurs->removeElement($constructeur);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Collection<int, MachineComponentLink>
|
* @return Collection<int, MachineComponentLink>
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user