some changes navigation in web and response changes

This commit is contained in:
amirrezaghabeli
2025-08-26 12:22:42 +03:30
parent 1b94f704cb
commit f964186a87
24 changed files with 553 additions and 398 deletions
@@ -11,12 +11,14 @@ abstract class TenderApprovalsStateData with _$TenderApprovalsStateData {
const factory TenderApprovalsStateData({
@JsonKey(name: 'company_id') required String? companyId,
@JsonKey(name: 'total_approvals') required int? totalApprovals,
@JsonKey(name: 'approved_tenders') required int? approvedTenders,
@JsonKey(name: 'submitted_tenders') required int? submittedTenders,
@JsonKey(name: 'rejected_tenders') required int? rejectedTenders,
@JsonKey(name: 'self_apply_count') required int? selfApplyCount,
@JsonKey(name: 'partnership_count') required int? partnershipCount,
@JsonKey(name: 'approvals_by_status') required ApprovalsByStatus? approvalsByStatus,
@JsonKey(name: 'approvals_by_submission') required ApprovalsBySubmission? approvalsBySubmission,
@JsonKey(name: 'approvals_by_status')
required ApprovalsByStatus? approvalsByStatus,
@JsonKey(name: 'approvals_by_submission')
required ApprovalsBySubmission? approvalsBySubmission,
@JsonKey(name: 'last_updated') required int? lastUpdated,
}) = _TenderApprovalsStateData;
@@ -27,7 +29,7 @@ abstract class TenderApprovalsStateData with _$TenderApprovalsStateData {
@freezed
abstract class ApprovalsByStatus with _$ApprovalsByStatus {
const factory ApprovalsByStatus({
@JsonKey(name: 'approved') required int? approved,
@JsonKey(name: 'submitted') required int? submitted,
@JsonKey(name: 'rejected') required int? rejected,
}) = _ApprovalsByStatus;
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$TenderApprovalsStateData {
@JsonKey(name: 'company_id') String? get companyId;@JsonKey(name: 'total_approvals') int? get totalApprovals;@JsonKey(name: 'approved_tenders') int? get approvedTenders;@JsonKey(name: 'rejected_tenders') int? get rejectedTenders;@JsonKey(name: 'self_apply_count') int? get selfApplyCount;@JsonKey(name: 'partnership_count') int? get partnershipCount;@JsonKey(name: 'approvals_by_status') ApprovalsByStatus? get approvalsByStatus;@JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? get approvalsBySubmission;@JsonKey(name: 'last_updated') int? get lastUpdated;
@JsonKey(name: 'company_id') String? get companyId;@JsonKey(name: 'total_approvals') int? get totalApprovals;@JsonKey(name: 'submitted_tenders') int? get submittedTenders;@JsonKey(name: 'rejected_tenders') int? get rejectedTenders;@JsonKey(name: 'self_apply_count') int? get selfApplyCount;@JsonKey(name: 'partnership_count') int? get partnershipCount;@JsonKey(name: 'approvals_by_status') ApprovalsByStatus? get approvalsByStatus;@JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? get approvalsBySubmission;@JsonKey(name: 'last_updated') int? get lastUpdated;
/// Create a copy of TenderApprovalsStateData
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $TenderApprovalsStateDataCopyWith<TenderApprovalsStateData> get copyWith => _$Te
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is TenderApprovalsStateData&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.totalApprovals, totalApprovals) || other.totalApprovals == totalApprovals)&&(identical(other.approvedTenders, approvedTenders) || other.approvedTenders == approvedTenders)&&(identical(other.rejectedTenders, rejectedTenders) || other.rejectedTenders == rejectedTenders)&&(identical(other.selfApplyCount, selfApplyCount) || other.selfApplyCount == selfApplyCount)&&(identical(other.partnershipCount, partnershipCount) || other.partnershipCount == partnershipCount)&&(identical(other.approvalsByStatus, approvalsByStatus) || other.approvalsByStatus == approvalsByStatus)&&(identical(other.approvalsBySubmission, approvalsBySubmission) || other.approvalsBySubmission == approvalsBySubmission)&&(identical(other.lastUpdated, lastUpdated) || other.lastUpdated == lastUpdated));
return identical(this, other) || (other.runtimeType == runtimeType&&other is TenderApprovalsStateData&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.totalApprovals, totalApprovals) || other.totalApprovals == totalApprovals)&&(identical(other.submittedTenders, submittedTenders) || other.submittedTenders == submittedTenders)&&(identical(other.rejectedTenders, rejectedTenders) || other.rejectedTenders == rejectedTenders)&&(identical(other.selfApplyCount, selfApplyCount) || other.selfApplyCount == selfApplyCount)&&(identical(other.partnershipCount, partnershipCount) || other.partnershipCount == partnershipCount)&&(identical(other.approvalsByStatus, approvalsByStatus) || other.approvalsByStatus == approvalsByStatus)&&(identical(other.approvalsBySubmission, approvalsBySubmission) || other.approvalsBySubmission == approvalsBySubmission)&&(identical(other.lastUpdated, lastUpdated) || other.lastUpdated == lastUpdated));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,companyId,totalApprovals,approvedTenders,rejectedTenders,selfApplyCount,partnershipCount,approvalsByStatus,approvalsBySubmission,lastUpdated);
int get hashCode => Object.hash(runtimeType,companyId,totalApprovals,submittedTenders,rejectedTenders,selfApplyCount,partnershipCount,approvalsByStatus,approvalsBySubmission,lastUpdated);
@override
String toString() {
return 'TenderApprovalsStateData(companyId: $companyId, totalApprovals: $totalApprovals, approvedTenders: $approvedTenders, rejectedTenders: $rejectedTenders, selfApplyCount: $selfApplyCount, partnershipCount: $partnershipCount, approvalsByStatus: $approvalsByStatus, approvalsBySubmission: $approvalsBySubmission, lastUpdated: $lastUpdated)';
return 'TenderApprovalsStateData(companyId: $companyId, totalApprovals: $totalApprovals, submittedTenders: $submittedTenders, rejectedTenders: $rejectedTenders, selfApplyCount: $selfApplyCount, partnershipCount: $partnershipCount, approvalsByStatus: $approvalsByStatus, approvalsBySubmission: $approvalsBySubmission, lastUpdated: $lastUpdated)';
}
@@ -48,7 +48,7 @@ abstract mixin class $TenderApprovalsStateDataCopyWith<$Res> {
factory $TenderApprovalsStateDataCopyWith(TenderApprovalsStateData value, $Res Function(TenderApprovalsStateData) _then) = _$TenderApprovalsStateDataCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'company_id') String? companyId,@JsonKey(name: 'total_approvals') int? totalApprovals,@JsonKey(name: 'approved_tenders') int? approvedTenders,@JsonKey(name: 'rejected_tenders') int? rejectedTenders,@JsonKey(name: 'self_apply_count') int? selfApplyCount,@JsonKey(name: 'partnership_count') int? partnershipCount,@JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus,@JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission,@JsonKey(name: 'last_updated') int? lastUpdated
@JsonKey(name: 'company_id') String? companyId,@JsonKey(name: 'total_approvals') int? totalApprovals,@JsonKey(name: 'submitted_tenders') int? submittedTenders,@JsonKey(name: 'rejected_tenders') int? rejectedTenders,@JsonKey(name: 'self_apply_count') int? selfApplyCount,@JsonKey(name: 'partnership_count') int? partnershipCount,@JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus,@JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission,@JsonKey(name: 'last_updated') int? lastUpdated
});
@@ -65,11 +65,11 @@ class _$TenderApprovalsStateDataCopyWithImpl<$Res>
/// Create a copy of TenderApprovalsStateData
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? companyId = freezed,Object? totalApprovals = freezed,Object? approvedTenders = freezed,Object? rejectedTenders = freezed,Object? selfApplyCount = freezed,Object? partnershipCount = freezed,Object? approvalsByStatus = freezed,Object? approvalsBySubmission = freezed,Object? lastUpdated = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? companyId = freezed,Object? totalApprovals = freezed,Object? submittedTenders = freezed,Object? rejectedTenders = freezed,Object? selfApplyCount = freezed,Object? partnershipCount = freezed,Object? approvalsByStatus = freezed,Object? approvalsBySubmission = freezed,Object? lastUpdated = freezed,}) {
return _then(_self.copyWith(
companyId: freezed == companyId ? _self.companyId : companyId // ignore: cast_nullable_to_non_nullable
as String?,totalApprovals: freezed == totalApprovals ? _self.totalApprovals : totalApprovals // ignore: cast_nullable_to_non_nullable
as int?,approvedTenders: freezed == approvedTenders ? _self.approvedTenders : approvedTenders // ignore: cast_nullable_to_non_nullable
as int?,submittedTenders: freezed == submittedTenders ? _self.submittedTenders : submittedTenders // ignore: cast_nullable_to_non_nullable
as int?,rejectedTenders: freezed == rejectedTenders ? _self.rejectedTenders : rejectedTenders // ignore: cast_nullable_to_non_nullable
as int?,selfApplyCount: freezed == selfApplyCount ? _self.selfApplyCount : selfApplyCount // ignore: cast_nullable_to_non_nullable
as int?,partnershipCount: freezed == partnershipCount ? _self.partnershipCount : partnershipCount // ignore: cast_nullable_to_non_nullable
@@ -185,10 +185,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'company_id') String? companyId, @JsonKey(name: 'total_approvals') int? totalApprovals, @JsonKey(name: 'approved_tenders') int? approvedTenders, @JsonKey(name: 'rejected_tenders') int? rejectedTenders, @JsonKey(name: 'self_apply_count') int? selfApplyCount, @JsonKey(name: 'partnership_count') int? partnershipCount, @JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus, @JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission, @JsonKey(name: 'last_updated') int? lastUpdated)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'company_id') String? companyId, @JsonKey(name: 'total_approvals') int? totalApprovals, @JsonKey(name: 'submitted_tenders') int? submittedTenders, @JsonKey(name: 'rejected_tenders') int? rejectedTenders, @JsonKey(name: 'self_apply_count') int? selfApplyCount, @JsonKey(name: 'partnership_count') int? partnershipCount, @JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus, @JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission, @JsonKey(name: 'last_updated') int? lastUpdated)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _TenderApprovalsStateData() when $default != null:
return $default(_that.companyId,_that.totalApprovals,_that.approvedTenders,_that.rejectedTenders,_that.selfApplyCount,_that.partnershipCount,_that.approvalsByStatus,_that.approvalsBySubmission,_that.lastUpdated);case _:
return $default(_that.companyId,_that.totalApprovals,_that.submittedTenders,_that.rejectedTenders,_that.selfApplyCount,_that.partnershipCount,_that.approvalsByStatus,_that.approvalsBySubmission,_that.lastUpdated);case _:
return orElse();
}
@@ -206,10 +206,10 @@ return $default(_that.companyId,_that.totalApprovals,_that.approvedTenders,_that
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'company_id') String? companyId, @JsonKey(name: 'total_approvals') int? totalApprovals, @JsonKey(name: 'approved_tenders') int? approvedTenders, @JsonKey(name: 'rejected_tenders') int? rejectedTenders, @JsonKey(name: 'self_apply_count') int? selfApplyCount, @JsonKey(name: 'partnership_count') int? partnershipCount, @JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus, @JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission, @JsonKey(name: 'last_updated') int? lastUpdated) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'company_id') String? companyId, @JsonKey(name: 'total_approvals') int? totalApprovals, @JsonKey(name: 'submitted_tenders') int? submittedTenders, @JsonKey(name: 'rejected_tenders') int? rejectedTenders, @JsonKey(name: 'self_apply_count') int? selfApplyCount, @JsonKey(name: 'partnership_count') int? partnershipCount, @JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus, @JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission, @JsonKey(name: 'last_updated') int? lastUpdated) $default,) {final _that = this;
switch (_that) {
case _TenderApprovalsStateData():
return $default(_that.companyId,_that.totalApprovals,_that.approvedTenders,_that.rejectedTenders,_that.selfApplyCount,_that.partnershipCount,_that.approvalsByStatus,_that.approvalsBySubmission,_that.lastUpdated);case _:
return $default(_that.companyId,_that.totalApprovals,_that.submittedTenders,_that.rejectedTenders,_that.selfApplyCount,_that.partnershipCount,_that.approvalsByStatus,_that.approvalsBySubmission,_that.lastUpdated);case _:
throw StateError('Unexpected subclass');
}
@@ -226,10 +226,10 @@ return $default(_that.companyId,_that.totalApprovals,_that.approvedTenders,_that
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'company_id') String? companyId, @JsonKey(name: 'total_approvals') int? totalApprovals, @JsonKey(name: 'approved_tenders') int? approvedTenders, @JsonKey(name: 'rejected_tenders') int? rejectedTenders, @JsonKey(name: 'self_apply_count') int? selfApplyCount, @JsonKey(name: 'partnership_count') int? partnershipCount, @JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus, @JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission, @JsonKey(name: 'last_updated') int? lastUpdated)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'company_id') String? companyId, @JsonKey(name: 'total_approvals') int? totalApprovals, @JsonKey(name: 'submitted_tenders') int? submittedTenders, @JsonKey(name: 'rejected_tenders') int? rejectedTenders, @JsonKey(name: 'self_apply_count') int? selfApplyCount, @JsonKey(name: 'partnership_count') int? partnershipCount, @JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus, @JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission, @JsonKey(name: 'last_updated') int? lastUpdated)? $default,) {final _that = this;
switch (_that) {
case _TenderApprovalsStateData() when $default != null:
return $default(_that.companyId,_that.totalApprovals,_that.approvedTenders,_that.rejectedTenders,_that.selfApplyCount,_that.partnershipCount,_that.approvalsByStatus,_that.approvalsBySubmission,_that.lastUpdated);case _:
return $default(_that.companyId,_that.totalApprovals,_that.submittedTenders,_that.rejectedTenders,_that.selfApplyCount,_that.partnershipCount,_that.approvalsByStatus,_that.approvalsBySubmission,_that.lastUpdated);case _:
return null;
}
@@ -241,12 +241,12 @@ return $default(_that.companyId,_that.totalApprovals,_that.approvedTenders,_that
@JsonSerializable(explicitToJson: true)
class _TenderApprovalsStateData implements TenderApprovalsStateData {
const _TenderApprovalsStateData({@JsonKey(name: 'company_id') required this.companyId, @JsonKey(name: 'total_approvals') required this.totalApprovals, @JsonKey(name: 'approved_tenders') required this.approvedTenders, @JsonKey(name: 'rejected_tenders') required this.rejectedTenders, @JsonKey(name: 'self_apply_count') required this.selfApplyCount, @JsonKey(name: 'partnership_count') required this.partnershipCount, @JsonKey(name: 'approvals_by_status') required this.approvalsByStatus, @JsonKey(name: 'approvals_by_submission') required this.approvalsBySubmission, @JsonKey(name: 'last_updated') required this.lastUpdated});
const _TenderApprovalsStateData({@JsonKey(name: 'company_id') required this.companyId, @JsonKey(name: 'total_approvals') required this.totalApprovals, @JsonKey(name: 'submitted_tenders') required this.submittedTenders, @JsonKey(name: 'rejected_tenders') required this.rejectedTenders, @JsonKey(name: 'self_apply_count') required this.selfApplyCount, @JsonKey(name: 'partnership_count') required this.partnershipCount, @JsonKey(name: 'approvals_by_status') required this.approvalsByStatus, @JsonKey(name: 'approvals_by_submission') required this.approvalsBySubmission, @JsonKey(name: 'last_updated') required this.lastUpdated});
factory _TenderApprovalsStateData.fromJson(Map<String, dynamic> json) => _$TenderApprovalsStateDataFromJson(json);
@override@JsonKey(name: 'company_id') final String? companyId;
@override@JsonKey(name: 'total_approvals') final int? totalApprovals;
@override@JsonKey(name: 'approved_tenders') final int? approvedTenders;
@override@JsonKey(name: 'submitted_tenders') final int? submittedTenders;
@override@JsonKey(name: 'rejected_tenders') final int? rejectedTenders;
@override@JsonKey(name: 'self_apply_count') final int? selfApplyCount;
@override@JsonKey(name: 'partnership_count') final int? partnershipCount;
@@ -267,16 +267,16 @@ Map<String, dynamic> toJson() {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderApprovalsStateData&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.totalApprovals, totalApprovals) || other.totalApprovals == totalApprovals)&&(identical(other.approvedTenders, approvedTenders) || other.approvedTenders == approvedTenders)&&(identical(other.rejectedTenders, rejectedTenders) || other.rejectedTenders == rejectedTenders)&&(identical(other.selfApplyCount, selfApplyCount) || other.selfApplyCount == selfApplyCount)&&(identical(other.partnershipCount, partnershipCount) || other.partnershipCount == partnershipCount)&&(identical(other.approvalsByStatus, approvalsByStatus) || other.approvalsByStatus == approvalsByStatus)&&(identical(other.approvalsBySubmission, approvalsBySubmission) || other.approvalsBySubmission == approvalsBySubmission)&&(identical(other.lastUpdated, lastUpdated) || other.lastUpdated == lastUpdated));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderApprovalsStateData&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.totalApprovals, totalApprovals) || other.totalApprovals == totalApprovals)&&(identical(other.submittedTenders, submittedTenders) || other.submittedTenders == submittedTenders)&&(identical(other.rejectedTenders, rejectedTenders) || other.rejectedTenders == rejectedTenders)&&(identical(other.selfApplyCount, selfApplyCount) || other.selfApplyCount == selfApplyCount)&&(identical(other.partnershipCount, partnershipCount) || other.partnershipCount == partnershipCount)&&(identical(other.approvalsByStatus, approvalsByStatus) || other.approvalsByStatus == approvalsByStatus)&&(identical(other.approvalsBySubmission, approvalsBySubmission) || other.approvalsBySubmission == approvalsBySubmission)&&(identical(other.lastUpdated, lastUpdated) || other.lastUpdated == lastUpdated));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,companyId,totalApprovals,approvedTenders,rejectedTenders,selfApplyCount,partnershipCount,approvalsByStatus,approvalsBySubmission,lastUpdated);
int get hashCode => Object.hash(runtimeType,companyId,totalApprovals,submittedTenders,rejectedTenders,selfApplyCount,partnershipCount,approvalsByStatus,approvalsBySubmission,lastUpdated);
@override
String toString() {
return 'TenderApprovalsStateData(companyId: $companyId, totalApprovals: $totalApprovals, approvedTenders: $approvedTenders, rejectedTenders: $rejectedTenders, selfApplyCount: $selfApplyCount, partnershipCount: $partnershipCount, approvalsByStatus: $approvalsByStatus, approvalsBySubmission: $approvalsBySubmission, lastUpdated: $lastUpdated)';
return 'TenderApprovalsStateData(companyId: $companyId, totalApprovals: $totalApprovals, submittedTenders: $submittedTenders, rejectedTenders: $rejectedTenders, selfApplyCount: $selfApplyCount, partnershipCount: $partnershipCount, approvalsByStatus: $approvalsByStatus, approvalsBySubmission: $approvalsBySubmission, lastUpdated: $lastUpdated)';
}
@@ -287,7 +287,7 @@ abstract mixin class _$TenderApprovalsStateDataCopyWith<$Res> implements $Tender
factory _$TenderApprovalsStateDataCopyWith(_TenderApprovalsStateData value, $Res Function(_TenderApprovalsStateData) _then) = __$TenderApprovalsStateDataCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'company_id') String? companyId,@JsonKey(name: 'total_approvals') int? totalApprovals,@JsonKey(name: 'approved_tenders') int? approvedTenders,@JsonKey(name: 'rejected_tenders') int? rejectedTenders,@JsonKey(name: 'self_apply_count') int? selfApplyCount,@JsonKey(name: 'partnership_count') int? partnershipCount,@JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus,@JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission,@JsonKey(name: 'last_updated') int? lastUpdated
@JsonKey(name: 'company_id') String? companyId,@JsonKey(name: 'total_approvals') int? totalApprovals,@JsonKey(name: 'submitted_tenders') int? submittedTenders,@JsonKey(name: 'rejected_tenders') int? rejectedTenders,@JsonKey(name: 'self_apply_count') int? selfApplyCount,@JsonKey(name: 'partnership_count') int? partnershipCount,@JsonKey(name: 'approvals_by_status') ApprovalsByStatus? approvalsByStatus,@JsonKey(name: 'approvals_by_submission') ApprovalsBySubmission? approvalsBySubmission,@JsonKey(name: 'last_updated') int? lastUpdated
});
@@ -304,11 +304,11 @@ class __$TenderApprovalsStateDataCopyWithImpl<$Res>
/// Create a copy of TenderApprovalsStateData
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? companyId = freezed,Object? totalApprovals = freezed,Object? approvedTenders = freezed,Object? rejectedTenders = freezed,Object? selfApplyCount = freezed,Object? partnershipCount = freezed,Object? approvalsByStatus = freezed,Object? approvalsBySubmission = freezed,Object? lastUpdated = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? companyId = freezed,Object? totalApprovals = freezed,Object? submittedTenders = freezed,Object? rejectedTenders = freezed,Object? selfApplyCount = freezed,Object? partnershipCount = freezed,Object? approvalsByStatus = freezed,Object? approvalsBySubmission = freezed,Object? lastUpdated = freezed,}) {
return _then(_TenderApprovalsStateData(
companyId: freezed == companyId ? _self.companyId : companyId // ignore: cast_nullable_to_non_nullable
as String?,totalApprovals: freezed == totalApprovals ? _self.totalApprovals : totalApprovals // ignore: cast_nullable_to_non_nullable
as int?,approvedTenders: freezed == approvedTenders ? _self.approvedTenders : approvedTenders // ignore: cast_nullable_to_non_nullable
as int?,submittedTenders: freezed == submittedTenders ? _self.submittedTenders : submittedTenders // ignore: cast_nullable_to_non_nullable
as int?,rejectedTenders: freezed == rejectedTenders ? _self.rejectedTenders : rejectedTenders // ignore: cast_nullable_to_non_nullable
as int?,selfApplyCount: freezed == selfApplyCount ? _self.selfApplyCount : selfApplyCount // ignore: cast_nullable_to_non_nullable
as int?,partnershipCount: freezed == partnershipCount ? _self.partnershipCount : partnershipCount // ignore: cast_nullable_to_non_nullable
@@ -350,7 +350,7 @@ $ApprovalsBySubmissionCopyWith<$Res>? get approvalsBySubmission {
/// @nodoc
mixin _$ApprovalsByStatus {
@JsonKey(name: 'approved') int? get approved;@JsonKey(name: 'rejected') int? get rejected;
@JsonKey(name: 'submitted') int? get submitted;@JsonKey(name: 'rejected') int? get rejected;
/// Create a copy of ApprovalsByStatus
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -363,16 +363,16 @@ $ApprovalsByStatusCopyWith<ApprovalsByStatus> get copyWith => _$ApprovalsByStatu
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ApprovalsByStatus&&(identical(other.approved, approved) || other.approved == approved)&&(identical(other.rejected, rejected) || other.rejected == rejected));
return identical(this, other) || (other.runtimeType == runtimeType&&other is ApprovalsByStatus&&(identical(other.submitted, submitted) || other.submitted == submitted)&&(identical(other.rejected, rejected) || other.rejected == rejected));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,approved,rejected);
int get hashCode => Object.hash(runtimeType,submitted,rejected);
@override
String toString() {
return 'ApprovalsByStatus(approved: $approved, rejected: $rejected)';
return 'ApprovalsByStatus(submitted: $submitted, rejected: $rejected)';
}
@@ -383,7 +383,7 @@ abstract mixin class $ApprovalsByStatusCopyWith<$Res> {
factory $ApprovalsByStatusCopyWith(ApprovalsByStatus value, $Res Function(ApprovalsByStatus) _then) = _$ApprovalsByStatusCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'approved') int? approved,@JsonKey(name: 'rejected') int? rejected
@JsonKey(name: 'submitted') int? submitted,@JsonKey(name: 'rejected') int? rejected
});
@@ -400,9 +400,9 @@ class _$ApprovalsByStatusCopyWithImpl<$Res>
/// Create a copy of ApprovalsByStatus
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? approved = freezed,Object? rejected = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? submitted = freezed,Object? rejected = freezed,}) {
return _then(_self.copyWith(
approved: freezed == approved ? _self.approved : approved // ignore: cast_nullable_to_non_nullable
submitted: freezed == submitted ? _self.submitted : submitted // ignore: cast_nullable_to_non_nullable
as int?,rejected: freezed == rejected ? _self.rejected : rejected // ignore: cast_nullable_to_non_nullable
as int?,
));
@@ -489,10 +489,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'approved') int? approved, @JsonKey(name: 'rejected') int? rejected)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'submitted') int? submitted, @JsonKey(name: 'rejected') int? rejected)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ApprovalsByStatus() when $default != null:
return $default(_that.approved,_that.rejected);case _:
return $default(_that.submitted,_that.rejected);case _:
return orElse();
}
@@ -510,10 +510,10 @@ return $default(_that.approved,_that.rejected);case _:
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'approved') int? approved, @JsonKey(name: 'rejected') int? rejected) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'submitted') int? submitted, @JsonKey(name: 'rejected') int? rejected) $default,) {final _that = this;
switch (_that) {
case _ApprovalsByStatus():
return $default(_that.approved,_that.rejected);case _:
return $default(_that.submitted,_that.rejected);case _:
throw StateError('Unexpected subclass');
}
@@ -530,10 +530,10 @@ return $default(_that.approved,_that.rejected);case _:
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'approved') int? approved, @JsonKey(name: 'rejected') int? rejected)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'submitted') int? submitted, @JsonKey(name: 'rejected') int? rejected)? $default,) {final _that = this;
switch (_that) {
case _ApprovalsByStatus() when $default != null:
return $default(_that.approved,_that.rejected);case _:
return $default(_that.submitted,_that.rejected);case _:
return null;
}
@@ -545,10 +545,10 @@ return $default(_that.approved,_that.rejected);case _:
@JsonSerializable()
class _ApprovalsByStatus implements ApprovalsByStatus {
const _ApprovalsByStatus({@JsonKey(name: 'approved') required this.approved, @JsonKey(name: 'rejected') required this.rejected});
const _ApprovalsByStatus({@JsonKey(name: 'submitted') required this.submitted, @JsonKey(name: 'rejected') required this.rejected});
factory _ApprovalsByStatus.fromJson(Map<String, dynamic> json) => _$ApprovalsByStatusFromJson(json);
@override@JsonKey(name: 'approved') final int? approved;
@override@JsonKey(name: 'submitted') final int? submitted;
@override@JsonKey(name: 'rejected') final int? rejected;
/// Create a copy of ApprovalsByStatus
@@ -564,16 +564,16 @@ Map<String, dynamic> toJson() {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ApprovalsByStatus&&(identical(other.approved, approved) || other.approved == approved)&&(identical(other.rejected, rejected) || other.rejected == rejected));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ApprovalsByStatus&&(identical(other.submitted, submitted) || other.submitted == submitted)&&(identical(other.rejected, rejected) || other.rejected == rejected));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,approved,rejected);
int get hashCode => Object.hash(runtimeType,submitted,rejected);
@override
String toString() {
return 'ApprovalsByStatus(approved: $approved, rejected: $rejected)';
return 'ApprovalsByStatus(submitted: $submitted, rejected: $rejected)';
}
@@ -584,7 +584,7 @@ abstract mixin class _$ApprovalsByStatusCopyWith<$Res> implements $ApprovalsBySt
factory _$ApprovalsByStatusCopyWith(_ApprovalsByStatus value, $Res Function(_ApprovalsByStatus) _then) = __$ApprovalsByStatusCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'approved') int? approved,@JsonKey(name: 'rejected') int? rejected
@JsonKey(name: 'submitted') int? submitted,@JsonKey(name: 'rejected') int? rejected
});
@@ -601,9 +601,9 @@ class __$ApprovalsByStatusCopyWithImpl<$Res>
/// Create a copy of ApprovalsByStatus
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? approved = freezed,Object? rejected = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? submitted = freezed,Object? rejected = freezed,}) {
return _then(_ApprovalsByStatus(
approved: freezed == approved ? _self.approved : approved // ignore: cast_nullable_to_non_nullable
submitted: freezed == submitted ? _self.submitted : submitted // ignore: cast_nullable_to_non_nullable
as int?,rejected: freezed == rejected ? _self.rejected : rejected // ignore: cast_nullable_to_non_nullable
as int?,
));
@@ -11,7 +11,7 @@ _TenderApprovalsStateData _$TenderApprovalsStateDataFromJson(
) => _TenderApprovalsStateData(
companyId: json['company_id'] as String?,
totalApprovals: (json['total_approvals'] as num?)?.toInt(),
approvedTenders: (json['approved_tenders'] as num?)?.toInt(),
submittedTenders: (json['submitted_tenders'] as num?)?.toInt(),
rejectedTenders: (json['rejected_tenders'] as num?)?.toInt(),
selfApplyCount: (json['self_apply_count'] as num?)?.toInt(),
partnershipCount: (json['partnership_count'] as num?)?.toInt(),
@@ -35,7 +35,7 @@ Map<String, dynamic> _$TenderApprovalsStateDataToJson(
) => <String, dynamic>{
'company_id': instance.companyId,
'total_approvals': instance.totalApprovals,
'approved_tenders': instance.approvedTenders,
'submitted_tenders': instance.submittedTenders,
'rejected_tenders': instance.rejectedTenders,
'self_apply_count': instance.selfApplyCount,
'partnership_count': instance.partnershipCount,
@@ -46,13 +46,13 @@ Map<String, dynamic> _$TenderApprovalsStateDataToJson(
_ApprovalsByStatus _$ApprovalsByStatusFromJson(Map<String, dynamic> json) =>
_ApprovalsByStatus(
approved: (json['approved'] as num?)?.toInt(),
submitted: (json['submitted'] as num?)?.toInt(),
rejected: (json['rejected'] as num?)?.toInt(),
);
Map<String, dynamic> _$ApprovalsByStatusToJson(_ApprovalsByStatus instance) =>
<String, dynamic>{
'approved': instance.approved,
'submitted': instance.submitted,
'rejected': instance.rejected,
};
@@ -9,26 +9,32 @@ part 'tender_data.g.dart';
@freezed
abstract class TenderData with _$TenderData {
const factory TenderData({
required bool? success,
required String? message,
required String? id,
@JsonKey(name: 'notice_publication_id') required String? noticePublicationId,
@JsonKey(name: 'publication_date') required int? publicationDate,
@JsonKey(name: 'tender_id') required String? tenderId,
@JsonKey(name: 'notice_publication_id')
required String? noticePublicationId,
@JsonKey(name: 'publication_date') required int? publicationDate,
required String? title,
required String? description,
@JsonKey(name: 'procurement_type_code') required String? procurementTypeCode,
@JsonKey(name: 'procedure_code') required String? procedureCode,
@JsonKey(name: 'estimated_value') required int? estimatedValue,
@JsonKey(name: 'procurement_type_code')
required String? procurementTypeCode,
@JsonKey(name: 'procedure_code') required String? procedureCode,
@JsonKey(name: 'estimated_value') required int? estimatedValue,
required String? currency,
required String? duration,
required String? durationUnit,
@JsonKey(name: 'tender_deadline') required int? tenderDeadline,
@JsonKey(name: 'country_code') required String? countryCode,
@JsonKey(name: 'buyer_organization') required Organization? buyerOrganization,
@JsonKey(name: 'tender_deadline') required int? tenderDeadline,
@JsonKey(name: 'submission_deadline') required int? submissionDeadline,
@JsonKey(name: 'application_deadline') required int? applicationDeadline,
@JsonKey(name: 'submission_url') required String? submissionUrl,
@JsonKey(name: 'country_code') required String? countryCode,
@JsonKey(name: 'buyer_organization')
required Organization? buyerOrganization,
required String? status,
}) = _TenderData;
factory TenderData.fromJson(Map<String, Object?> json) =>
_$TenderDataFromJson(json);
}
}
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$TenderData {
bool? get success; String? get message; String? get id;@JsonKey(name: 'notice_publication_id') String? get noticePublicationId;@JsonKey(name: 'publication_date') int? get publicationDate; String? get title; String? get description;@JsonKey(name: 'procurement_type_code') String? get procurementTypeCode;@JsonKey(name: 'procedure_code') String? get procedureCode;@JsonKey(name: 'estimated_value') int? get estimatedValue; String? get currency; String? get duration; String? get durationUnit;@JsonKey(name: 'tender_deadline') int? get tenderDeadline;@JsonKey(name: 'country_code') String? get countryCode;@JsonKey(name: 'buyer_organization') Organization? get buyerOrganization; String? get status;
bool? get success; String? get message; String? get id;@JsonKey(name: 'tender_id') String? get tenderId;@JsonKey(name: 'notice_publication_id') String? get noticePublicationId;@JsonKey(name: 'publication_date') int? get publicationDate; String? get title; String? get description;@JsonKey(name: 'procurement_type_code') String? get procurementTypeCode;@JsonKey(name: 'procedure_code') String? get procedureCode;@JsonKey(name: 'estimated_value') int? get estimatedValue; String? get currency; String? get duration; String? get durationUnit;@JsonKey(name: 'tender_deadline') int? get tenderDeadline;@JsonKey(name: 'submission_deadline') int? get submissionDeadline;@JsonKey(name: 'application_deadline') int? get applicationDeadline;@JsonKey(name: 'submission_url') String? get submissionUrl;@JsonKey(name: 'country_code') String? get countryCode;@JsonKey(name: 'buyer_organization') Organization? get buyerOrganization; String? get status;
/// Create a copy of TenderData
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $TenderDataCopyWith<TenderData> get copyWith => _$TenderDataCopyWithImpl<TenderD
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is TenderData&&(identical(other.success, success) || other.success == success)&&(identical(other.message, message) || other.message == message)&&(identical(other.id, id) || other.id == id)&&(identical(other.noticePublicationId, noticePublicationId) || other.noticePublicationId == noticePublicationId)&&(identical(other.publicationDate, publicationDate) || other.publicationDate == publicationDate)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.procurementTypeCode, procurementTypeCode) || other.procurementTypeCode == procurementTypeCode)&&(identical(other.procedureCode, procedureCode) || other.procedureCode == procedureCode)&&(identical(other.estimatedValue, estimatedValue) || other.estimatedValue == estimatedValue)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.durationUnit, durationUnit) || other.durationUnit == durationUnit)&&(identical(other.tenderDeadline, tenderDeadline) || other.tenderDeadline == tenderDeadline)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.buyerOrganization, buyerOrganization) || other.buyerOrganization == buyerOrganization)&&(identical(other.status, status) || other.status == status));
return identical(this, other) || (other.runtimeType == runtimeType&&other is TenderData&&(identical(other.success, success) || other.success == success)&&(identical(other.message, message) || other.message == message)&&(identical(other.id, id) || other.id == id)&&(identical(other.tenderId, tenderId) || other.tenderId == tenderId)&&(identical(other.noticePublicationId, noticePublicationId) || other.noticePublicationId == noticePublicationId)&&(identical(other.publicationDate, publicationDate) || other.publicationDate == publicationDate)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.procurementTypeCode, procurementTypeCode) || other.procurementTypeCode == procurementTypeCode)&&(identical(other.procedureCode, procedureCode) || other.procedureCode == procedureCode)&&(identical(other.estimatedValue, estimatedValue) || other.estimatedValue == estimatedValue)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.durationUnit, durationUnit) || other.durationUnit == durationUnit)&&(identical(other.tenderDeadline, tenderDeadline) || other.tenderDeadline == tenderDeadline)&&(identical(other.submissionDeadline, submissionDeadline) || other.submissionDeadline == submissionDeadline)&&(identical(other.applicationDeadline, applicationDeadline) || other.applicationDeadline == applicationDeadline)&&(identical(other.submissionUrl, submissionUrl) || other.submissionUrl == submissionUrl)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.buyerOrganization, buyerOrganization) || other.buyerOrganization == buyerOrganization)&&(identical(other.status, status) || other.status == status));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,success,message,id,noticePublicationId,publicationDate,title,description,procurementTypeCode,procedureCode,estimatedValue,currency,duration,durationUnit,tenderDeadline,countryCode,buyerOrganization,status);
int get hashCode => Object.hashAll([runtimeType,success,message,id,tenderId,noticePublicationId,publicationDate,title,description,procurementTypeCode,procedureCode,estimatedValue,currency,duration,durationUnit,tenderDeadline,submissionDeadline,applicationDeadline,submissionUrl,countryCode,buyerOrganization,status]);
@override
String toString() {
return 'TenderData(success: $success, message: $message, id: $id, noticePublicationId: $noticePublicationId, publicationDate: $publicationDate, title: $title, description: $description, procurementTypeCode: $procurementTypeCode, procedureCode: $procedureCode, estimatedValue: $estimatedValue, currency: $currency, duration: $duration, durationUnit: $durationUnit, tenderDeadline: $tenderDeadline, countryCode: $countryCode, buyerOrganization: $buyerOrganization, status: $status)';
return 'TenderData(success: $success, message: $message, id: $id, tenderId: $tenderId, noticePublicationId: $noticePublicationId, publicationDate: $publicationDate, title: $title, description: $description, procurementTypeCode: $procurementTypeCode, procedureCode: $procedureCode, estimatedValue: $estimatedValue, currency: $currency, duration: $duration, durationUnit: $durationUnit, tenderDeadline: $tenderDeadline, submissionDeadline: $submissionDeadline, applicationDeadline: $applicationDeadline, submissionUrl: $submissionUrl, countryCode: $countryCode, buyerOrganization: $buyerOrganization, status: $status)';
}
@@ -48,7 +48,7 @@ abstract mixin class $TenderDataCopyWith<$Res> {
factory $TenderDataCopyWith(TenderData value, $Res Function(TenderData) _then) = _$TenderDataCopyWithImpl;
@useResult
$Res call({
bool? success, String? message, String? id,@JsonKey(name: 'notice_publication_id') String? noticePublicationId,@JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description,@JsonKey(name: 'procurement_type_code') String? procurementTypeCode,@JsonKey(name: 'procedure_code') String? procedureCode,@JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit,@JsonKey(name: 'tender_deadline') int? tenderDeadline,@JsonKey(name: 'country_code') String? countryCode,@JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status
bool? success, String? message, String? id,@JsonKey(name: 'tender_id') String? tenderId,@JsonKey(name: 'notice_publication_id') String? noticePublicationId,@JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description,@JsonKey(name: 'procurement_type_code') String? procurementTypeCode,@JsonKey(name: 'procedure_code') String? procedureCode,@JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit,@JsonKey(name: 'tender_deadline') int? tenderDeadline,@JsonKey(name: 'submission_deadline') int? submissionDeadline,@JsonKey(name: 'application_deadline') int? applicationDeadline,@JsonKey(name: 'submission_url') String? submissionUrl,@JsonKey(name: 'country_code') String? countryCode,@JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status
});
@@ -65,11 +65,12 @@ class _$TenderDataCopyWithImpl<$Res>
/// Create a copy of TenderData
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? success = freezed,Object? message = freezed,Object? id = freezed,Object? noticePublicationId = freezed,Object? publicationDate = freezed,Object? title = freezed,Object? description = freezed,Object? procurementTypeCode = freezed,Object? procedureCode = freezed,Object? estimatedValue = freezed,Object? currency = freezed,Object? duration = freezed,Object? durationUnit = freezed,Object? tenderDeadline = freezed,Object? countryCode = freezed,Object? buyerOrganization = freezed,Object? status = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? success = freezed,Object? message = freezed,Object? id = freezed,Object? tenderId = freezed,Object? noticePublicationId = freezed,Object? publicationDate = freezed,Object? title = freezed,Object? description = freezed,Object? procurementTypeCode = freezed,Object? procedureCode = freezed,Object? estimatedValue = freezed,Object? currency = freezed,Object? duration = freezed,Object? durationUnit = freezed,Object? tenderDeadline = freezed,Object? submissionDeadline = freezed,Object? applicationDeadline = freezed,Object? submissionUrl = freezed,Object? countryCode = freezed,Object? buyerOrganization = freezed,Object? status = freezed,}) {
return _then(_self.copyWith(
success: freezed == success ? _self.success : success // ignore: cast_nullable_to_non_nullable
as bool?,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String?,id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,tenderId: freezed == tenderId ? _self.tenderId : tenderId // ignore: cast_nullable_to_non_nullable
as String?,noticePublicationId: freezed == noticePublicationId ? _self.noticePublicationId : noticePublicationId // ignore: cast_nullable_to_non_nullable
as String?,publicationDate: freezed == publicationDate ? _self.publicationDate : publicationDate // ignore: cast_nullable_to_non_nullable
as int?,title: freezed == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
@@ -81,7 +82,10 @@ as int?,currency: freezed == currency ? _self.currency : currency // ignore: cas
as String?,duration: freezed == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
as String?,durationUnit: freezed == durationUnit ? _self.durationUnit : durationUnit // ignore: cast_nullable_to_non_nullable
as String?,tenderDeadline: freezed == tenderDeadline ? _self.tenderDeadline : tenderDeadline // ignore: cast_nullable_to_non_nullable
as int?,countryCode: freezed == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
as int?,submissionDeadline: freezed == submissionDeadline ? _self.submissionDeadline : submissionDeadline // ignore: cast_nullable_to_non_nullable
as int?,applicationDeadline: freezed == applicationDeadline ? _self.applicationDeadline : applicationDeadline // ignore: cast_nullable_to_non_nullable
as int?,submissionUrl: freezed == submissionUrl ? _self.submissionUrl : submissionUrl // ignore: cast_nullable_to_non_nullable
as String?,countryCode: freezed == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
as String?,buyerOrganization: freezed == buyerOrganization ? _self.buyerOrganization : buyerOrganization // ignore: cast_nullable_to_non_nullable
as Organization?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String?,
@@ -181,10 +185,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? success, String? message, String? id, @JsonKey(name: 'notice_publication_id') String? noticePublicationId, @JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description, @JsonKey(name: 'procurement_type_code') String? procurementTypeCode, @JsonKey(name: 'procedure_code') String? procedureCode, @JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit, @JsonKey(name: 'tender_deadline') int? tenderDeadline, @JsonKey(name: 'country_code') String? countryCode, @JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? success, String? message, String? id, @JsonKey(name: 'tender_id') String? tenderId, @JsonKey(name: 'notice_publication_id') String? noticePublicationId, @JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description, @JsonKey(name: 'procurement_type_code') String? procurementTypeCode, @JsonKey(name: 'procedure_code') String? procedureCode, @JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit, @JsonKey(name: 'tender_deadline') int? tenderDeadline, @JsonKey(name: 'submission_deadline') int? submissionDeadline, @JsonKey(name: 'application_deadline') int? applicationDeadline, @JsonKey(name: 'submission_url') String? submissionUrl, @JsonKey(name: 'country_code') String? countryCode, @JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _TenderData() when $default != null:
return $default(_that.success,_that.message,_that.id,_that.noticePublicationId,_that.publicationDate,_that.title,_that.description,_that.procurementTypeCode,_that.procedureCode,_that.estimatedValue,_that.currency,_that.duration,_that.durationUnit,_that.tenderDeadline,_that.countryCode,_that.buyerOrganization,_that.status);case _:
return $default(_that.success,_that.message,_that.id,_that.tenderId,_that.noticePublicationId,_that.publicationDate,_that.title,_that.description,_that.procurementTypeCode,_that.procedureCode,_that.estimatedValue,_that.currency,_that.duration,_that.durationUnit,_that.tenderDeadline,_that.submissionDeadline,_that.applicationDeadline,_that.submissionUrl,_that.countryCode,_that.buyerOrganization,_that.status);case _:
return orElse();
}
@@ -202,10 +206,10 @@ return $default(_that.success,_that.message,_that.id,_that.noticePublicationId,_
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? success, String? message, String? id, @JsonKey(name: 'notice_publication_id') String? noticePublicationId, @JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description, @JsonKey(name: 'procurement_type_code') String? procurementTypeCode, @JsonKey(name: 'procedure_code') String? procedureCode, @JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit, @JsonKey(name: 'tender_deadline') int? tenderDeadline, @JsonKey(name: 'country_code') String? countryCode, @JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? success, String? message, String? id, @JsonKey(name: 'tender_id') String? tenderId, @JsonKey(name: 'notice_publication_id') String? noticePublicationId, @JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description, @JsonKey(name: 'procurement_type_code') String? procurementTypeCode, @JsonKey(name: 'procedure_code') String? procedureCode, @JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit, @JsonKey(name: 'tender_deadline') int? tenderDeadline, @JsonKey(name: 'submission_deadline') int? submissionDeadline, @JsonKey(name: 'application_deadline') int? applicationDeadline, @JsonKey(name: 'submission_url') String? submissionUrl, @JsonKey(name: 'country_code') String? countryCode, @JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status) $default,) {final _that = this;
switch (_that) {
case _TenderData():
return $default(_that.success,_that.message,_that.id,_that.noticePublicationId,_that.publicationDate,_that.title,_that.description,_that.procurementTypeCode,_that.procedureCode,_that.estimatedValue,_that.currency,_that.duration,_that.durationUnit,_that.tenderDeadline,_that.countryCode,_that.buyerOrganization,_that.status);case _:
return $default(_that.success,_that.message,_that.id,_that.tenderId,_that.noticePublicationId,_that.publicationDate,_that.title,_that.description,_that.procurementTypeCode,_that.procedureCode,_that.estimatedValue,_that.currency,_that.duration,_that.durationUnit,_that.tenderDeadline,_that.submissionDeadline,_that.applicationDeadline,_that.submissionUrl,_that.countryCode,_that.buyerOrganization,_that.status);case _:
throw StateError('Unexpected subclass');
}
@@ -222,10 +226,10 @@ return $default(_that.success,_that.message,_that.id,_that.noticePublicationId,_
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? success, String? message, String? id, @JsonKey(name: 'notice_publication_id') String? noticePublicationId, @JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description, @JsonKey(name: 'procurement_type_code') String? procurementTypeCode, @JsonKey(name: 'procedure_code') String? procedureCode, @JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit, @JsonKey(name: 'tender_deadline') int? tenderDeadline, @JsonKey(name: 'country_code') String? countryCode, @JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? success, String? message, String? id, @JsonKey(name: 'tender_id') String? tenderId, @JsonKey(name: 'notice_publication_id') String? noticePublicationId, @JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description, @JsonKey(name: 'procurement_type_code') String? procurementTypeCode, @JsonKey(name: 'procedure_code') String? procedureCode, @JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit, @JsonKey(name: 'tender_deadline') int? tenderDeadline, @JsonKey(name: 'submission_deadline') int? submissionDeadline, @JsonKey(name: 'application_deadline') int? applicationDeadline, @JsonKey(name: 'submission_url') String? submissionUrl, @JsonKey(name: 'country_code') String? countryCode, @JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status)? $default,) {final _that = this;
switch (_that) {
case _TenderData() when $default != null:
return $default(_that.success,_that.message,_that.id,_that.noticePublicationId,_that.publicationDate,_that.title,_that.description,_that.procurementTypeCode,_that.procedureCode,_that.estimatedValue,_that.currency,_that.duration,_that.durationUnit,_that.tenderDeadline,_that.countryCode,_that.buyerOrganization,_that.status);case _:
return $default(_that.success,_that.message,_that.id,_that.tenderId,_that.noticePublicationId,_that.publicationDate,_that.title,_that.description,_that.procurementTypeCode,_that.procedureCode,_that.estimatedValue,_that.currency,_that.duration,_that.durationUnit,_that.tenderDeadline,_that.submissionDeadline,_that.applicationDeadline,_that.submissionUrl,_that.countryCode,_that.buyerOrganization,_that.status);case _:
return null;
}
@@ -237,12 +241,13 @@ return $default(_that.success,_that.message,_that.id,_that.noticePublicationId,_
@JsonSerializable()
class _TenderData implements TenderData {
const _TenderData({required this.success, required this.message, required this.id, @JsonKey(name: 'notice_publication_id') required this.noticePublicationId, @JsonKey(name: 'publication_date') required this.publicationDate, required this.title, required this.description, @JsonKey(name: 'procurement_type_code') required this.procurementTypeCode, @JsonKey(name: 'procedure_code') required this.procedureCode, @JsonKey(name: 'estimated_value') required this.estimatedValue, required this.currency, required this.duration, required this.durationUnit, @JsonKey(name: 'tender_deadline') required this.tenderDeadline, @JsonKey(name: 'country_code') required this.countryCode, @JsonKey(name: 'buyer_organization') required this.buyerOrganization, required this.status});
const _TenderData({required this.success, required this.message, required this.id, @JsonKey(name: 'tender_id') required this.tenderId, @JsonKey(name: 'notice_publication_id') required this.noticePublicationId, @JsonKey(name: 'publication_date') required this.publicationDate, required this.title, required this.description, @JsonKey(name: 'procurement_type_code') required this.procurementTypeCode, @JsonKey(name: 'procedure_code') required this.procedureCode, @JsonKey(name: 'estimated_value') required this.estimatedValue, required this.currency, required this.duration, required this.durationUnit, @JsonKey(name: 'tender_deadline') required this.tenderDeadline, @JsonKey(name: 'submission_deadline') required this.submissionDeadline, @JsonKey(name: 'application_deadline') required this.applicationDeadline, @JsonKey(name: 'submission_url') required this.submissionUrl, @JsonKey(name: 'country_code') required this.countryCode, @JsonKey(name: 'buyer_organization') required this.buyerOrganization, required this.status});
factory _TenderData.fromJson(Map<String, dynamic> json) => _$TenderDataFromJson(json);
@override final bool? success;
@override final String? message;
@override final String? id;
@override@JsonKey(name: 'tender_id') final String? tenderId;
@override@JsonKey(name: 'notice_publication_id') final String? noticePublicationId;
@override@JsonKey(name: 'publication_date') final int? publicationDate;
@override final String? title;
@@ -254,6 +259,9 @@ class _TenderData implements TenderData {
@override final String? duration;
@override final String? durationUnit;
@override@JsonKey(name: 'tender_deadline') final int? tenderDeadline;
@override@JsonKey(name: 'submission_deadline') final int? submissionDeadline;
@override@JsonKey(name: 'application_deadline') final int? applicationDeadline;
@override@JsonKey(name: 'submission_url') final String? submissionUrl;
@override@JsonKey(name: 'country_code') final String? countryCode;
@override@JsonKey(name: 'buyer_organization') final Organization? buyerOrganization;
@override final String? status;
@@ -271,16 +279,16 @@ Map<String, dynamic> toJson() {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderData&&(identical(other.success, success) || other.success == success)&&(identical(other.message, message) || other.message == message)&&(identical(other.id, id) || other.id == id)&&(identical(other.noticePublicationId, noticePublicationId) || other.noticePublicationId == noticePublicationId)&&(identical(other.publicationDate, publicationDate) || other.publicationDate == publicationDate)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.procurementTypeCode, procurementTypeCode) || other.procurementTypeCode == procurementTypeCode)&&(identical(other.procedureCode, procedureCode) || other.procedureCode == procedureCode)&&(identical(other.estimatedValue, estimatedValue) || other.estimatedValue == estimatedValue)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.durationUnit, durationUnit) || other.durationUnit == durationUnit)&&(identical(other.tenderDeadline, tenderDeadline) || other.tenderDeadline == tenderDeadline)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.buyerOrganization, buyerOrganization) || other.buyerOrganization == buyerOrganization)&&(identical(other.status, status) || other.status == status));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderData&&(identical(other.success, success) || other.success == success)&&(identical(other.message, message) || other.message == message)&&(identical(other.id, id) || other.id == id)&&(identical(other.tenderId, tenderId) || other.tenderId == tenderId)&&(identical(other.noticePublicationId, noticePublicationId) || other.noticePublicationId == noticePublicationId)&&(identical(other.publicationDate, publicationDate) || other.publicationDate == publicationDate)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.procurementTypeCode, procurementTypeCode) || other.procurementTypeCode == procurementTypeCode)&&(identical(other.procedureCode, procedureCode) || other.procedureCode == procedureCode)&&(identical(other.estimatedValue, estimatedValue) || other.estimatedValue == estimatedValue)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.durationUnit, durationUnit) || other.durationUnit == durationUnit)&&(identical(other.tenderDeadline, tenderDeadline) || other.tenderDeadline == tenderDeadline)&&(identical(other.submissionDeadline, submissionDeadline) || other.submissionDeadline == submissionDeadline)&&(identical(other.applicationDeadline, applicationDeadline) || other.applicationDeadline == applicationDeadline)&&(identical(other.submissionUrl, submissionUrl) || other.submissionUrl == submissionUrl)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.buyerOrganization, buyerOrganization) || other.buyerOrganization == buyerOrganization)&&(identical(other.status, status) || other.status == status));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,success,message,id,noticePublicationId,publicationDate,title,description,procurementTypeCode,procedureCode,estimatedValue,currency,duration,durationUnit,tenderDeadline,countryCode,buyerOrganization,status);
int get hashCode => Object.hashAll([runtimeType,success,message,id,tenderId,noticePublicationId,publicationDate,title,description,procurementTypeCode,procedureCode,estimatedValue,currency,duration,durationUnit,tenderDeadline,submissionDeadline,applicationDeadline,submissionUrl,countryCode,buyerOrganization,status]);
@override
String toString() {
return 'TenderData(success: $success, message: $message, id: $id, noticePublicationId: $noticePublicationId, publicationDate: $publicationDate, title: $title, description: $description, procurementTypeCode: $procurementTypeCode, procedureCode: $procedureCode, estimatedValue: $estimatedValue, currency: $currency, duration: $duration, durationUnit: $durationUnit, tenderDeadline: $tenderDeadline, countryCode: $countryCode, buyerOrganization: $buyerOrganization, status: $status)';
return 'TenderData(success: $success, message: $message, id: $id, tenderId: $tenderId, noticePublicationId: $noticePublicationId, publicationDate: $publicationDate, title: $title, description: $description, procurementTypeCode: $procurementTypeCode, procedureCode: $procedureCode, estimatedValue: $estimatedValue, currency: $currency, duration: $duration, durationUnit: $durationUnit, tenderDeadline: $tenderDeadline, submissionDeadline: $submissionDeadline, applicationDeadline: $applicationDeadline, submissionUrl: $submissionUrl, countryCode: $countryCode, buyerOrganization: $buyerOrganization, status: $status)';
}
@@ -291,7 +299,7 @@ abstract mixin class _$TenderDataCopyWith<$Res> implements $TenderDataCopyWith<$
factory _$TenderDataCopyWith(_TenderData value, $Res Function(_TenderData) _then) = __$TenderDataCopyWithImpl;
@override @useResult
$Res call({
bool? success, String? message, String? id,@JsonKey(name: 'notice_publication_id') String? noticePublicationId,@JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description,@JsonKey(name: 'procurement_type_code') String? procurementTypeCode,@JsonKey(name: 'procedure_code') String? procedureCode,@JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit,@JsonKey(name: 'tender_deadline') int? tenderDeadline,@JsonKey(name: 'country_code') String? countryCode,@JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status
bool? success, String? message, String? id,@JsonKey(name: 'tender_id') String? tenderId,@JsonKey(name: 'notice_publication_id') String? noticePublicationId,@JsonKey(name: 'publication_date') int? publicationDate, String? title, String? description,@JsonKey(name: 'procurement_type_code') String? procurementTypeCode,@JsonKey(name: 'procedure_code') String? procedureCode,@JsonKey(name: 'estimated_value') int? estimatedValue, String? currency, String? duration, String? durationUnit,@JsonKey(name: 'tender_deadline') int? tenderDeadline,@JsonKey(name: 'submission_deadline') int? submissionDeadline,@JsonKey(name: 'application_deadline') int? applicationDeadline,@JsonKey(name: 'submission_url') String? submissionUrl,@JsonKey(name: 'country_code') String? countryCode,@JsonKey(name: 'buyer_organization') Organization? buyerOrganization, String? status
});
@@ -308,11 +316,12 @@ class __$TenderDataCopyWithImpl<$Res>
/// Create a copy of TenderData
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? success = freezed,Object? message = freezed,Object? id = freezed,Object? noticePublicationId = freezed,Object? publicationDate = freezed,Object? title = freezed,Object? description = freezed,Object? procurementTypeCode = freezed,Object? procedureCode = freezed,Object? estimatedValue = freezed,Object? currency = freezed,Object? duration = freezed,Object? durationUnit = freezed,Object? tenderDeadline = freezed,Object? countryCode = freezed,Object? buyerOrganization = freezed,Object? status = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? success = freezed,Object? message = freezed,Object? id = freezed,Object? tenderId = freezed,Object? noticePublicationId = freezed,Object? publicationDate = freezed,Object? title = freezed,Object? description = freezed,Object? procurementTypeCode = freezed,Object? procedureCode = freezed,Object? estimatedValue = freezed,Object? currency = freezed,Object? duration = freezed,Object? durationUnit = freezed,Object? tenderDeadline = freezed,Object? submissionDeadline = freezed,Object? applicationDeadline = freezed,Object? submissionUrl = freezed,Object? countryCode = freezed,Object? buyerOrganization = freezed,Object? status = freezed,}) {
return _then(_TenderData(
success: freezed == success ? _self.success : success // ignore: cast_nullable_to_non_nullable
as bool?,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String?,id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,tenderId: freezed == tenderId ? _self.tenderId : tenderId // ignore: cast_nullable_to_non_nullable
as String?,noticePublicationId: freezed == noticePublicationId ? _self.noticePublicationId : noticePublicationId // ignore: cast_nullable_to_non_nullable
as String?,publicationDate: freezed == publicationDate ? _self.publicationDate : publicationDate // ignore: cast_nullable_to_non_nullable
as int?,title: freezed == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
@@ -324,7 +333,10 @@ as int?,currency: freezed == currency ? _self.currency : currency // ignore: cas
as String?,duration: freezed == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
as String?,durationUnit: freezed == durationUnit ? _self.durationUnit : durationUnit // ignore: cast_nullable_to_non_nullable
as String?,tenderDeadline: freezed == tenderDeadline ? _self.tenderDeadline : tenderDeadline // ignore: cast_nullable_to_non_nullable
as int?,countryCode: freezed == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
as int?,submissionDeadline: freezed == submissionDeadline ? _self.submissionDeadline : submissionDeadline // ignore: cast_nullable_to_non_nullable
as int?,applicationDeadline: freezed == applicationDeadline ? _self.applicationDeadline : applicationDeadline // ignore: cast_nullable_to_non_nullable
as int?,submissionUrl: freezed == submissionUrl ? _self.submissionUrl : submissionUrl // ignore: cast_nullable_to_non_nullable
as String?,countryCode: freezed == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
as String?,buyerOrganization: freezed == buyerOrganization ? _self.buyerOrganization : buyerOrganization // ignore: cast_nullable_to_non_nullable
as Organization?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String?,
@@ -10,6 +10,7 @@ _TenderData _$TenderDataFromJson(Map<String, dynamic> json) => _TenderData(
success: json['success'] as bool?,
message: json['message'] as String?,
id: json['id'] as String?,
tenderId: json['tender_id'] as String?,
noticePublicationId: json['notice_publication_id'] as String?,
publicationDate: (json['publication_date'] as num?)?.toInt(),
title: json['title'] as String?,
@@ -21,6 +22,9 @@ _TenderData _$TenderDataFromJson(Map<String, dynamic> json) => _TenderData(
duration: json['duration'] as String?,
durationUnit: json['durationUnit'] as String?,
tenderDeadline: (json['tender_deadline'] as num?)?.toInt(),
submissionDeadline: (json['submission_deadline'] as num?)?.toInt(),
applicationDeadline: (json['application_deadline'] as num?)?.toInt(),
submissionUrl: json['submission_url'] as String?,
countryCode: json['country_code'] as String?,
buyerOrganization:
json['buyer_organization'] == null
@@ -36,6 +40,7 @@ Map<String, dynamic> _$TenderDataToJson(_TenderData instance) =>
'success': instance.success,
'message': instance.message,
'id': instance.id,
'tender_id': instance.tenderId,
'notice_publication_id': instance.noticePublicationId,
'publication_date': instance.publicationDate,
'title': instance.title,
@@ -47,6 +52,9 @@ Map<String, dynamic> _$TenderDataToJson(_TenderData instance) =>
'duration': instance.duration,
'durationUnit': instance.durationUnit,
'tender_deadline': instance.tenderDeadline,
'submission_deadline': instance.submissionDeadline,
'application_deadline': instance.applicationDeadline,
'submission_url': instance.submissionUrl,
'country_code': instance.countryCode,
'buyer_organization': instance.buyerOrganization,
'status': instance.status,
+7 -4
View File
@@ -7,24 +7,27 @@ import '../../../core/network/network_manager.dart';
class YourTendersService {
YourTendersService({required NetworkManager networkManager})
: _networkManager = networkManager;
: _networkManager = networkManager;
final NetworkManager _networkManager;
Future<Result<TenderApprovalsResponse>> getApprovedTenders() async {
try {
final result = await _networkManager.makeRequest(
'/api/v1/tender-approvals?status=approved',
'/api/v1/tender-approvals?status=submitted',
(json) => TenderApprovalsResponse.fromJson(json),
method: 'GET',
);
return result;
} on DioException catch (e) {
appLogger.error('get approved tenders failed: $e');
appLogger.error('get submitted tenders failed: $e');
return Result.error(e);
} on Exception catch (e, stackTrace) {
appLogger.error('get approved tenders failed: $e', stackTrace: stackTrace);
appLogger.error(
'get submitted tenders failed: $e',
stackTrace: stackTrace,
);
return Result.error(Exception(e));
}
}