feat : buy in province
This commit is contained in:
4
assets/icons/clock.svg
Normal file
4
assets/icons/clock.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.00016 15.1663C4.04683 15.1663 0.833496 11.953 0.833496 7.99967C0.833496 4.04634 4.04683 0.833008 8.00016 0.833008C11.9535 0.833008 15.1668 4.04634 15.1668 7.99967C15.1668 11.953 11.9535 15.1663 8.00016 15.1663ZM8.00016 1.83301C4.60016 1.83301 1.8335 4.59967 1.8335 7.99967C1.8335 11.3997 4.60016 14.1663 8.00016 14.1663C11.4002 14.1663 14.1668 11.3997 14.1668 7.99967C14.1668 4.59967 11.4002 1.83301 8.00016 1.83301Z" fill="#717171"/>
|
||||
<path d="M10.4731 10.6202C10.3864 10.6202 10.2998 10.6002 10.2198 10.5468L8.1531 9.3135C7.63977 9.00684 7.25977 8.3335 7.25977 7.74017V5.00684C7.25977 4.7335 7.48643 4.50684 7.75977 4.50684C8.0331 4.50684 8.25977 4.7335 8.25977 5.00684V7.74017C8.25977 7.98017 8.45977 8.3335 8.66643 8.4535L10.7331 9.68684C10.9731 9.82684 11.0464 10.1335 10.9064 10.3735C10.8064 10.5335 10.6398 10.6202 10.4731 10.6202Z" fill="#717171"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 971 B |
@@ -6,19 +6,6 @@ part 'imported_loads_model.g.dart';
|
||||
@freezed
|
||||
abstract class ImportedLoadsModel with _$ImportedLoadsModel {
|
||||
const factory ImportedLoadsModel({
|
||||
int? count,
|
||||
String? next,
|
||||
String? previous,
|
||||
List<ImportedLoad>? results,
|
||||
}) = _ImportedLoadsModel;
|
||||
|
||||
factory ImportedLoadsModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ImportedLoadsModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ImportedLoad with _$ImportedLoad {
|
||||
const factory ImportedLoad({
|
||||
int? id,
|
||||
Product? product,
|
||||
KillHouse? killHouse,
|
||||
@@ -74,10 +61,10 @@ abstract class ImportedLoad with _$ImportedLoad {
|
||||
dynamic stewardWareHouse,
|
||||
dynamic car,
|
||||
dynamic dispenser,
|
||||
}) = _ImportedLoad;
|
||||
}) = _ImportedLoadsModel;
|
||||
|
||||
factory ImportedLoad.fromJson(Map<String, dynamic> json) =>
|
||||
_$ImportedLoadFromJson(json);
|
||||
factory ImportedLoadsModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ImportedLoadsModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -16,7 +16,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$ImportedLoadsModel {
|
||||
|
||||
int? get count; String? get next; String? get previous; List<ImportedLoad>? get results;
|
||||
int? get id; Product? get product; KillHouse? get killHouse; dynamic get toKillHouse; dynamic get steward; ToSteward? get toSteward; dynamic get guilds; dynamic get toGuilds; dynamic get toColdHouse; int? get indexWeight; int? get dateTimestamp; int? get newState; int? get newReceiverState; int? get newAllocationState; String? get key; String? get createDate; String? get modifyDate; bool? get trash; int? get numberOfCarcasses; int? get realNumberOfCarcasses; int? get receiverRealNumberOfCarcasses; double? get weightOfCarcasses; double? get realWeightOfCarcasses; double? get receiverRealWeightOfCarcasses; double? get weightLossOfCarcasses; bool? get finalRegistration; String? get sellType; String? get productName; String? get sellerType; String? get type; String? get saleType; String? get allocationType; bool? get systemRegistrationCode; int? get registrationCode; int? get amount; int? get totalAmount; int? get totalAmountPaid; int? get totalAmountRemain; dynamic get loggedRegistrationCode; String? get state; String? get receiverState; String? get allocationState; String? get date; dynamic get role; dynamic get stewardTempKey; bool? get approvedPriceStatus; bool? get calculateStatus; bool? get temporaryTrash; bool? get temporaryDeleted; dynamic get createdBy; dynamic get modifiedBy; dynamic get wareHouse; dynamic get stewardWareHouse; dynamic get car; dynamic get dispenser;
|
||||
/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -29,16 +29,16 @@ $ImportedLoadsModelCopyWith<ImportedLoadsModel> get copyWith => _$ImportedLoadsM
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ImportedLoadsModel&&(identical(other.count, count) || other.count == count)&&(identical(other.next, next) || other.next == next)&&(identical(other.previous, previous) || other.previous == previous)&&const DeepCollectionEquality().equals(other.results, results));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ImportedLoadsModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&(identical(other.killHouse, killHouse) || other.killHouse == killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&const DeepCollectionEquality().equals(other.steward, steward)&&(identical(other.toSteward, toSteward) || other.toSteward == toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&const DeepCollectionEquality().equals(other.toGuilds, toGuilds)&&const DeepCollectionEquality().equals(other.toColdHouse, toColdHouse)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.dateTimestamp, dateTimestamp) || other.dateTimestamp == dateTimestamp)&&(identical(other.newState, newState) || other.newState == newState)&&(identical(other.newReceiverState, newReceiverState) || other.newReceiverState == newReceiverState)&&(identical(other.newAllocationState, newAllocationState) || other.newAllocationState == newAllocationState)&&(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.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.realNumberOfCarcasses, realNumberOfCarcasses) || other.realNumberOfCarcasses == realNumberOfCarcasses)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.realWeightOfCarcasses, realWeightOfCarcasses) || other.realWeightOfCarcasses == realWeightOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.finalRegistration, finalRegistration) || other.finalRegistration == finalRegistration)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.productName, productName) || other.productName == productName)&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.type, type) || other.type == type)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.systemRegistrationCode, systemRegistrationCode) || other.systemRegistrationCode == systemRegistrationCode)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.totalAmountPaid, totalAmountPaid) || other.totalAmountPaid == totalAmountPaid)&&(identical(other.totalAmountRemain, totalAmountRemain) || other.totalAmountRemain == totalAmountRemain)&&const DeepCollectionEquality().equals(other.loggedRegistrationCode, loggedRegistrationCode)&&(identical(other.state, state) || other.state == state)&&(identical(other.receiverState, receiverState) || other.receiverState == receiverState)&&(identical(other.allocationState, allocationState) || other.allocationState == allocationState)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.role, role)&&const DeepCollectionEquality().equals(other.stewardTempKey, stewardTempKey)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&const DeepCollectionEquality().equals(other.wareHouse, wareHouse)&&const DeepCollectionEquality().equals(other.stewardWareHouse, stewardWareHouse)&&const DeepCollectionEquality().equals(other.car, car)&&const DeepCollectionEquality().equals(other.dispenser, dispenser));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,count,next,previous,const DeepCollectionEquality().hash(results));
|
||||
int get hashCode => Object.hashAll([runtimeType,id,product,killHouse,const DeepCollectionEquality().hash(toKillHouse),const DeepCollectionEquality().hash(steward),toSteward,const DeepCollectionEquality().hash(guilds),const DeepCollectionEquality().hash(toGuilds),const DeepCollectionEquality().hash(toColdHouse),indexWeight,dateTimestamp,newState,newReceiverState,newAllocationState,key,createDate,modifyDate,trash,numberOfCarcasses,realNumberOfCarcasses,receiverRealNumberOfCarcasses,weightOfCarcasses,realWeightOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses,finalRegistration,sellType,productName,sellerType,type,saleType,allocationType,systemRegistrationCode,registrationCode,amount,totalAmount,totalAmountPaid,totalAmountRemain,const DeepCollectionEquality().hash(loggedRegistrationCode),state,receiverState,allocationState,date,const DeepCollectionEquality().hash(role),const DeepCollectionEquality().hash(stewardTempKey),approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,const DeepCollectionEquality().hash(createdBy),const DeepCollectionEquality().hash(modifiedBy),const DeepCollectionEquality().hash(wareHouse),const DeepCollectionEquality().hash(stewardWareHouse),const DeepCollectionEquality().hash(car),const DeepCollectionEquality().hash(dispenser)]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ImportedLoadsModel(count: $count, next: $next, previous: $previous, results: $results)';
|
||||
return 'ImportedLoadsModel(id: $id, product: $product, killHouse: $killHouse, toKillHouse: $toKillHouse, steward: $steward, toSteward: $toSteward, guilds: $guilds, toGuilds: $toGuilds, toColdHouse: $toColdHouse, indexWeight: $indexWeight, dateTimestamp: $dateTimestamp, newState: $newState, newReceiverState: $newReceiverState, newAllocationState: $newAllocationState, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, numberOfCarcasses: $numberOfCarcasses, realNumberOfCarcasses: $realNumberOfCarcasses, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, realWeightOfCarcasses: $realWeightOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, finalRegistration: $finalRegistration, sellType: $sellType, productName: $productName, sellerType: $sellerType, type: $type, saleType: $saleType, allocationType: $allocationType, systemRegistrationCode: $systemRegistrationCode, registrationCode: $registrationCode, amount: $amount, totalAmount: $totalAmount, totalAmountPaid: $totalAmountPaid, totalAmountRemain: $totalAmountRemain, loggedRegistrationCode: $loggedRegistrationCode, state: $state, receiverState: $receiverState, allocationState: $allocationState, date: $date, role: $role, stewardTempKey: $stewardTempKey, approvedPriceStatus: $approvedPriceStatus, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)';
|
||||
}
|
||||
|
||||
|
||||
@@ -49,11 +49,11 @@ abstract mixin class $ImportedLoadsModelCopyWith<$Res> {
|
||||
factory $ImportedLoadsModelCopyWith(ImportedLoadsModel value, $Res Function(ImportedLoadsModel) _then) = _$ImportedLoadsModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int? count, String? next, String? previous, List<ImportedLoad>? results
|
||||
int? id, Product? product, KillHouse? killHouse, dynamic toKillHouse, dynamic steward, ToSteward? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, dynamic createdBy, dynamic modifiedBy, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser
|
||||
});
|
||||
|
||||
|
||||
|
||||
$ProductCopyWith<$Res>? get product;$KillHouseCopyWith<$Res>? get killHouse;$ToStewardCopyWith<$Res>? get toSteward;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@@ -66,156 +66,6 @@ class _$ImportedLoadsModelCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? count = freezed,Object? next = freezed,Object? previous = freezed,Object? results = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
count: freezed == count ? _self.count : count // ignore: cast_nullable_to_non_nullable
|
||||
as int?,next: freezed == next ? _self.next : next // ignore: cast_nullable_to_non_nullable
|
||||
as String?,previous: freezed == previous ? _self.previous : previous // ignore: cast_nullable_to_non_nullable
|
||||
as String?,results: freezed == results ? _self.results : results // ignore: cast_nullable_to_non_nullable
|
||||
as List<ImportedLoad>?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _ImportedLoadsModel implements ImportedLoadsModel {
|
||||
const _ImportedLoadsModel({this.count, this.next, this.previous, final List<ImportedLoad>? results}): _results = results;
|
||||
factory _ImportedLoadsModel.fromJson(Map<String, dynamic> json) => _$ImportedLoadsModelFromJson(json);
|
||||
|
||||
@override final int? count;
|
||||
@override final String? next;
|
||||
@override final String? previous;
|
||||
final List<ImportedLoad>? _results;
|
||||
@override List<ImportedLoad>? get results {
|
||||
final value = _results;
|
||||
if (value == null) return null;
|
||||
if (_results is EqualUnmodifiableListView) return _results;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ImportedLoadsModelCopyWith<_ImportedLoadsModel> get copyWith => __$ImportedLoadsModelCopyWithImpl<_ImportedLoadsModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$ImportedLoadsModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ImportedLoadsModel&&(identical(other.count, count) || other.count == count)&&(identical(other.next, next) || other.next == next)&&(identical(other.previous, previous) || other.previous == previous)&&const DeepCollectionEquality().equals(other._results, _results));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,count,next,previous,const DeepCollectionEquality().hash(_results));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ImportedLoadsModel(count: $count, next: $next, previous: $previous, results: $results)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ImportedLoadsModelCopyWith<$Res> implements $ImportedLoadsModelCopyWith<$Res> {
|
||||
factory _$ImportedLoadsModelCopyWith(_ImportedLoadsModel value, $Res Function(_ImportedLoadsModel) _then) = __$ImportedLoadsModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int? count, String? next, String? previous, List<ImportedLoad>? results
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$ImportedLoadsModelCopyWithImpl<$Res>
|
||||
implements _$ImportedLoadsModelCopyWith<$Res> {
|
||||
__$ImportedLoadsModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ImportedLoadsModel _self;
|
||||
final $Res Function(_ImportedLoadsModel) _then;
|
||||
|
||||
/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? count = freezed,Object? next = freezed,Object? previous = freezed,Object? results = freezed,}) {
|
||||
return _then(_ImportedLoadsModel(
|
||||
count: freezed == count ? _self.count : count // ignore: cast_nullable_to_non_nullable
|
||||
as int?,next: freezed == next ? _self.next : next // ignore: cast_nullable_to_non_nullable
|
||||
as String?,previous: freezed == previous ? _self.previous : previous // ignore: cast_nullable_to_non_nullable
|
||||
as String?,results: freezed == results ? _self._results : results // ignore: cast_nullable_to_non_nullable
|
||||
as List<ImportedLoad>?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ImportedLoad {
|
||||
|
||||
int? get id; Product? get product; KillHouse? get killHouse; dynamic get toKillHouse; dynamic get steward; ToSteward? get toSteward; dynamic get guilds; dynamic get toGuilds; dynamic get toColdHouse; int? get indexWeight; int? get dateTimestamp; int? get newState; int? get newReceiverState; int? get newAllocationState; String? get key; String? get createDate; String? get modifyDate; bool? get trash; int? get numberOfCarcasses; int? get realNumberOfCarcasses; int? get receiverRealNumberOfCarcasses; double? get weightOfCarcasses; double? get realWeightOfCarcasses; double? get receiverRealWeightOfCarcasses; double? get weightLossOfCarcasses; bool? get finalRegistration; String? get sellType; String? get productName; String? get sellerType; String? get type; String? get saleType; String? get allocationType; bool? get systemRegistrationCode; int? get registrationCode; int? get amount; int? get totalAmount; int? get totalAmountPaid; int? get totalAmountRemain; dynamic get loggedRegistrationCode; String? get state; String? get receiverState; String? get allocationState; String? get date; dynamic get role; dynamic get stewardTempKey; bool? get approvedPriceStatus; bool? get calculateStatus; bool? get temporaryTrash; bool? get temporaryDeleted; dynamic get createdBy; dynamic get modifiedBy; dynamic get wareHouse; dynamic get stewardWareHouse; dynamic get car; dynamic get dispenser;
|
||||
/// Create a copy of ImportedLoad
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ImportedLoadCopyWith<ImportedLoad> get copyWith => _$ImportedLoadCopyWithImpl<ImportedLoad>(this as ImportedLoad, _$identity);
|
||||
|
||||
/// Serializes this ImportedLoad to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ImportedLoad&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&(identical(other.killHouse, killHouse) || other.killHouse == killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&const DeepCollectionEquality().equals(other.steward, steward)&&(identical(other.toSteward, toSteward) || other.toSteward == toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&const DeepCollectionEquality().equals(other.toGuilds, toGuilds)&&const DeepCollectionEquality().equals(other.toColdHouse, toColdHouse)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.dateTimestamp, dateTimestamp) || other.dateTimestamp == dateTimestamp)&&(identical(other.newState, newState) || other.newState == newState)&&(identical(other.newReceiverState, newReceiverState) || other.newReceiverState == newReceiverState)&&(identical(other.newAllocationState, newAllocationState) || other.newAllocationState == newAllocationState)&&(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.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.realNumberOfCarcasses, realNumberOfCarcasses) || other.realNumberOfCarcasses == realNumberOfCarcasses)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.realWeightOfCarcasses, realWeightOfCarcasses) || other.realWeightOfCarcasses == realWeightOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.finalRegistration, finalRegistration) || other.finalRegistration == finalRegistration)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.productName, productName) || other.productName == productName)&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.type, type) || other.type == type)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.systemRegistrationCode, systemRegistrationCode) || other.systemRegistrationCode == systemRegistrationCode)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.totalAmountPaid, totalAmountPaid) || other.totalAmountPaid == totalAmountPaid)&&(identical(other.totalAmountRemain, totalAmountRemain) || other.totalAmountRemain == totalAmountRemain)&&const DeepCollectionEquality().equals(other.loggedRegistrationCode, loggedRegistrationCode)&&(identical(other.state, state) || other.state == state)&&(identical(other.receiverState, receiverState) || other.receiverState == receiverState)&&(identical(other.allocationState, allocationState) || other.allocationState == allocationState)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.role, role)&&const DeepCollectionEquality().equals(other.stewardTempKey, stewardTempKey)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&const DeepCollectionEquality().equals(other.wareHouse, wareHouse)&&const DeepCollectionEquality().equals(other.stewardWareHouse, stewardWareHouse)&&const DeepCollectionEquality().equals(other.car, car)&&const DeepCollectionEquality().equals(other.dispenser, dispenser));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,id,product,killHouse,const DeepCollectionEquality().hash(toKillHouse),const DeepCollectionEquality().hash(steward),toSteward,const DeepCollectionEquality().hash(guilds),const DeepCollectionEquality().hash(toGuilds),const DeepCollectionEquality().hash(toColdHouse),indexWeight,dateTimestamp,newState,newReceiverState,newAllocationState,key,createDate,modifyDate,trash,numberOfCarcasses,realNumberOfCarcasses,receiverRealNumberOfCarcasses,weightOfCarcasses,realWeightOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses,finalRegistration,sellType,productName,sellerType,type,saleType,allocationType,systemRegistrationCode,registrationCode,amount,totalAmount,totalAmountPaid,totalAmountRemain,const DeepCollectionEquality().hash(loggedRegistrationCode),state,receiverState,allocationState,date,const DeepCollectionEquality().hash(role),const DeepCollectionEquality().hash(stewardTempKey),approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,const DeepCollectionEquality().hash(createdBy),const DeepCollectionEquality().hash(modifiedBy),const DeepCollectionEquality().hash(wareHouse),const DeepCollectionEquality().hash(stewardWareHouse),const DeepCollectionEquality().hash(car),const DeepCollectionEquality().hash(dispenser)]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ImportedLoad(id: $id, product: $product, killHouse: $killHouse, toKillHouse: $toKillHouse, steward: $steward, toSteward: $toSteward, guilds: $guilds, toGuilds: $toGuilds, toColdHouse: $toColdHouse, indexWeight: $indexWeight, dateTimestamp: $dateTimestamp, newState: $newState, newReceiverState: $newReceiverState, newAllocationState: $newAllocationState, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, numberOfCarcasses: $numberOfCarcasses, realNumberOfCarcasses: $realNumberOfCarcasses, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, realWeightOfCarcasses: $realWeightOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, finalRegistration: $finalRegistration, sellType: $sellType, productName: $productName, sellerType: $sellerType, type: $type, saleType: $saleType, allocationType: $allocationType, systemRegistrationCode: $systemRegistrationCode, registrationCode: $registrationCode, amount: $amount, totalAmount: $totalAmount, totalAmountPaid: $totalAmountPaid, totalAmountRemain: $totalAmountRemain, loggedRegistrationCode: $loggedRegistrationCode, state: $state, receiverState: $receiverState, allocationState: $allocationState, date: $date, role: $role, stewardTempKey: $stewardTempKey, approvedPriceStatus: $approvedPriceStatus, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ImportedLoadCopyWith<$Res> {
|
||||
factory $ImportedLoadCopyWith(ImportedLoad value, $Res Function(ImportedLoad) _then) = _$ImportedLoadCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int? id, Product? product, KillHouse? killHouse, dynamic toKillHouse, dynamic steward, ToSteward? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, dynamic createdBy, dynamic modifiedBy, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser
|
||||
});
|
||||
|
||||
|
||||
$ProductCopyWith<$Res>? get product;$KillHouseCopyWith<$Res>? get killHouse;$ToStewardCopyWith<$Res>? get toSteward;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$ImportedLoadCopyWithImpl<$Res>
|
||||
implements $ImportedLoadCopyWith<$Res> {
|
||||
_$ImportedLoadCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ImportedLoad _self;
|
||||
final $Res Function(ImportedLoad) _then;
|
||||
|
||||
/// Create a copy of ImportedLoad
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? product = freezed,Object? killHouse = freezed,Object? toKillHouse = freezed,Object? steward = freezed,Object? toSteward = freezed,Object? guilds = freezed,Object? toGuilds = freezed,Object? toColdHouse = freezed,Object? indexWeight = freezed,Object? dateTimestamp = freezed,Object? newState = freezed,Object? newReceiverState = freezed,Object? newAllocationState = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? numberOfCarcasses = freezed,Object? realNumberOfCarcasses = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? realWeightOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,Object? finalRegistration = freezed,Object? sellType = freezed,Object? productName = freezed,Object? sellerType = freezed,Object? type = freezed,Object? saleType = freezed,Object? allocationType = freezed,Object? systemRegistrationCode = freezed,Object? registrationCode = freezed,Object? amount = freezed,Object? totalAmount = freezed,Object? totalAmountPaid = freezed,Object? totalAmountRemain = freezed,Object? loggedRegistrationCode = freezed,Object? state = freezed,Object? receiverState = freezed,Object? allocationState = freezed,Object? date = freezed,Object? role = freezed,Object? stewardTempKey = freezed,Object? approvedPriceStatus = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? wareHouse = freezed,Object? stewardWareHouse = freezed,Object? car = freezed,Object? dispenser = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
@@ -276,7 +126,7 @@ as dynamic,dispenser: freezed == dispenser ? _self.dispenser : dispenser // igno
|
||||
as dynamic,
|
||||
));
|
||||
}
|
||||
/// Create a copy of ImportedLoad
|
||||
/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -288,7 +138,7 @@ $ProductCopyWith<$Res>? get product {
|
||||
return $ProductCopyWith<$Res>(_self.product!, (value) {
|
||||
return _then(_self.copyWith(product: value));
|
||||
});
|
||||
}/// Create a copy of ImportedLoad
|
||||
}/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -300,7 +150,7 @@ $KillHouseCopyWith<$Res>? get killHouse {
|
||||
return $KillHouseCopyWith<$Res>(_self.killHouse!, (value) {
|
||||
return _then(_self.copyWith(killHouse: value));
|
||||
});
|
||||
}/// Create a copy of ImportedLoad
|
||||
}/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -319,9 +169,9 @@ $ToStewardCopyWith<$Res>? get toSteward {
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _ImportedLoad implements ImportedLoad {
|
||||
const _ImportedLoad({this.id, this.product, this.killHouse, this.toKillHouse, this.steward, this.toSteward, this.guilds, this.toGuilds, this.toColdHouse, this.indexWeight, this.dateTimestamp, this.newState, this.newReceiverState, this.newAllocationState, this.key, this.createDate, this.modifyDate, this.trash, this.numberOfCarcasses, this.realNumberOfCarcasses, this.receiverRealNumberOfCarcasses, this.weightOfCarcasses, this.realWeightOfCarcasses, this.receiverRealWeightOfCarcasses, this.weightLossOfCarcasses, this.finalRegistration, this.sellType, this.productName, this.sellerType, this.type, this.saleType, this.allocationType, this.systemRegistrationCode, this.registrationCode, this.amount, this.totalAmount, this.totalAmountPaid, this.totalAmountRemain, this.loggedRegistrationCode, this.state, this.receiverState, this.allocationState, this.date, this.role, this.stewardTempKey, this.approvedPriceStatus, this.calculateStatus, this.temporaryTrash, this.temporaryDeleted, this.createdBy, this.modifiedBy, this.wareHouse, this.stewardWareHouse, this.car, this.dispenser});
|
||||
factory _ImportedLoad.fromJson(Map<String, dynamic> json) => _$ImportedLoadFromJson(json);
|
||||
class _ImportedLoadsModel implements ImportedLoadsModel {
|
||||
const _ImportedLoadsModel({this.id, this.product, this.killHouse, this.toKillHouse, this.steward, this.toSteward, this.guilds, this.toGuilds, this.toColdHouse, this.indexWeight, this.dateTimestamp, this.newState, this.newReceiverState, this.newAllocationState, this.key, this.createDate, this.modifyDate, this.trash, this.numberOfCarcasses, this.realNumberOfCarcasses, this.receiverRealNumberOfCarcasses, this.weightOfCarcasses, this.realWeightOfCarcasses, this.receiverRealWeightOfCarcasses, this.weightLossOfCarcasses, this.finalRegistration, this.sellType, this.productName, this.sellerType, this.type, this.saleType, this.allocationType, this.systemRegistrationCode, this.registrationCode, this.amount, this.totalAmount, this.totalAmountPaid, this.totalAmountRemain, this.loggedRegistrationCode, this.state, this.receiverState, this.allocationState, this.date, this.role, this.stewardTempKey, this.approvedPriceStatus, this.calculateStatus, this.temporaryTrash, this.temporaryDeleted, this.createdBy, this.modifiedBy, this.wareHouse, this.stewardWareHouse, this.car, this.dispenser});
|
||||
factory _ImportedLoadsModel.fromJson(Map<String, dynamic> json) => _$ImportedLoadsModelFromJson(json);
|
||||
|
||||
@override final int? id;
|
||||
@override final Product? product;
|
||||
@@ -379,20 +229,20 @@ class _ImportedLoad implements ImportedLoad {
|
||||
@override final dynamic car;
|
||||
@override final dynamic dispenser;
|
||||
|
||||
/// Create a copy of ImportedLoad
|
||||
/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ImportedLoadCopyWith<_ImportedLoad> get copyWith => __$ImportedLoadCopyWithImpl<_ImportedLoad>(this, _$identity);
|
||||
_$ImportedLoadsModelCopyWith<_ImportedLoadsModel> get copyWith => __$ImportedLoadsModelCopyWithImpl<_ImportedLoadsModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$ImportedLoadToJson(this, );
|
||||
return _$ImportedLoadsModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ImportedLoad&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&(identical(other.killHouse, killHouse) || other.killHouse == killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&const DeepCollectionEquality().equals(other.steward, steward)&&(identical(other.toSteward, toSteward) || other.toSteward == toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&const DeepCollectionEquality().equals(other.toGuilds, toGuilds)&&const DeepCollectionEquality().equals(other.toColdHouse, toColdHouse)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.dateTimestamp, dateTimestamp) || other.dateTimestamp == dateTimestamp)&&(identical(other.newState, newState) || other.newState == newState)&&(identical(other.newReceiverState, newReceiverState) || other.newReceiverState == newReceiverState)&&(identical(other.newAllocationState, newAllocationState) || other.newAllocationState == newAllocationState)&&(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.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.realNumberOfCarcasses, realNumberOfCarcasses) || other.realNumberOfCarcasses == realNumberOfCarcasses)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.realWeightOfCarcasses, realWeightOfCarcasses) || other.realWeightOfCarcasses == realWeightOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.finalRegistration, finalRegistration) || other.finalRegistration == finalRegistration)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.productName, productName) || other.productName == productName)&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.type, type) || other.type == type)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.systemRegistrationCode, systemRegistrationCode) || other.systemRegistrationCode == systemRegistrationCode)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.totalAmountPaid, totalAmountPaid) || other.totalAmountPaid == totalAmountPaid)&&(identical(other.totalAmountRemain, totalAmountRemain) || other.totalAmountRemain == totalAmountRemain)&&const DeepCollectionEquality().equals(other.loggedRegistrationCode, loggedRegistrationCode)&&(identical(other.state, state) || other.state == state)&&(identical(other.receiverState, receiverState) || other.receiverState == receiverState)&&(identical(other.allocationState, allocationState) || other.allocationState == allocationState)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.role, role)&&const DeepCollectionEquality().equals(other.stewardTempKey, stewardTempKey)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&const DeepCollectionEquality().equals(other.wareHouse, wareHouse)&&const DeepCollectionEquality().equals(other.stewardWareHouse, stewardWareHouse)&&const DeepCollectionEquality().equals(other.car, car)&&const DeepCollectionEquality().equals(other.dispenser, dispenser));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ImportedLoadsModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&(identical(other.killHouse, killHouse) || other.killHouse == killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&const DeepCollectionEquality().equals(other.steward, steward)&&(identical(other.toSteward, toSteward) || other.toSteward == toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&const DeepCollectionEquality().equals(other.toGuilds, toGuilds)&&const DeepCollectionEquality().equals(other.toColdHouse, toColdHouse)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.dateTimestamp, dateTimestamp) || other.dateTimestamp == dateTimestamp)&&(identical(other.newState, newState) || other.newState == newState)&&(identical(other.newReceiverState, newReceiverState) || other.newReceiverState == newReceiverState)&&(identical(other.newAllocationState, newAllocationState) || other.newAllocationState == newAllocationState)&&(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.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.realNumberOfCarcasses, realNumberOfCarcasses) || other.realNumberOfCarcasses == realNumberOfCarcasses)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.realWeightOfCarcasses, realWeightOfCarcasses) || other.realWeightOfCarcasses == realWeightOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.finalRegistration, finalRegistration) || other.finalRegistration == finalRegistration)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.productName, productName) || other.productName == productName)&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.type, type) || other.type == type)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.systemRegistrationCode, systemRegistrationCode) || other.systemRegistrationCode == systemRegistrationCode)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.totalAmountPaid, totalAmountPaid) || other.totalAmountPaid == totalAmountPaid)&&(identical(other.totalAmountRemain, totalAmountRemain) || other.totalAmountRemain == totalAmountRemain)&&const DeepCollectionEquality().equals(other.loggedRegistrationCode, loggedRegistrationCode)&&(identical(other.state, state) || other.state == state)&&(identical(other.receiverState, receiverState) || other.receiverState == receiverState)&&(identical(other.allocationState, allocationState) || other.allocationState == allocationState)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.role, role)&&const DeepCollectionEquality().equals(other.stewardTempKey, stewardTempKey)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&const DeepCollectionEquality().equals(other.wareHouse, wareHouse)&&const DeepCollectionEquality().equals(other.stewardWareHouse, stewardWareHouse)&&const DeepCollectionEquality().equals(other.car, car)&&const DeepCollectionEquality().equals(other.dispenser, dispenser));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -401,15 +251,15 @@ int get hashCode => Object.hashAll([runtimeType,id,product,killHouse,const DeepC
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ImportedLoad(id: $id, product: $product, killHouse: $killHouse, toKillHouse: $toKillHouse, steward: $steward, toSteward: $toSteward, guilds: $guilds, toGuilds: $toGuilds, toColdHouse: $toColdHouse, indexWeight: $indexWeight, dateTimestamp: $dateTimestamp, newState: $newState, newReceiverState: $newReceiverState, newAllocationState: $newAllocationState, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, numberOfCarcasses: $numberOfCarcasses, realNumberOfCarcasses: $realNumberOfCarcasses, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, realWeightOfCarcasses: $realWeightOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, finalRegistration: $finalRegistration, sellType: $sellType, productName: $productName, sellerType: $sellerType, type: $type, saleType: $saleType, allocationType: $allocationType, systemRegistrationCode: $systemRegistrationCode, registrationCode: $registrationCode, amount: $amount, totalAmount: $totalAmount, totalAmountPaid: $totalAmountPaid, totalAmountRemain: $totalAmountRemain, loggedRegistrationCode: $loggedRegistrationCode, state: $state, receiverState: $receiverState, allocationState: $allocationState, date: $date, role: $role, stewardTempKey: $stewardTempKey, approvedPriceStatus: $approvedPriceStatus, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)';
|
||||
return 'ImportedLoadsModel(id: $id, product: $product, killHouse: $killHouse, toKillHouse: $toKillHouse, steward: $steward, toSteward: $toSteward, guilds: $guilds, toGuilds: $toGuilds, toColdHouse: $toColdHouse, indexWeight: $indexWeight, dateTimestamp: $dateTimestamp, newState: $newState, newReceiverState: $newReceiverState, newAllocationState: $newAllocationState, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, numberOfCarcasses: $numberOfCarcasses, realNumberOfCarcasses: $realNumberOfCarcasses, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, realWeightOfCarcasses: $realWeightOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, finalRegistration: $finalRegistration, sellType: $sellType, productName: $productName, sellerType: $sellerType, type: $type, saleType: $saleType, allocationType: $allocationType, systemRegistrationCode: $systemRegistrationCode, registrationCode: $registrationCode, amount: $amount, totalAmount: $totalAmount, totalAmountPaid: $totalAmountPaid, totalAmountRemain: $totalAmountRemain, loggedRegistrationCode: $loggedRegistrationCode, state: $state, receiverState: $receiverState, allocationState: $allocationState, date: $date, role: $role, stewardTempKey: $stewardTempKey, approvedPriceStatus: $approvedPriceStatus, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ImportedLoadCopyWith<$Res> implements $ImportedLoadCopyWith<$Res> {
|
||||
factory _$ImportedLoadCopyWith(_ImportedLoad value, $Res Function(_ImportedLoad) _then) = __$ImportedLoadCopyWithImpl;
|
||||
abstract mixin class _$ImportedLoadsModelCopyWith<$Res> implements $ImportedLoadsModelCopyWith<$Res> {
|
||||
factory _$ImportedLoadsModelCopyWith(_ImportedLoadsModel value, $Res Function(_ImportedLoadsModel) _then) = __$ImportedLoadsModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int? id, Product? product, KillHouse? killHouse, dynamic toKillHouse, dynamic steward, ToSteward? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, dynamic createdBy, dynamic modifiedBy, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser
|
||||
@@ -420,17 +270,17 @@ $Res call({
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$ImportedLoadCopyWithImpl<$Res>
|
||||
implements _$ImportedLoadCopyWith<$Res> {
|
||||
__$ImportedLoadCopyWithImpl(this._self, this._then);
|
||||
class __$ImportedLoadsModelCopyWithImpl<$Res>
|
||||
implements _$ImportedLoadsModelCopyWith<$Res> {
|
||||
__$ImportedLoadsModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ImportedLoad _self;
|
||||
final $Res Function(_ImportedLoad) _then;
|
||||
final _ImportedLoadsModel _self;
|
||||
final $Res Function(_ImportedLoadsModel) _then;
|
||||
|
||||
/// Create a copy of ImportedLoad
|
||||
/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? product = freezed,Object? killHouse = freezed,Object? toKillHouse = freezed,Object? steward = freezed,Object? toSteward = freezed,Object? guilds = freezed,Object? toGuilds = freezed,Object? toColdHouse = freezed,Object? indexWeight = freezed,Object? dateTimestamp = freezed,Object? newState = freezed,Object? newReceiverState = freezed,Object? newAllocationState = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? numberOfCarcasses = freezed,Object? realNumberOfCarcasses = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? realWeightOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,Object? finalRegistration = freezed,Object? sellType = freezed,Object? productName = freezed,Object? sellerType = freezed,Object? type = freezed,Object? saleType = freezed,Object? allocationType = freezed,Object? systemRegistrationCode = freezed,Object? registrationCode = freezed,Object? amount = freezed,Object? totalAmount = freezed,Object? totalAmountPaid = freezed,Object? totalAmountRemain = freezed,Object? loggedRegistrationCode = freezed,Object? state = freezed,Object? receiverState = freezed,Object? allocationState = freezed,Object? date = freezed,Object? role = freezed,Object? stewardTempKey = freezed,Object? approvedPriceStatus = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? wareHouse = freezed,Object? stewardWareHouse = freezed,Object? car = freezed,Object? dispenser = freezed,}) {
|
||||
return _then(_ImportedLoad(
|
||||
return _then(_ImportedLoadsModel(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable
|
||||
as Product?,killHouse: freezed == killHouse ? _self.killHouse : killHouse // ignore: cast_nullable_to_non_nullable
|
||||
@@ -490,7 +340,7 @@ as dynamic,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of ImportedLoad
|
||||
/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -502,7 +352,7 @@ $ProductCopyWith<$Res>? get product {
|
||||
return $ProductCopyWith<$Res>(_self.product!, (value) {
|
||||
return _then(_self.copyWith(product: value));
|
||||
});
|
||||
}/// Create a copy of ImportedLoad
|
||||
}/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -514,7 +364,7 @@ $KillHouseCopyWith<$Res>? get killHouse {
|
||||
return $KillHouseCopyWith<$Res>(_self.killHouse!, (value) {
|
||||
return _then(_self.copyWith(killHouse: value));
|
||||
});
|
||||
}/// Create a copy of ImportedLoad
|
||||
}/// Create a copy of ImportedLoadsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
|
||||
@@ -6,27 +6,9 @@ part of 'imported_loads_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_ImportedLoadsModel _$ImportedLoadsModelFromJson(Map<String, dynamic> json) =>
|
||||
_ImportedLoadsModel(
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
next: json['next'] as String?,
|
||||
previous: json['previous'] as String?,
|
||||
results: (json['results'] as List<dynamic>?)
|
||||
?.map((e) => ImportedLoad.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ImportedLoadsModelToJson(_ImportedLoadsModel instance) =>
|
||||
<String, dynamic>{
|
||||
'count': instance.count,
|
||||
'next': instance.next,
|
||||
'previous': instance.previous,
|
||||
'results': instance.results,
|
||||
};
|
||||
|
||||
_ImportedLoad _$ImportedLoadFromJson(
|
||||
_ImportedLoadsModel _$ImportedLoadsModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _ImportedLoad(
|
||||
) => _ImportedLoadsModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
product: json['product'] == null
|
||||
? null
|
||||
@@ -92,8 +74,8 @@ _ImportedLoad _$ImportedLoadFromJson(
|
||||
dispenser: json['dispenser'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ImportedLoadToJson(
|
||||
_ImportedLoad instance,
|
||||
Map<String, dynamic> _$ImportedLoadsModelToJson(
|
||||
_ImportedLoadsModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'product': instance.product,
|
||||
|
||||
@@ -43,9 +43,9 @@ abstract class ChickenRepository {
|
||||
required Map<String, dynamic> request,
|
||||
});
|
||||
|
||||
Future<ImportedLoadsModel?> getImportedLoadsModel({
|
||||
Future<PaginationModel<ImportedLoadsModel>?> getImportedLoadsModel({
|
||||
required String token,
|
||||
required int page,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<PaginationModel<AllocatedMadeModel>?> getAllocatedMade({
|
||||
|
||||
@@ -95,14 +95,18 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ImportedLoadsModel?> getImportedLoadsModel({
|
||||
Future<PaginationModel<ImportedLoadsModel>?> getImportedLoadsModel({
|
||||
required String token,
|
||||
required int page,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward-allocation/?role=Steward&search=filter&page=$page&page_size=10&value=&type=entered',
|
||||
'/steward-allocation/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: ImportedLoadsModel.fromJson,
|
||||
fromJson: (json) => PaginationModel.fromJson(
|
||||
json,
|
||||
(data) => ImportedLoadsModel.fromJson(data as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@@ -1,31 +1,39 @@
|
||||
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/buy/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/buy_in_province_all/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/buy_in_province_waiting/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class BuyInProvinceLogic extends GetxController {
|
||||
RxList<String> routesName = RxList();
|
||||
RxList<String> routesName = RxList();
|
||||
RxList<int> isExpandedList = <int>[].obs;
|
||||
RxnString searchedValue = RxnString();
|
||||
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
||||
Rx<Jalali> toDateFilter = Jalali.now().obs;
|
||||
|
||||
RootLogic get rootLogic => Get.find<RootLogic>();
|
||||
|
||||
BuyLogic get buyLogic => Get.find<BuyLogic>();
|
||||
RxInt selectedSegmentIndex = 0.obs;
|
||||
|
||||
BuyInProvinceAllLogic buyAllLogic = Get.find<BuyInProvinceAllLogic>();
|
||||
BuyInProvinceWaitingLogic buyWaitingLogic = Get.find<BuyInProvinceWaitingLogic>();
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
routesName.value = [...buyLogic.routesName, 'داخل استان'].toList();
|
||||
routesName.add(selectedSegmentIndex.value ==0 ? 'در انتظار':'همه');
|
||||
routesName.add(selectedSegmentIndex.value == 0 ? 'در انتظار' : 'همه');
|
||||
ever(selectedSegmentIndex, (callback) {
|
||||
routesName.removeLast();
|
||||
routesName.add(callback ==0 ? 'در انتظار':'همه');
|
||||
},);
|
||||
routesName.add(callback == 0 ? 'در انتظار' : 'همه');
|
||||
});
|
||||
|
||||
ever(fromDateFilter, (callback) => _setFromDateFilter(callback));
|
||||
ever(toDateFilter, (callback) => _setToDateFilter(callback));
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
@@ -38,8 +46,40 @@ class BuyInProvinceLogic extends GetxController {
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
void _setFromDateFilter(Jalali jalali) {
|
||||
final isWaiting = selectedSegmentIndex.value == 0;
|
||||
if (isWaiting) {
|
||||
buyWaitingLogic.fromDateFilter.value = fromDateFilter.value;
|
||||
} else {
|
||||
buyAllLogic.fromDateFilter.value = fromDateFilter.value;
|
||||
}
|
||||
}
|
||||
|
||||
void _setToDateFilter(Jalali jalali) {
|
||||
final isWaiting = selectedSegmentIndex.value == 0;
|
||||
if (isWaiting) {
|
||||
buyWaitingLogic.toDateFilter.value = fromDateFilter.value;
|
||||
} else {
|
||||
buyAllLogic.toDateFilter.value = fromDateFilter.value;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> submitFilter() async {
|
||||
final isWaiting = selectedSegmentIndex.value == 0;
|
||||
if (isWaiting) {
|
||||
buyWaitingLogic.getWaitingArrivals();
|
||||
} else {
|
||||
buyAllLogic.getImportedEntries();
|
||||
}
|
||||
}
|
||||
|
||||
void setSearchValue(String? data) {
|
||||
searchedValue.value = data?.trim();
|
||||
//TODO
|
||||
final isWaiting = selectedSegmentIndex.value == 0;
|
||||
if (isWaiting) {
|
||||
buyWaitingLogic.searchedValue.value = searchedValue.value;
|
||||
} else {
|
||||
buyAllLogic.searchedValue.value = searchedValue.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
||||
routesWidget: ObxValue((route) => buildPageRoute(route), controller.routesName),
|
||||
onBackPressed: () => Get.back(id: 0),
|
||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||
filteringWidget: Container(color: Colors.redAccent),
|
||||
filteringWidget: filterBottomSheet(),
|
||||
widgets: [
|
||||
segmentWidget(),
|
||||
ObxValue((index) {
|
||||
@@ -48,4 +48,44 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget filterBottomSheet() {
|
||||
return BaseBottomSheet(
|
||||
height: 250,
|
||||
child: Column(
|
||||
spacing: 16,
|
||||
children: [
|
||||
Text('فیلترها', style: AppFonts.yekan16Bold.copyWith(color: AppColor.darkGreyDarkHover)),
|
||||
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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 2),
|
||||
RElevated(
|
||||
text: 'اعمال فیلتر',
|
||||
onPressed: () {
|
||||
controller.submitFilter();
|
||||
Get.back();
|
||||
},
|
||||
height: 40,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
import 'package:rasadyar_auth/data/utils/safe_call.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/imported_loads_model/imported_loads_model.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class BuyInProvinceAllLogic extends GetxController {
|
||||
RxList<int> isExpandedList = <int>[].obs;
|
||||
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
||||
Rx<Jalali> toDateFilter = Jalali.now().obs;
|
||||
RxnString searchedValue = RxnString();
|
||||
|
||||
RootLogic rootLogic = Get.find<RootLogic>();
|
||||
Rx<Resource<List<ImportedLoadsModel>>> importedLoads =
|
||||
Resource<List<ImportedLoadsModel>>.loading().obs;
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
debounce(searchedValue, (callback) => getImportedEntries(), time: Duration(milliseconds: 2000));
|
||||
super.onReady();
|
||||
}
|
||||
|
||||
@@ -12,4 +27,28 @@ class BuyInProvinceAllLogic extends GetxController {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
Future<void> getImportedEntries() async {
|
||||
safeCall(
|
||||
call: () async => await rootLogic.chickenRepository.getImportedLoadsModel(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
queryParameters: buildQueryParams(
|
||||
queryParams: {'type': 'entered'},
|
||||
role: 'Steward',
|
||||
search: 'filter',
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
value: searchedValue.value
|
||||
),
|
||||
),
|
||||
onSuccess: (res) async {
|
||||
await Future.delayed(Duration(milliseconds: 200));
|
||||
if ((res?.count ?? 0) == 0) {
|
||||
importedLoads.value = Resource<List<ImportedLoadsModel>>.empty();
|
||||
} else {
|
||||
importedLoads.value = Resource<List<ImportedLoadsModel>>.success(res!.results!);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,39 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_auth/data/utils/safe_call.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/steward_allocation/steward_allocation_request.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class BuyInProvinceWaitingLogic extends GetxController {
|
||||
RxList<int> isExpandedList = <int>[].obs;
|
||||
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
||||
Rx<Jalali> toDateFilter = Jalali.now().obs;
|
||||
Rx<Jalali> fromDateFilter = Jalali
|
||||
.now()
|
||||
.obs;
|
||||
Rx<Jalali> toDateFilter = Jalali
|
||||
.now()
|
||||
.obs;
|
||||
RxnString searchedValue = RxnString();
|
||||
RxMap<String, bool> isLoadingConfirmMap = RxMap();
|
||||
Rx<Color> bgConfirmAllColor = AppColor.blueNormal.obs;
|
||||
|
||||
RootLogic rootLogic = Get.find<RootLogic>();
|
||||
Rx<Resource<List<WaitingArrivalModel>>> waitingProduct =
|
||||
Resource<List<WaitingArrivalModel>>.loading().obs;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
debounce(
|
||||
searchedValue,
|
||||
(callback) => getWaitingArrivals(),
|
||||
time: Duration(milliseconds: timeDebounce),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
@@ -24,14 +45,17 @@ class BuyInProvinceWaitingLogic extends GetxController {
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
void setSearchValue(String? data) {
|
||||
searchedValue.value = data?.trim();
|
||||
}
|
||||
|
||||
Future<void> getWaitingArrivals() async {
|
||||
safeCall(
|
||||
call: () async => await rootLogic.chickenRepository.getWaitingArrivals(
|
||||
call: () async =>
|
||||
await rootLogic.chickenRepository.getWaitingArrivals(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
queryParameters: buildQueryParams(
|
||||
queryParams: {
|
||||
'type':'not_entered'
|
||||
},
|
||||
queryParams: {'type': 'not_entered'},
|
||||
pageSize: 10,
|
||||
page: 1,
|
||||
search: 'filter',
|
||||
@@ -42,17 +66,78 @@ class BuyInProvinceWaitingLogic extends GetxController {
|
||||
),
|
||||
),
|
||||
onSuccess: (res) async {
|
||||
await Future.delayed(Duration(milliseconds: 500));
|
||||
await Future.delayed(Duration(milliseconds: 200));
|
||||
if ((res?.count ?? 0) == 0) {
|
||||
waitingProduct.value = Resource<List<WaitingArrivalModel>>.empty();
|
||||
} else {
|
||||
waitingProduct.value = Resource<List<WaitingArrivalModel>>.success(res!.results!);
|
||||
flashingFabBgColor();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void setSearchValue(String? data) {
|
||||
searchedValue.value = data?.trim();
|
||||
Future<void> acceptEntries(WaitingArrivalModel model) async {
|
||||
var request = StewardAllocationRequest(
|
||||
allocationKey: model.key,
|
||||
checkAllocation: true,
|
||||
state: 'accepted',
|
||||
receiverRealNumberOfCarcasses: model.realNumberOfCarcasses ?? 0,
|
||||
receiverRealWeightOfCarcasses: model.realWeightOfCarcasses?.toInt() ?? 0,
|
||||
registrationCode: model.registrationCode ?? 0,
|
||||
weightLossOfCarcasses: model.weightLossOfCarcasses?.toInt() ?? 0,
|
||||
).toJson();
|
||||
request.removeWhere((key, value) => value == null);
|
||||
|
||||
safeCall(
|
||||
call: () async =>
|
||||
await rootLogic.chickenRepository.setSateForArrivals(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
request: request,
|
||||
),
|
||||
onError: (error, stackTrace) {
|
||||
eLog(error);
|
||||
},
|
||||
onSuccess: (result) {
|
||||
getWaitingArrivals();
|
||||
// getBarGeneralInformation();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> denyEntries(WaitingArrivalModel model) async {
|
||||
var request = StewardAllocationRequest(
|
||||
allocationKey: model.key,
|
||||
checkAllocation: true,
|
||||
state: 'rejected',
|
||||
).toJson();
|
||||
request.removeWhere((key, value) => value == null);
|
||||
|
||||
safeCall(
|
||||
call: () async =>
|
||||
await rootLogic.chickenRepository.setSateForArrivals(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
request: request,
|
||||
),
|
||||
onError: (error, stackTrace) {
|
||||
eLog(error);
|
||||
},
|
||||
onSuccess: (result) {
|
||||
getWaitingArrivals();
|
||||
//TODO
|
||||
// getBarGeneralInformation();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void flashingFabBgColor() {
|
||||
Timer.periodic(Duration(seconds: 2), (timer) {
|
||||
if (bgConfirmAllColor.value == AppColor.blueNormal) {
|
||||
bgConfirmAllColor.value = AppColor.blueDarkActive;
|
||||
} else {
|
||||
bgConfirmAllColor.value = AppColor.blueNormal;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
@@ -12,36 +11,50 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: ObxValue((data) {
|
||||
return RPaginatedListView(
|
||||
listType: ListType.separated,
|
||||
resource: data.value,
|
||||
padding: EdgeInsets.fromLTRB(8, 8, 8, 80),
|
||||
itemBuilder: (context, index) {
|
||||
var item = data.value.data![index];
|
||||
return ObxValue((val) {
|
||||
return ListItem2(
|
||||
selected: val.contains(index),
|
||||
onTap: () => controller.isExpandedList.toggle(index),
|
||||
index: index,
|
||||
child: itemListWidget(item),
|
||||
secondChild: itemListExpandedWidget(item),
|
||||
labelColor: AppColor.blueLight,
|
||||
labelIcon: Assets.vec.truckFastOutlinedSvg.path,
|
||||
);
|
||||
}, controller.isExpandedList);
|
||||
},
|
||||
itemCount: data.value.data?.length ?? 0,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||
onLoadMore: () async {},
|
||||
);
|
||||
return Scaffold(
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: ObxValue((data) {
|
||||
return RPaginatedListView(
|
||||
listType: ListType.separated,
|
||||
resource: data.value,
|
||||
padding: EdgeInsets.fromLTRB(8, 8, 8, 80),
|
||||
itemBuilder: (context, index) {
|
||||
var item = data.value.data![index];
|
||||
return ObxValue((val) {
|
||||
return ListItem2(
|
||||
selected: val.contains(index),
|
||||
onTap: () => controller.isExpandedList.toggle(index),
|
||||
index: index,
|
||||
child: itemListWidget(item),
|
||||
secondChild: itemListExpandedWidget(item),
|
||||
labelColor: AppColor.blueLight,
|
||||
labelIcon: Assets.vec.timerSvg.path,
|
||||
);
|
||||
}, controller.isExpandedList);
|
||||
},
|
||||
itemCount: data.value.data?.length ?? 0,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||
onLoadMore: () async {},
|
||||
);
|
||||
}, controller.waitingProduct),
|
||||
),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
|
||||
floatingActionButton: ObxValue((data) {
|
||||
if ((data.value.data?.length ?? 0) > 1) {
|
||||
return AnimatedFab(
|
||||
onPressed: () {},
|
||||
message: 'تایید یکجا',
|
||||
icon: Assets.vec.clipboardTaskSvg.svg(),
|
||||
backgroundColor: controller.bgConfirmAllColor.value,
|
||||
);
|
||||
} else {
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
}, controller.waitingProduct),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Row itemListWidget(WaitingArrivalModel item) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
@@ -76,7 +89,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
spacing: 3,
|
||||
spacing: 6,
|
||||
children: [
|
||||
Visibility(
|
||||
visible: item.product?.name?.contains('مرغ گرم') ?? false,
|
||||
@@ -95,8 +108,6 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
||||
),
|
||||
|
||||
SizedBox(height: 2),
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -127,6 +138,14 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
'در انتظار',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan10.copyWith(color: AppColor.darkGreyDark),
|
||||
),
|
||||
SizedBox(width: 7),
|
||||
Assets.vec.clockSvg.svg(width: 16.w, height: 16.h),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
@@ -170,95 +189,61 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
||||
),
|
||||
),
|
||||
|
||||
// buildRow(title: 'مشخصات فروشنده', value: item.killHouseName ?? 'N/A'),
|
||||
|
||||
// buildRow(title: 'مشخصات فروشنده', value: item.killHouseName ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'نام و نام خانوادگی فروشنده',
|
||||
value: item.steward?.user?.fullname ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
title: 'تلفن فروشنده',
|
||||
value: item.steward?.user?.mobile ?? 'N/A',
|
||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
|
||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'وزن خریداری شده',
|
||||
value: '${item.weightOfCarcasses?.separatedByComma} کیلوگرم',
|
||||
),
|
||||
buildRowOnTapped(
|
||||
title: 'مشاهده بارنامه',
|
||||
titleStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||
valueWidget: Assets.vec.clipboardEyeSvg.svg(
|
||||
width: 20,
|
||||
height: 24,
|
||||
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||
),
|
||||
onTap: () {
|
||||
Get.bottomSheet(
|
||||
BaseBottomSheet(
|
||||
height: 400,
|
||||
child: Column(
|
||||
spacing: 16,
|
||||
children: [
|
||||
Text(
|
||||
'بارنامه',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.darkGreyDarkHover),
|
||||
),
|
||||
|
||||
/* Image.network(
|
||||
item.barImage ?? '',
|
||||
fit: BoxFit.cover,
|
||||
height: 300,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
eLog(error.toString());
|
||||
return Center(child: Text('خطایی پیش آمده!'));
|
||||
},
|
||||
loadingBuilder: (context, child, loadingProgress) {
|
||||
if (loadingProgress == null) return child;
|
||||
return CupertinoActivityIndicator();
|
||||
},
|
||||
),*/
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
/* Row(
|
||||
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByComma} ریال'),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
spacing: 16.w,
|
||||
children: [
|
||||
RElevated(
|
||||
text: 'ویرایش',
|
||||
width: 150.w,
|
||||
height: 40.h,
|
||||
onPressed: () {
|
||||
controller.setEditData(item);
|
||||
Get.bottomSheet(
|
||||
addPurchasedInformationBottomSheet(true),
|
||||
isScrollControlled: true,
|
||||
).whenComplete(() {
|
||||
controller.resetSubmitForm();
|
||||
});
|
||||
},
|
||||
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
),
|
||||
ObxValue((data) {
|
||||
return RElevated(
|
||||
text: 'تایید',
|
||||
width: 150.w,
|
||||
height: 40.h,
|
||||
isLoading: data[item.key!] ?? false,
|
||||
onPressed: () async {
|
||||
data[item.key!] = !(data[item.key!] ?? false);
|
||||
await controller.acceptEntries(item);
|
||||
data.remove(item.key!);
|
||||
},
|
||||
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
);
|
||||
}, controller.isLoadingConfirmMap),
|
||||
ROutlinedElevated(
|
||||
text: 'حذف',
|
||||
text: 'رد',
|
||||
textStyle: AppFonts.yekan20.copyWith(color: AppColor.redNormal),
|
||||
width: 150.w,
|
||||
height: 40.h,
|
||||
onPressed: () {
|
||||
buildDeleteDialog(
|
||||
onConfirm: () => controller.deleteStewardPurchaseOutOfProvince(item.key!),
|
||||
onRefresh: () => controller.getStewardPurchaseOutOfProvince(),
|
||||
buildWarningDialog(
|
||||
title: 'اخطار',
|
||||
middleText: 'آیا از رد شدن این مورد اطمینان دارید؟',
|
||||
onConfirm: () => controller.denyEntries(item),
|
||||
onRefresh: () => controller.getWaitingArrivals(),
|
||||
);
|
||||
},
|
||||
borderColor: AppColor.redNormal,
|
||||
),
|
||||
],
|
||||
),*/
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,26 +33,7 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
|
||||
getBarGeneralInformation();
|
||||
|
||||
getImportedEntried();
|
||||
|
||||
scrollControllerImportedLoad.addListener(() {
|
||||
if (scrollControllerImportedLoad.position.pixels >=
|
||||
scrollControllerImportedLoad.position.maxScrollExtent - 100) {
|
||||
addPageImportedLoad.value = true;
|
||||
getImportedEntried();
|
||||
}
|
||||
});
|
||||
|
||||
scrollControllerWaitingForArrival.addListener(() {
|
||||
if (scrollControllerWaitingForArrival.position.pixels >=
|
||||
scrollControllerWaitingForArrival.position.maxScrollExtent - 100) {
|
||||
addPageWaitingForArrival.value = true;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> getBarGeneralInformation() async {
|
||||
@@ -74,68 +55,6 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
|
||||
|
||||
|
||||
Future<void> acceptEntried(String key) async {
|
||||
var request = StewardAllocationRequest(
|
||||
allocationKey: key,
|
||||
checkAllocation: true,
|
||||
state: 'accepted',
|
||||
receiverRealNumberOfCarcasses: int.parse(
|
||||
volumeController.text.isNotEmpty ? volumeController.text : '0',
|
||||
),
|
||||
receiverRealWeightOfCarcasses: int.parse(
|
||||
weightController.text.isNotEmpty ? weightController.text : '0',
|
||||
),
|
||||
registrationCode: acceptType.value == 1
|
||||
? int.parse(
|
||||
authenticationCodeController.text.isNotEmpty
|
||||
? authenticationCodeController.text
|
||||
: '0',
|
||||
)
|
||||
: null,
|
||||
weightLossOfCarcasses: int.parse(
|
||||
weightLossController.text.isNotEmpty ? weightLossController.text : '0',
|
||||
),
|
||||
).toJson();
|
||||
request.removeWhere((key, value) => value == null);
|
||||
|
||||
safeCall(
|
||||
call: () async => await rootLogic.chickenRepository.setSateForArrivals(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
request: request,
|
||||
),
|
||||
onError: (error, stackTrace) {
|
||||
eLog(error);
|
||||
},
|
||||
onSuccess: (result) {
|
||||
clearControllers();
|
||||
|
||||
getBarGeneralInformation();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> denyEntried(String key) async {
|
||||
var request = StewardAllocationRequest(
|
||||
allocationKey: key,
|
||||
checkAllocation: true,
|
||||
state: 'rejected',
|
||||
).toJson();
|
||||
request.removeWhere((key, value) => value == null);
|
||||
|
||||
safeCall(
|
||||
call: () async => await rootLogic.chickenRepository.setSateForArrivals(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
request: request,
|
||||
),
|
||||
onError: (error, stackTrace) {
|
||||
eLog(error);
|
||||
},
|
||||
onSuccess: (result) {
|
||||
|
||||
getBarGeneralInformation();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> getImportedEntried() async {
|
||||
if (isLoadingMoreImportedLoad.value || !hasMoreDataImportedLoad.value) {
|
||||
@@ -146,7 +65,7 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
currentPageImportedLoad.value++;
|
||||
}
|
||||
|
||||
safeCall(
|
||||
/* safeCall(
|
||||
call: () async => await rootLogic.chickenRepository.getImportedLoadsModel(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
page: currentPageImportedLoad.value,
|
||||
@@ -164,7 +83,7 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
isLoadingMoreImportedLoad.value = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
);*/
|
||||
}
|
||||
|
||||
clearControllers() {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/entering_the_warehouse/string_utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
@@ -22,7 +20,7 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
return generalBarInformation(data.value);
|
||||
}, controller.barInformation),
|
||||
|
||||
importedLoads(),
|
||||
// importedLoads(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -43,7 +41,7 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
/* ObxValue(
|
||||
/* ObxValue(
|
||||
(data) => data.isEmpty
|
||||
? Container(
|
||||
margin: const EdgeInsets.symmetric(vertical: 2),
|
||||
@@ -135,14 +133,8 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
'کل ورودی به انبار (کیلوگرم)',
|
||||
model.totalFreeBarsCarcassesWeight.toString(),
|
||||
),
|
||||
buildRow(
|
||||
'کل فروش (کیلوگرم)',
|
||||
model.realAllocatedWeight.toString(),
|
||||
),
|
||||
buildRow(
|
||||
'مانده انبار (کیلوگرم)',
|
||||
model.totalRemainWeight.toString(),
|
||||
),
|
||||
buildRow('کل فروش (کیلوگرم)', model.realAllocatedWeight.toString()),
|
||||
buildRow('مانده انبار (کیلوگرم)', model.totalRemainWeight.toString()),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -161,9 +153,7 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
child: Text(
|
||||
title,
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
@@ -172,9 +162,7 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
value,
|
||||
textAlign: TextAlign.left,
|
||||
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -209,14 +197,8 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 8,
|
||||
children: [
|
||||
buildRow(
|
||||
'تعداد کل بارها',
|
||||
model.totalBars!.toInt().toString(),
|
||||
),
|
||||
buildRow(
|
||||
'وزن کل بارها (کیلوگرم)',
|
||||
model.totalBarsWeight!.toInt().toString(),
|
||||
),
|
||||
buildRow('تعداد کل بارها', model.totalBars!.toInt().toString()),
|
||||
buildRow('وزن کل بارها (کیلوگرم)', model.totalBarsWeight!.toInt().toString()),
|
||||
buildRow(
|
||||
'تعداد کل بارهای وارد شده',
|
||||
model.totalEnteredBars!.toInt().toString(),
|
||||
@@ -231,14 +213,9 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
),
|
||||
buildRow(
|
||||
'وزن کل بار وارد نشده (کیلوگرم)',
|
||||
model.totalNotEnteredKillHouseRequestsWeight!
|
||||
.toInt()
|
||||
.toString(),
|
||||
),
|
||||
buildRow(
|
||||
'تعداد کل بارهای رد شده',
|
||||
model.totalRejectedBars!.toInt().toString(),
|
||||
model.totalNotEnteredKillHouseRequestsWeight!.toInt().toString(),
|
||||
),
|
||||
buildRow('تعداد کل بارهای رد شده', model.totalRejectedBars!.toInt().toString()),
|
||||
buildRow(
|
||||
' وزن کل بارهای رد شده',
|
||||
model.totalRejectedBarsWeight!.toInt().toString(),
|
||||
@@ -251,7 +228,7 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
);
|
||||
}
|
||||
|
||||
/* Widget waitingForArrival() {
|
||||
/* Widget waitingForArrival() {
|
||||
return Column(
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
@@ -400,153 +377,72 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
);
|
||||
}*/
|
||||
|
||||
Widget importedLoads() {
|
||||
return Column(
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'بارهای وارد شده',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
/* Widget importedLoads() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
buildRow('ردیف', '${index + 1}'),
|
||||
buildRow(
|
||||
'تاریخ ثبت',
|
||||
result.date!.formattedJalaliDate ?? 'N/A',
|
||||
),
|
||||
),
|
||||
ObxValue((data) {
|
||||
if (data.value == null) {
|
||||
return Container(
|
||||
height: 80,
|
||||
margin: const EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(color: AppColor.blueNormal, width: 1),
|
||||
),
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
} else if (data.value?.results?.isEmpty ?? true) {
|
||||
return Container(
|
||||
height: 80,
|
||||
margin: const EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(color: AppColor.blueNormal, width: 1),
|
||||
),
|
||||
child: Center(child: Text('هیچ بار وارد شدهای وجود ندارد')),
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
margin: const EdgeInsets.symmetric(vertical: 2),
|
||||
height: 700,
|
||||
padding: const EdgeInsets.all(6),
|
||||
child: ListView.separated(
|
||||
controller: controller.scrollControllerImportedLoad,
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
itemCount: data.value!.results!.length + 1,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
if (index == data.value!.results!.length) {
|
||||
return Obx(
|
||||
() => controller.isLoadingMoreImportedLoad.value
|
||||
? const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
)
|
||||
: const SizedBox(),
|
||||
);
|
||||
}
|
||||
|
||||
final result = data.value!.results![index];
|
||||
|
||||
return Card(
|
||||
color: Colors.white,
|
||||
margin: const EdgeInsets.symmetric(vertical: 4.0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
side: const BorderSide(
|
||||
color: AppColor.blueNormal,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
buildRow('ردیف', '${index + 1}'),
|
||||
buildRow(
|
||||
'تاریخ ثبت',
|
||||
result.date!.formattedJalaliDate ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'نوع تخصیص',
|
||||
result.allocationType?.faAllocationType ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'مشخصات خریدار',
|
||||
'${result.toSteward?.user?.fullname} - ${result.toSteward?.guildsName}' ??
|
||||
'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'مشخصات فروشنده',
|
||||
result.killHouse?.name ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'نوع فروش',
|
||||
result.sellType?.faItem ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'قیمت هر کیلو',
|
||||
'${result.amount ?? 0} ریال ',
|
||||
),
|
||||
buildRow(
|
||||
'قیمت کل',
|
||||
'${result.totalAmount ?? 0} ریال',
|
||||
),
|
||||
buildRow(
|
||||
'وزن تخصیصی',
|
||||
'${result.weightOfCarcasses?.toInt() ?? 0} کیلوگرم',
|
||||
),
|
||||
buildRow(
|
||||
'کداحراز',
|
||||
result.registrationCode?.toString() ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'وضعیت کد احراز',
|
||||
result.systemRegistrationCode == true
|
||||
? "ارسال شده"
|
||||
: "ارسال نشده" ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'افت وزن(کیلوگرم)',
|
||||
result.weightLossOfCarcasses?.toInt().toString() ??
|
||||
'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'وضعیت',
|
||||
result.receiverState?.faItem ?? 'N/A',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (BuildContext context, int index) =>
|
||||
SizedBox(height: 8),
|
||||
),
|
||||
);
|
||||
}
|
||||
}, controller.importedLoads),
|
||||
],
|
||||
buildRow(
|
||||
'نوع تخصیص',
|
||||
result.allocationType?.faAllocationType ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'مشخصات خریدار',
|
||||
'${result.toSteward?.user?.fullname} - ${result.toSteward?.guildsName}' ??
|
||||
'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'مشخصات فروشنده',
|
||||
result.killHouse?.name ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'نوع فروش',
|
||||
result.sellType?.faItem ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'قیمت هر کیلو',
|
||||
'${result.amount ?? 0} ریال ',
|
||||
),
|
||||
buildRow(
|
||||
'قیمت کل',
|
||||
'${result.totalAmount ?? 0} ریال',
|
||||
),
|
||||
buildRow(
|
||||
'وزن تخصیصی',
|
||||
'${result.weightOfCarcasses?.toInt() ?? 0} کیلوگرم',
|
||||
),
|
||||
buildRow(
|
||||
'کداحراز',
|
||||
result.registrationCode?.toString() ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'وضعیت کد احراز',
|
||||
result.systemRegistrationCode == true
|
||||
? "ارسال شده"
|
||||
: "ارسال نشده" ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'افت وزن(کیلوگرم)',
|
||||
result.weightLossOfCarcasses?.toInt().toString() ??
|
||||
'N/A',
|
||||
),
|
||||
buildRow(
|
||||
'وضعیت',
|
||||
result.receiverState?.faItem ?? 'N/A',
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}*/
|
||||
|
||||
/* Widget acceptBottomSheet(ResultModel resultModel) {
|
||||
/* Widget acceptBottomSheet(ResultModel resultModel) {
|
||||
return BaseBottomSheet(
|
||||
height: 500,
|
||||
child: Column(
|
||||
|
||||
@@ -4,8 +4,8 @@ import 'package:rasadyar_chicken/data/models/request/conform_allocation/conform_
|
||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/entering_the_warehouse/string_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
extension xStringUtils on String {
|
||||
extension XStringUtils on String {
|
||||
get faAllocationType {
|
||||
final tmp = split('_');
|
||||
tmp.insert(1, '_');
|
||||
@@ -3,6 +3,11 @@ import 'package:rasadyar_auth/data/models/local/user_local/user_local_model.dart
|
||||
import 'package:rasadyar_auth/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
|
||||
|
||||
const int timeDebounce = 1200;
|
||||
|
||||
|
||||
void handleGeneric(DioException error,[void Function()? onError]) {
|
||||
Get.showSnackbar(_errorSnackBar('اعتبار توکن شما منقضی شده است لطفا دوباره وارد شوید'));
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ class AppColor {
|
||||
0xFF142b73,
|
||||
); // #142b73 rgb(20, 43, 115)
|
||||
static const Color blueDarker = Color(0xFF102159); // #102159 rgb(16, 33, 89)
|
||||
static const Color blueFlashing = Color(0xFF6F91FF); // #6F91FF rgb(111, 145, 255)
|
||||
//endregion
|
||||
|
||||
//region --- Green Colors ---
|
||||
|
||||
@@ -71,6 +71,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/clipboard_task.svg
|
||||
SvgGenImage get clipboardTask => const SvgGenImage('assets/icons/clipboard_task.svg');
|
||||
|
||||
/// File path: assets/icons/clock.svg
|
||||
SvgGenImage get clock => const SvgGenImage('assets/icons/clock.svg');
|
||||
|
||||
/// File path: assets/icons/close_square.svg
|
||||
SvgGenImage get closeSquare => const SvgGenImage('assets/icons/close_square.svg');
|
||||
|
||||
@@ -252,6 +255,7 @@ class $AssetsIconsGen {
|
||||
chicken,
|
||||
clipboardEye,
|
||||
clipboardTask,
|
||||
clock,
|
||||
closeSquare,
|
||||
convertCube,
|
||||
cube,
|
||||
@@ -384,6 +388,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/clipboard_task.svg.vec
|
||||
SvgGenImage get clipboardTaskSvg => const SvgGenImage.vec('assets/vec/clipboard_task.svg.vec');
|
||||
|
||||
/// File path: assets/vec/clock.svg.vec
|
||||
SvgGenImage get clockSvg => const SvgGenImage.vec('assets/vec/clock.svg.vec');
|
||||
|
||||
/// File path: assets/vec/close_square.svg.vec
|
||||
SvgGenImage get closeSquareSvg => const SvgGenImage.vec('assets/vec/close_square.svg.vec');
|
||||
|
||||
@@ -565,6 +572,7 @@ class $AssetsVecGen {
|
||||
chickenSvg,
|
||||
clipboardEyeSvg,
|
||||
clipboardTaskSvg,
|
||||
clockSvg,
|
||||
closeSquareSvg,
|
||||
convertCubeSvg,
|
||||
cubeSvg,
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AnimatedFab extends StatelessWidget {
|
||||
final VoidCallback? onPressed;
|
||||
final Color backgroundColor;
|
||||
final Color foregroundColor;
|
||||
final Widget icon;
|
||||
final double radius;
|
||||
final bool isLoading;
|
||||
final String? message;
|
||||
|
||||
const AnimatedFab({
|
||||
super.key,
|
||||
required this.onPressed,
|
||||
required this.icon,
|
||||
required this.backgroundColor,
|
||||
this.foregroundColor = Colors.white,
|
||||
this.radius = 56.0,
|
||||
this.isLoading = false,
|
||||
this.message,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return message != null
|
||||
? Tooltip(
|
||||
message: message ?? '',
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 1300),
|
||||
width: radius,
|
||||
height: radius,
|
||||
decoration: BoxDecoration(color: backgroundColor, shape: BoxShape.circle),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(radius),
|
||||
onTap: isLoading ? null : onPressed,
|
||||
child: Center(
|
||||
child: isLoading
|
||||
? SizedBox(
|
||||
height: radius / 2,
|
||||
width: radius / 2,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2.5,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(foregroundColor),
|
||||
),
|
||||
)
|
||||
: icon,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 1300),
|
||||
width: radius,
|
||||
height: radius,
|
||||
decoration: BoxDecoration(color: backgroundColor, shape: BoxShape.circle),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(radius),
|
||||
onTap: isLoading ? null : onPressed,
|
||||
child: Center(
|
||||
child: isLoading
|
||||
? SizedBox(
|
||||
height: radius / 2,
|
||||
width: radius / 2,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2.5,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(foregroundColor),
|
||||
),
|
||||
)
|
||||
: icon,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export 'animated_fab.dart';
|
||||
export 'elevated.dart';
|
||||
export 'fab.dart';
|
||||
export 'fab_outlined.dart';
|
||||
export 'outline_elevated.dart';
|
||||
export 'outline_elevated_icon.dart';
|
||||
export 'text_button.dart';
|
||||
2
packages/core/lib/presentation/widget/dialog/dialog.dart
Normal file
2
packages/core/lib/presentation/widget/dialog/dialog.dart
Normal file
@@ -0,0 +1,2 @@
|
||||
export 'delete_dialog.dart';
|
||||
export 'warning_dialog.dart';
|
||||
@@ -0,0 +1,33 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../core.dart';
|
||||
|
||||
Future<void> buildWarningDialog({
|
||||
required String title,
|
||||
required String middleText,
|
||||
required Future<void> Function() onConfirm,
|
||||
required Future<void> Function() onRefresh,
|
||||
}) async {
|
||||
await Get.defaultDialog(
|
||||
title: title,
|
||||
middleText: middleText,
|
||||
confirm: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColor.error,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: () async {
|
||||
await onConfirm();
|
||||
onRefresh();
|
||||
Get.back();
|
||||
},
|
||||
child: Text('بله'),
|
||||
),
|
||||
cancel: ElevatedButton(
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Text('خیر'),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -3,14 +3,10 @@ export 'bottom_navigation/r_bottom_navigation.dart';
|
||||
export 'bottom_navigation/wave_bottom_navigation.dart';
|
||||
export 'bottom_sheet/base_bottom_sheet.dart';
|
||||
export 'bottom_sheet/date_picker_bottom_sheet.dart';
|
||||
export 'buttons/elevated.dart';
|
||||
export 'buttons/fab.dart';
|
||||
export 'buttons/outline_elevated.dart';
|
||||
export 'buttons/outline_elevated_icon.dart';
|
||||
export 'buttons/text_button.dart';
|
||||
export 'buttons/buttons.dart';
|
||||
export 'card/card_with_icon_with_border.dart';
|
||||
export 'chips/r_chips.dart';
|
||||
export 'dialog/delete_dialog.dart';
|
||||
export 'dialog/dialog.dart';
|
||||
export 'draggable_bottom_sheet/bottom_sheet_manger.dart';
|
||||
export 'draggable_bottom_sheet/draggable_bottom_sheet.dart';
|
||||
export 'draggable_bottom_sheet/draggable_bottom_sheet2.dart';
|
||||
|
||||
Reference in New Issue
Block a user