feat: 대시보드에 라이선스 만료 요약 및 Lookup 데이터 캐싱 시스템 구현
- License Expiry Summary API 연동 완료 - 30/60/90일 내 만료 예정 라이선스 요약 표시 - 대시보드 상단에 알림 카드로 통합 - 만료 임박 순서로 색상 구분 (빨강/주황/노랑) - Lookup 데이터 전역 캐싱 시스템 구축 - LookupService 및 RemoteDataSource 생성 - 전체 lookup 데이터 일괄 로드 및 캐싱 - 타입별 필터링 지원 - 새로운 모델 추가 - LicenseExpirySummary (Freezed) - LookupData, LookupCategory, LookupItem 모델 - CLAUDE.md 문서 업데이트 - 미사용 API 활용 계획 추가 - 구현 우선순위 정의 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,12 @@ class _OverviewScreenRedesignState extends State<OverviewScreenRedesign> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 라이선스 만료 알림 배너 (조건부 표시)
|
||||
if (controller.hasExpiringLicenses) ...[
|
||||
_buildLicenseExpiryBanner(controller),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
|
||||
// 환영 섹션
|
||||
ShadcnCard(
|
||||
padding: const EdgeInsets.all(32),
|
||||
@@ -375,6 +381,82 @@ class _OverviewScreenRedesignState extends State<OverviewScreenRedesign> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildLicenseExpiryBanner(OverviewController controller) {
|
||||
final summary = controller.licenseExpirySummary;
|
||||
if (summary == null) return const SizedBox.shrink();
|
||||
|
||||
Color bannerColor = ShadcnTheme.warning;
|
||||
String bannerText = '';
|
||||
IconData bannerIcon = Icons.warning_amber_rounded;
|
||||
|
||||
if (summary.expired > 0) {
|
||||
bannerColor = ShadcnTheme.destructive;
|
||||
bannerText = '${summary.expired}개 라이선스 만료';
|
||||
bannerIcon = Icons.error_outline;
|
||||
} else if (summary.within30Days > 0) {
|
||||
bannerColor = ShadcnTheme.warning;
|
||||
bannerText = '${summary.within30Days}개 라이선스 30일 내 만료 예정';
|
||||
bannerIcon = Icons.warning_amber_rounded;
|
||||
} else if (summary.within60Days > 0) {
|
||||
bannerColor = ShadcnTheme.primary;
|
||||
bannerText = '${summary.within60Days}개 라이선스 60일 내 만료 예정';
|
||||
bannerIcon = Icons.info_outline;
|
||||
}
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: bannerColor.withValues(alpha: 0.1),
|
||||
border: Border.all(color: bannerColor.withValues(alpha: 0.3)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(bannerIcon, color: bannerColor, size: 24),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'라이선스 관리 필요',
|
||||
style: ShadcnTheme.bodyMedium.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: bannerColor,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
bannerText,
|
||||
style: ShadcnTheme.bodySmall.copyWith(
|
||||
color: ShadcnTheme.foreground,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
// 라이선스 목록 페이지로 이동
|
||||
Navigator.pushNamed(context, '/licenses');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
'상세 보기',
|
||||
style: TextStyle(color: bannerColor),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Icon(Icons.arrow_forward, color: bannerColor, size: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatCard(
|
||||
String title,
|
||||
String value,
|
||||
|
||||
Reference in New Issue
Block a user