fix : some ui bug

This commit is contained in:
2025-09-21 15:42:08 +03:30
parent 50d708469c
commit 338dd8f681
8 changed files with 241 additions and 82 deletions

View File

@@ -21,6 +21,14 @@ abstract class HatchingReport with _$HatchingReport {
String? reporterMobile,
String? createdBy,
String? modifiedBy,
String? messageRegistererRole,
String? messageRegistererMobile,
String? messageRegistererFullname,
String? message,
String? messageAi,
int? realQuantity,
int? realQuantityAi,
String? state,
}) = _HatchingReport;
factory HatchingReport.fromJson(Map<String, dynamic> json) => _$HatchingReportFromJson(json);

View File

@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$HatchingReport {
int? get id; PoultryScience? get poultryScience; Hatching? get hatching; String? get key; String? get createDate; String? get modifyDate; bool? get trash; String? get date; List<String>? get image; double? get lat; double? get log; String? get reporterFullname; String? get reporterMobile; String? get createdBy; String? get modifiedBy;
int? get id; PoultryScience? get poultryScience; Hatching? get hatching; String? get key; String? get createDate; String? get modifyDate; bool? get trash; String? get date; List<String>? get image; double? get lat; double? get log; String? get reporterFullname; String? get reporterMobile; String? get createdBy; String? get modifiedBy; String? get messageRegistererRole; String? get messageRegistererMobile; String? get messageRegistererFullname; String? get message; String? get messageAi; int? get realQuantity; int? get realQuantityAi; String? get state;
/// Create a copy of HatchingReport
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $HatchingReportCopyWith<HatchingReport> get copyWith => _$HatchingReportCopyWith
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is HatchingReport&&(identical(other.id, id) || other.id == id)&&(identical(other.poultryScience, poultryScience) || other.poultryScience == poultryScience)&&(identical(other.hatching, hatching) || other.hatching == hatching)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.image, image)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.log, log) || other.log == log)&&(identical(other.reporterFullname, reporterFullname) || other.reporterFullname == reporterFullname)&&(identical(other.reporterMobile, reporterMobile) || other.reporterMobile == reporterMobile)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy));
return identical(this, other) || (other.runtimeType == runtimeType&&other is HatchingReport&&(identical(other.id, id) || other.id == id)&&(identical(other.poultryScience, poultryScience) || other.poultryScience == poultryScience)&&(identical(other.hatching, hatching) || other.hatching == hatching)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.image, image)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.log, log) || other.log == log)&&(identical(other.reporterFullname, reporterFullname) || other.reporterFullname == reporterFullname)&&(identical(other.reporterMobile, reporterMobile) || other.reporterMobile == reporterMobile)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy)&&(identical(other.messageRegistererRole, messageRegistererRole) || other.messageRegistererRole == messageRegistererRole)&&(identical(other.messageRegistererMobile, messageRegistererMobile) || other.messageRegistererMobile == messageRegistererMobile)&&(identical(other.messageRegistererFullname, messageRegistererFullname) || other.messageRegistererFullname == messageRegistererFullname)&&(identical(other.message, message) || other.message == message)&&(identical(other.messageAi, messageAi) || other.messageAi == messageAi)&&(identical(other.realQuantity, realQuantity) || other.realQuantity == realQuantity)&&(identical(other.realQuantityAi, realQuantityAi) || other.realQuantityAi == realQuantityAi)&&(identical(other.state, state) || other.state == state));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,poultryScience,hatching,key,createDate,modifyDate,trash,date,const DeepCollectionEquality().hash(image),lat,log,reporterFullname,reporterMobile,createdBy,modifiedBy);
int get hashCode => Object.hashAll([runtimeType,id,poultryScience,hatching,key,createDate,modifyDate,trash,date,const DeepCollectionEquality().hash(image),lat,log,reporterFullname,reporterMobile,createdBy,modifiedBy,messageRegistererRole,messageRegistererMobile,messageRegistererFullname,message,messageAi,realQuantity,realQuantityAi,state]);
@override
String toString() {
return 'HatchingReport(id: $id, poultryScience: $poultryScience, hatching: $hatching, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, date: $date, image: $image, lat: $lat, log: $log, reporterFullname: $reporterFullname, reporterMobile: $reporterMobile, createdBy: $createdBy, modifiedBy: $modifiedBy)';
return 'HatchingReport(id: $id, poultryScience: $poultryScience, hatching: $hatching, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, date: $date, image: $image, lat: $lat, log: $log, reporterFullname: $reporterFullname, reporterMobile: $reporterMobile, createdBy: $createdBy, modifiedBy: $modifiedBy, messageRegistererRole: $messageRegistererRole, messageRegistererMobile: $messageRegistererMobile, messageRegistererFullname: $messageRegistererFullname, message: $message, messageAi: $messageAi, realQuantity: $realQuantity, realQuantityAi: $realQuantityAi, state: $state)';
}
@@ -48,7 +48,7 @@ abstract mixin class $HatchingReportCopyWith<$Res> {
factory $HatchingReportCopyWith(HatchingReport value, $Res Function(HatchingReport) _then) = _$HatchingReportCopyWithImpl;
@useResult
$Res call({
int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy
int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy, String? messageRegistererRole, String? messageRegistererMobile, String? messageRegistererFullname, String? message, String? messageAi, int? realQuantity, int? realQuantityAi, String? state
});
@@ -65,7 +65,7 @@ class _$HatchingReportCopyWithImpl<$Res>
/// Create a copy of HatchingReport
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? poultryScience = freezed,Object? hatching = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? date = freezed,Object? image = freezed,Object? lat = freezed,Object? log = freezed,Object? reporterFullname = freezed,Object? reporterMobile = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? poultryScience = freezed,Object? hatching = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? date = freezed,Object? image = freezed,Object? lat = freezed,Object? log = freezed,Object? reporterFullname = freezed,Object? reporterMobile = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? messageRegistererRole = freezed,Object? messageRegistererMobile = freezed,Object? messageRegistererFullname = freezed,Object? message = freezed,Object? messageAi = freezed,Object? realQuantity = freezed,Object? realQuantityAi = freezed,Object? state = freezed,}) {
return _then(_self.copyWith(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as int?,poultryScience: freezed == poultryScience ? _self.poultryScience : poultryScience // ignore: cast_nullable_to_non_nullable
@@ -82,6 +82,14 @@ as double?,reporterFullname: freezed == reporterFullname ? _self.reporterFullnam
as String?,reporterMobile: freezed == reporterMobile ? _self.reporterMobile : reporterMobile // ignore: cast_nullable_to_non_nullable
as String?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
as String?,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable
as String?,messageRegistererRole: freezed == messageRegistererRole ? _self.messageRegistererRole : messageRegistererRole // ignore: cast_nullable_to_non_nullable
as String?,messageRegistererMobile: freezed == messageRegistererMobile ? _self.messageRegistererMobile : messageRegistererMobile // ignore: cast_nullable_to_non_nullable
as String?,messageRegistererFullname: freezed == messageRegistererFullname ? _self.messageRegistererFullname : messageRegistererFullname // ignore: cast_nullable_to_non_nullable
as String?,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String?,messageAi: freezed == messageAi ? _self.messageAi : messageAi // ignore: cast_nullable_to_non_nullable
as String?,realQuantity: freezed == realQuantity ? _self.realQuantity : realQuantity // ignore: cast_nullable_to_non_nullable
as int?,realQuantityAi: freezed == realQuantityAi ? _self.realQuantityAi : realQuantityAi // ignore: cast_nullable_to_non_nullable
as int?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
as String?,
));
}
@@ -191,10 +199,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy, String? messageRegistererRole, String? messageRegistererMobile, String? messageRegistererFullname, String? message, String? messageAi, int? realQuantity, int? realQuantityAi, String? state)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _HatchingReport() when $default != null:
return $default(_that.id,_that.poultryScience,_that.hatching,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.date,_that.image,_that.lat,_that.log,_that.reporterFullname,_that.reporterMobile,_that.createdBy,_that.modifiedBy);case _:
return $default(_that.id,_that.poultryScience,_that.hatching,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.date,_that.image,_that.lat,_that.log,_that.reporterFullname,_that.reporterMobile,_that.createdBy,_that.modifiedBy,_that.messageRegistererRole,_that.messageRegistererMobile,_that.messageRegistererFullname,_that.message,_that.messageAi,_that.realQuantity,_that.realQuantityAi,_that.state);case _:
return orElse();
}
@@ -212,10 +220,10 @@ return $default(_that.id,_that.poultryScience,_that.hatching,_that.key,_that.cre
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy, String? messageRegistererRole, String? messageRegistererMobile, String? messageRegistererFullname, String? message, String? messageAi, int? realQuantity, int? realQuantityAi, String? state) $default,) {final _that = this;
switch (_that) {
case _HatchingReport():
return $default(_that.id,_that.poultryScience,_that.hatching,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.date,_that.image,_that.lat,_that.log,_that.reporterFullname,_that.reporterMobile,_that.createdBy,_that.modifiedBy);case _:
return $default(_that.id,_that.poultryScience,_that.hatching,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.date,_that.image,_that.lat,_that.log,_that.reporterFullname,_that.reporterMobile,_that.createdBy,_that.modifiedBy,_that.messageRegistererRole,_that.messageRegistererMobile,_that.messageRegistererFullname,_that.message,_that.messageAi,_that.realQuantity,_that.realQuantityAi,_that.state);case _:
throw StateError('Unexpected subclass');
}
@@ -232,10 +240,10 @@ return $default(_that.id,_that.poultryScience,_that.hatching,_that.key,_that.cre
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy, String? messageRegistererRole, String? messageRegistererMobile, String? messageRegistererFullname, String? message, String? messageAi, int? realQuantity, int? realQuantityAi, String? state)? $default,) {final _that = this;
switch (_that) {
case _HatchingReport() when $default != null:
return $default(_that.id,_that.poultryScience,_that.hatching,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.date,_that.image,_that.lat,_that.log,_that.reporterFullname,_that.reporterMobile,_that.createdBy,_that.modifiedBy);case _:
return $default(_that.id,_that.poultryScience,_that.hatching,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.date,_that.image,_that.lat,_that.log,_that.reporterFullname,_that.reporterMobile,_that.createdBy,_that.modifiedBy,_that.messageRegistererRole,_that.messageRegistererMobile,_that.messageRegistererFullname,_that.message,_that.messageAi,_that.realQuantity,_that.realQuantityAi,_that.state);case _:
return null;
}
@@ -247,7 +255,7 @@ return $default(_that.id,_that.poultryScience,_that.hatching,_that.key,_that.cre
@JsonSerializable()
class _HatchingReport implements HatchingReport {
const _HatchingReport({this.id, this.poultryScience, this.hatching, this.key, this.createDate, this.modifyDate, this.trash, this.date, final List<String>? image, this.lat, this.log, this.reporterFullname, this.reporterMobile, this.createdBy, this.modifiedBy}): _image = image;
const _HatchingReport({this.id, this.poultryScience, this.hatching, this.key, this.createDate, this.modifyDate, this.trash, this.date, final List<String>? image, this.lat, this.log, this.reporterFullname, this.reporterMobile, this.createdBy, this.modifiedBy, this.messageRegistererRole, this.messageRegistererMobile, this.messageRegistererFullname, this.message, this.messageAi, this.realQuantity, this.realQuantityAi, this.state}): _image = image;
factory _HatchingReport.fromJson(Map<String, dynamic> json) => _$HatchingReportFromJson(json);
@override final int? id;
@@ -273,6 +281,14 @@ class _HatchingReport implements HatchingReport {
@override final String? reporterMobile;
@override final String? createdBy;
@override final String? modifiedBy;
@override final String? messageRegistererRole;
@override final String? messageRegistererMobile;
@override final String? messageRegistererFullname;
@override final String? message;
@override final String? messageAi;
@override final int? realQuantity;
@override final int? realQuantityAi;
@override final String? state;
/// Create a copy of HatchingReport
/// with the given fields replaced by the non-null parameter values.
@@ -287,16 +303,16 @@ Map<String, dynamic> toJson() {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _HatchingReport&&(identical(other.id, id) || other.id == id)&&(identical(other.poultryScience, poultryScience) || other.poultryScience == poultryScience)&&(identical(other.hatching, hatching) || other.hatching == hatching)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other._image, _image)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.log, log) || other.log == log)&&(identical(other.reporterFullname, reporterFullname) || other.reporterFullname == reporterFullname)&&(identical(other.reporterMobile, reporterMobile) || other.reporterMobile == reporterMobile)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _HatchingReport&&(identical(other.id, id) || other.id == id)&&(identical(other.poultryScience, poultryScience) || other.poultryScience == poultryScience)&&(identical(other.hatching, hatching) || other.hatching == hatching)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other._image, _image)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.log, log) || other.log == log)&&(identical(other.reporterFullname, reporterFullname) || other.reporterFullname == reporterFullname)&&(identical(other.reporterMobile, reporterMobile) || other.reporterMobile == reporterMobile)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy)&&(identical(other.messageRegistererRole, messageRegistererRole) || other.messageRegistererRole == messageRegistererRole)&&(identical(other.messageRegistererMobile, messageRegistererMobile) || other.messageRegistererMobile == messageRegistererMobile)&&(identical(other.messageRegistererFullname, messageRegistererFullname) || other.messageRegistererFullname == messageRegistererFullname)&&(identical(other.message, message) || other.message == message)&&(identical(other.messageAi, messageAi) || other.messageAi == messageAi)&&(identical(other.realQuantity, realQuantity) || other.realQuantity == realQuantity)&&(identical(other.realQuantityAi, realQuantityAi) || other.realQuantityAi == realQuantityAi)&&(identical(other.state, state) || other.state == state));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,poultryScience,hatching,key,createDate,modifyDate,trash,date,const DeepCollectionEquality().hash(_image),lat,log,reporterFullname,reporterMobile,createdBy,modifiedBy);
int get hashCode => Object.hashAll([runtimeType,id,poultryScience,hatching,key,createDate,modifyDate,trash,date,const DeepCollectionEquality().hash(_image),lat,log,reporterFullname,reporterMobile,createdBy,modifiedBy,messageRegistererRole,messageRegistererMobile,messageRegistererFullname,message,messageAi,realQuantity,realQuantityAi,state]);
@override
String toString() {
return 'HatchingReport(id: $id, poultryScience: $poultryScience, hatching: $hatching, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, date: $date, image: $image, lat: $lat, log: $log, reporterFullname: $reporterFullname, reporterMobile: $reporterMobile, createdBy: $createdBy, modifiedBy: $modifiedBy)';
return 'HatchingReport(id: $id, poultryScience: $poultryScience, hatching: $hatching, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, date: $date, image: $image, lat: $lat, log: $log, reporterFullname: $reporterFullname, reporterMobile: $reporterMobile, createdBy: $createdBy, modifiedBy: $modifiedBy, messageRegistererRole: $messageRegistererRole, messageRegistererMobile: $messageRegistererMobile, messageRegistererFullname: $messageRegistererFullname, message: $message, messageAi: $messageAi, realQuantity: $realQuantity, realQuantityAi: $realQuantityAi, state: $state)';
}
@@ -307,7 +323,7 @@ abstract mixin class _$HatchingReportCopyWith<$Res> implements $HatchingReportCo
factory _$HatchingReportCopyWith(_HatchingReport value, $Res Function(_HatchingReport) _then) = __$HatchingReportCopyWithImpl;
@override @useResult
$Res call({
int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy
int? id, PoultryScience? poultryScience, Hatching? hatching, String? key, String? createDate, String? modifyDate, bool? trash, String? date, List<String>? image, double? lat, double? log, String? reporterFullname, String? reporterMobile, String? createdBy, String? modifiedBy, String? messageRegistererRole, String? messageRegistererMobile, String? messageRegistererFullname, String? message, String? messageAi, int? realQuantity, int? realQuantityAi, String? state
});
@@ -324,7 +340,7 @@ class __$HatchingReportCopyWithImpl<$Res>
/// Create a copy of HatchingReport
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? poultryScience = freezed,Object? hatching = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? date = freezed,Object? image = freezed,Object? lat = freezed,Object? log = freezed,Object? reporterFullname = freezed,Object? reporterMobile = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? poultryScience = freezed,Object? hatching = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? date = freezed,Object? image = freezed,Object? lat = freezed,Object? log = freezed,Object? reporterFullname = freezed,Object? reporterMobile = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? messageRegistererRole = freezed,Object? messageRegistererMobile = freezed,Object? messageRegistererFullname = freezed,Object? message = freezed,Object? messageAi = freezed,Object? realQuantity = freezed,Object? realQuantityAi = freezed,Object? state = freezed,}) {
return _then(_HatchingReport(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as int?,poultryScience: freezed == poultryScience ? _self.poultryScience : poultryScience // ignore: cast_nullable_to_non_nullable
@@ -341,6 +357,14 @@ as double?,reporterFullname: freezed == reporterFullname ? _self.reporterFullnam
as String?,reporterMobile: freezed == reporterMobile ? _self.reporterMobile : reporterMobile // ignore: cast_nullable_to_non_nullable
as String?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
as String?,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable
as String?,messageRegistererRole: freezed == messageRegistererRole ? _self.messageRegistererRole : messageRegistererRole // ignore: cast_nullable_to_non_nullable
as String?,messageRegistererMobile: freezed == messageRegistererMobile ? _self.messageRegistererMobile : messageRegistererMobile // ignore: cast_nullable_to_non_nullable
as String?,messageRegistererFullname: freezed == messageRegistererFullname ? _self.messageRegistererFullname : messageRegistererFullname // ignore: cast_nullable_to_non_nullable
as String?,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String?,messageAi: freezed == messageAi ? _self.messageAi : messageAi // ignore: cast_nullable_to_non_nullable
as String?,realQuantity: freezed == realQuantity ? _self.realQuantity : realQuantity // ignore: cast_nullable_to_non_nullable
as int?,realQuantityAi: freezed == realQuantityAi ? _self.realQuantityAi : realQuantityAi // ignore: cast_nullable_to_non_nullable
as int?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
as String?,
));
}

