결재 및 마스터 모듈을 v4 API 계약에 맞게 조정

This commit is contained in:
JiWoong Sul
2025-10-16 17:27:20 +09:00
parent d5c99627db
commit 9e2244f260
34 changed files with 1394 additions and 330 deletions

View File

@@ -39,22 +39,22 @@ class InventoryLookupRepositoryRemote implements InventoryLookupRepository {
return _fetchList(
_approvalActionsPath,
activeOnly: activeOnly,
// Approval actions는 is_active 필터가 없을 수 있어 조건적으로 전달.
includeIsActive: false,
// Approval actions는 active 필터가 없을 수 있어 조건적으로 전달한다.
includeActiveFilter: false,
);
}
Future<List<LookupItem>> _fetchList(
String path, {
required bool activeOnly,
bool includeIsActive = true,
bool includeActiveFilter = true,
}) async {
final response = await _api.get<Map<String, dynamic>>(
path,
query: {
'page': 1,
'page_size': 200,
if (includeIsActive && activeOnly) 'is_active': true,
if (includeActiveFilter && activeOnly) 'active': true,
},
options: Options(responseType: ResponseType.json),
);