diff --git a/db/migrations/20260915073019_make_pause_reason_nullable.php b/db/migrations/20260915073019_make_pause_reason_nullable.php new file mode 100644 index 00000000..8ecbbece --- /dev/null +++ b/db/migrations/20260915073019_make_pause_reason_nullable.php @@ -0,0 +1,24 @@ +table('production_pauses') + ->changeColumn('reason_id', 'integer', ['null' => true]) + ->update(); + } + + public function down(): void + { + $this->table('production_pauses') + ->changeColumn('reason_id', 'integer', ['null' => false]) + ->update(); + } +} diff --git a/db/migrations/20260915100659_add_stato_da_compilare_dati.php b/db/migrations/20260915100659_add_stato_da_compilare_dati.php new file mode 100644 index 00000000..3f2dad73 --- /dev/null +++ b/db/migrations/20260915100659_add_stato_da_compilare_dati.php @@ -0,0 +1,22 @@ +execute(" + INSERT INTO production_status (id, nome, ordinamento, badge_color, line_color) + VALUES (11, 'Da compilare dati', 48, '#7c3aed', '#ede9fe') + "); + } + + public function down(): void + { + $this->execute("DELETE FROM production_status WHERE id = 11"); + } +} diff --git a/public/userarea/pause_stats.php b/public/userarea/pause_stats.php index 0e0ec27e..2d985c60 100644 --- a/public/userarea/pause_stats.php +++ b/public/userarea/pause_stats.php @@ -286,6 +286,7 @@ if (!empty($_GET['ajax'])) { } .kpi-card { + position: relative; background: #fff; border-radius: 1rem; padding: 1.1rem 1.2rem; @@ -339,6 +340,7 @@ if (!empty($_GET['ajax'])) { } .chart-card { + position: relative; background: #fff; border-radius: 1rem; padding: 1.1rem 1.2rem; @@ -354,6 +356,7 @@ if (!empty($_GET['ajax'])) { color: #1e293b; margin: 0 0 .8rem; font-size: .95rem; + padding-right: 1.8rem; } .chart-wrap { @@ -362,6 +365,7 @@ if (!empty($_GET['ajax'])) { } .table-card { + position: relative; background: #fff; border-radius: 1rem; padding: 1.1rem 1.2rem; @@ -374,6 +378,7 @@ if (!empty($_GET['ajax'])) { font-weight: 700; color: #1e293b; margin: 0 0 .8rem; + padding-right: 1.8rem; } table.stats-table { @@ -442,6 +447,69 @@ if (!empty($_GET['ajax'])) { padding: 3rem; color: #94a3b8; } + + /* --- PULSANTINO "?" INFO --- */ + .info-btn { + position: absolute; + top: .6rem; + right: .6rem; + width: 20px; + height: 20px; + border-radius: 50%; + border: none; + cursor: pointer; + background: #e2e8f0; + color: #475569; + font-size: .72rem; + font-weight: 800; + line-height: 1; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + transition: .15s; + z-index: 5; + } + + .info-btn:hover { + background: #dc2626; + color: #fff; + } + + .info-pop { + position: absolute; + top: 2.1rem; + right: .6rem; + width: 250px; + max-width: 80vw; + background: #0f172a; + color: #f1f5f9; + border-radius: .6rem; + padding: .7rem .8rem; + font-size: .8rem; + line-height: 1.4; + font-weight: 400; + text-transform: none; + letter-spacing: normal; + box-shadow: 0 8px 24px rgba(0, 0, 0, .25); + z-index: 50; + display: none; + } + + .info-pop.show { + display: block; + } + + .info-pop strong { + color: #fff; + } + + .info-pop .info-pop-title { + display: block; + font-weight: 800; + margin-bottom: .25rem; + color: #fff; + } @@ -496,28 +564,34 @@ if (!empty($_GET['ajax'])) {