feat: show sla tracking only for active sla clients

This commit is contained in:
Marco0300
2026-09-02 00:53:02 +02:00
parent 9f149c61be
commit 82ccbc4d54
2 changed files with 6 additions and 2 deletions
+2
View File
@@ -24,6 +24,8 @@ jobcard_feature_assert(str_contains($front, '$reportClientsStmt->execute([(int)$
foreach (['Technician notes / Work performed', 'totalReportHours'] as $heading) jobcard_feature_assert(str_contains($front, $heading), "Detailed report must include {$heading}.");
jobcard_feature_assert(!str_contains($front, 'name=\"technician_notes\"') && !str_contains($front, 'Hours notes'), 'Jobcards must use time-entry technician notes only.');
jobcard_feature_assert(str_contains($front, 'remaining_hours') && str_contains($front, 'SLA hours remaining'), 'Client pages must show remaining SLA hours.');
jobcard_feature_assert(str_contains($front, '$hasClientSla ?') && str_contains($front, "'counts_toward_sla' => \$hasClientSla &&"), 'SLA checkbox and submitted flag must be conditional on an active client SLA.');
jobcard_feature_assert(str_contains($front, 'j.client_id = :client') && str_contains($front, 'te.counts_toward_sla = 1'), 'Client SLA usage must aggregate active-period SLA time entries regardless of jobcard status.');
jobcard_feature_assert(str_contains($front, "['TOTAL HOURS'") && str_contains($front, 'totalReportHours'), 'Detailed report downloads must include total hours.');
jobcard_feature_assert(str_contains($front, "if (\$route === 'settings')") && str_contains($front, "role_name'] ?? '') !== 'Administrator'"), 'Branding settings must be Administrator-only.');