결재 및 마스터 모듈을 v4 API 계약에 맞게 조정
This commit is contained in:
@@ -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),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user