사용하지 않는 파일 정리 전 백업 (Phase 10 완료 후 상태)
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:superport/utils/constants.dart';
|
||||
import 'package:superport/data/models/dashboard/overview_stats.dart';
|
||||
import 'package:superport/screens/common/components/shadcn_components.dart';
|
||||
import 'package:superport/screens/common/theme_shadcn.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
|
||||
/// 대시보드 통계 카드 그리드
|
||||
class StatisticsCardGrid extends StatelessWidget {
|
||||
@@ -120,57 +121,49 @@ class StatisticsCardGrid extends StatelessWidget {
|
||||
Color color,
|
||||
String? route,
|
||||
) {
|
||||
return ShadcnCard(
|
||||
padding: EdgeInsets.zero,
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: InkWell(
|
||||
onTap: route != null ? () => _navigateToRoute(context, route) : null,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
return GestureDetector(
|
||||
onTap: route != null ? () => _navigateToRoute(context, route) : null,
|
||||
child: ShadcnCard(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
color: color,
|
||||
size: 24,
|
||||
),
|
||||
if (route != null)
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 12,
|
||||
color: ShadcnTheme.muted,
|
||||
),
|
||||
],
|
||||
Icon(
|
||||
icon,
|
||||
color: color,
|
||||
size: 24,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
value,
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: ShadcnTheme.foreground,
|
||||
if (route != null)
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 12,
|
||||
color: ShadcnTheme.muted,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: ShadcnTheme.mutedForeground,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
value,
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: ShadcnTheme.foreground,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: ShadcnTheme.mutedForeground,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -193,12 +186,15 @@ class StatisticsCardGrid extends StatelessWidget {
|
||||
'장비 상태 분포',
|
||||
style: ShadcnTheme.headingH5,
|
||||
),
|
||||
TextButton.icon(
|
||||
ShadButton.ghost(
|
||||
onPressed: () => Navigator.pushNamed(context, Routes.equipment),
|
||||
icon: const Icon(Icons.arrow_forward, size: 16),
|
||||
label: const Text('전체 보기'),
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: ShadcnTheme.primary,
|
||||
size: ShadButtonSize.sm,
|
||||
child: const Row(
|
||||
children: [
|
||||
Text('전체 보기'),
|
||||
SizedBox(width: 4),
|
||||
Icon(Icons.arrow_forward, size: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -233,7 +229,7 @@ class StatisticsCardGrid extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: ShadcnTheme.muted.withOpacity(0.5),
|
||||
color: ShadcnTheme.muted.withValues(alpha: 0.5 * 255),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
@@ -265,11 +261,8 @@ class StatisticsCardGrid extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
LinearProgressIndicator(
|
||||
value: percentage,
|
||||
backgroundColor: ShadcnTheme.border,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(color),
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
ShadProgress(
|
||||
value: percentage * 100,
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -312,7 +305,7 @@ class StatisticsCardGrid extends StatelessWidget {
|
||||
Navigator.pushNamed(context, Routes.equipment);
|
||||
break;
|
||||
case '/licenses':
|
||||
Navigator.pushNamed(context, Routes.licenses);
|
||||
Navigator.pushNamed(context, Routes.maintenanceSchedule);
|
||||
break;
|
||||
case '/warehouse-locations':
|
||||
Navigator.pushNamed(context, Routes.warehouseLocations);
|
||||
|
||||
Reference in New Issue
Block a user