feat : new changes from back
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
sdk.dir=C:/Users/Housh11/AppData/Local/Android/Sdk
|
sdk.dir=C:/Users/Housh11/AppData/Local/Android/Sdk
|
||||||
flutter.sdk=C:\\src\\flutter
|
flutter.sdk=C:\\src\\flutter
|
||||||
flutter.buildMode=release
|
flutter.buildMode=debug
|
||||||
flutter.versionName=1.3.22
|
flutter.versionName=1.3.24
|
||||||
flutter.versionCode=19
|
flutter.versionCode=21
|
||||||
@@ -314,7 +314,7 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
|
|||||||
var res = await _httpClient.post(
|
var res = await _httpClient.post(
|
||||||
'/steward_free_bar/',
|
'/steward_free_bar/',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
data: body.toJson(),
|
data: body.toJson()..removeWhere((key, value) => value==null,),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ abstract class StewardAllocationRequest with _$StewardAllocationRequest {
|
|||||||
int? receiverRealNumberOfCarcasses,
|
int? receiverRealNumberOfCarcasses,
|
||||||
int? receiverRealWeightOfCarcasses,
|
int? receiverRealWeightOfCarcasses,
|
||||||
int? weightLossOfCarcasses,
|
int? weightLossOfCarcasses,
|
||||||
|
bool? stewardCheckAllocation
|
||||||
}) = _StewardAllocationRequest;
|
}) = _StewardAllocationRequest;
|
||||||
|
|
||||||
factory StewardAllocationRequest.fromJson(Map<String, dynamic> json) =>
|
factory StewardAllocationRequest.fromJson(Map<String, dynamic> json) =>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$StewardAllocationRequest {
|
mixin _$StewardAllocationRequest {
|
||||||
|
|
||||||
bool? get checkAllocation; String? get allocationKey; String? get state; int? get registrationCode; int? get receiverRealNumberOfCarcasses; int? get receiverRealWeightOfCarcasses; int? get weightLossOfCarcasses;
|
bool? get checkAllocation; String? get allocationKey; String? get state; int? get registrationCode; int? get receiverRealNumberOfCarcasses; int? get receiverRealWeightOfCarcasses; int? get weightLossOfCarcasses; bool? get stewardCheckAllocation;
|
||||||
/// Create a copy of StewardAllocationRequest
|
/// Create a copy of StewardAllocationRequest
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $StewardAllocationRequestCopyWith<StewardAllocationRequest> get copyWith => _$St
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardAllocationRequest&&(identical(other.checkAllocation, checkAllocation) || other.checkAllocation == checkAllocation)&&(identical(other.allocationKey, allocationKey) || other.allocationKey == allocationKey)&&(identical(other.state, state) || other.state == state)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardAllocationRequest&&(identical(other.checkAllocation, checkAllocation) || other.checkAllocation == checkAllocation)&&(identical(other.allocationKey, allocationKey) || other.allocationKey == allocationKey)&&(identical(other.state, state) || other.state == state)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.stewardCheckAllocation, stewardCheckAllocation) || other.stewardCheckAllocation == stewardCheckAllocation));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,checkAllocation,allocationKey,state,registrationCode,receiverRealNumberOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses);
|
int get hashCode => Object.hash(runtimeType,checkAllocation,allocationKey,state,registrationCode,receiverRealNumberOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses,stewardCheckAllocation);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'StewardAllocationRequest(checkAllocation: $checkAllocation, allocationKey: $allocationKey, state: $state, registrationCode: $registrationCode, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses)';
|
return 'StewardAllocationRequest(checkAllocation: $checkAllocation, allocationKey: $allocationKey, state: $state, registrationCode: $registrationCode, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, stewardCheckAllocation: $stewardCheckAllocation)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ abstract mixin class $StewardAllocationRequestCopyWith<$Res> {
|
|||||||
factory $StewardAllocationRequestCopyWith(StewardAllocationRequest value, $Res Function(StewardAllocationRequest) _then) = _$StewardAllocationRequestCopyWithImpl;
|
factory $StewardAllocationRequestCopyWith(StewardAllocationRequest value, $Res Function(StewardAllocationRequest) _then) = _$StewardAllocationRequestCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses
|
bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses, bool? stewardCheckAllocation
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ class _$StewardAllocationRequestCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of StewardAllocationRequest
|
/// Create a copy of StewardAllocationRequest
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? checkAllocation = freezed,Object? allocationKey = freezed,Object? state = freezed,Object? registrationCode = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? checkAllocation = freezed,Object? allocationKey = freezed,Object? state = freezed,Object? registrationCode = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,Object? stewardCheckAllocation = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
checkAllocation: freezed == checkAllocation ? _self.checkAllocation : checkAllocation // ignore: cast_nullable_to_non_nullable
|
checkAllocation: freezed == checkAllocation ? _self.checkAllocation : checkAllocation // ignore: cast_nullable_to_non_nullable
|
||||||
as bool?,allocationKey: freezed == allocationKey ? _self.allocationKey : allocationKey // ignore: cast_nullable_to_non_nullable
|
as bool?,allocationKey: freezed == allocationKey ? _self.allocationKey : allocationKey // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -74,7 +74,8 @@ as String?,registrationCode: freezed == registrationCode ? _self.registrationCod
|
|||||||
as int?,receiverRealNumberOfCarcasses: freezed == receiverRealNumberOfCarcasses ? _self.receiverRealNumberOfCarcasses : receiverRealNumberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
as int?,receiverRealNumberOfCarcasses: freezed == receiverRealNumberOfCarcasses ? _self.receiverRealNumberOfCarcasses : receiverRealNumberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,receiverRealWeightOfCarcasses: freezed == receiverRealWeightOfCarcasses ? _self.receiverRealWeightOfCarcasses : receiverRealWeightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
as int?,receiverRealWeightOfCarcasses: freezed == receiverRealWeightOfCarcasses ? _self.receiverRealWeightOfCarcasses : receiverRealWeightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,weightLossOfCarcasses: freezed == weightLossOfCarcasses ? _self.weightLossOfCarcasses : weightLossOfCarcasses // ignore: cast_nullable_to_non_nullable
|
as int?,weightLossOfCarcasses: freezed == weightLossOfCarcasses ? _self.weightLossOfCarcasses : weightLossOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,
|
as int?,stewardCheckAllocation: freezed == stewardCheckAllocation ? _self.stewardCheckAllocation : stewardCheckAllocation // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,10 +160,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses, bool? stewardCheckAllocation)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _StewardAllocationRequest() when $default != null:
|
case _StewardAllocationRequest() when $default != null:
|
||||||
return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.registrationCode,_that.receiverRealNumberOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses);case _:
|
return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.registrationCode,_that.receiverRealNumberOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.stewardCheckAllocation);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -180,10 +181,10 @@ return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.regi
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses, bool? stewardCheckAllocation) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _StewardAllocationRequest():
|
case _StewardAllocationRequest():
|
||||||
return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.registrationCode,_that.receiverRealNumberOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses);case _:
|
return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.registrationCode,_that.receiverRealNumberOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.stewardCheckAllocation);case _:
|
||||||
throw StateError('Unexpected subclass');
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -200,10 +201,10 @@ return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.regi
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses, bool? stewardCheckAllocation)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _StewardAllocationRequest() when $default != null:
|
case _StewardAllocationRequest() when $default != null:
|
||||||
return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.registrationCode,_that.receiverRealNumberOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses);case _:
|
return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.registrationCode,_that.receiverRealNumberOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.stewardCheckAllocation);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -215,7 +216,7 @@ return $default(_that.checkAllocation,_that.allocationKey,_that.state,_that.regi
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _StewardAllocationRequest implements StewardAllocationRequest {
|
class _StewardAllocationRequest implements StewardAllocationRequest {
|
||||||
const _StewardAllocationRequest({this.checkAllocation, this.allocationKey, this.state, this.registrationCode, this.receiverRealNumberOfCarcasses, this.receiverRealWeightOfCarcasses, this.weightLossOfCarcasses});
|
const _StewardAllocationRequest({this.checkAllocation, this.allocationKey, this.state, this.registrationCode, this.receiverRealNumberOfCarcasses, this.receiverRealWeightOfCarcasses, this.weightLossOfCarcasses, this.stewardCheckAllocation});
|
||||||
factory _StewardAllocationRequest.fromJson(Map<String, dynamic> json) => _$StewardAllocationRequestFromJson(json);
|
factory _StewardAllocationRequest.fromJson(Map<String, dynamic> json) => _$StewardAllocationRequestFromJson(json);
|
||||||
|
|
||||||
@override final bool? checkAllocation;
|
@override final bool? checkAllocation;
|
||||||
@@ -225,6 +226,7 @@ class _StewardAllocationRequest implements StewardAllocationRequest {
|
|||||||
@override final int? receiverRealNumberOfCarcasses;
|
@override final int? receiverRealNumberOfCarcasses;
|
||||||
@override final int? receiverRealWeightOfCarcasses;
|
@override final int? receiverRealWeightOfCarcasses;
|
||||||
@override final int? weightLossOfCarcasses;
|
@override final int? weightLossOfCarcasses;
|
||||||
|
@override final bool? stewardCheckAllocation;
|
||||||
|
|
||||||
/// Create a copy of StewardAllocationRequest
|
/// Create a copy of StewardAllocationRequest
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -239,16 +241,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardAllocationRequest&&(identical(other.checkAllocation, checkAllocation) || other.checkAllocation == checkAllocation)&&(identical(other.allocationKey, allocationKey) || other.allocationKey == allocationKey)&&(identical(other.state, state) || other.state == state)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardAllocationRequest&&(identical(other.checkAllocation, checkAllocation) || other.checkAllocation == checkAllocation)&&(identical(other.allocationKey, allocationKey) || other.allocationKey == allocationKey)&&(identical(other.state, state) || other.state == state)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.stewardCheckAllocation, stewardCheckAllocation) || other.stewardCheckAllocation == stewardCheckAllocation));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,checkAllocation,allocationKey,state,registrationCode,receiverRealNumberOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses);
|
int get hashCode => Object.hash(runtimeType,checkAllocation,allocationKey,state,registrationCode,receiverRealNumberOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses,stewardCheckAllocation);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'StewardAllocationRequest(checkAllocation: $checkAllocation, allocationKey: $allocationKey, state: $state, registrationCode: $registrationCode, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses)';
|
return 'StewardAllocationRequest(checkAllocation: $checkAllocation, allocationKey: $allocationKey, state: $state, registrationCode: $registrationCode, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, stewardCheckAllocation: $stewardCheckAllocation)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -259,7 +261,7 @@ abstract mixin class _$StewardAllocationRequestCopyWith<$Res> implements $Stewar
|
|||||||
factory _$StewardAllocationRequestCopyWith(_StewardAllocationRequest value, $Res Function(_StewardAllocationRequest) _then) = __$StewardAllocationRequestCopyWithImpl;
|
factory _$StewardAllocationRequestCopyWith(_StewardAllocationRequest value, $Res Function(_StewardAllocationRequest) _then) = __$StewardAllocationRequestCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses
|
bool? checkAllocation, String? allocationKey, String? state, int? registrationCode, int? receiverRealNumberOfCarcasses, int? receiverRealWeightOfCarcasses, int? weightLossOfCarcasses, bool? stewardCheckAllocation
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -276,7 +278,7 @@ class __$StewardAllocationRequestCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of StewardAllocationRequest
|
/// Create a copy of StewardAllocationRequest
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? checkAllocation = freezed,Object? allocationKey = freezed,Object? state = freezed,Object? registrationCode = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? checkAllocation = freezed,Object? allocationKey = freezed,Object? state = freezed,Object? registrationCode = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,Object? stewardCheckAllocation = freezed,}) {
|
||||||
return _then(_StewardAllocationRequest(
|
return _then(_StewardAllocationRequest(
|
||||||
checkAllocation: freezed == checkAllocation ? _self.checkAllocation : checkAllocation // ignore: cast_nullable_to_non_nullable
|
checkAllocation: freezed == checkAllocation ? _self.checkAllocation : checkAllocation // ignore: cast_nullable_to_non_nullable
|
||||||
as bool?,allocationKey: freezed == allocationKey ? _self.allocationKey : allocationKey // ignore: cast_nullable_to_non_nullable
|
as bool?,allocationKey: freezed == allocationKey ? _self.allocationKey : allocationKey // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -285,7 +287,8 @@ as String?,registrationCode: freezed == registrationCode ? _self.registrationCod
|
|||||||
as int?,receiverRealNumberOfCarcasses: freezed == receiverRealNumberOfCarcasses ? _self.receiverRealNumberOfCarcasses : receiverRealNumberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
as int?,receiverRealNumberOfCarcasses: freezed == receiverRealNumberOfCarcasses ? _self.receiverRealNumberOfCarcasses : receiverRealNumberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,receiverRealWeightOfCarcasses: freezed == receiverRealWeightOfCarcasses ? _self.receiverRealWeightOfCarcasses : receiverRealWeightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
as int?,receiverRealWeightOfCarcasses: freezed == receiverRealWeightOfCarcasses ? _self.receiverRealWeightOfCarcasses : receiverRealWeightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,weightLossOfCarcasses: freezed == weightLossOfCarcasses ? _self.weightLossOfCarcasses : weightLossOfCarcasses // ignore: cast_nullable_to_non_nullable
|
as int?,weightLossOfCarcasses: freezed == weightLossOfCarcasses ? _self.weightLossOfCarcasses : weightLossOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,
|
as int?,stewardCheckAllocation: freezed == stewardCheckAllocation ? _self.stewardCheckAllocation : stewardCheckAllocation // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ _StewardAllocationRequest _$StewardAllocationRequestFromJson(
|
|||||||
receiverRealWeightOfCarcasses:
|
receiverRealWeightOfCarcasses:
|
||||||
(json['receiver_real_weight_of_carcasses'] as num?)?.toInt(),
|
(json['receiver_real_weight_of_carcasses'] as num?)?.toInt(),
|
||||||
weightLossOfCarcasses: (json['weight_loss_of_carcasses'] as num?)?.toInt(),
|
weightLossOfCarcasses: (json['weight_loss_of_carcasses'] as num?)?.toInt(),
|
||||||
|
stewardCheckAllocation: json['steward_check_allocation'] as bool?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$StewardAllocationRequestToJson(
|
Map<String, dynamic> _$StewardAllocationRequestToJson(
|
||||||
@@ -30,4 +31,5 @@ Map<String, dynamic> _$StewardAllocationRequestToJson(
|
|||||||
'receiver_real_number_of_carcasses': instance.receiverRealNumberOfCarcasses,
|
'receiver_real_number_of_carcasses': instance.receiverRealNumberOfCarcasses,
|
||||||
'receiver_real_weight_of_carcasses': instance.receiverRealWeightOfCarcasses,
|
'receiver_real_weight_of_carcasses': instance.receiverRealWeightOfCarcasses,
|
||||||
'weight_loss_of_carcasses': instance.weightLossOfCarcasses,
|
'weight_loss_of_carcasses': instance.weightLossOfCarcasses,
|
||||||
|
'steward_check_allocation': instance.stewardCheckAllocation,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ class BuyInProvinceAllLogic extends GetxController {
|
|||||||
void onReady() {
|
void onReady() {
|
||||||
debounce(searchedValue, (callback) => getAllArrivals(), time: Duration(milliseconds: 2000));
|
debounce(searchedValue, (callback) => getAllArrivals(), time: Duration(milliseconds: 2000));
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
ever(approvedWithOtpCode, (callback) {
|
||||||
|
if (callback == false) {
|
||||||
|
approvedWithOtpController.clear();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -95,7 +100,9 @@ class BuyInProvinceAllLogic extends GetxController {
|
|||||||
state: 'accepted',
|
state: 'accepted',
|
||||||
receiverRealNumberOfCarcasses: model.realNumberOfCarcasses ?? 0,
|
receiverRealNumberOfCarcasses: model.realNumberOfCarcasses ?? 0,
|
||||||
receiverRealWeightOfCarcasses: model.realWeightOfCarcasses?.toInt() ?? 0,
|
receiverRealWeightOfCarcasses: model.realWeightOfCarcasses?.toInt() ?? 0,
|
||||||
registrationCode: model.registrationCode,
|
registrationCode: approvedWithOtpCode.value
|
||||||
|
? int.parse(approvedWithOtpController.text)
|
||||||
|
: null,
|
||||||
weightLossOfCarcasses: model.weightLossOfCarcasses?.toInt() ?? 0,
|
weightLossOfCarcasses: model.weightLossOfCarcasses?.toInt() ?? 0,
|
||||||
).toJson();
|
).toJson();
|
||||||
request.removeWhere((key, value) => value == null);
|
request.removeWhere((key, value) => value == null);
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.steward?.user?.fullname ?? 'N/A',
|
item.toSteward?.user?.fullname ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||||
),
|
),
|
||||||
@@ -184,19 +184,27 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
buildRow(title: 'مشخصات فروشنده', value: item.steward?.user?.fullname ?? 'N/A'),
|
buildRow(title: 'مشخصات فروشنده', value: item.toSteward?.user?.fullname ?? 'N/A'),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'تلفن فروشنده',
|
title: 'تلفن فروشنده',
|
||||||
value: item.steward?.user?.mobile ?? 'N/A',
|
value: item.toSteward?.user?.mobile ?? 'N/A',
|
||||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
||||||
|
buildRow(title: ' سهمیه', value: item.quota?.faTitle ?? 'N/A'),
|
||||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'وزن خریداری شده',
|
title: 'وزن خریداری شده',
|
||||||
value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم',
|
value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم',
|
||||||
),
|
),
|
||||||
|
buildRow(
|
||||||
|
title: 'قیمت هر کیلوگرم',
|
||||||
|
titleLabel:(item.approvedPriceStatus ?? false) ? 'مصوب' : 'آزاد' ,
|
||||||
|
titleLabelStyle: AppFonts.yekan14Bold.copyWith(color: AppColor.greenNormal),
|
||||||
|
value: '${item.amount?.separatedByCommaFa} ریال',
|
||||||
|
),
|
||||||
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'),
|
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'),
|
||||||
|
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: item.receiverState == 'pending',
|
visible: item.receiverState == 'pending',
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -210,12 +218,14 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
|||||||
height: 40.h,
|
height: 40.h,
|
||||||
isLoading: data[item.key!] ?? false,
|
isLoading: data[item.key!] ?? false,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
Get.bottomSheet(conformationBottomSheet(item), isScrollControlled: true).then(
|
await Get.bottomSheet(
|
||||||
(value) {
|
conformationBottomSheet(item),
|
||||||
Get.back();
|
isScrollControlled: true,
|
||||||
controller.clearApprovedController();
|
).then((value) {
|
||||||
},
|
|
||||||
);
|
Get.back();
|
||||||
|
controller.clearApprovedController();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
||||||
backgroundColor: AppColor.greenNormal,
|
backgroundColor: AppColor.greenNormal,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class BuyInProvinceWaitingLogic extends GetxController {
|
|||||||
RxInt currentPage = 1.obs;
|
RxInt currentPage = 1.obs;
|
||||||
final RxBool isLoadingMoreAllocationsMade = false.obs;
|
final RxBool isLoadingMoreAllocationsMade = false.obs;
|
||||||
StewardRootLogic rootLogic = Get.find<StewardRootLogic>();
|
StewardRootLogic rootLogic = Get.find<StewardRootLogic>();
|
||||||
|
RxBool isButtonConfirm = false.obs;
|
||||||
|
|
||||||
Rx<Resource<PaginationModel<WaitingArrivalModel>>> waitingProduct =
|
Rx<Resource<PaginationModel<WaitingArrivalModel>>> waitingProduct =
|
||||||
Resource<PaginationModel<WaitingArrivalModel>>.loading().obs;
|
Resource<PaginationModel<WaitingArrivalModel>>.loading().obs;
|
||||||
@@ -42,6 +43,9 @@ class BuyInProvinceWaitingLogic extends GetxController {
|
|||||||
void onReady() {
|
void onReady() {
|
||||||
super.onReady();
|
super.onReady();
|
||||||
getWaitingArrivals();
|
getWaitingArrivals();
|
||||||
|
approvedWithOtpController.addListener(() {
|
||||||
|
isButtonConfirm.value = approvedWithOtpController.text.trim().length > 4;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -106,13 +110,17 @@ class BuyInProvinceWaitingLogic extends GetxController {
|
|||||||
state: 'accepted',
|
state: 'accepted',
|
||||||
receiverRealNumberOfCarcasses: model.realNumberOfCarcasses ?? 0,
|
receiverRealNumberOfCarcasses: model.realNumberOfCarcasses ?? 0,
|
||||||
receiverRealWeightOfCarcasses: model.realWeightOfCarcasses?.toInt() ?? 0,
|
receiverRealWeightOfCarcasses: model.realWeightOfCarcasses?.toInt() ?? 0,
|
||||||
registrationCode: model.registrationCode,
|
registrationCode: approvedWithOtpCode.value
|
||||||
|
? int.parse(approvedWithOtpController.text.trim())
|
||||||
|
: null,
|
||||||
weightLossOfCarcasses: model.weightLossOfCarcasses?.toInt() ?? 0,
|
weightLossOfCarcasses: model.weightLossOfCarcasses?.toInt() ?? 0,
|
||||||
|
stewardCheckAllocation: true,
|
||||||
).toJson();
|
).toJson();
|
||||||
request.removeWhere((key, value) => value == null);
|
request.removeWhere((key, value) => value == null);
|
||||||
|
|
||||||
safeCall(
|
safeCall(
|
||||||
showError: true,
|
showError: true,
|
||||||
|
showSuccess: true,
|
||||||
call: () async => await rootLogic.chickenRepository.setSateForArrivals(
|
call: () async => await rootLogic.chickenRepository.setSateForArrivals(
|
||||||
token: rootLogic.tokenService.accessToken.value!,
|
token: rootLogic.tokenService.accessToken.value!,
|
||||||
request: request,
|
request: request,
|
||||||
@@ -125,7 +133,10 @@ class BuyInProvinceWaitingLogic extends GetxController {
|
|||||||
rootLogic.onRefresh();
|
rootLogic.onRefresh();
|
||||||
clearApprovedController();
|
clearApprovedController();
|
||||||
toggleExpansion();
|
toggleExpansion();
|
||||||
Get.back();
|
Future.delayed(Duration(seconds: 3), () {
|
||||||
|
Get.back();
|
||||||
|
Get.back();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.steward?.user?.fullname ?? 'N/A',
|
item.toSteward?.user?.fullname ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||||
),
|
),
|
||||||
@@ -189,14 +189,20 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
value: item.toSteward?.user?.mobile ?? 'N/A',
|
value: item.toSteward?.user?.mobile ?? 'N/A',
|
||||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
buildRow(title: 'نوع تخصیص', value: item.quota?.faTitle ?? 'N/A'),
|
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
||||||
buildRow(title: 'سهمیه', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
buildRow(title: ' سهمیه', value: item.quota?.faTitle ?? 'N/A'),
|
||||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'وزن خریداری شده',
|
title: 'وزن خریداری شده',
|
||||||
value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم',
|
value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم',
|
||||||
),
|
),
|
||||||
buildRow(title: 'قیمت هر کیلو', value: '${item.amount?.separatedByCommaFa} ریال'),
|
buildRow(
|
||||||
|
title: 'قیمت هر کیلوگرم',
|
||||||
|
titleLabel: (item.approvedPriceStatus ?? false) ? 'مصوب' : 'آزاد',
|
||||||
|
titleLabelStyle: AppFonts.yekan14Bold.copyWith(color: AppColor.greenNormal),
|
||||||
|
value: '${item.amount?.separatedByCommaFa} ریال',
|
||||||
|
),
|
||||||
|
|
||||||
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'),
|
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'),
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
@@ -241,10 +247,11 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
Widget conformationBottomSheet(WaitingArrivalModel item) {
|
Widget conformationBottomSheet(WaitingArrivalModel item) {
|
||||||
controller.weightController.text = item.weightOfCarcasses.separatedByComma;
|
controller.weightController.text = item.weightOfCarcasses.separatedByComma;
|
||||||
return BaseBottomSheet(
|
return BaseBottomSheet(
|
||||||
height: 430.h,
|
height: 450.h,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
SizedBox(height: 10),
|
||||||
RTextField(
|
RTextField(
|
||||||
label: 'وزن(کیلوگرم)',
|
label: 'وزن(کیلوگرم)',
|
||||||
controller: controller.weightController,
|
controller: controller.weightController,
|
||||||
@@ -301,6 +308,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
controller: controller.approvedWithOtpController,
|
controller: controller.approvedWithOtpController,
|
||||||
label: 'کد احراز',
|
label: 'کد احراز',
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
|
maxLength: 5,
|
||||||
),
|
),
|
||||||
visible: data.value,
|
visible: data.value,
|
||||||
),
|
),
|
||||||
@@ -308,10 +316,10 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
);
|
);
|
||||||
}, controller.approvedWithOtpCode),
|
}, controller.approvedWithOtpCode),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
ObxValue((data) {
|
Obx(() {
|
||||||
return RElevated(
|
return RElevated(
|
||||||
enabled: controller.approvedWithOtpCode.value
|
enabled: controller.approvedWithOtpCode.value
|
||||||
? controller.approvedWithOtpController.text.isNotEmpty
|
? controller.isButtonConfirm.value
|
||||||
: true,
|
: true,
|
||||||
text: 'تایید',
|
text: 'تایید',
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
@@ -319,7 +327,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
},
|
},
|
||||||
isFullWidth: true,
|
isFullWidth: true,
|
||||||
);
|
);
|
||||||
}, controller.approvedWithOtpCode),
|
}),
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ class BuyOutOfProvinceLogic extends GetxController {
|
|||||||
sellerNameController.clear();
|
sellerNameController.clear();
|
||||||
sellerPhoneController.clear();
|
sellerPhoneController.clear();
|
||||||
carcassWeightController.clear();
|
carcassWeightController.clear();
|
||||||
|
carcassCountController.clear();
|
||||||
selectedProvince.value = null;
|
selectedProvince.value = null;
|
||||||
selectedCity.value = null;
|
selectedCity.value = null;
|
||||||
selectedImage.value = null;
|
selectedImage.value = null;
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ class SalesInProvinceLogic extends GetxController {
|
|||||||
|
|
||||||
void setSubmitData() {
|
void setSubmitData() {
|
||||||
tmpStewardAllocation = SubmitStewardAllocation(
|
tmpStewardAllocation = SubmitStewardAllocation(
|
||||||
approvedPriceStatus: broadcastPrice.value?.active ?? false,
|
approvedPriceStatus: priceType.value==1,
|
||||||
allocationType:
|
allocationType:
|
||||||
'${guildProfile.value?.steward == true ? "steward" : "guild"}_${selectedGuildModel.value?.steward == true ? "steward" : "guild"}',
|
'${guildProfile.value?.steward == true ? "steward" : "guild"}_${selectedGuildModel.value?.steward == true ? "steward" : "guild"}',
|
||||||
sellerType: guildProfile.value?.steward == true ? "Steward" : "Guild",
|
sellerType: guildProfile.value?.steward == true ? "Steward" : "Guild",
|
||||||
|
|||||||
@@ -303,8 +303,9 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
value: controller.getBuyerInformation(item)?.user?.mobile ?? 'N/A',
|
value: controller.getBuyerInformation(item)?.user?.mobile ?? 'N/A',
|
||||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
buildRow(title: 'نوع فروش', value: item.sellType?.faItem ?? 'N/A'),
|
|
||||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||||
|
buildRow(title: 'نوع فروش', value: item.sellType?.faItem ?? 'N/A'),
|
||||||
|
|
||||||
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'وزن خریداری شده',
|
title: 'وزن خریداری شده',
|
||||||
@@ -314,6 +315,12 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
title: 'افت وزن(کیلوگرم)',
|
title: 'افت وزن(کیلوگرم)',
|
||||||
value: item.weightLossOfCarcasses?.toInt().toString() ?? 'N/A',
|
value: item.weightLossOfCarcasses?.toInt().toString() ?? 'N/A',
|
||||||
),
|
),
|
||||||
|
buildRow(
|
||||||
|
title: 'قیمت هر کیلوگرم',
|
||||||
|
titleLabel: (item.approvedPriceStatus ?? false) ? 'مصوب' : 'آزاد',
|
||||||
|
titleLabelStyle: AppFonts.yekan14Bold.copyWith(color: AppColor.greenNormal),
|
||||||
|
value: '${item.amount?.separatedByCommaFa} ریال',
|
||||||
|
),
|
||||||
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'),
|
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'),
|
||||||
|
|
||||||
buildRow(title: 'کداحراز', value: item.registrationCode?.toString() ?? 'ندارد'),
|
buildRow(title: 'کداحراز', value: item.registrationCode?.toString() ?? 'ندارد'),
|
||||||
|
|||||||
@@ -129,10 +129,23 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
SizedBox(width: 12),
|
SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: Text(
|
child: Column(
|
||||||
item.date?.formattedJalaliDate ?? 'N/A',
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
textAlign: TextAlign.center,
|
spacing: 4,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
children: [
|
||||||
|
Text(
|
||||||
|
item.date?.formattedJalaliDate ?? 'N/A',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||||
|
),
|
||||||
|
|
||||||
|
Text(
|
||||||
|
'${item.weightOfCarcasses?.separatedByCommaFa ?? 0}KG',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: AppFonts.yekan12Bold.copyWith(color: AppColor.textColor),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 4),
|
SizedBox(width: 4),
|
||||||
@@ -163,27 +176,22 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
item.buyer?.unitName ?? 'N/A',
|
item.buyer?.province?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${item.weightOfCarcasses?.separatedByCommaFa ?? 0}KG',
|
item.buyer?.city?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
|
||||||
flex: 2,
|
|
||||||
child: Text(
|
|
||||||
'${item.buyer?.province}\n${item.buyer?.city}',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,14 +123,7 @@ class SalesOutOfProvinceSalesListPage extends GetView<SalesOutOfProvinceSalesLis
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
|
||||||
flex: 2,
|
|
||||||
child: Text(
|
|
||||||
'${item.buyer?.province}\n${item.buyer?.city}',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ class SegmentationPage extends GetView<SegmentationLogic> {
|
|||||||
|
|
||||||
Widget addOrEditBottomSheet([bool isOnEdit = false]) {
|
Widget addOrEditBottomSheet([bool isOnEdit = false]) {
|
||||||
return BaseBottomSheet(
|
return BaseBottomSheet(
|
||||||
height: 500.h,
|
height: 550.h,
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Form(
|
child: Form(
|
||||||
key: controller.formKey,
|
key: controller.formKey,
|
||||||
|
|||||||
@@ -18,15 +18,16 @@ Widget inventoryWidget(StewardRootLogic rootLogic) {
|
|||||||
return _itemList(
|
return _itemList(
|
||||||
title: 'موجودی انبار',
|
title: 'موجودی انبار',
|
||||||
value: value ?? '', // در صورت نال بودن، رشته خالی نمایش داده شود
|
value: value ?? '', // در صورت نال بودن، رشته خالی نمایش داده شود
|
||||||
|
color: const Color(0xFFEAFBFC),
|
||||||
);
|
);
|
||||||
}, rootLogic.inventoryModel),
|
}, rootLogic.inventoryModel),
|
||||||
ObxValue((data) {
|
ObxValue((data) {
|
||||||
final value = data.value?.totalGovernmentalRemainWeight?.separatedByCommaFa;
|
final value = data.value?.totalGovernmentalRemainWeight?.separatedByCommaFa;
|
||||||
return _itemList(title: 'مانده دولتی', value: value ?? '');
|
return _itemList(title: 'مانده دولتی', value: value ?? '',color: const Color(0xFFF5ECEE),);
|
||||||
}, rootLogic.stewardSalesInfoDashboard),
|
}, rootLogic.stewardSalesInfoDashboard),
|
||||||
ObxValue((data) {
|
ObxValue((data) {
|
||||||
final value = data.value?.totalFreeRemainWeight?.separatedByCommaFa;
|
final value = data.value?.totalFreeRemainWeight?.separatedByCommaFa;
|
||||||
return _itemList(title: 'مانده آزاد', value: value ?? '');
|
return _itemList(title: 'مانده آزاد', value: value ?? '',color: const Color(0xFFF1E7FF));
|
||||||
}, rootLogic.stewardSalesInfoDashboard),
|
}, rootLogic.stewardSalesInfoDashboard),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -34,13 +35,13 @@ Widget inventoryWidget(StewardRootLogic rootLogic) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _itemList({required String title, required String? value, String? unit}) {
|
Widget _itemList({required String title, required String? value, String? unit,Color? color}) {
|
||||||
return Container(
|
return Container(
|
||||||
width: 125.w,
|
width: 125.w,
|
||||||
height: 50.h,
|
height: 50.h,
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
decoration: ShapeDecoration(
|
decoration: ShapeDecoration(
|
||||||
color: Colors.white.withValues(alpha: 0.40),
|
color: color??Colors.white.withValues(alpha: 0.40),
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class ExpandableListItem2 extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 50.h,
|
height: 55.h,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
|
|||||||
@@ -4,8 +4,12 @@ import 'package:rasadyar_core/core.dart';
|
|||||||
Widget buildRow({
|
Widget buildRow({
|
||||||
required String title,
|
required String title,
|
||||||
required String value,
|
required String value,
|
||||||
|
String? titleLabel,
|
||||||
|
String? valueLabel,
|
||||||
TextStyle? titleStyle,
|
TextStyle? titleStyle,
|
||||||
TextStyle? valueStyle,
|
TextStyle? valueStyle,
|
||||||
|
TextStyle? titleLabelStyle,
|
||||||
|
TextStyle? valueLabelStyle,
|
||||||
}) {
|
}) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||||
@@ -14,18 +18,44 @@ Widget buildRow({
|
|||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
child: Text(
|
child: RichText(
|
||||||
title,
|
text: TextSpan(
|
||||||
textAlign: TextAlign.right,
|
children: [
|
||||||
style: titleStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
TextSpan(
|
||||||
|
text: title,
|
||||||
|
style: titleStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
||||||
|
),
|
||||||
|
if (titleLabel != null) ...[
|
||||||
|
TextSpan(
|
||||||
|
text: ' ($titleLabel)',
|
||||||
|
style:
|
||||||
|
titleLabelStyle ??
|
||||||
|
AppFonts.yekan14.copyWith(color: AppColor.mediumGreyDarkHover),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
child: Text(
|
child: RichText(
|
||||||
value,
|
text: TextSpan(
|
||||||
textAlign: TextAlign.left,
|
children: [
|
||||||
style: valueStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
TextSpan(
|
||||||
|
text: value,
|
||||||
|
style: valueStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
||||||
|
),
|
||||||
|
if (valueLabel != null) ...[
|
||||||
|
TextSpan(
|
||||||
|
text: ' ($valueLabel)',
|
||||||
|
style:
|
||||||
|
valueLabelStyle ??
|
||||||
|
AppFonts.yekan12.copyWith(color: AppColor.mediumGreyDarkHover),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -109,7 +139,7 @@ Widget buildUnitRow({
|
|||||||
style: valueStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
style: valueStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: value != null ||( value?.isNotEmpty ?? false),
|
visible: value != null || (value?.isNotEmpty ?? false),
|
||||||
child: Text(
|
child: Text(
|
||||||
unit,
|
unit,
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
|
|||||||
@@ -153,13 +153,13 @@ void _defaultHideLoading() {
|
|||||||
|
|
||||||
void defaultShowSuccessMessage(
|
void defaultShowSuccessMessage(
|
||||||
String message, {
|
String message, {
|
||||||
int durationInSeconds = 2,
|
int durationInSeconds = 1500,
|
||||||
VoidCallback? onDismissed,
|
VoidCallback? onDismissed,
|
||||||
}) {
|
}) {
|
||||||
Get.snackbar(
|
Get.snackbar(
|
||||||
'موفقیت',
|
'موفقیت',
|
||||||
message,
|
message,
|
||||||
duration: Duration(seconds: durationInSeconds),
|
duration: Duration(milliseconds: durationInSeconds),
|
||||||
snackPosition: SnackPosition.TOP,
|
snackPosition: SnackPosition.TOP,
|
||||||
backgroundColor: Colors.green,
|
backgroundColor: Colors.green,
|
||||||
snackbarStatus: (status) {
|
snackbarStatus: (status) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: rasadyar_app
|
name: rasadyar_app
|
||||||
description: "A new Flutter project."
|
description: "A new Flutter project."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.3.22+19
|
version: 1.3.24+21
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.9.2
|
sdk: ^3.9.2
|
||||||
|
|||||||
Reference in New Issue
Block a user