View File

@@ -31,6 +31,14 @@ _HatchingReport _$HatchingReportFromJson(Map<String, dynamic> json) =>
reporterMobile: json['reporter_mobile'] as String?,
createdBy: json['created_by'] as String?,
modifiedBy: json['modified_by'] as String?,
messageRegistererRole: json['message_registerer_role'] as String?,
messageRegistererMobile: json['message_registerer_mobile'] as String?,
messageRegistererFullname: json['message_registerer_fullname'] as String?,
message: json['message'] as String?,
messageAi: json['message_ai'] as String?,
realQuantity: (json['real_quantity'] as num?)?.toInt(),
realQuantityAi: (json['real_quantity_ai'] as num?)?.toInt(),
state: json['state'] as String?,
);
Map<String, dynamic> _$HatchingReportToJson(_HatchingReport instance) =>
@@ -50,6 +58,14 @@ Map<String, dynamic> _$HatchingReportToJson(_HatchingReport instance) =>
'reporter_mobile': instance.reporterMobile,
'created_by': instance.createdBy,
'modified_by': instance.modifiedBy,
'message_registerer_role': instance.messageRegistererRole,
'message_registerer_mobile': instance.messageRegistererMobile,
'message_registerer_fullname': instance.messageRegistererFullname,
'message': instance.message,
'message_ai': instance.messageAi,
'real_quantity': instance.realQuantity,
'real_quantity_ai': instance.realQuantityAi,
'state': instance.state,
};
_PoultryScience _$PoultryScienceFromJson(Map<String, dynamic> json) =>

