fix: 페이지네이션 로직 개선 및 상세 로그 추가
- 모든 관리 화면(회사, 장비, 입고지, 유지보수)의 페이지네이션 로직 통일 - Controller에서 전체 데이터 로드, View에서만 페이지네이션 처리 - 각 화면에 상세한 터미널 로그 추가로 데이터 로드 상태 추적 가능 - 회사 DTO에 지점 정보 포함 기능 추가 - 전체 79개 회사 중 14개만 표시되던 문제 해결
This commit is contained in:
@@ -28,6 +28,12 @@ mixin _$CompanyBranchFlatDto {
|
||||
int? get branchId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'branch_name')
|
||||
String? get branchName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'company_types')
|
||||
List<String>? get companyTypes => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'is_partner')
|
||||
bool get isPartner => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'is_customer')
|
||||
bool get isCustomer => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this CompanyBranchFlatDto to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -49,7 +55,10 @@ abstract class $CompanyBranchFlatDtoCopyWith<$Res> {
|
||||
{@JsonKey(name: 'company_id') int companyId,
|
||||
@JsonKey(name: 'company_name') String companyName,
|
||||
@JsonKey(name: 'branch_id') int? branchId,
|
||||
@JsonKey(name: 'branch_name') String? branchName});
|
||||
@JsonKey(name: 'branch_name') String? branchName,
|
||||
@JsonKey(name: 'company_types') List<String>? companyTypes,
|
||||
@JsonKey(name: 'is_partner') bool isPartner,
|
||||
@JsonKey(name: 'is_customer') bool isCustomer});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -72,6 +81,9 @@ class _$CompanyBranchFlatDtoCopyWithImpl<$Res,
|
||||
Object? companyName = null,
|
||||
Object? branchId = freezed,
|
||||
Object? branchName = freezed,
|
||||
Object? companyTypes = freezed,
|
||||
Object? isPartner = null,
|
||||
Object? isCustomer = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
companyId: null == companyId
|
||||
@@ -90,6 +102,18 @@ class _$CompanyBranchFlatDtoCopyWithImpl<$Res,
|
||||
? _value.branchName
|
||||
: branchName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
companyTypes: freezed == companyTypes
|
||||
? _value.companyTypes
|
||||
: companyTypes // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
isPartner: null == isPartner
|
||||
? _value.isPartner
|
||||
: isPartner // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isCustomer: null == isCustomer
|
||||
? _value.isCustomer
|
||||
: isCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
@@ -106,7 +130,10 @@ abstract class _$$CompanyBranchFlatDtoImplCopyWith<$Res>
|
||||
{@JsonKey(name: 'company_id') int companyId,
|
||||
@JsonKey(name: 'company_name') String companyName,
|
||||
@JsonKey(name: 'branch_id') int? branchId,
|
||||
@JsonKey(name: 'branch_name') String? branchName});
|
||||
@JsonKey(name: 'branch_name') String? branchName,
|
||||
@JsonKey(name: 'company_types') List<String>? companyTypes,
|
||||
@JsonKey(name: 'is_partner') bool isPartner,
|
||||
@JsonKey(name: 'is_customer') bool isCustomer});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -126,6 +153,9 @@ class __$$CompanyBranchFlatDtoImplCopyWithImpl<$Res>
|
||||
Object? companyName = null,
|
||||
Object? branchId = freezed,
|
||||
Object? branchName = freezed,
|
||||
Object? companyTypes = freezed,
|
||||
Object? isPartner = null,
|
||||
Object? isCustomer = null,
|
||||
}) {
|
||||
return _then(_$CompanyBranchFlatDtoImpl(
|
||||
companyId: null == companyId
|
||||
@@ -144,6 +174,18 @@ class __$$CompanyBranchFlatDtoImplCopyWithImpl<$Res>
|
||||
? _value.branchName
|
||||
: branchName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
companyTypes: freezed == companyTypes
|
||||
? _value._companyTypes
|
||||
: companyTypes // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
isPartner: null == isPartner
|
||||
? _value.isPartner
|
||||
: isPartner // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isCustomer: null == isCustomer
|
||||
? _value.isCustomer
|
||||
: isCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -155,7 +197,11 @@ class _$CompanyBranchFlatDtoImpl implements _CompanyBranchFlatDto {
|
||||
{@JsonKey(name: 'company_id') required this.companyId,
|
||||
@JsonKey(name: 'company_name') required this.companyName,
|
||||
@JsonKey(name: 'branch_id') this.branchId,
|
||||
@JsonKey(name: 'branch_name') this.branchName});
|
||||
@JsonKey(name: 'branch_name') this.branchName,
|
||||
@JsonKey(name: 'company_types') final List<String>? companyTypes,
|
||||
@JsonKey(name: 'is_partner') this.isPartner = false,
|
||||
@JsonKey(name: 'is_customer') this.isCustomer = false})
|
||||
: _companyTypes = companyTypes;
|
||||
|
||||
factory _$CompanyBranchFlatDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CompanyBranchFlatDtoImplFromJson(json);
|
||||
@@ -172,10 +218,27 @@ class _$CompanyBranchFlatDtoImpl implements _CompanyBranchFlatDto {
|
||||
@override
|
||||
@JsonKey(name: 'branch_name')
|
||||
final String? branchName;
|
||||
final List<String>? _companyTypes;
|
||||
@override
|
||||
@JsonKey(name: 'company_types')
|
||||
List<String>? get companyTypes {
|
||||
final value = _companyTypes;
|
||||
if (value == null) return null;
|
||||
if (_companyTypes is EqualUnmodifiableListView) return _companyTypes;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'is_partner')
|
||||
final bool isPartner;
|
||||
@override
|
||||
@JsonKey(name: 'is_customer')
|
||||
final bool isCustomer;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CompanyBranchFlatDto(companyId: $companyId, companyName: $companyName, branchId: $branchId, branchName: $branchName)';
|
||||
return 'CompanyBranchFlatDto(companyId: $companyId, companyName: $companyName, branchId: $branchId, branchName: $branchName, companyTypes: $companyTypes, isPartner: $isPartner, isCustomer: $isCustomer)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -190,13 +253,26 @@ class _$CompanyBranchFlatDtoImpl implements _CompanyBranchFlatDto {
|
||||
(identical(other.branchId, branchId) ||
|
||||
other.branchId == branchId) &&
|
||||
(identical(other.branchName, branchName) ||
|
||||
other.branchName == branchName));
|
||||
other.branchName == branchName) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._companyTypes, _companyTypes) &&
|
||||
(identical(other.isPartner, isPartner) ||
|
||||
other.isPartner == isPartner) &&
|
||||
(identical(other.isCustomer, isCustomer) ||
|
||||
other.isCustomer == isCustomer));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, companyId, companyName, branchId, branchName);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
companyId,
|
||||
companyName,
|
||||
branchId,
|
||||
branchName,
|
||||
const DeepCollectionEquality().hash(_companyTypes),
|
||||
isPartner,
|
||||
isCustomer);
|
||||
|
||||
/// Create a copy of CompanyBranchFlatDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -221,7 +297,10 @@ abstract class _CompanyBranchFlatDto implements CompanyBranchFlatDto {
|
||||
{@JsonKey(name: 'company_id') required final int companyId,
|
||||
@JsonKey(name: 'company_name') required final String companyName,
|
||||
@JsonKey(name: 'branch_id') final int? branchId,
|
||||
@JsonKey(name: 'branch_name') final String? branchName}) =
|
||||
@JsonKey(name: 'branch_name') final String? branchName,
|
||||
@JsonKey(name: 'company_types') final List<String>? companyTypes,
|
||||
@JsonKey(name: 'is_partner') final bool isPartner,
|
||||
@JsonKey(name: 'is_customer') final bool isCustomer}) =
|
||||
_$CompanyBranchFlatDtoImpl;
|
||||
|
||||
factory _CompanyBranchFlatDto.fromJson(Map<String, dynamic> json) =
|
||||
@@ -239,6 +318,15 @@ abstract class _CompanyBranchFlatDto implements CompanyBranchFlatDto {
|
||||
@override
|
||||
@JsonKey(name: 'branch_name')
|
||||
String? get branchName;
|
||||
@override
|
||||
@JsonKey(name: 'company_types')
|
||||
List<String>? get companyTypes;
|
||||
@override
|
||||
@JsonKey(name: 'is_partner')
|
||||
bool get isPartner;
|
||||
@override
|
||||
@JsonKey(name: 'is_customer')
|
||||
bool get isCustomer;
|
||||
|
||||
/// Create a copy of CompanyBranchFlatDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
||||
Reference in New Issue
Block a user