From 024d69e367a5d214ff92aa27d5dc035c0103eacc Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 29 Oct 2025 16:23:54 +0000 Subject: [PATCH] versao 12 --- macro_area_form.php | 4 +++- macro_areas.php | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/macro_area_form.php b/macro_area_form.php index 786751c..5c0399b 100644 --- a/macro_area_form.php +++ b/macro_area_form.php @@ -46,12 +46,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Update $stmt = $pdo->prepare('UPDATE macro_areas SET nome = ?, slug = ?, descricao = ?, ativo = ? WHERE id = ?'); $stmt->execute([$nome, $slug, $descricao, $ativo, $id]); + $redirect_id = $id; } else { // Create $stmt = $pdo->prepare('INSERT INTO macro_areas (nome, slug, descricao, ativo, user_id) VALUES (?, ?, ?, ?, ?)'); $stmt->execute([$nome, $slug, $descricao, $ativo, $_SESSION['user_id'] ?? 1]); + $redirect_id = $pdo->lastInsertId(); } - header("Location: macro_areas.php"); + header("Location: macro_area_form.php"); exit; } } diff --git a/macro_areas.php b/macro_areas.php index 34edd98..359737f 100644 --- a/macro_areas.php +++ b/macro_areas.php @@ -47,13 +47,13 @@ $macro_areas = $stmt->fetchAll(PDO::FETCH_ASSOC);
- +
- + @@ -133,8 +133,8 @@ document.addEventListener('DOMContentLoaded', function () { border-left: 0; } .btn-sm i[data-lucide] { - width: 16px; - height: 16px; + width: 13px; + height: 13px; } /* Custom styles for status badges */ .badge-status-ativo {
Nome Descrição StatusAçõesAções