This commit is contained in:
Lizandro Guarnizo
2026-05-27 10:30:47 -05:00
parent c9454ac62f
commit 313e57aace
10 changed files with 333 additions and 24 deletions
+6
View File
@@ -87,6 +87,12 @@ try {
// Mapear status a is_active: 'active' -> 1, cualquier otra cosa -> 0
$menuData['is_active'] = (($input['status'] ?? 'active') === 'active') ? 1 : 0;
}
// Guardar tipo de menú (main | no_advisor)
if (in_array('menu_type', $availableColumns)) {
$rawType = $input['menu_type'] ?? 'main';
$menuData['menu_type'] = in_array($rawType, ['main', 'no_advisor'], true) ? $rawType : 'main';
}
if (in_array('order_position', $availableColumns) && !$isUpdate) {
// Solo establecer order_position para menús nuevos