Compare commits

...

2 Commits

Author SHA1 Message Date
b5d5ce0d8e Actualiser README.md 2026-03-15 07:15:49 +00:00
Matthieu
03e6c2432b 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>
2026-03-10 18:00:09 +01:00
3 changed files with 18 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
# Inventory
# InventoryTEST
Application de gestion d'inventaire industriel pour **Malio**. Gestion complète du parc machines, des pièces, composants, produits, fournisseurs et documents associés, avec traçabilité et contrôle d'accès par rôles.

View File

@@ -210,6 +210,22 @@ class Machine
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>
*/