feat(approvals): 결재 접근 차단 대응과 전표 전이 메모 전달 강화

- approvals 모듈에서 APPROVAL_ACCESS_DENIED 응답을 포착하여 ApprovalAccessDeniedException으로 변환하고 접근 거부 시 토스트·대시보드 리다이렉트를 처리

- approval history 조회가 서버 action id에 맞춰 필터링되도록 repository·controller·테스트를 보강

- 재고 트랜잭션 상태 전이 API 호출에 note를 전달하도록 repository·컨트롤러·통합/단위 테스트를 업데이트

- 승인 플로우 QA 체크리스트 및 연동 문서를 최신 계약과 테스트 흐름으로 업데이트
This commit is contained in:
JiWoong Sul
2025-10-31 16:43:14 +09:00
parent d76f765814
commit 3e83408aa7
35 changed files with 1056 additions and 470 deletions

View File

@@ -15,6 +15,14 @@ class ApprovalHistoryRepositoryRemote implements ApprovalHistoryRepository {
final ApiClient _api;
static const _basePath = '${ApiRoutes.apiV1}/approval-histories';
static const _defaultInclude = <String>[
'approval',
'step',
'approval_action',
'approver',
'from_status',
'to_status',
];
/// 결재 이력 목록을 조회한다.
@override
@@ -22,18 +30,24 @@ class ApprovalHistoryRepositoryRemote implements ApprovalHistoryRepository {
int page = 1,
int pageSize = 20,
String? query,
String? action,
int? approvalActionId,
DateTime? from,
DateTime? to,
}) async {
final resolvedQuery = ApiClient.buildQuery(
page: page,
pageSize: pageSize,
q: query,
include: _defaultInclude,
filters: {
if (from != null) 'action_from': from,
if (to != null) 'action_to': to,
if (approvalActionId != null) 'approval_action_id': approvalActionId,
},
);
final response = await _api.get<Map<String, dynamic>>(
_basePath,
query: {
'page': page,
'page_size': pageSize,
if (from != null) 'action_from': from.toIso8601String(),
if (to != null) 'action_to': to.toIso8601String(),
},
query: resolvedQuery.isEmpty ? null : resolvedQuery,
options: Options(responseType: ResponseType.json),
);