From ba98ae37f42ae60045e336b60ca90456b466853e Mon Sep 17 00:00:00 2001 From: Matthieu Date: Wed, 11 Feb 2026 16:48:46 +0100 Subject: [PATCH] feat(entity) : auto-capitalize first letter of names on Composant and ModelType Update setName() to use mb_strtoupper on the first character so that category and component names always start with an uppercase letter. Also update frontend submodule with URL state preservation and back button improvements. Co-Authored-By: Claude Opus 4.6 --- Inventory_frontend | 2 +- src/Entity/Composant.php | 2 +- src/Entity/ModelType.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Inventory_frontend b/Inventory_frontend index 185af65..480aaa2 160000 --- a/Inventory_frontend +++ b/Inventory_frontend @@ -1 +1 @@ -Subproject commit 185af655191ed04362b5ab4341da1e5a3a61f151 +Subproject commit 480aaa24b26ea5ba2ca8db5741ff478c6884fcb9 diff --git a/src/Entity/Composant.php b/src/Entity/Composant.php index a069255..2573e15 100644 --- a/src/Entity/Composant.php +++ b/src/Entity/Composant.php @@ -144,7 +144,7 @@ class Composant public function setName(string $name): static { - $this->name = $name; + $this->name = mb_strtoupper(mb_substr($name, 0, 1)).mb_substr($name, 1); return $this; } diff --git a/src/Entity/ModelType.php b/src/Entity/ModelType.php index c0d8f6e..adce939 100644 --- a/src/Entity/ModelType.php +++ b/src/Entity/ModelType.php @@ -180,7 +180,7 @@ class ModelType public function setName(string $name): static { - $this->name = $name; + $this->name = mb_strtoupper(mb_substr($name, 0, 1)).mb_substr($name, 1); return $this; }