Files
sam-manage/resources/views/stats/dashboard/partials/_delta.blade.php
권혁성 5dd580623e feat:통계 대시보드 페이지 신규 구현 (/stats/dashboard)
- 모델 7개: StatSalesDaily, StatFinanceDaily, StatProductionDaily,
  StatInventoryDaily, StatSystemDaily, StatSalesMonthly, StatFinanceMonthly
- DashboardStatService: 요약카드, 7일 추이차트, 알림, 월간요약 데이터
- StatDashboardController: HX-Redirect 패턴 적용
- 뷰: 요약카드 6개 + Chart.js 4개 차트 + 알림/월간요약 하단섹션
- 기존 대시보드 "통계 및 리포트" 바로가기 링크 연결
- 헤더 테넌트 선택 기준 전체/개별 테넌트 필터링 지원

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 14:03:58 +09:00

21 lines
1.1 KiB
PHP

@php
$inverse = $inverse ?? false;
$isPositive = $inverse ? ($value <= 0) : ($value >= 0);
$absValue = abs($value);
@endphp
<div class="flex items-center mt-2 text-xs">
@if($value != 0)
<span class="{{ $isPositive ? 'text-green-600' : 'text-red-600' }} flex items-center">
@if($value > 0)
<svg class="w-3 h-3 mr-0.5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"/></svg>
@else
<svg class="w-3 h-3 mr-0.5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z" clip-rule="evenodd"/></svg>
@endif
{{ number_format($absValue) }}{{ $suffix ?? '' }}
</span>
<span class="text-gray-400 ml-1">전일 대비</span>
@else
<span class="text-gray-400">변동 없음</span>
@endif
</div>