refactor(api) : remove TypeMachine skeleton system, fix ModelType serialization
- Remove TypeMachine, TypeMachineComponentRequirement, TypeMachinePieceRequirement, TypeMachineProductRequirement entities and related repositories/state processor - Replace MachineSkeletonController with MachineStructureController - Link CustomField directly to Machine instead of TypeMachine - Add migration to drop TypeMachine tables and migrate custom fields to machines - Fix ModelType serialization: Annotation\Groups → Attribute\Groups (Symfony 8 compat) and add product:read, composant:read, piece:read groups for embedded category display - Fix Profile: same Annotation → Attribute import - Fix SearchFilter: partial → ipartial on Comment and Document - Update frontend submodule (remove skeleton pages/components, simplify machine creation) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -137,16 +137,6 @@ final class ModelTypeCategoryConversionService
|
||||
$blockers[] = sprintf('%d pièce(s) liée(s) à des machines.', $machineLinked);
|
||||
}
|
||||
|
||||
// Check type machine requirements
|
||||
$requirementCount = (int) $this->connection->fetchOne(
|
||||
'SELECT COUNT(*) FROM type_machine_piece_requirements WHERE typepieceid = :id',
|
||||
['id' => $modelTypeId],
|
||||
);
|
||||
|
||||
if ($requirementCount > 0) {
|
||||
$blockers[] = sprintf('Utilisé dans %d modèle(s) de type de machine.', $requirementCount);
|
||||
}
|
||||
|
||||
// Check name collision with existing composants
|
||||
$collisions = $this->connection->fetchFirstColumn(
|
||||
'SELECT p.name FROM pieces p
|
||||
@@ -210,16 +200,6 @@ final class ModelTypeCategoryConversionService
|
||||
$blockers[] = sprintf('%d composant(s) lié(s) à des machines.', $machineLinked);
|
||||
}
|
||||
|
||||
// Check type machine requirements
|
||||
$requirementCount = (int) $this->connection->fetchOne(
|
||||
'SELECT COUNT(*) FROM type_machine_component_requirements WHERE typecomposantid = :id',
|
||||
['id' => $modelTypeId],
|
||||
);
|
||||
|
||||
if ($requirementCount > 0) {
|
||||
$blockers[] = sprintf('Utilisé dans %d modèle(s) de type de machine.', $requirementCount);
|
||||
}
|
||||
|
||||
// Check if any composant has pieces or sub-components in structure
|
||||
$withStructure = $this->connection->fetchAllAssociative(
|
||||
'SELECT name, structure FROM composants WHERE typecomposantid = :id AND structure IS NOT NULL',
|
||||
|
||||
Reference in New Issue
Block a user