OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
34
app/Domain/Reports/Templates/partials/statusPill.blade.php
Normal file
34
app/Domain/Reports/Templates/partials/statusPill.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
{{--
|
||||
Colored project status pill (green/yellow/red from the latest status update).
|
||||
|
||||
Expects:
|
||||
$status: string|null - green|yellow|red (null = no update yet)
|
||||
$date: \Carbon\CarbonImmutable|null - when the status was posted (optional)
|
||||
--}}
|
||||
@php
|
||||
$pillColors = [
|
||||
'green' => 'var(--green)',
|
||||
'yellow' => 'var(--yellow)',
|
||||
'red' => 'var(--red)',
|
||||
];
|
||||
$pillLabels = [
|
||||
'green' => __('label.status_on_track'),
|
||||
'yellow' => __('label.status_at_risk'),
|
||||
'red' => __('label.status_off_track'),
|
||||
];
|
||||
@endphp
|
||||
|
||||
@if (!empty($status) && isset($pillColors[$status]))
|
||||
<span class="reportStatusPill tw-text-sm">
|
||||
<span class="statusDot" style="background:{{ $pillColors[$status] }};"></span>
|
||||
{{ $pillLabels[$status] }}
|
||||
@if (!empty($date))
|
||||
<span class="tw-opacity-60">· {{ $date->formatDateForUser() }}</span>
|
||||
@endif
|
||||
</span>
|
||||
@else
|
||||
<span class="reportStatusPill tw-text-sm tw-opacity-60">
|
||||
<span class="statusDot" style="background:var(--grey);"></span>
|
||||
{{ __('label.status_no_update') }}
|
||||
</span>
|
||||
@endif
|
||||
Reference in New Issue
Block a user