diff --git a/android/local.properties b/android/local.properties index 6bab2b3..5cbba42 100644 --- a/android/local.properties +++ b/android/local.properties @@ -1,5 +1,5 @@ -sdk.dir=C:\\Users\\Housh11\\AppData\\Local\\Android\\sdk +sdk.dir=C:/Users/Housh11/AppData/Local/Android/Sdk flutter.sdk=C:\\src\\flutter -flutter.buildMode=debug -flutter.versionName=1.3.26 -flutter.versionCode=23 \ No newline at end of file +flutter.buildMode=release +flutter.versionName=1.3.28 +flutter.versionCode=25 \ No newline at end of file diff --git a/packages/chicken/lib/data/models/response/allocated_made/allocated_made.dart b/packages/chicken/lib/data/models/response/allocated_made/allocated_made.dart index 19947f2..3d5699d 100644 --- a/packages/chicken/lib/data/models/response/allocated_made/allocated_made.dart +++ b/packages/chicken/lib/data/models/response/allocated_made/allocated_made.dart @@ -58,6 +58,7 @@ abstract class AllocatedMadeModel with _$AllocatedMadeModel { String? createdBy, String? modifiedBy, String? productionDate, + String? quota, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, diff --git a/packages/chicken/lib/data/models/response/allocated_made/allocated_made.freezed.dart b/packages/chicken/lib/data/models/response/allocated_made/allocated_made.freezed.dart index 084d80e..2ecb927 100644 --- a/packages/chicken/lib/data/models/response/allocated_made/allocated_made.freezed.dart +++ b/packages/chicken/lib/data/models/response/allocated_made/allocated_made.freezed.dart @@ -15,7 +15,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$AllocatedMadeModel { - int? get id; Product? get product; dynamic get killHouse; dynamic get toKillHouse; Steward? get steward; dynamic get toSteward; dynamic get guilds; Steward? 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; int? get weightOfCarcasses; int? get realWeightOfCarcasses; int? get receiverRealWeightOfCarcasses; int? 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; int? get loggedRegistrationCode; String? get state; String? get receiverState; String? get allocationState; String? get date; String? get role; String? get stewardTempKey; bool? get approvedPriceStatus; bool? get calculateStatus; bool? get temporaryTrash; bool? get temporaryDeleted; String? get createdBy; String? get modifiedBy; String? get productionDate; dynamic get wareHouse; dynamic get stewardWareHouse; dynamic get car; dynamic get dispenser; + int? get id; Product? get product; dynamic get killHouse; dynamic get toKillHouse; Steward? get steward; dynamic get toSteward; dynamic get guilds; Steward? 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; int? get weightOfCarcasses; int? get realWeightOfCarcasses; int? get receiverRealWeightOfCarcasses; int? 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; int? get loggedRegistrationCode; String? get state; String? get receiverState; String? get allocationState; String? get date; String? get role; String? get stewardTempKey; bool? get approvedPriceStatus; bool? get calculateStatus; bool? get temporaryTrash; bool? get temporaryDeleted; String? get createdBy; String? get modifiedBy; String? get productionDate; String? get quota; dynamic get wareHouse; dynamic get stewardWareHouse; dynamic get car; dynamic get dispenser; /// Create a copy of AllocatedMadeModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -28,16 +28,16 @@ $AllocatedMadeModelCopyWith get copyWith => _$AllocatedMadeM @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is AllocatedMadeModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&(identical(other.steward, steward) || other.steward == steward)&&const DeepCollectionEquality().equals(other.toSteward, toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&(identical(other.toGuilds, toGuilds) || 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)&&(identical(other.loggedRegistrationCode, loggedRegistrationCode) || 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)&&(identical(other.role, role) || other.role == role)&&(identical(other.stewardTempKey, stewardTempKey) || 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)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&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 AllocatedMadeModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&(identical(other.steward, steward) || other.steward == steward)&&const DeepCollectionEquality().equals(other.toSteward, toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&(identical(other.toGuilds, toGuilds) || 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)&&(identical(other.loggedRegistrationCode, loggedRegistrationCode) || 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)&&(identical(other.role, role) || other.role == role)&&(identical(other.stewardTempKey, stewardTempKey) || 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)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.quota, quota) || other.quota == quota)&&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,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(toKillHouse),steward,const DeepCollectionEquality().hash(toSteward),const DeepCollectionEquality().hash(guilds),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,loggedRegistrationCode,state,receiverState,allocationState,date,role,stewardTempKey,approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,createdBy,modifiedBy,productionDate,const DeepCollectionEquality().hash(wareHouse),const DeepCollectionEquality().hash(stewardWareHouse),const DeepCollectionEquality().hash(car),const DeepCollectionEquality().hash(dispenser)]); +int get hashCode => Object.hashAll([runtimeType,id,product,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(toKillHouse),steward,const DeepCollectionEquality().hash(toSteward),const DeepCollectionEquality().hash(guilds),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,loggedRegistrationCode,state,receiverState,allocationState,date,role,stewardTempKey,approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,createdBy,modifiedBy,productionDate,quota,const DeepCollectionEquality().hash(wareHouse),const DeepCollectionEquality().hash(stewardWareHouse),const DeepCollectionEquality().hash(car),const DeepCollectionEquality().hash(dispenser)]); @override String toString() { - return 'AllocatedMadeModel(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, productionDate: $productionDate, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)'; + return 'AllocatedMadeModel(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, productionDate: $productionDate, quota: $quota, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)'; } @@ -48,7 +48,7 @@ abstract mixin class $AllocatedMadeModelCopyWith<$Res> { factory $AllocatedMadeModelCopyWith(AllocatedMadeModel value, $Res Function(AllocatedMadeModel) _then) = _$AllocatedMadeModelCopyWithImpl; @useResult $Res call({ - int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser + int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, String? quota, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser }); @@ -65,7 +65,7 @@ class _$AllocatedMadeModelCopyWithImpl<$Res> /// Create a copy of AllocatedMadeModel /// 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? productionDate = freezed,Object? wareHouse = freezed,Object? stewardWareHouse = freezed,Object? car = freezed,Object? dispenser = freezed,}) { +@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? productionDate = freezed,Object? quota = 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 as int?,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable @@ -119,6 +119,7 @@ as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted as bool?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable as String?,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable as String?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable +as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable as String?,wareHouse: freezed == wareHouse ? _self.wareHouse : wareHouse // ignore: cast_nullable_to_non_nullable as dynamic,stewardWareHouse: freezed == stewardWareHouse ? _self.stewardWareHouse : stewardWareHouse // ignore: cast_nullable_to_non_nullable as dynamic,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable @@ -244,10 +245,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, String? quota, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _AllocatedMadeModel() when $default != null: -return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy,_that.productionDate,_that.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _: +return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy,_that.productionDate,_that.quota,_that.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _: return orElse(); } @@ -265,10 +266,10 @@ return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.s /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, String? quota, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser) $default,) {final _that = this; switch (_that) { case _AllocatedMadeModel(): -return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy,_that.productionDate,_that.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _: +return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy,_that.productionDate,_that.quota,_that.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _: throw StateError('Unexpected subclass'); } @@ -285,10 +286,10 @@ return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.s /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, String? quota, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,) {final _that = this; switch (_that) { case _AllocatedMadeModel() when $default != null: -return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy,_that.productionDate,_that.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _: +return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.createdBy,_that.modifiedBy,_that.productionDate,_that.quota,_that.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _: return null; } @@ -300,7 +301,7 @@ return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.s @JsonSerializable() class _AllocatedMadeModel implements AllocatedMadeModel { - _AllocatedMadeModel({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.productionDate, this.wareHouse, this.stewardWareHouse, this.car, this.dispenser}); + _AllocatedMadeModel({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.productionDate, this.quota, this.wareHouse, this.stewardWareHouse, this.car, this.dispenser}); factory _AllocatedMadeModel.fromJson(Map json) => _$AllocatedMadeModelFromJson(json); @override final int? id; @@ -355,6 +356,7 @@ class _AllocatedMadeModel implements AllocatedMadeModel { @override final String? createdBy; @override final String? modifiedBy; @override final String? productionDate; +@override final String? quota; @override final dynamic wareHouse; @override final dynamic stewardWareHouse; @override final dynamic car; @@ -373,16 +375,16 @@ Map toJson() { @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _AllocatedMadeModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&(identical(other.steward, steward) || other.steward == steward)&&const DeepCollectionEquality().equals(other.toSteward, toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&(identical(other.toGuilds, toGuilds) || 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)&&(identical(other.loggedRegistrationCode, loggedRegistrationCode) || 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)&&(identical(other.role, role) || other.role == role)&&(identical(other.stewardTempKey, stewardTempKey) || 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)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&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 _AllocatedMadeModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&(identical(other.steward, steward) || other.steward == steward)&&const DeepCollectionEquality().equals(other.toSteward, toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&(identical(other.toGuilds, toGuilds) || 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)&&(identical(other.loggedRegistrationCode, loggedRegistrationCode) || 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)&&(identical(other.role, role) || other.role == role)&&(identical(other.stewardTempKey, stewardTempKey) || 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)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.quota, quota) || other.quota == quota)&&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,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(toKillHouse),steward,const DeepCollectionEquality().hash(toSteward),const DeepCollectionEquality().hash(guilds),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,loggedRegistrationCode,state,receiverState,allocationState,date,role,stewardTempKey,approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,createdBy,modifiedBy,productionDate,const DeepCollectionEquality().hash(wareHouse),const DeepCollectionEquality().hash(stewardWareHouse),const DeepCollectionEquality().hash(car),const DeepCollectionEquality().hash(dispenser)]); +int get hashCode => Object.hashAll([runtimeType,id,product,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(toKillHouse),steward,const DeepCollectionEquality().hash(toSteward),const DeepCollectionEquality().hash(guilds),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,loggedRegistrationCode,state,receiverState,allocationState,date,role,stewardTempKey,approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,createdBy,modifiedBy,productionDate,quota,const DeepCollectionEquality().hash(wareHouse),const DeepCollectionEquality().hash(stewardWareHouse),const DeepCollectionEquality().hash(car),const DeepCollectionEquality().hash(dispenser)]); @override String toString() { - return 'AllocatedMadeModel(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, productionDate: $productionDate, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)'; + return 'AllocatedMadeModel(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, productionDate: $productionDate, quota: $quota, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)'; } @@ -393,7 +395,7 @@ abstract mixin class _$AllocatedMadeModelCopyWith<$Res> implements $AllocatedMad factory _$AllocatedMadeModelCopyWith(_AllocatedMadeModel value, $Res Function(_AllocatedMadeModel) _then) = __$AllocatedMadeModelCopyWithImpl; @override @useResult $Res call({ - int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser + int? id, Product? product, dynamic killHouse, dynamic toKillHouse, Steward? steward, dynamic toSteward, dynamic guilds, Steward? 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, int? weightOfCarcasses, int? realWeightOfCarcasses, int? receiverRealWeightOfCarcasses, int? 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, int? loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, String? role, String? stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, String? productionDate, String? quota, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser }); @@ -410,7 +412,7 @@ class __$AllocatedMadeModelCopyWithImpl<$Res> /// Create a copy of AllocatedMadeModel /// 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? productionDate = freezed,Object? wareHouse = freezed,Object? stewardWareHouse = freezed,Object? car = freezed,Object? dispenser = freezed,}) { +@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? productionDate = freezed,Object? quota = freezed,Object? wareHouse = freezed,Object? stewardWareHouse = freezed,Object? car = freezed,Object? dispenser = freezed,}) { return _then(_AllocatedMadeModel( 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 @@ -464,6 +466,7 @@ as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted as bool?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable as String?,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable as String?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable +as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable as String?,wareHouse: freezed == wareHouse ? _self.wareHouse : wareHouse // ignore: cast_nullable_to_non_nullable as dynamic,stewardWareHouse: freezed == stewardWareHouse ? _self.stewardWareHouse : stewardWareHouse // ignore: cast_nullable_to_non_nullable as dynamic,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable diff --git a/packages/chicken/lib/data/models/response/allocated_made/allocated_made.g.dart b/packages/chicken/lib/data/models/response/allocated_made/allocated_made.g.dart index 25ec582..0fa31f9 100644 --- a/packages/chicken/lib/data/models/response/allocated_made/allocated_made.g.dart +++ b/packages/chicken/lib/data/models/response/allocated_made/allocated_made.g.dart @@ -69,6 +69,7 @@ _AllocatedMadeModel _$AllocatedMadeModelFromJson( createdBy: json['created_by'] as String?, modifiedBy: json['modified_by'] as String?, productionDate: json['production_date'] as String?, + quota: json['quota'] as String?, wareHouse: json['ware_house'], stewardWareHouse: json['steward_ware_house'], car: json['car'], @@ -130,6 +131,7 @@ Map _$AllocatedMadeModelToJson( 'created_by': instance.createdBy, 'modified_by': instance.modifiedBy, 'production_date': instance.productionDate, + 'quota': instance.quota, 'ware_house': instance.wareHouse, 'steward_ware_house': instance.stewardWareHouse, 'car': instance.car, diff --git a/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.dart b/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.dart index 0108a27..0956fab 100644 --- a/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.dart +++ b/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.dart @@ -17,6 +17,7 @@ abstract class SegmentationModel with _$SegmentationModel { Buyer? buyer, DateTime? date, ToGuild? toGuild, + String? productionDate, }) = _SegmentationModel; factory SegmentationModel.fromJson(Map json) => @@ -25,11 +26,7 @@ abstract class SegmentationModel with _$SegmentationModel { @freezed abstract class Buyer with _$Buyer { - const factory Buyer({ - String? fullname, - String? mobile, - String? shop, - }) = _Buyer; + const factory Buyer({String? fullname, String? mobile, String? shop}) = _Buyer; factory Buyer.fromJson(Map json) => _$BuyerFromJson(json); } diff --git a/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.freezed.dart b/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.freezed.dart index 3995a0f..a358ac4 100644 --- a/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.freezed.dart +++ b/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.freezed.dart @@ -15,7 +15,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$SegmentationModel { - String? get key; String? get productKey; String? get guildKey; String? get result; String? get quota; String? get saleType; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild; + String? get key; String? get productKey; String? get guildKey; String? get result; String? get quota; String? get saleType; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild; String? get productionDate; /// Create a copy of SegmentationModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -28,16 +28,16 @@ $SegmentationModelCopyWith get copyWith => _$SegmentationMode @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)); } @JsonKey(includeFromJson: false, includeToJson: false) @override -int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild); +int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate); @override String toString() { - return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)'; + return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate)'; } @@ -48,7 +48,7 @@ abstract mixin class $SegmentationModelCopyWith<$Res> { factory $SegmentationModelCopyWith(SegmentationModel value, $Res Function(SegmentationModel) _then) = _$SegmentationModelCopyWithImpl; @useResult $Res call({ - String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild + String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate }); @@ -65,7 +65,7 @@ class _$SegmentationModelCopyWithImpl<$Res> /// Create a copy of SegmentationModel /// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) { +@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,}) { return _then(_self.copyWith( key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable @@ -77,7 +77,8 @@ as String?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nul as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable as DateTime?,toGuild: freezed == toGuild ? _self.toGuild : toGuild // ignore: cast_nullable_to_non_nullable -as ToGuild?, +as ToGuild?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable +as String?, )); } /// Create a copy of SegmentationModel @@ -186,10 +187,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SegmentationModel() when $default != null: -return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild);case _: +return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _: return orElse(); } @@ -207,10 +208,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate) $default,) {final _that = this; switch (_that) { case _SegmentationModel(): -return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild);case _: +return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _: throw StateError('Unexpected subclass'); } @@ -227,10 +228,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate)? $default,) {final _that = this; switch (_that) { case _SegmentationModel() when $default != null: -return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild);case _: +return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _: return null; } @@ -242,7 +243,7 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo @JsonSerializable() class _SegmentationModel implements SegmentationModel { - const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.quota, this.saleType, this.weight, this.buyer, this.date, this.toGuild}); + const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.quota, this.saleType, this.weight, this.buyer, this.date, this.toGuild, this.productionDate}); factory _SegmentationModel.fromJson(Map json) => _$SegmentationModelFromJson(json); @override final String? key; @@ -255,6 +256,7 @@ class _SegmentationModel implements SegmentationModel { @override final Buyer? buyer; @override final DateTime? date; @override final ToGuild? toGuild; +@override final String? productionDate; /// Create a copy of SegmentationModel /// with the given fields replaced by the non-null parameter values. @@ -269,16 +271,16 @@ Map toJson() { @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)); } @JsonKey(includeFromJson: false, includeToJson: false) @override -int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild); +int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate); @override String toString() { - return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)'; + return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate)'; } @@ -289,7 +291,7 @@ abstract mixin class _$SegmentationModelCopyWith<$Res> implements $SegmentationM factory _$SegmentationModelCopyWith(_SegmentationModel value, $Res Function(_SegmentationModel) _then) = __$SegmentationModelCopyWithImpl; @override @useResult $Res call({ - String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild + String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate }); @@ -306,7 +308,7 @@ class __$SegmentationModelCopyWithImpl<$Res> /// Create a copy of SegmentationModel /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,}) { return _then(_SegmentationModel( key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable @@ -318,7 +320,8 @@ as String?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nul as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable as DateTime?,toGuild: freezed == toGuild ? _self.toGuild : toGuild // ignore: cast_nullable_to_non_nullable -as ToGuild?, +as ToGuild?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable +as String?, )); } diff --git a/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.g.dart b/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.g.dart index dfa75db..e947e7a 100644 --- a/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.g.dart +++ b/packages/chicken/lib/data/models/response/segmentation_model/segmentation_model.g.dart @@ -24,6 +24,7 @@ _SegmentationModel _$SegmentationModelFromJson(Map json) => toGuild: json['to_guild'] == null ? null : ToGuild.fromJson(json['to_guild'] as Map), + productionDate: json['production_date'] as String?, ); Map _$SegmentationModelToJson(_SegmentationModel instance) => @@ -38,6 +39,7 @@ Map _$SegmentationModelToJson(_SegmentationModel instance) => 'buyer': instance.buyer, 'date': instance.date?.toIso8601String(), 'to_guild': instance.toGuild, + 'production_date': instance.productionDate, }; _Buyer _$BuyerFromJson(Map json) => _Buyer( diff --git a/packages/chicken/lib/presentation/pages/common/profile/view.dart b/packages/chicken/lib/presentation/pages/common/profile/view.dart index db54d85..d9aa3f8 100644 --- a/packages/chicken/lib/presentation/pages/common/profile/view.dart +++ b/packages/chicken/lib/presentation/pages/common/profile/view.dart @@ -82,45 +82,47 @@ class ProfilePage extends GetView { } else if (data.value.status == ResourceStatus.error) { return ErrorWidget('خطا در دریافت اطلاعات کاربر'); } else if (data.value.status == ResourceStatus.success) { - return Column( - spacing: 6, - children: [ - ObxValue((isOpen) { - return GestureDetector( - onTap: () => isOpen.toggle(), - child: AnimatedContainer( - height: isOpen.value ? 320.h : 47.h, - duration: Duration(milliseconds: 500), - curve: Curves.linear, - child: userProfileInformation(data.value), - ), - ); - }, controller.isUserInformationOpen), - - Visibility( - visible: - data.value.data?.unitName != null || - data.value.data?.unitAddress != null || - data.value.data?.unitPostalCode != null || - data.value.data?.unitRegistrationNumber != null || - data.value.data?.unitEconomicalNumber != null || - data.value.data?.unitCity != null || - data.value.data?.unitProvince != null || - data.value.data?.unitNationalId != null, - - child: ObxValue((isOpen) { + return SingleChildScrollView( + child: Column( + spacing: 6, + children: [ + ObxValue((isOpen) { return GestureDetector( onTap: () => isOpen.toggle(), child: AnimatedContainer( height: isOpen.value ? 320.h : 47.h, duration: Duration(milliseconds: 500), curve: Curves.linear, - child: unitInformation(data.value), + child: userProfileInformation(data.value), ), ); - }, controller.isUnitInformationOpen), - ), - ], + }, controller.isUserInformationOpen), + + Visibility( + visible: + data.value.data?.unitName != null || + data.value.data?.unitAddress != null || + data.value.data?.unitPostalCode != null || + data.value.data?.unitRegistrationNumber != null || + data.value.data?.unitEconomicalNumber != null || + data.value.data?.unitCity != null || + data.value.data?.unitProvince != null || + data.value.data?.unitNationalId != null, + + child: ObxValue((isOpen) { + return GestureDetector( + onTap: () => isOpen.toggle(), + child: AnimatedContainer( + height: isOpen.value ? 320.h : 47.h, + duration: Duration(milliseconds: 500), + curve: Curves.linear, + child: unitInformation(data.value), + ), + ); + }, controller.isUnitInformationOpen), + ), + ], + ), ); } else { return SizedBox.shrink(); diff --git a/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/view.dart b/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/view.dart index 2e3eff8..8e4b76b 100644 --- a/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/view.dart +++ b/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/view.dart @@ -113,7 +113,7 @@ class BuyInProvinceWaitingPage extends GetView { spacing: 3, children: [ Text( - (item.approvedPriceStatus ?? false) ? 'مصوب' : 'آزاد', + (item.approvedPriceStatus ?? false) ? 'دولتی' : 'آزاد', style: AppFonts.yekan12Bold.copyWith( color: (item.approvedPriceStatus ?? false) ? AppColor.blueNormal @@ -206,6 +206,7 @@ class BuyInProvinceWaitingPage extends GetView { ), buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'ندارد'), buildRow(title: ' سهمیه', value: item.quota?.faTitle ?? 'ندارد'), + buildRow(title: 'نوع فروش', value: item.saleType == "governmental" ? 'دولتی' : 'آزاد'), buildRow(title: 'محصول', value: item.product?.name ?? 'ندارد'), buildRow( title: 'تاریخ تولید گوشت', @@ -217,7 +218,7 @@ class BuyInProvinceWaitingPage extends GetView { ), buildRow( title: 'قیمت هر کیلوگرم', - titleLabel: (item.approvedPriceStatus ?? false) ? 'مصوب' : 'آزاد', + titleLabel: (item.approvedPriceStatus ?? false) ? 'دولتی' : 'آزاد', titleLabelStyle: AppFonts.yekan14Bold.copyWith(color: AppColor.greenNormal), value: '${item.amount?.separatedByCommaFa} ریال', ), diff --git a/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/view.dart b/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/view.dart index e1a4fff..de73035 100644 --- a/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/view.dart +++ b/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/view.dart @@ -151,6 +151,10 @@ class BuyOutOfProvincePage extends GetView { title: 'وزن خریداری شده', value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم', ), + buildRow( + title: 'حجم خریداری شده', + value: '${item.numberOfCarcasses?.separatedByCommaFa} قطعه', + ), buildRowOnTapped( title: 'مشاهده بارنامه', titleStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), diff --git a/packages/chicken/lib/presentation/pages/steward/sales_in_province/logic.dart b/packages/chicken/lib/presentation/pages/steward/sales_in_province/logic.dart index 4633d74..c42a247 100644 --- a/packages/chicken/lib/presentation/pages/steward/sales_in_province/logic.dart +++ b/packages/chicken/lib/presentation/pages/steward/sales_in_province/logic.dart @@ -437,7 +437,7 @@ class SalesInProvinceLogic extends GetxController { toggleExpansion(); currentPage.value = 1; hasMoreDataAllocationsMade.value = true; - await Future.wait([getAllocatedMade(), rootLogic.onRefresh()]); + await Future.wait([getAllocatedMade(), getRolesProducts(), rootLogic.onRefresh()]); } void toggleExpansion({int? index}) { diff --git a/packages/chicken/lib/presentation/pages/steward/sales_in_province/view.dart b/packages/chicken/lib/presentation/pages/steward/sales_in_province/view.dart index 8338d28..e35e618 100644 --- a/packages/chicken/lib/presentation/pages/steward/sales_in_province/view.dart +++ b/packages/chicken/lib/presentation/pages/steward/sales_in_province/view.dart @@ -154,14 +154,14 @@ class SalesInProvincePage extends GetView { spacing: 4, children: [ Text( - controller.getBuyerInformation(item)?.user?.fullname ?? 'N/Aشششش', + controller.getBuyerInformation(item)?.user?.fullname ?? 'نداردشششش', textAlign: TextAlign.center, style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), ), SizedBox(height: 2), Text( - item.createDate?.formattedJalaliDate ?? 'N/A', + item.createDate?.formattedJalaliDate ?? 'ندارد', textAlign: TextAlign.center, style: AppFonts.yekan14.copyWith(color: AppColor.bgDark), ), @@ -226,14 +226,6 @@ class SalesInProvincePage extends GetView { : AppColor.greenNormal, ), ), - Visibility( - visible: item.productionDate != null, - child: Text( - item.productionDate?.formattedJalaliDate ?? '-', - textAlign: TextAlign.center, - style: AppFonts.yekan14.copyWith(color: AppColor.bgDark), - ), - ), ], ), ), @@ -254,7 +246,7 @@ class SalesInProvincePage extends GetView { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - controller.getBuyerInformation(item)?.user?.fullname ?? 'N/A', + controller.getBuyerInformation(item)?.user?.fullname ?? 'ندارد', textAlign: TextAlign.center, style: AppFonts.yekan16.copyWith(color: AppColor.greenDark), ), @@ -294,12 +286,12 @@ class SalesInProvincePage extends GetView { spacing: 3, children: [ Text( - item.date?.toJalali.formatter.wN ?? 'N/A', + item.date?.toJalali.formatter.wN ?? 'ندارد', style: AppFonts.yekan14.copyWith(color: AppColor.textColor), ), Text( - '${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'N/A'}', + '${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'ندارد'}', style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), ), ], @@ -311,7 +303,7 @@ class SalesInProvincePage extends GetView { ), Text( - '${item.date?.toJalali.formatter.tHH}:${item.date?.toJalali.formatter.tMM ?? 'N/A'}', + '${item.date?.toJalali.formatter.tHH}:${item.date?.toJalali.formatter.tMM ?? 'ندارد'}', style: AppFonts.yekan14.copyWith(color: AppColor.textColor), ), ], @@ -319,20 +311,30 @@ class SalesInProvincePage extends GetView { ), buildRow( title: 'تلفن خریدار', - value: controller.getBuyerInformation(item)?.user?.mobile ?? 'N/A', + value: controller.getBuyerInformation(item)?.user?.mobile ?? 'ندارد', valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), ), - buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'), - buildRow(title: 'نوع فروش', value: item.sellType?.faItem ?? 'N/A'), + buildRow(title: 'محصول', value: item.product?.name ?? 'ندارد'), + + buildRow( + title: 'تاریخ تولید گوشت', + value: item.productionDate?.toJalali.formatCompactDate() ?? 'ندارد', + ), + + buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'ندارد'), + buildRow( + title: 'نوع فروش', + value: (item.approvedPriceStatus ?? false) ? 'دولتی' : 'آزاد', + ), + buildRow(title: 'نوع انبار', value: (item.quota == 'governmental') ? 'دولتی' : 'آزاد'), - buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'), buildRow( title: 'وزن خریداری شده', value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم', ), buildRow( title: 'افت وزن(کیلوگرم)', - value: item.weightLossOfCarcasses?.toInt().toString() ?? 'N/A', + value: item.weightLossOfCarcasses?.toInt().toString() ?? 'ندارد', ), buildRow( title: 'قیمت هر کیلوگرم', @@ -482,33 +484,25 @@ class SalesInProvincePage extends GetView { child: Column( spacing: 12, children: [ - Visibility( - visible: isEditMode == false, - child: Column( - spacing: 12, - children: [ - const SizedBox(height: 8), - ObxValue((data) { - return RTextField( - controller: TextEditingController(), - filledColor: AppColor.bgLight, - filled: true, - label: 'تاریخ', - onTap: () { - Get.bottomSheet( - modalDatePicker((value) { - controller.fromDateFilter.value = value; - controller.fromDateFilter.refresh(); - }), - ); - }, - borderColor: AppColor.darkGreyLight, - initText: (data.value ?? Jalali.now()).formatCompactDate(), - ); - }, controller.fromDateFilter), - ], - ), - ), + const SizedBox(height: 8), + ObxValue((data) { + return RTextField( + controller: TextEditingController(), + filledColor: AppColor.bgLight, + filled: true, + label: 'تاریخ', + onTap: () { + Get.bottomSheet( + modalDatePicker((value) { + controller.fromDateFilter.value = value; + controller.fromDateFilter.refresh(); + }), + ); + }, + borderColor: AppColor.darkGreyLight, + initText: (data.value ?? Jalali.now()).formatCompactDate(), + ); + }, controller.fromDateFilter), RTextField( controller: controller.weightController, @@ -533,6 +527,136 @@ class SalesInProvincePage extends GetView { }, label: 'وزن لاشه (کیلوگرم)', ), + + ObxValue((data) { + return RTextField( + controller: TextEditingController(), + filledColor: AppColor.bgLight, + filled: true, + label: 'تاریخ تولید گوشت', + onTap: () { + Get.bottomSheet( + modalDatePicker((value) { + controller.productionData.value = value; + controller.productionData.refresh(); + }), + ); + }, + borderColor: AppColor.darkGreyLight, + initText: data.value?.formatCompactDate(), + ); + }, controller.productionData), + Visibility( + visible: isEditMode == false, + child: Column( + spacing: 12, + children: [ + SizedBox(height: 12.h), + Container( + height: 58.h, + clipBehavior: Clip.none, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: AppColor.darkGreyLight, width: 1), + ), + child: Stack( + fit: StackFit.expand, + alignment: Alignment.center, + clipBehavior: Clip.none, + children: [ + Positioned( + child: Container(color: Colors.white, child: Text("نوع انبار")), + top: -10, + right: 8, + ), + Obx(() { + return RadioGroup( + groupValue: controller.quotaType.value, + onChanged: (value) { + controller.quotaType.value = value!; + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: Row( + children: [ + Radio(value: 1), + Text('انبار دولتی', style: AppFonts.yekan14), + ], + ), + ), + + Expanded( + child: Row( + children: [ + Radio(value: 2), + Text('انبار آزاد', style: AppFonts.yekan14), + ], + ), + ), + ], + ), + ); + }), + ], + ), + ), + SizedBox(height: 12.h), + Container( + height: 58.h, + clipBehavior: Clip.none, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: AppColor.darkGreyLight, width: 1), + ), + child: Stack( + fit: StackFit.expand, + alignment: Alignment.center, + clipBehavior: Clip.none, + children: [ + Positioned( + child: Container(color: Colors.white, child: Text("نوع فروش")), + top: -10, + right: 8, + ), + Obx(() { + return RadioGroup( + groupValue: controller.priceType.value, + onChanged: (value) { + controller.priceType.value = value!; + }, + child: Row( + children: [ + Expanded( + child: Row( + children: [ + Radio(value: 1), + Text('قیمت دولتی', style: AppFonts.yekan14), + ], + ), + ), + + Expanded( + child: Row( + children: [ + Radio(value: 2), + Text('قیمت آزاد', style: AppFonts.yekan14), + ], + ), + ), + ], + ), + ); + }), + ], + ), + ), + ], + ), + ), Obx(() { return Visibility( visible: controller.broadcastPrice.value?.active == true, @@ -546,7 +670,9 @@ class SalesInProvincePage extends GetView { ], filledColor: AppColor.bgLight, filled: true, - enabled: (controller.priceType.value == 2), + enabled: + (controller.priceType.value == 2 || + (controller.selectedProductModel.value?.approvedPriceStatus == false)), onChanged: (p0) { controller.pricePerKilo.value = int.tryParse(p0.clearComma) ?? 0; }, @@ -572,129 +698,7 @@ class SalesInProvincePage extends GetView { ], ), ), - const SizedBox(height: 12), - ObxValue((data) { - return RTextField( - controller: TextEditingController(), - filledColor: AppColor.bgLight, - filled: true, - label: 'تاریخ تولید گوشت', - onTap: () { - Get.bottomSheet( - modalDatePicker((value) { - controller.productionData.value = value; - controller.productionData.refresh(); - }), - ); - }, - borderColor: AppColor.darkGreyLight, - initText: data.value?.formatCompactDate(), - ); - }, controller.productionData), - SizedBox(height: 12.h), - Container( - height: 58.h, - clipBehavior: Clip.none, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: AppColor.darkGreyLight, width: 1), - ), - child: Stack( - fit: StackFit.expand, - alignment: Alignment.center, - clipBehavior: Clip.none, - children: [ - Positioned( - child: Container(color: Colors.white, child: Text("نوع فروش")), - top: -10, - right: 8, - ), - Obx(() { - return RadioGroup( - groupValue: controller.priceType.value, - onChanged: (value) { - controller.priceType.value = value!; - }, - child: Row( - children: [ - Expanded( - child: Row( - children: [ - Radio(value: 1), - Text('قیمت دولتی', style: AppFonts.yekan14), - ], - ), - ), - - Expanded( - child: Row( - children: [ - Radio(value: 2), - Text('قیمت آزاد', style: AppFonts.yekan14), - ], - ), - ), - ], - ), - ); - }), - ], - ), - ), - SizedBox(height: 12.h), - Container( - height: 58.h, - clipBehavior: Clip.none, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: AppColor.darkGreyLight, width: 1), - ), - child: Stack( - fit: StackFit.expand, - alignment: Alignment.center, - clipBehavior: Clip.none, - children: [ - Positioned( - child: Container(color: Colors.white, child: Text("نوع انبار")), - top: -10, - right: 8, - ), - Obx(() { - return RadioGroup( - groupValue: controller.quotaType.value, - onChanged: (value) { - controller.quotaType.value = value!; - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Row( - children: [ - Radio(value: 1), - Text('انبار دولتی', style: AppFonts.yekan14), - ], - ), - ), - - Expanded( - child: Row( - children: [ - Radio(value: 2), - Text('انبار آزاد', style: AppFonts.yekan14), - ], - ), - ), - ], - ), - ); - }), - ], - ), - ), SizedBox(height: 12.h), ObxValue((data) { return RElevated( @@ -922,7 +926,7 @@ class SalesInProvincePage extends GetView { children: [ buildRow( title: 'تاریخ ثبت', - value: controller.tmpStewardAllocation?.date?.formattedJalaliDate ?? 'N/A', + value: controller.tmpStewardAllocation?.date?.formattedJalaliDate ?? 'ندارد', ), buildRow( title: 'نام و نام خانوادگی خریدار', @@ -931,7 +935,7 @@ class SalesInProvincePage extends GetView { .firstWhere((p0) => p0.key == controller.tmpStewardAllocation?.guildKey) .user ?.fullname ?? - 'N/A', + 'ندارد', ), buildRow( title: 'شماره خریدار', @@ -940,7 +944,7 @@ class SalesInProvincePage extends GetView { .firstWhere((p0) => p0.key == controller.tmpStewardAllocation?.guildKey) .user ?.mobile ?? - 'N/A', + 'ندارد', ), buildRow( diff --git a/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/view.dart b/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/view.dart index bfc08fd..28f12d9 100644 --- a/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/view.dart +++ b/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/view.dart @@ -135,7 +135,7 @@ class SalesOutOfProvincePage extends GetView { spacing: 4, children: [ Text( - item.date?.formattedJalaliDate ?? 'N/A', + item.date?.formattedJalaliDate ?? 'ندارد', textAlign: TextAlign.center, style: AppFonts.yekan12.copyWith(color: AppColor.bgDark), ), @@ -156,14 +156,14 @@ class SalesOutOfProvincePage extends GetView { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - item.buyer?.fullname ?? 'N/A', + item.buyer?.fullname ?? 'ندارد', textAlign: TextAlign.center, style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), ), SizedBox(height: 2), Text( - item.buyer?.mobile ?? 'N/A', + item.buyer?.mobile ?? 'ندارد', textAlign: TextAlign.center, style: AppFonts.yekan14.copyWith(color: AppColor.bgDark), ), @@ -178,12 +178,12 @@ class SalesOutOfProvincePage extends GetView { spacing: 8, children: [ Text( - item.buyer?.province ?? 'N/A', + item.buyer?.province ?? 'ندارد', textAlign: TextAlign.center, style: AppFonts.yekan12.copyWith(color: AppColor.bgDark), ), Text( - item.buyer?.city ?? 'N/A', + item.buyer?.city ?? 'ندارد', textAlign: TextAlign.center, style: AppFonts.yekan12.copyWith(color: AppColor.bgDark), ), @@ -228,12 +228,12 @@ class SalesOutOfProvincePage extends GetView { spacing: 3, children: [ Text( - item.date?.toJalali.formatter.wN ?? 'N/A', + item.date?.toJalali.formatter.wN ?? 'ندارد', style: AppFonts.yekan14.copyWith(color: AppColor.textColor), ), Text( - '${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'N/A'}', + '${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'ندارد'}', style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), ), ], @@ -245,15 +245,15 @@ class SalesOutOfProvincePage extends GetView { ), Text( - '${item.date?.toJalali.formatter.tHH}:${item.date?.toJalali.formatter.tMM ?? 'N/A'}', + '${item.date?.toJalali.formatter.tHH}:${item.date?.toJalali.formatter.tMM ?? 'ندارد'}', style: AppFonts.yekan14.copyWith(color: AppColor.textColor), ), ], ), ), - buildRow(title: 'مشخصات خریدار', value: item.buyer?.fullname ?? 'N/A'), - buildRow(title: 'تلفن خریدار', value: item.buyer?.mobile ?? 'N/A'), - buildRow(title: 'نام واحد', value: item.buyer?.unitName ?? 'N/A'), + buildRow(title: 'مشخصات خریدار', value: item.buyer?.fullname ?? 'ندارد'), + buildRow(title: 'تلفن خریدار', value: item.buyer?.mobile ?? 'ندارد'), + buildRow(title: 'نام واحد', value: item.buyer?.unitName ?? 'ندارد'), buildRow( title: 'وزن لاشه ', value: '${item.weightOfCarcasses?.separatedByCommaFa}', @@ -264,6 +264,10 @@ class SalesOutOfProvincePage extends GetView { value: '${item.numberOfCarcasses?.separatedByCommaFa}', valueLabel: 'قطعه', ), + buildRow( + title: 'تاریخ تولید گوشت', + value: item.productionDate?.toJalali.formatCompactDate() ?? 'ندارد', + ), buildRow(title: 'انبار فروش', value: '${item.quota?.faTitle}'), buildRow(title: 'کد قرنطینه ', value: item.clearanceCode ?? 'بدون کد'), @@ -362,26 +366,171 @@ class SalesOutOfProvincePage extends GetView { initText: data.value?.formatCompactDate(), ); }, controller.saleDate), + Visibility(visible: isOnEdit == false, child: _buyerWidget()), - ObxValue((data) { - return RTextField( - controller: TextEditingController(), - filledColor: AppColor.bgLight, - filled: true, - label: 'تاریخ تولید گوشت', - onTap: () { - Get.bottomSheet( - modalDatePicker((value) { - controller.productionData.value = value; - controller.productionData.refresh(); - }), - ); - }, - borderColor: AppColor.darkGreyLight, - initText: data.value?.formatCompactDate(), - ); - }, controller.productionData), - _buyerWidget(), + RTextField( + controller: controller.quarantineCodeController, + label: 'کد قرنطینه', + borderColor: AppColor.darkGreyLight, + filledColor: AppColor.bgLight, + filled: true, + validator: (value) { + if (value == null) { + return 'لطفاً کد قرنطینه را وارد کنید'; + } + return null; + }, + ), + Visibility( + visible: isOnEdit == false, + child: Column( + spacing: 12, + children: [ + ObxValue((data) { + return RTextField( + controller: TextEditingController(), + filledColor: AppColor.bgLight, + filled: true, + label: 'تاریخ تولید گوشت', + onTap: () { + Get.bottomSheet( + modalDatePicker((value) { + controller.productionData.value = value; + controller.productionData.refresh(); + }), + ); + }, + borderColor: AppColor.darkGreyLight, + initText: data.value?.formatCompactDate(), + ); + }, controller.productionData), + + Container( + height: 50.h, + clipBehavior: Clip.none, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: AppColor.darkGreyLight, width: 1), + ), + child: Stack( + fit: StackFit.expand, + alignment: Alignment.center, + clipBehavior: Clip.none, + children: [ + Positioned( + child: Container(color: Colors.white, child: Text("نوع انبار")), + top: -10, + right: 8, + ), + Obx(() { + return RadioGroup( + groupValue: controller.quotaType.value, + onChanged: (value) { + controller.quotaType.value = value ?? 0; + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + controller.quotaType.value = 1; + }, + child: Row( + children: [ + Radio(value: 1), + Text('انبار دولتی', style: AppFonts.yekan14), + ], + ), + ), + ), + + Expanded( + child: GestureDetector( + onTap: () { + controller.quotaType.value = 2; + }, + child: Row( + children: [ + Radio(value: 2), + Text('انبار آزاد', style: AppFonts.yekan14), + ], + ), + ), + ), + ], + ), + ); + }), + ], + ), + ), + + Container( + height: 50.h, + clipBehavior: Clip.none, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: AppColor.darkGreyLight, width: 1), + ), + child: Stack( + fit: StackFit.expand, + alignment: Alignment.center, + clipBehavior: Clip.none, + children: [ + Positioned( + child: Container(color: Colors.white, child: Text("نوع فروش")), + top: -10, + right: 8, + ), + Obx(() { + return RadioGroup( + groupValue: controller.saleType.value, + onChanged: (value) { + controller.saleType.value = value ?? 0; + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + controller.saleType.value = 1; + }, + child: Row( + children: [ + Radio(value: 1), + Text('قیمت دولتی', style: AppFonts.yekan14), + ], + ), + ), + ), + + Expanded( + child: GestureDetector( + onTap: () { + controller.saleType.value = 2; + }, + child: Row( + children: [ + Radio(value: 2), + Text('قیمت آزاد', style: AppFonts.yekan14), + ], + ), + ), + ), + ], + ), + ); + }), + ], + ), + ), + ], + ), + ), RTextField( controller: controller.saleWeightController, label: 'وزن لاشه (کیلوگرم)', @@ -423,139 +572,6 @@ class SalesOutOfProvincePage extends GetView { return null; }, ), - RTextField( - controller: controller.quarantineCodeController, - label: 'کد قرنطینه', - borderColor: AppColor.darkGreyLight, - filledColor: AppColor.bgLight, - filled: true, - validator: (value) { - if (value == null) { - return 'لطفاً کد قرنطینه را وارد کنید'; - } - return null; - }, - ), - ], - ), - ), - Container( - height: 50.h, - clipBehavior: Clip.none, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: AppColor.darkGreyLight, width: 1), - ), - child: Stack( - fit: StackFit.expand, - alignment: Alignment.center, - clipBehavior: Clip.none, - children: [ - Positioned( - child: Container(color: Colors.white, child: Text("نوع فروش")), - top: -10, - right: 8, - ), - Obx(() { - return RadioGroup( - groupValue: controller.saleType.value, - onChanged: (value) { - controller.saleType.value = value ?? 0; - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - GestureDetector( - onTap: () { - controller.saleType.value = 1; - }, - child: Expanded( - child: Row( - children: [ - Radio(value: 1), - Text('قیمت دولتی', style: AppFonts.yekan14), - ], - ), - ), - ), - - GestureDetector( - onTap: () { - controller.saleType.value = 2; - }, - child: Expanded( - child: Row( - children: [ - Radio(value: 2), - Text('قیمت آزاد', style: AppFonts.yekan14), - ], - ), - ), - ), - ], - ), - ); - }), - ], - ), - ), - Container( - height: 50.h, - clipBehavior: Clip.none, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: AppColor.darkGreyLight, width: 1), - ), - child: Stack( - fit: StackFit.expand, - alignment: Alignment.center, - clipBehavior: Clip.none, - children: [ - Positioned( - child: Container(color: Colors.white, child: Text("نوع انبار")), - top: -10, - right: 8, - ), - Obx(() { - return RadioGroup( - groupValue: controller.quotaType.value, - onChanged: (value) { - controller.quotaType.value = value ?? 0; - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - GestureDetector( - onTap: () { - controller.quotaType.value = 1; - }, - child: Row( - children: [ - Radio(value: 1), - Text('انبار دولتی', style: AppFonts.yekan14), - ], - ), - ), - - GestureDetector( - onTap: () { - controller.quotaType.value = 2; - }, - child: Expanded( - child: Row( - children: [ - Radio(value: 2), - Text('انبار آزاد', style: AppFonts.yekan14), - ], - ), - ), - ), - ], - ), - ); - }), ], ), ), diff --git a/packages/chicken/lib/presentation/pages/steward/segmentation/logic.dart b/packages/chicken/lib/presentation/pages/steward/segmentation/logic.dart index bd9d00f..5026d2c 100644 --- a/packages/chicken/lib/presentation/pages/steward/segmentation/logic.dart +++ b/packages/chicken/lib/presentation/pages/steward/segmentation/logic.dart @@ -22,7 +22,7 @@ class SegmentationLogic extends GetxController { Rx toDateFilter = Jalali.now().obs; RxnString searchedValue = RxnString(); RxInt segmentType = 1.obs; - RxInt saleType = 1.obs; + RxInt saleType = 2.obs; RxInt quotaType = 1.obs; GlobalKey formKey = GlobalKey(); TextEditingController weightController = TextEditingController(text: '0'); @@ -35,6 +35,8 @@ class SegmentationLogic extends GetxController { Resource>.loading().obs; RxList guildsModel = [].obs; + Rxn productionData = Rxn(); + Rx saleDate = Jalali.now().obs; @override void onInit() { @@ -83,6 +85,7 @@ class SegmentationLogic extends GetxController { weightController.text = '0'; selectedSegment.value = null; selectedGuildModel.value = null; + productionData.value = null; segmentType.value = 1; saleType.value = 1; quotaType.value = 1; @@ -111,6 +114,8 @@ class SegmentationLogic extends GetxController { } await safeCall( + showError: true, + showSuccess: true, call: () async => await rootLogic.chickenRepository.getSegmentation( token: rootLogic.tokenService.accessToken.value!, queryParameters: buildQueryParams( @@ -148,7 +153,8 @@ class SegmentationLogic extends GetxController { Future deleteSegmentation(String key) async { await safeCall( - showError: false, + showError: true, + showSuccess: true, call: () => rootLogic.chickenRepository.deleteSegmentation( token: rootLogic.tokenService.accessToken.value!, key: key, @@ -165,6 +171,7 @@ class SegmentationLogic extends GetxController { model: SegmentationModel( key: selectedSegment.value?.key, weight: int.tryParse(weightController.text.clearComma) ?? 0, + productionDate: productionData.value?.toDateTime().formattedDashedGregorian, ), ), onSuccess: (result) { @@ -189,7 +196,14 @@ class SegmentationLogic extends GetxController { if (segmentType.value == 2) { segmentationModel = segmentationModel.copyWith(guildKey: selectedGuildModel.value?.key); } + if (productionData.value != null) { + segmentationModel = segmentationModel.copyWith( + productionDate: productionData.value?.toDateTime().formattedDashedGregorian, + ); + } await safeCall( + showError: true, + showSuccess: true, call: () async => await rootLogic.chickenRepository.createSegmentation( token: rootLogic.tokenService.accessToken.value!, model: segmentationModel, diff --git a/packages/chicken/lib/presentation/pages/steward/segmentation/view.dart b/packages/chicken/lib/presentation/pages/steward/segmentation/view.dart index c6bbcc9..6d16512 100644 --- a/packages/chicken/lib/presentation/pages/steward/segmentation/view.dart +++ b/packages/chicken/lib/presentation/pages/steward/segmentation/view.dart @@ -91,7 +91,7 @@ class SegmentationPage extends GetView { spacing: 4, children: [ Text( - item.toGuild != null ? 'مباشر' : 'قطعه‌بند', + item.toGuild != null ? 'قطعه‌بند' : 'مباشر', textAlign: TextAlign.center, style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), ), @@ -131,11 +131,27 @@ class SegmentationPage extends GetView { SizedBox(width: 4), Expanded( flex: 2, - child: Text( - item.weight.separatedByCommaFa.addKg, - textAlign: TextAlign.center, - textDirection: TextDirection.ltr, - style: AppFonts.yekan14Bold.copyWith(color: AppColor.blueNormal), + child: Column( + spacing: 4, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + item.weight.separatedByCommaFa.addKg, + textAlign: TextAlign.center, + textDirection: TextDirection.ltr, + style: AppFonts.yekan14Bold.copyWith(color: AppColor.blueNormal), + ), + Text( + item.saleType == "governmental" ? 'دولتی' : 'آزاد', + textAlign: TextAlign.center, + textDirection: TextDirection.ltr, + style: AppFonts.yekan14Bold.copyWith( + color: item.saleType == "governmental" + ? AppColor.blueNormal + : AppColor.greenNormal, + ), + ), + ], ), ), ], @@ -207,7 +223,14 @@ class SegmentationPage extends GetView { ? item.toGuild?.guildsName ?? 'N/A' : item.buyer?.shop ?? 'N/A', ), - buildRow(title: 'ماهیت', value: item.toGuild != null ? 'مباشر' : 'قطعه‌بند'), + buildRow(title: 'ماهیت', value: item.toGuild != null ? 'قطعه‌بند' : 'مباشر'), + buildRow(title: 'نوع فروش', value: item.saleType == "governmental" ? 'دولتی' : 'آزاد'), + buildRow(title: 'انبار فروش', value: item.quota == "governmental" ? 'دولتی' : 'آزاد'), + buildRow( + title: 'تاریخ تولید گوشت', + value: item.productionDate?.toJalali.formatCompactDate() ?? 'ندارد', + ), + buildRow( title: 'وزن قطعه‌بندی', value: item.weight!.separatedByCommaFa, @@ -260,7 +283,7 @@ class SegmentationPage extends GetView { Widget addOrEditBottomSheet([bool isOnEdit = false]) { return BaseBottomSheet( - height: 550.h, + height: isOnEdit ? 350.h : 650.h, child: SingleChildScrollView( child: Form( key: controller.formKey, @@ -272,168 +295,201 @@ class SegmentationPage extends GetView { style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal), ), _productDropDown(), - Container( - padding: EdgeInsets.all(8), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: AppColor.darkGreyLight, width: 1), - ), - + Visibility( + visible: isOnEdit == false, child: Column( + spacing: 12, children: [ - const SizedBox(height: 8), - SizedBox( - height: 40, - child: ObxValue((data) { - return RadioGroup( - onChanged: (value) { - controller.segmentType.value = value!; - controller.selectedGuildModel.value = null; - controller.selectedGuildModel.refresh(); - }, - groupValue: controller.segmentType.value, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Radio(value: 1), - Text('قطعه‌بندی(کاربر)', style: AppFonts.yekan14), - SizedBox(width: 12), - Radio(value: 2), - Text('تخصیص به قطعه‌بند', style: AppFonts.yekan14), - ], - ), - ); - }, controller.saleType), - ), - const SizedBox(height: 12), + Container( + padding: EdgeInsets.all(8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: AppColor.darkGreyLight, width: 1), + ), - ObxValue((data) { - return Visibility(visible: data.value == 2, child: guildsDropDown()); - }, controller.segmentType), - ], - ), - ), - - Container( - height: 50.h, - clipBehavior: Clip.none, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: AppColor.darkGreyLight, width: 1), - ), - child: Stack( - fit: StackFit.expand, - alignment: Alignment.center, - clipBehavior: Clip.none, - children: [ - Positioned( - child: Container(color: Colors.white, child: Text("نوع فروش")), - top: -10, - right: 8, - ), - Obx(() { - return RadioGroup( - groupValue: controller.saleType.value, - onChanged: (value) { - controller.saleType.value = value ?? 0; - controller.selectedGuildModel.value = null; - controller.selectedGuildModel.refresh(); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - GestureDetector( - onTap: () { - controller.saleType.value = 1; - }, - child: Expanded( + child: Column( + children: [ + const SizedBox(height: 8), + SizedBox( + height: 40, + child: ObxValue((data) { + return RadioGroup( + onChanged: (value) { + controller.segmentType.value = value!; + controller.selectedGuildModel.value = null; + controller.selectedGuildModel.refresh(); + }, + groupValue: controller.segmentType.value, child: Row( + mainAxisAlignment: MainAxisAlignment.start, children: [ Radio(value: 1), - Text('قیمت دولتی', style: AppFonts.yekan14), - ], - ), - ), - ), - - GestureDetector( - onTap: () { - controller.saleType.value = 2; - }, - child: Expanded( - child: Row( - children: [ + Text('قطعه‌بندی(کاربر)', style: AppFonts.yekan14), + SizedBox(width: 12), Radio(value: 2), - Text('قیمت آزاد', style: AppFonts.yekan14), + Text('تخصیص به قطعه‌بند', style: AppFonts.yekan14), ], ), - ), - ), - ], - ), - ); - }), - ], - ), - ), - Container( - height: 50.h, - clipBehavior: Clip.none, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: AppColor.darkGreyLight, width: 1), - ), - child: Stack( - fit: StackFit.expand, - alignment: Alignment.center, - clipBehavior: Clip.none, - children: [ - Positioned( - child: Container(color: Colors.white, child: Text("نوع انبار")), - top: -10, - right: 8, + ); + }, controller.saleType), + ), + const SizedBox(height: 12), + + ObxValue((data) { + return Visibility(visible: data.value == 2, child: guildsDropDown()); + }, controller.segmentType), + ], + ), ), - Obx(() { - return RadioGroup( - groupValue: controller.quotaType.value, - onChanged: (value) { - controller.quotaType.value = value ?? 0; + ObxValue((data) { + return RTextField( + controller: TextEditingController(), + filledColor: AppColor.bgLight, + filled: true, + label: 'تاریخ تولید گوشت', + onTap: () { + Get.bottomSheet( + modalDatePicker((value) { + controller.productionData.value = value; + controller.productionData.refresh(); + }), + ); }, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - GestureDetector( - onTap: () { - controller.quotaType.value = 1; + borderColor: AppColor.darkGreyLight, + initText: data.value?.formatCompactDate(), + ); + }, controller.productionData), + + Container( + height: 50.h, + clipBehavior: Clip.none, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: AppColor.darkGreyLight, width: 1), + ), + child: Stack( + fit: StackFit.expand, + alignment: Alignment.center, + clipBehavior: Clip.none, + children: [ + Positioned( + child: Container(color: Colors.white, child: Text("نوع فروش")), + top: -10, + right: 8, + ), + Obx(() { + return RadioGroup( + groupValue: controller.saleType.value, + onChanged: (value) { + controller.saleType.value = 2 ?? 0; + controller.selectedGuildModel.value = null; + controller.selectedGuildModel.refresh(); }, child: Row( + mainAxisAlignment: MainAxisAlignment.start, children: [ - Radio(value: 1), - Text('انبار دولتی', style: AppFonts.yekan14), + Expanded( + child: GestureDetector( + onTap: () { + //controller.saleType.value = 1; + }, + child: Row( + children: [ + Radio(value: 1, enabled: false), + Text( + 'قیمت دولتی', + style: AppFonts.yekan14.copyWith( + color: AppColor.mediumGreyDark, + ), + ), + ], + ), + ), + ), + + Expanded( + child: GestureDetector( + onTap: () { + controller.saleType.value = 2; + }, + child: Row( + children: [ + Radio(value: 2), + Text('قیمت آزاد', style: AppFonts.yekan14), + ], + ), + ), + ), ], ), - ), - - GestureDetector( - onTap: () { - controller.quotaType.value = 2; + ); + }), + ], + ), + ), + Container( + height: 50.h, + clipBehavior: Clip.none, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: AppColor.darkGreyLight, width: 1), + ), + child: Stack( + fit: StackFit.expand, + alignment: Alignment.center, + clipBehavior: Clip.none, + children: [ + Positioned( + child: Container(color: Colors.white, child: Text("نوع انبار")), + top: -10, + right: 8, + ), + Obx(() { + return RadioGroup( + groupValue: controller.quotaType.value, + onChanged: (value) { + controller.quotaType.value = value ?? 0; }, - child: Expanded( - child: Row( - children: [ - Radio(value: 2), - Text('انبار آزاد', style: AppFonts.yekan14), - ], - ), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + controller.quotaType.value = 1; + }, + child: Row( + children: [ + Radio(value: 1), + Text('انبار دولتی', style: AppFonts.yekan14), + ], + ), + ), + ), + + Expanded( + child: GestureDetector( + onTap: () { + controller.quotaType.value = 2; + }, + child: Row( + children: [ + Radio(value: 2), + Text('انبار آزاد', style: AppFonts.yekan14), + ], + ), + ), + ), + ], ), - ), - ], - ), - ); - }), + ); + }), + ], + ), + ), ], ), ), @@ -551,4 +607,59 @@ class SegmentationPage extends GetView { ); }); } + + Container modalDatePicker(ValueChanged onDateSelected) { + Jalali? tempPickedDate; + return Container( + height: 250, + color: Colors.white, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: Row( + children: [ + SizedBox(width: 20), + RElevated( + height: 35, + width: 70, + textStyle: AppFonts.yekan14.copyWith(color: Colors.white), + onPressed: () { + onDateSelected(tempPickedDate ?? Jalali.now()); + Get.back(); + }, + text: 'تایید', + ), + Spacer(), + RElevated( + height: 35, + width: 70, + backgroundColor: AppColor.error, + textStyle: AppFonts.yekan14.copyWith(color: Colors.white), + onPressed: () { + onDateSelected(tempPickedDate ?? Jalali.now()); + Get.back(); + }, + text: 'لغو', + ), + SizedBox(width: 20), + ], + ), + ), + Divider(height: 0, thickness: 1), + Expanded( + child: Container( + child: PersianCupertinoDatePicker( + initialDateTime: controller.saleDate.value, + mode: PersianCupertinoDatePickerMode.date, + onDateTimeChanged: (dateTime) { + tempPickedDate = dateTime; + }, + ), + ), + ), + ], + ), + ); + } } diff --git a/pubspec.yaml b/pubspec.yaml index 1e58107..486b73a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: rasadyar_app description: "A new Flutter project." publish_to: 'none' -version: 1.3.26+23 +version: 1.3.28+25 environment: sdk: ^3.9.2