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:
@@ -1,5 +1,5 @@
|
||||
import 'package:dartz/dartz.dart';
|
||||
import '../../../services/company_service.dart';
|
||||
import '../../repositories/company_repository.dart';
|
||||
import '../../../models/company_model.dart';
|
||||
import '../../../core/errors/failures.dart';
|
||||
import '../base_usecase.dart';
|
||||
@@ -17,22 +17,17 @@ class GetCompanyDetailParams {
|
||||
|
||||
/// 회사 상세 조회 UseCase
|
||||
class GetCompanyDetailUseCase extends UseCase<Company, GetCompanyDetailParams> {
|
||||
final CompanyService _companyService;
|
||||
// 레포지토리 기반으로 마이그레이션
|
||||
final CompanyRepository _companyRepository;
|
||||
|
||||
GetCompanyDetailUseCase(this._companyService);
|
||||
GetCompanyDetailUseCase(this._companyRepository);
|
||||
|
||||
@override
|
||||
Future<Either<Failure, Company>> call(GetCompanyDetailParams params) async {
|
||||
try {
|
||||
final Company company;
|
||||
|
||||
if (params.includeBranches) {
|
||||
company = await _companyService.getCompanyWithChildren(params.id);
|
||||
} else {
|
||||
company = await _companyService.getCompanyDetail(params.id);
|
||||
}
|
||||
|
||||
return Right(company);
|
||||
// 레포지토리에서 상세 조회(자식 포함 형태로 매핑됨)
|
||||
final result = await _companyRepository.getCompanyById(params.id);
|
||||
return result;
|
||||
} on ServerFailure catch (e) {
|
||||
if (e.message.contains('not found')) {
|
||||
return Left(ValidationFailure(
|
||||
@@ -52,4 +47,4 @@ class GetCompanyDetailUseCase extends UseCase<Company, GetCompanyDetailParams> {
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user