web: migrate health notifications to js_interop; add browser hook
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled

- Replace dart:js with package:js in health_check_service_web.dart\n- Implement showHealthCheckNotification in web/index.html\n- Pin js dependency to ^0.6.7 for flutter_secure_storage_web compatibility

auth: harden AuthInterceptor + tests

- Allow overrideAuthRepository injection for testing\n- Normalize imports to package: paths\n- Add unit test covering token attach, 401→refresh→retry, and failure path\n- Add integration test skeleton gated by env vars

ui/data: map User.companyName to list column

- Add companyName to domain User\n- Map UserDto.company?.name\n- Render companyName in user_list

cleanup: remove legacy equipment table + unused code; minor warnings

- Remove _buildFlexibleTable and unused helpers\n- Remove unused zipcode details and cache retry constant\n- Fix null-aware and non-null assertions\n- Address child-last warnings in administrator dialog

docs: update AGENTS.md session context
This commit is contained in:
JiWoong Sul
2025-09-08 17:39:00 +09:00
parent 519e1883a3
commit 655d473413
55 changed files with 2729 additions and 4968 deletions

View File

@@ -192,25 +192,26 @@ class _MaintenanceAlertDashboardState extends State<MaintenanceAlertDashboard> {
Color color;
IconData icon;
// Phase 10: 색체심리학 기반 알림 색상 체계 적용
switch (type) {
case 'expiring_7':
color = Colors.red.shade600;
color = ShadcnTheme.alertCritical7; // 7일 이내 - 위험 (레드)
icon = Icons.priority_high_outlined;
break;
case 'expiring_30':
color = Colors.orange.shade600;
color = ShadcnTheme.alertWarning30; // 30일 이내 - 경고 (오렌지)
icon = Icons.warning_amber_outlined;
break;
case 'expiring_60':
color = Colors.amber.shade600;
color = ShadcnTheme.alertWarning60; // 60일 이내 - 주의 (앰버)
icon = Icons.schedule_outlined;
break;
case 'expired':
color = Colors.red.shade800;
color = ShadcnTheme.alertExpired; // 만료됨 - 심각 (진한 레드)
icon = Icons.error_outline;
break;
default:
color = Colors.grey.shade600;
color = ShadcnTheme.alertNormal; // 정상 - 안전 (그린)
icon = Icons.info_outline;
}
@@ -449,13 +450,14 @@ class _MaintenanceAlertDashboardState extends State<MaintenanceAlertDashboard> {
),
),
// 고객사
// 고객사 - Phase 10: 회사 타입별 색상 적용
Padding(
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 8),
child: Text(
controller.getCompanyName(maintenance),
style: ShadcnTheme.bodySmall.copyWith(
color: ShadcnTheme.foreground,
color: ShadcnTheme.companyCustomer, // 고객사 - 진한 그린
fontWeight: FontWeight.w500,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
@@ -468,12 +470,13 @@ class _MaintenanceAlertDashboardState extends State<MaintenanceAlertDashboard> {
child: Text(
'${maintenance.endedAt.year}-${maintenance.endedAt.month.toString().padLeft(2, '0')}-${maintenance.endedAt.day.toString().padLeft(2, '0')}',
style: ShadcnTheme.bodySmall.copyWith(
// Phase 10: 만료 상태별 색상 체계 적용
color: isExpired
? Colors.red.shade600
? ShadcnTheme.alertExpired // 만료됨 - 심각 (진한 레드)
: isExpiringSoon
? Colors.orange.shade600
: ShadcnTheme.foreground,
fontWeight: isExpired || isExpiringSoon ? FontWeight.w600 : FontWeight.normal,
? ShadcnTheme.alertWarning30 // 만료 임박 - 경고 (오렌지)
: ShadcnTheme.alertNormal, // 정상 - 안전 (그린)
fontWeight: isExpired || isExpiringSoon ? FontWeight.w600 : FontWeight.w500,
),
),
),
@@ -506,11 +509,12 @@ class _MaintenanceAlertDashboardState extends State<MaintenanceAlertDashboard> {
? '${daysRemaining.abs()}일 지연'
: '$daysRemaining일 남음',
style: ShadcnTheme.bodySmall.copyWith(
// Phase 10: 남은 일수 상태별 색상 체계 적용
color: isExpired
? Colors.red.shade600
? ShadcnTheme.alertExpired // 지연 - 심각 (진한 레드)
: isExpiringSoon
? Colors.orange.shade600
: Colors.green.shade600,
? ShadcnTheme.alertWarning30 // 임박 - 경고 (오렌지)
: ShadcnTheme.alertNormal, // 충분 - 안전 (그린)
fontWeight: FontWeight.w600,
),
),
@@ -543,14 +547,15 @@ class _MaintenanceAlertDashboardState extends State<MaintenanceAlertDashboard> {
}
/// 유지보수 타입별 색상
// Phase 10: 유지보수 타입별 색상 체계
Color _getMaintenanceTypeColor(String maintenanceType) {
switch (maintenanceType) {
case 'V': // 방문
return Colors.blue.shade600;
case 'R': // 원격
return Colors.green.shade600;
case 'V': // 방문 - 본사/지점 계열 (블루)
return ShadcnTheme.companyHeadquarters;
case 'R': // 원격 - 협력/성장 계열 (그린)
return ShadcnTheme.companyPartner;
default:
return Colors.grey.shade600;
return ShadcnTheme.muted;
}
}