From 88cc225e4d9c72ec55c7f38009074f4663a60eb2 Mon Sep 17 00:00:00 2001 From: igor Date: Mon, 5 May 2025 00:06:47 +0200 Subject: [PATCH] fixnute radenie reportov podla priority, pridane podfarbenie pre rozne priority, doplnena skupina do report boxu, odstranene debug tlacitka na dashboard --- lib/functions.inc.php | 2 +- webapp/src/assets/css/style.css | 40 +++++++++++++++++++++++++++-- webapp/src/components/ReportBox.vue | 15 +++++++++-- webapp/src/views/Dashboard.vue | 25 ++++++------------ 4 files changed, 60 insertions(+), 22 deletions(-) diff --git a/lib/functions.inc.php b/lib/functions.inc.php index a5bb514..10e8c25 100644 --- a/lib/functions.inc.php +++ b/lib/functions.inc.php @@ -203,7 +203,7 @@ function reportGetAll($status = null) { global $db; if ($status === null) $status = array(0, 1, 2, 3); return $db->select('reports', '*', [ - 'ORDER' => ['report_priority', 'ordnum'], + 'ORDER' => ['report_priority' => 'DESC', 'ordnum' => 'ASC'], 'report_status' => $status ]); } diff --git a/webapp/src/assets/css/style.css b/webapp/src/assets/css/style.css index 6cdfc06..c20bc08 100644 --- a/webapp/src/assets/css/style.css +++ b/webapp/src/assets/css/style.css @@ -35,6 +35,9 @@ --color-bg0: #0d5eaf; --color-bg1: #449ef8; --color-bg2: #449ef820; + --color-bgGray: #797979; + --color-bgOrange: #af6000; + --color-bgRed: #be0101; --color-text0: #fff; --color-text1: rgb(11, 11, 104); --color-text2: #449ef8; @@ -197,11 +200,20 @@ button:focus-visible, border-right: 5px var(--color-bg0) solid; background-color: var(--color-bg2); } -#dashboard .report .report-date { +#dashboard .report .report-footer { background-color: var(--color-bg1); + border-bottom-right-radius: 5px; + display: flex; + flex-direction: row; + justify-content: space-between; +} +#dashboard .report .report-group { + text-align: left; + padding: 5px; +} +#dashboard .report .report-date { text-align: right; padding: 5px; - border-bottom-right-radius: 5px; } #dashboard .report:hover { filter: brightness(1.2); @@ -213,6 +225,30 @@ button:focus-visible, #dashboard:has(.dragging) .draggable-item:not(.dragging) .report { opacity: 0.4; } +#dashboard .report-priority-0 .report-header { + background-color: var(--color-bgGray); +} +#dashboard .report-priority-0 .report-description { + border-right-color: var(--color-bgGray); +} +#dashboard .report-priority-1 .report-header { + background-color: var(--color-bg0); +} +#dashboard .report-priority-1 .report-description { + border-right-color: var(--color-bg0); +} +#dashboard .report-priority-2 .report-header { + background-color: var(--color-bgOrange); +} +#dashboard .report-priority-2 .report-description { + border-right-color: var(--color-bgOrange); +} +#dashboard .report-priority-3 .report-header { + background-color: var(--color-bgRed); +} +#dashboard .report-priority-3 .report-description { + border-right-color: var(--color-bgRed); +} /* ---------------------------------------------------- 04 - BUG ADD diff --git a/webapp/src/components/ReportBox.vue b/webapp/src/components/ReportBox.vue index e66d229..0910e62 100644 --- a/webapp/src/components/ReportBox.vue +++ b/webapp/src/components/ReportBox.vue @@ -4,10 +4,12 @@ defineProps({ title: String, description: String, date: String, + priority: Number, + group: String, });