fix(helpdesk): reset card margin-bottom and tighten risk level thresholds

- margin-bottom: 0 on cards to override article shell default
- Level thresholds stricter: high >= 55 (was 70), medium >= 25 (was 40)
  so fewer customers appear as 'low risk' and issues surface earlier

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 00:55:41 +02:00
parent 4dfe98f40a
commit 97dbc7f57b
3 changed files with 5 additions and 4 deletions

View File

@@ -15,8 +15,8 @@ final class RiskRadarService
private const W_INACTIVITY = 10; private const W_INACTIVITY = 10;
// --- Level thresholds --- // --- Level thresholds ---
private const LEVEL_HIGH = 70; private const LEVEL_HIGH = 55;
private const LEVEL_MEDIUM = 40; private const LEVEL_MEDIUM = 25;
private const CLOSED_STATES = ['Erledigt', 'Resolved', 'Closed', 'Geschlossen']; private const CLOSED_STATES = ['Erledigt', 'Resolved', 'Closed', 'Geschlossen'];

View File

@@ -86,7 +86,7 @@ class RiskRadarServiceTest extends TestCase
$result = RiskRadarService::buildRiskRadar($tickets, [], 90); $result = RiskRadarService::buildRiskRadar($tickets, [], 90);
$this->assertSame('high', $result['customers'][0]['risk_level']); $this->assertSame('high', $result['customers'][0]['risk_level']);
$this->assertGreaterThanOrEqual(70, $result['customers'][0]['risk_score']); $this->assertGreaterThanOrEqual(55, $result['customers'][0]['risk_score']);
} }
public function testLowRiskLevel(): void public function testLowRiskLevel(): void
@@ -100,7 +100,7 @@ class RiskRadarServiceTest extends TestCase
$result = RiskRadarService::buildRiskRadar($tickets, [], 90); $result = RiskRadarService::buildRiskRadar($tickets, [], 90);
$this->assertSame('low', $result['customers'][0]['risk_level']); $this->assertSame('low', $result['customers'][0]['risk_level']);
$this->assertLessThan(40, $result['customers'][0]['risk_score']); $this->assertLessThan(25, $result['customers'][0]['risk_score']);
} }
public function testSlaOverdueDetection(): void public function testSlaOverdueDetection(): void

View File

@@ -545,6 +545,7 @@
border: 1px solid var(--app-muted-border-color); border: 1px solid var(--app-muted-border-color);
border-radius: var(--app-radius, 0.375rem); border-radius: var(--app-radius, 0.375rem);
padding: calc(var(--app-spacing) * 0.65) calc(var(--app-spacing) * 0.75); padding: calc(var(--app-spacing) * 0.65) calc(var(--app-spacing) * 0.75);
margin-bottom: 0;
transition: border-color 0.15s ease, box-shadow 0.15s ease; transition: border-color 0.15s ease, box-shadow 0.15s ease;
cursor: pointer; cursor: pointer;
} }