web: migrate health notifications to js_interop; add browser hook
- 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:
@@ -2,7 +2,7 @@ import 'package:dartz/dartz.dart';
|
||||
import '../../../core/errors/failures.dart';
|
||||
import '../../../domain/entities/company_hierarchy.dart';
|
||||
import '../../../models/company_model.dart';
|
||||
import '../../../services/company_service.dart';
|
||||
import '../../repositories/company_repository.dart';
|
||||
import '../base_usecase.dart';
|
||||
|
||||
/// 회사 계층 구조 조회 파라미터
|
||||
@@ -16,22 +16,23 @@ class GetCompanyHierarchyParams {
|
||||
|
||||
/// 회사 계층 구조 조회 UseCase
|
||||
class GetCompanyHierarchyUseCase extends UseCase<CompanyHierarchy, GetCompanyHierarchyParams> {
|
||||
final CompanyService _companyService;
|
||||
// 레포지토리 기반으로 마이그레이션
|
||||
final CompanyRepository _companyRepository;
|
||||
|
||||
GetCompanyHierarchyUseCase(this._companyService);
|
||||
GetCompanyHierarchyUseCase(this._companyRepository);
|
||||
|
||||
@override
|
||||
Future<Either<Failure, CompanyHierarchy>> call(GetCompanyHierarchyParams params) async {
|
||||
try {
|
||||
// 모든 회사 조회
|
||||
final response = await _companyService.getCompanies(
|
||||
page: 1,
|
||||
perPage: 1000,
|
||||
// 레포지토리에서 전체 회사(계층 구성용) 조회
|
||||
final companiesEither = await _companyRepository.getCompanyHierarchy(
|
||||
includeInactive: params.includeInactive,
|
||||
);
|
||||
|
||||
// 계층 구조로 변환
|
||||
final hierarchy = _buildHierarchy(response.items);
|
||||
final hierarchy = companiesEither.fold(
|
||||
(failure) => throw failure,
|
||||
(companies) => _buildHierarchy(companies),
|
||||
);
|
||||
|
||||
return Right(hierarchy);
|
||||
} on ServerFailure catch (e) {
|
||||
@@ -125,4 +126,4 @@ class GetCompanyHierarchyUseCase extends UseCase<CompanyHierarchy, GetCompanyHie
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user