mivita/resources/views/user/team/firstlines.blade.php
Kevin 03416b0afe Audit 18.09.: Zahlungsdatum nur bei Zahlung, Neupartner-IDs im Snapshot, Pausenende folgt dem Termin
F1: partner_paid_at wird beim Rechnungskauf (paymentStatusPaidAction mit
paid=false) nicht mehr gesetzt, sondern erst bei der Rechnungszahlung; der
Backfill nimmt das Aktivierungsdatum nur noch ohne jede
Registrierungsbestellung (offene Rechnung bleibt leer).
F2: Snapshots speichern je Linie new_partner_ids, die Neupartner-Liste zeigt
genau diese; aeltere Snapshots ohne IDs rechnen mit der damaligen Regel
(Registrierungsmonat, scopeNewPartnerInByActiveDate), damit Kachel und Liste
uebereinstimmen. Keine Payload-Versionsaenderung, kein Neuaufbau noetig.
F3: Liefertag-/Termin-Aenderung waehrend einer Pause zieht paused_until mit;
eine Ausfuehrung loescht auch den paused_by_*-Grund.
F4: expiredCount der Firstlines-Seite (Controller, View, Sprachen) zum bereits
committeten Test nachgezogen.
F5: Backfills schreiben ohne updated_at (toBase()->update, timestamps=false).
Kuendigungsbestaetigung abo_cancel_confirm wird im Selfservice serverseitig
verlangt. AboStatusExplainer laedt die Historie je Abo und Aktion nur einmal.

Stellungnahme und Deploy-Folgen im Audit-Dokument, Regressionstests je Befund.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 08:59:45 +00:00

79 lines
4.3 KiB
PHP

@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100">
<div>{{ __('team.firstlines') }}</div>
</h4>
<div class="card mb-4">
<div class="card-header">
<div class="row align-items-center">
<div class="col-md-8">
<span class="font-weight-bold">{{ __('team.firstlines') }}
({{ __('team.firstlines_count_split', ['active' => $activeCount, 'total' => count($rows)]) }}@if ($expiredCount > 0), {{ __('team.firstlines_count_expired', ['count' => $expiredCount]) }}@endif)</span>
<div class="text-muted small">{{ __('team.firstlines_copy') }}</div>
</div>
<div class="col-md-4 mt-2 mt-md-0">
{!! Form::open([
'url' => route('user_team_firstlines'),
'method' => 'GET',
'class' => 'form-inline justify-content-md-end',
]) !!}
{!! Form::select('month', $filterMonths, (int) $selectedMonth, ['class' => 'form-control custom-select form-control-sm mr-2', 'onchange' => 'this.form.submit()']) !!}
{!! Form::select('year', array_combine($filterYears, $filterYears), (int) $selectedYear, ['class' => 'form-control custom-select form-control-sm', 'onchange' => 'this.form.submit()']) !!}
<noscript><button type="submit" class="btn btn-sm btn-secondary ml-2">{{ __('abo.filter') }}</button></noscript>
{!! Form::close() !!}
</div>
</div>
</div>
@if (count($rows) === 0)
<div class="card-body">
<p class="text-muted mb-0">{{ __('team.firstlines_none') }}</p>
</div>
@else
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead>
<tr class="text-muted small">
<th>{{ __('tables.adviser') }}</th>
<th>{{ __('team.career_level') }}</th>
<th class="text-right">{{ __('team.firstlines_points') }}</th>
<th>{{ __('tables.phone') }}</th>
<th>{{ __('tables.email') }}</th>
<th>{{ __('team.active_since') }}</th>
</tr>
</thead>
<tbody>
@foreach ($rows as $row)
<tr>
<td>
<div class="font-weight-semibold">{{ $row['name'] }}</div>
@unless ($row['is_active_account'])
<span class="badge badge-outline-danger">{{ __('team.account_inactive') }}</span>
@endunless
</td>
<td class="align-middle small text-muted">{{ $row['career_level'] }}</td>
<td class="align-middle text-right font-weight-bold">
{{ \App\Services\Util::formatNumber($row['total_points']) }}
</td>
<td class="align-middle">
@if ($row['phone'] !== '')
<a href="tel:{{ $row['phone'] }}">{{ $row['phone'] }}</a>
@else
<span class="text-muted">-</span>
@endif
</td>
<td class="align-middle">
<a href="mailto:{{ $row['email'] }}">{{ $row['email'] }}</a>
</td>
<td class="align-middle small text-muted">
{{ $row['active_since'] ? formatDate($row['active_since']) : '-' }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>
@endsection