From b837def5a0caa056cc2b72d27353e998d3be798b Mon Sep 17 00:00:00 2001 From: andre Date: Fri, 25 Sep 2026 21:45:08 +0100 Subject: [PATCH] refactor(horas): partilhar _form.php entre create e edit (audit 6.8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mesmo padrão de horario/: extrai dia/abertura/fecho para _form.php. create.php formatava open/close sem substr() enquanto edit.php cortava para "HH:MM" com substr(..., 0, 5) por vir de uma coluna TIME da BD; unificado na versão de edit.php (sem efeito em create.php). Co-Authored-By: Claude Sonnet 5 --- views/admin/work_hours/_form.php | 19 +++++++++++++++++++ views/admin/work_hours/create.php | 14 +------------- views/admin/work_hours/edit.php | 14 +------------- 3 files changed, 21 insertions(+), 26 deletions(-) create mode 100644 views/admin/work_hours/_form.php diff --git a/views/admin/work_hours/_form.php b/views/admin/work_hours/_form.php new file mode 100644 index 0000000..4df8dbd --- /dev/null +++ b/views/admin/work_hours/_form.php @@ -0,0 +1,19 @@ + of both create.php +// and edit.php. Expects: +// $data : associative array with every work_hours column (week_day, open, close) +// $dias : week_day value => label map +?> +
+
+
+
+
+
+
+
diff --git a/views/admin/work_hours/create.php b/views/admin/work_hours/create.php index a89c857..ed543f2 100644 --- a/views/admin/work_hours/create.php +++ b/views/admin/work_hours/create.php @@ -36,19 +36,7 @@ include __DIR__ . '/../../../includes/header.php';
-
-
-
-
-
-
-
-
+
Cancelar diff --git a/views/admin/work_hours/edit.php b/views/admin/work_hours/edit.php index 02a66b4..a8c4171 100644 --- a/views/admin/work_hours/edit.php +++ b/views/admin/work_hours/edit.php @@ -46,19 +46,7 @@ include __DIR__ . '/../../../includes/header.php';
-
-
-
-
-
-
-
-
+
Cancelar