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

@@ -33,7 +33,6 @@ class EquipmentWarehouseCacheService {
// 설정 상수
static const int _cacheValidMinutes = 10; // 10분간 캐시 유효
static const int _maxRetryCount = 3; // 최대 재시도 횟수
/// 캐시 로딩 상태
bool get isLoaded => _isLoaded;
@@ -199,4 +198,4 @@ class EquipmentWarehouseCacheService {
print(' $key: $value');
});
}
}
}

View File

@@ -1,17 +1,19 @@
import 'dart:js' as js;
import 'package:flutter/foundation.dart';
import 'package:js/js.dart';
/// 웹 플랫폼을 위한 알림 구현
// JS interop 선언: window.showHealthCheckNotification(title, message, status)
@JS('showHealthCheckNotification')
external void _showHealthCheckNotification(
String title,
String message,
String status,
);
/// 웹 플랫폼을 위한 알림 구현 (js_interop 기반)
void showNotification(String title, String message, String status) {
try {
// JavaScript 함수 호출
js.context.callMethod('showHealthCheckNotification', [
title,
message,
status,
]);
_showHealthCheckNotification(title, message, status);
} catch (e) {
debugPrint('웹 알림 표시 실패: $e');
}
}
}

View File

@@ -180,8 +180,8 @@ class InventoryHistoryService {
/// 시리얼번호 결정 로직
String _determineSerialNumber(EquipmentDto? equipment, EquipmentHistoryDto history) {
if (equipment != null && equipment.serialNumber != null) {
return equipment.serialNumber!;
if (equipment != null) {
return equipment.serialNumber;
}
if (history.equipmentSerial != null) {
@@ -245,4 +245,4 @@ class InventoryHistoryService {
].any((field) => field.toLowerCase().contains(keyword));
}).toList();
}
}
}

View File

@@ -178,6 +178,7 @@ class UserService {
email: dto.email ?? '',
name: dto.name,
phone: dto.phone,
companyName: dto.company?.name,
role: UserRole.staff, // UserDto에는 role이 없으므로 기본값
isActive: true, // UserDto에는 isActive가 없으므로 기본값
createdAt: DateTime.now(), // UserDto에는 createdAt이 없으므로 현재 시간
@@ -191,4 +192,4 @@ class UserService {
if (phoneNumbers.isEmpty) return null;
return phoneNumbers.first['number'];
}
}
}