View File

@@ -98,25 +98,13 @@ class ActiveHatchingPage extends GetView<ActiveHatchingLogic> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
spacing: 3,
children: [
Text('نژاد:', style: AppFonts.yekan14.copyWith(color: AppColor.textColor)),
Text(
item.breed?.first.breed ?? 'N/A',
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
),
SizedBox(width: 2),
Text('نژاد:${item.breed?.first.breed ?? 'N/A'}', style: AppFonts.yekan14.copyWith(color: AppColor.textColor)),
Text(
' سن${item.age}',
' سن${item.age} (روز)',
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
),
],
),
Text(
' دوره جوجه ریزی:${item.period}',
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
@@ -126,13 +114,13 @@ class ActiveHatchingPage extends GetView<ActiveHatchingLogic> {
),
buildRow(title: 'شماره مجوز جوجه ریزی', value: item.licenceNumber ?? 'N/A'),
buildRow(
buildUnitRow(
title: 'حجم جوجه ریزی',
value: item.quantity.separatedByCommaFa,
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
unit: '(قطعه)',
),
buildRow(title: 'مانده در سالن', value: item.leftOver.separatedByCommaFa),
buildRow(title: 'تلفات', value: item.losses.separatedByCommaFa),
buildUnitRow(title: 'مانده در سالن', value: item.leftOver.separatedByCommaFa,unit: '(قطعه)',),
buildUnitRow(title: 'تلفات', value: item.losses.separatedByCommaFa,unit: '(قطعه)',),
buildRow(
title: 'دامپزشک فارم',
value: '${item.vetFarm?.vetFarmFullName}(${item.vetFarm?.vetFarmMobile})',

View File

@@ -131,9 +131,9 @@ class FarmPage extends GetView<FarmLogic> {
buildRow(title: 'کد بهداشتی', value: item.healthCertificateNumber ?? 'N/A'),
buildRow(
title: 'دامپزشک فارم',
value: '${item.vetFarm?.fullName ?? '-'} (${item.vetFarm?.mobile ?? '-'})',
value: '${item.vetFarm?.fullName} (${item.vetFarm?.mobile ?? '-'})',
),
buildRow(title: 'ظرفیت فارم', value: item.totalCapacity.separatedByCommaFa),
buildUnitRow(title: 'ظرفیت فارم', value: item.totalCapacity.separatedByCommaFa, unit: '(قطعه)'),
buildRow(
title: 'جوجه ریزی فعال (تعداد دوره) ',
value:

View File

@@ -118,7 +118,7 @@ class GenocidePage extends GetView<GenocideLogic> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'سن مرغ: ${item.hatching?.age ?? '-'}',
'سن مرغ:${item.hatching?.age ?? '-'} (روز)',
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
),

View File

@@ -1,3 +1,4 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart';
import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart';
import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.dart';
@@ -26,6 +27,10 @@ class InspectionPoultryScienceLogic extends GetxController {
RxList<String> routesName = RxList();
RxInt selectedSegmentIndex = 0.obs;
RxnString searchedValue = RxnString();
Rx<Jalali> fromDateFilter = Jalali.now().obs;
Rx<Jalali> toDateFilter = Jalali.now().obs;
@override
void onInit() {
super.onInit();
@@ -68,12 +73,12 @@ class InspectionPoultryScienceLogic extends GetxController {
} else {
hatchingList.value = Resource<PaginationModel<HatchingModel>>.loading();
}
/*
if (searchedValue.value != null &&
searchedValue.value!.trim().isNotEmpty &&
currentPage.value > 1) {
currentPage.value = 1;
}*/
}
safeCall(
call: () async => await rootLogic.poultryRepository.getHatchingPoultry(
@@ -81,6 +86,10 @@ class InspectionPoultryScienceLogic extends GetxController {
queryParameters: buildQueryParams(
queryParams: {'type': 'hatching', 'report': true},
role: 'PoultryScience',
search: 'filter',
value: searchedValue.value,
fromDate: fromDateFilter.value.toDateTime(),
toDate: toDateFilter.value.toDateTime(),
pageSize: 50,
page: currentPage.value,
),
@@ -108,12 +117,12 @@ class InspectionPoultryScienceLogic extends GetxController {
} else {
hatchingReportList.value = Resource<PaginationModel<HatchingReport>>.loading();
}
/*
if (searchedValue.value != null &&
searchedValue.value!.trim().isNotEmpty &&
currentPage.value > 1) {
currentPage.value = 1;
}*/
}
safeCall(
call: () async => await rootLogic.poultryRepository.getHatchingPoultryReport(
@@ -122,7 +131,9 @@ class InspectionPoultryScienceLogic extends GetxController {
role: 'PoultryScience',
pageSize: 50,
search: 'filter',
value: '',
value: searchedValue.value,
fromDate: fromDateFilter.value.toDateTime(),
toDate: toDateFilter.value.toDateTime(),
page: currentPage.value,
),
),
@@ -214,4 +225,34 @@ class InspectionPoultryScienceLogic extends GetxController {
void toggleExpanded(int index) {
expandedIndex.value = expandedIndex.value == index ? -1 : index;
}
String getStatus(HatchingReport item) {
if (item.state == 'accepted') {
return 'تکمیل شده';
} else if (item.state == 'rejected') {
return 'رد شده';
} else {
return 'در حال بررسی';
}
}
Color getStatusColor(HatchingReport item) {
if (item.state == 'accepted') {
return AppColor.greenNormal;
} else if (item.state == 'rejected') {
return AppColor.redNormal;
} else {
return AppColor.yellowNormal;
}
}
void setSearchValue(String? data) {
searchedValue.value = data?.trim();
final isReporter = selectedSegmentIndex.value == 0;
if (isReporter) {
getHatchingReport();
} else {
getHatchingList();
}
}
}

View File

@@ -17,7 +17,11 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
Widget build(BuildContext context) {
return BasePage(
hasBack: true,
hasFilter: false,
hasFilter: true,
hasSearch: true,
filteringWidget: filterBottomSheet(),
onSearchChanged: (data) => controller.setSearchValue(data),
routesWidget: ObxValue((route) => buildPageRoute(route), controller.routesName),
onBackPressed: () => Get.back(id: poultryFirstKey),
widgets: [
@@ -105,25 +109,13 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
spacing: 3,
children: [
Text('نژاد:', style: AppFonts.yekan14.copyWith(color: AppColor.textColor)),
Text(
item.breed?.first.breed ?? 'N/A',
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
),
SizedBox(width: 2),
Text('نژاد:${ item.breed?.first.breed ?? 'N/A'}', style: AppFonts.yekan14.copyWith(color: AppColor.textColor)),
Text(
' سن${item.age}',
' سن ${item.age} (روزه)',
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
),
],
),
Text(
' دوره جوجه ریزی:${item.period}',
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
@@ -133,16 +125,18 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
),
buildRow(title: 'شماره مجوز جوجه ریزی', value: item.licenceNumber ?? 'N/A'),
buildRow(
buildUnitRow(
title: 'حجم جوجه ریزی',
value: item.quantity.separatedByCommaFa,
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
unit: '(قطعه)',
),
buildRow(title: 'مانده در سالن', value: item.leftOver.separatedByCommaFa),
buildRow(title: 'تلفات', value: item.losses.separatedByCommaFa),
buildUnitRow(title: 'مانده در سالن', value: item.leftOver.separatedByCommaFa,unit: '(قطعه)',),
buildUnitRow(title: 'تلفات', value: item.losses.separatedByCommaFa,unit: '(قطعه)',),
buildRow(
title: 'دامپزشک فارم',
value: '${item.vetFarm?.vetFarmFullName}(${item.vetFarm?.vetFarmMobile})',
),
buildRow(
title: 'شرح بازرسی',
@@ -342,7 +336,7 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
index: index,
child: itemListWidgetReport(item),
secondChild: itemListExpandedWidgetReport(item),
labelColor: AppColor.greenLight,
labelColor: item.state == 'rejected' ? AppColor.redLight : AppColor.greenLight,
labelIcon: Assets.vec.checkSquareSvg.path,
);
}, controller.expandedIndex);
@@ -407,16 +401,15 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
),
SizedBox(width: 2),
Text(
' سن${item.hatching?.chickenAge}',
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
),
],
),
Text(
' سن ${item.hatching?.chickenAge} (روزه)',
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
),
Text(
' دوره جوجه ریزی:${item.hatching?.period}',
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
@@ -426,16 +419,18 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
),
buildRow(title: 'شماره مجوز جوجه ریزی', value: item.hatching?.licenceNumber ?? 'N/A'),
buildRow(
buildUnitRow(
title: 'حجم جوجه ریزی',
value: item.hatching?.quantity.separatedByCommaFa ?? 'N/A',
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
unit: '(قطعه)'
),
buildRow(
buildUnitRow(
title: 'مانده در سالن',
value: item.hatching?.leftOver.separatedByCommaFa ?? 'N/A',
unit: '(قطعه)'
),
buildRow(title: 'تلفات', value: item.hatching?.losses.separatedByCommaFa ?? 'N/A'),
buildUnitRow(title: 'تلفات', value: item.hatching?.losses.separatedByCommaFa ?? 'N/A', unit: '(قطعه)'),
buildRow(
title: 'دامپزشک فارم',
value:
@@ -443,11 +438,52 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
),
buildRow(
title: 'شرح بازرسی',
value: 'تکمیل شده',
titleStyle: AppFonts.yekan14.copyWith(color: AppColor.greenNormal),
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.greenNormal),
value: controller.getStatus(item),
titleStyle: AppFonts.yekan14.copyWith(color: controller.getStatusColor(item)),
valueStyle: AppFonts.yekan14.copyWith(color: controller.getStatusColor(item)),
),
if (item.state == 'accepted') ...{
Visibility(
visible: item.realQuantityAi != null,
child: buildRow(title: 'تعداد تاییده هوش مصنوعی', value: item.realQuantityAi.separatedByComma),
),
Visibility(
visible: item.realQuantity != null,
child: buildRow(title: 'تعداد تاییده', value: item.realQuantity.separatedByComma ?? '-'),
),
},
if (item.state == 'rejected') ...{
Visibility(
visible: item.messageAi != null,
child: buildRow(title: 'پیام هوش مصنوعی', value: item.messageAi ?? '-'),
),
Visibility(
visible: item.message != null,
child: buildRow(title: 'پیام', value: item.message ?? '-'),
),
Visibility(
visible: item.messageRegistererFullname != null,
child: buildRow(
title: 'ثبت کننده گزارش',
value: item.messageRegistererFullname ?? '-',
),
),
Visibility(
visible: item.messageRegistererMobile != null,
child: buildRow(
title: 'موبایل کننده گزارش',
value: item.messageRegistererMobile ?? '-',
),
),
Visibility(
visible: item.messageRegistererRole != null,
child: buildRow(title: 'نقش کننده گزارش', value: item.messageRegistererRole ?? '-'),
),
},
SizedBox(
height: 140.h,
child: GridView.builder(
@@ -459,7 +495,7 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
crossAxisSpacing: 10,
),
itemBuilder: (context, index) => Container(
height: 138.h,
height: 100.h,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.r),
@@ -589,4 +625,50 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
],
);
}
Widget filterBottomSheet() {
return BaseBottomSheet(
height: 200,
child: Column(
spacing: 16,
children: [
Text('فیلترها', style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal)),
Row(
spacing: 8,
children: [
Expanded(
child: dateFilterWidget(
date: controller.fromDateFilter,
onChanged: (jalali) => controller.fromDateFilter.value = jalali,
),
),
Expanded(
child: dateFilterWidget(
isFrom: false,
date: controller.toDateFilter,
onChanged: (jalali) => controller.toDateFilter.value = jalali,
),
),
],
),
RElevated(
text: 'اعمال فیلتر',
isFullWidth: true,
backgroundColor: AppColor.greenNormal,
onPressed: () {
final isReporter = controller.selectedSegmentIndex.value == 0;
if (isReporter) {
controller.getHatchingReport();
} else {
controller.getHatchingList();
}
Get.back();
},
height: 40,
),
],
),
);
}
}