uprava API metody update aby bolo mozne aktualizovat len to co je potrebne,

pridany page pre Report,
zobrazenie info o reporte s dynamickou editaciou nadpisu a popisu
This commit is contained in:
2025-05-04 23:31:13 +02:00
parent 58a7444da2
commit 745f6495d1
9 changed files with 145 additions and 29 deletions

View File

@ -151,15 +151,9 @@ function reportAdd($title, $description, $status = 0, $group = null, $priority =
return $db->id();
}
function reportUpdate($report_id, $title, $description, $status = 0, $group = null, $priority = 0) {
function reportUpdate($report_id, $report_data) {
global $db;
$stm = $db->update('reports', [
'report_title' => $title,
'report_description' => $description,
'report_status' => $status,
'report_group' => $group,
'report_priority' => $priority,
], [
$stm = $db->update('reports', $report_data, [
'report_id' => $report_id
]);
return ($stm->rowCount() > 0);