feat: 결재·마스터 실연동 업데이트
This commit is contained in:
@@ -32,7 +32,9 @@ class GroupDto {
|
||||
return GroupDto(
|
||||
id: json['id'] as int?,
|
||||
groupName: json['group_name'] as String,
|
||||
description: json['description'] as String?,
|
||||
description:
|
||||
json['description'] as String? ??
|
||||
json['group_description'] as String?,
|
||||
isDefault: (json['is_default'] as bool?) ?? false,
|
||||
isActive: (json['is_active'] as bool?) ?? true,
|
||||
isDeleted: (json['is_deleted'] as bool?) ?? false,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:superport_v2/core/common/models/paginated_result.dart';
|
||||
import 'package:superport_v2/core/network/api_client.dart';
|
||||
import 'package:superport_v2/core/network/api_routes.dart';
|
||||
|
||||
import '../../domain/entities/group.dart';
|
||||
import '../../domain/repositories/group_repository.dart';
|
||||
@@ -12,7 +13,7 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
|
||||
final ApiClient _api;
|
||||
|
||||
static const _basePath = '/groups';
|
||||
static const _basePath = '${ApiRoutes.apiV1}/groups';
|
||||
|
||||
/// 그룹 목록을 조회한다.
|
||||
@override
|
||||
@@ -22,7 +23,16 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
String? query,
|
||||
bool? isDefault,
|
||||
bool? isActive,
|
||||
bool includePermissions = false,
|
||||
bool includeEmployees = false,
|
||||
}) async {
|
||||
final includeParts = <String>[];
|
||||
if (includePermissions) {
|
||||
includeParts.add('permissions');
|
||||
}
|
||||
if (includeEmployees) {
|
||||
includeParts.add('employees');
|
||||
}
|
||||
final response = await _api.get<Map<String, dynamic>>(
|
||||
_basePath,
|
||||
query: {
|
||||
@@ -31,6 +41,7 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
if (query != null && query.isNotEmpty) 'q': query,
|
||||
if (isDefault != null) 'is_default': isDefault,
|
||||
if (isActive != null) 'is_active': isActive,
|
||||
if (includeParts.isNotEmpty) 'include': includeParts.join(','),
|
||||
},
|
||||
options: Options(responseType: ResponseType.json),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user