refactor : steward pages
This commit is contained in:
@@ -44,7 +44,7 @@ abstract class AllocatedMadeModel with _$AllocatedMadeModel {
|
|||||||
int? totalAmount,
|
int? totalAmount,
|
||||||
int? totalAmountPaid,
|
int? totalAmountPaid,
|
||||||
int? totalAmountRemain,
|
int? totalAmountRemain,
|
||||||
String? loggedRegistrationCode,
|
int? loggedRegistrationCode,
|
||||||
String? state,
|
String? state,
|
||||||
String? receiverState,
|
String? receiverState,
|
||||||
String? allocationState,
|
String? allocationState,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$AllocatedMadeModel {
|
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; String? 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; 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; dynamic get wareHouse; dynamic get stewardWareHouse; dynamic get car; dynamic get dispenser;
|
||||||
/// Create a copy of AllocatedMadeModel
|
/// Create a copy of AllocatedMadeModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -48,7 +48,7 @@ abstract mixin class $AllocatedMadeModelCopyWith<$Res> {
|
|||||||
factory $AllocatedMadeModelCopyWith(AllocatedMadeModel value, $Res Function(AllocatedMadeModel) _then) = _$AllocatedMadeModelCopyWithImpl;
|
factory $AllocatedMadeModelCopyWith(AllocatedMadeModel value, $Res Function(AllocatedMadeModel) _then) = _$AllocatedMadeModelCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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, String? 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, 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, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ as int?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount //
|
|||||||
as int?,totalAmountPaid: freezed == totalAmountPaid ? _self.totalAmountPaid : totalAmountPaid // ignore: cast_nullable_to_non_nullable
|
as int?,totalAmountPaid: freezed == totalAmountPaid ? _self.totalAmountPaid : totalAmountPaid // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,totalAmountRemain: freezed == totalAmountRemain ? _self.totalAmountRemain : totalAmountRemain // ignore: cast_nullable_to_non_nullable
|
as int?,totalAmountRemain: freezed == totalAmountRemain ? _self.totalAmountRemain : totalAmountRemain // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,loggedRegistrationCode: freezed == loggedRegistrationCode ? _self.loggedRegistrationCode : loggedRegistrationCode // ignore: cast_nullable_to_non_nullable
|
as int?,loggedRegistrationCode: freezed == loggedRegistrationCode ? _self.loggedRegistrationCode : loggedRegistrationCode // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
as int?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,receiverState: freezed == receiverState ? _self.receiverState : receiverState // ignore: cast_nullable_to_non_nullable
|
as String?,receiverState: freezed == receiverState ? _self.receiverState : receiverState // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,allocationState: freezed == allocationState ? _self.allocationState : allocationState // ignore: cast_nullable_to_non_nullable
|
as String?,allocationState: freezed == allocationState ? _self.allocationState : allocationState // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -243,7 +243,7 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(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, String? 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, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(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, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AllocatedMadeModel() when $default != null:
|
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.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.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _:
|
||||||
@@ -264,7 +264,7 @@ return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.s
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(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, String? 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, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(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, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AllocatedMadeModel():
|
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.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.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _:
|
||||||
@@ -284,7 +284,7 @@ return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.s
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(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, String? 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, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(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, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AllocatedMadeModel() when $default != null:
|
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.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.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _:
|
||||||
@@ -340,7 +340,7 @@ class _AllocatedMadeModel implements AllocatedMadeModel {
|
|||||||
@override final int? totalAmount;
|
@override final int? totalAmount;
|
||||||
@override final int? totalAmountPaid;
|
@override final int? totalAmountPaid;
|
||||||
@override final int? totalAmountRemain;
|
@override final int? totalAmountRemain;
|
||||||
@override final String? loggedRegistrationCode;
|
@override final int? loggedRegistrationCode;
|
||||||
@override final String? state;
|
@override final String? state;
|
||||||
@override final String? receiverState;
|
@override final String? receiverState;
|
||||||
@override final String? allocationState;
|
@override final String? allocationState;
|
||||||
@@ -391,7 +391,7 @@ abstract mixin class _$AllocatedMadeModelCopyWith<$Res> implements $AllocatedMad
|
|||||||
factory _$AllocatedMadeModelCopyWith(_AllocatedMadeModel value, $Res Function(_AllocatedMadeModel) _then) = __$AllocatedMadeModelCopyWithImpl;
|
factory _$AllocatedMadeModelCopyWith(_AllocatedMadeModel value, $Res Function(_AllocatedMadeModel) _then) = __$AllocatedMadeModelCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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, String? 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, 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, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -449,7 +449,7 @@ as int?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount //
|
|||||||
as int?,totalAmountPaid: freezed == totalAmountPaid ? _self.totalAmountPaid : totalAmountPaid // ignore: cast_nullable_to_non_nullable
|
as int?,totalAmountPaid: freezed == totalAmountPaid ? _self.totalAmountPaid : totalAmountPaid // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,totalAmountRemain: freezed == totalAmountRemain ? _self.totalAmountRemain : totalAmountRemain // ignore: cast_nullable_to_non_nullable
|
as int?,totalAmountRemain: freezed == totalAmountRemain ? _self.totalAmountRemain : totalAmountRemain // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,loggedRegistrationCode: freezed == loggedRegistrationCode ? _self.loggedRegistrationCode : loggedRegistrationCode // ignore: cast_nullable_to_non_nullable
|
as int?,loggedRegistrationCode: freezed == loggedRegistrationCode ? _self.loggedRegistrationCode : loggedRegistrationCode // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
as int?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,receiverState: freezed == receiverState ? _self.receiverState : receiverState // ignore: cast_nullable_to_non_nullable
|
as String?,receiverState: freezed == receiverState ? _self.receiverState : receiverState // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,allocationState: freezed == allocationState ? _self.allocationState : allocationState // ignore: cast_nullable_to_non_nullable
|
as String?,allocationState: freezed == allocationState ? _self.allocationState : allocationState // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ _AllocatedMadeModel _$AllocatedMadeModelFromJson(
|
|||||||
totalAmount: (json['total_amount'] as num?)?.toInt(),
|
totalAmount: (json['total_amount'] as num?)?.toInt(),
|
||||||
totalAmountPaid: (json['total_amount_paid'] as num?)?.toInt(),
|
totalAmountPaid: (json['total_amount_paid'] as num?)?.toInt(),
|
||||||
totalAmountRemain: (json['total_amount_remain'] as num?)?.toInt(),
|
totalAmountRemain: (json['total_amount_remain'] as num?)?.toInt(),
|
||||||
loggedRegistrationCode: json['logged_registration_code'] as String?,
|
loggedRegistrationCode: (json['logged_registration_code'] as num?)?.toInt(),
|
||||||
state: json['state'] as String?,
|
state: json['state'] as String?,
|
||||||
receiverState: json['receiver_state'] as String?,
|
receiverState: json['receiver_state'] as String?,
|
||||||
allocationState: json['allocation_state'] as String?,
|
allocationState: json['allocation_state'] as String?,
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class PoultryScienceRootLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void popBackTaped(bool didPop, result) async {
|
void popBackTaped() async{
|
||||||
final nestedKeyId = getNestedKey();
|
final nestedKeyId = getNestedKey();
|
||||||
GlobalKey<NavigatorState>? currentNestedKey = Get.nestedKey(nestedKeyId);
|
GlobalKey<NavigatorState>? currentNestedKey = Get.nestedKey(nestedKeyId);
|
||||||
|
|
||||||
|
|||||||
@@ -10,71 +10,68 @@ class PoultryScienceRootPage extends GetView<PoultryScienceRootLogic> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return PopScope(
|
return ChickenBasePage(
|
||||||
canPop: false,
|
isFullScreen: true,
|
||||||
onPopInvokedWithResult: controller.popBackTaped,
|
onPopScopTaped: controller.popBackTaped,
|
||||||
child: ChickenBasePage(
|
child: ObxValue((data) {
|
||||||
isFullScreen: true,
|
return Stack(
|
||||||
child: ObxValue((data) {
|
children: [
|
||||||
return Stack(
|
IndexedStack(children: controller.pages, index: data.value),
|
||||||
children: [
|
Positioned(
|
||||||
IndexedStack(children: controller.pages, index: data.value),
|
right: 0,
|
||||||
Positioned(
|
left: 0,
|
||||||
right: 0,
|
bottom: 0,
|
||||||
left: 0,
|
child: RBottomNavigation(
|
||||||
bottom: 0,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
child: RBottomNavigation(
|
items: [
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
RBottomNavigationItem(
|
||||||
items: [
|
label: 'عملیات',
|
||||||
RBottomNavigationItem(
|
icon: Assets.vec.settingSvg.path,
|
||||||
label: 'عملیات',
|
isSelected: controller.currentPage.value == 0,
|
||||||
icon: Assets.vec.settingSvg.path,
|
onTap: () {
|
||||||
isSelected: controller.currentPage.value == 0,
|
Get.nestedKey(
|
||||||
onTap: () {
|
poultrySecondKey,
|
||||||
Get.nestedKey(
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
poultrySecondKey,
|
Get.nestedKey(
|
||||||
)?.currentState?.popUntil((route) => route.isFirst);
|
poultryFirstKey,
|
||||||
Get.nestedKey(
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
poultryFirstKey,
|
controller.changePage(0);
|
||||||
)?.currentState?.popUntil((route) => route.isFirst);
|
},
|
||||||
controller.changePage(0);
|
),
|
||||||
},
|
RBottomNavigationItem(
|
||||||
),
|
label: 'خانه',
|
||||||
RBottomNavigationItem(
|
icon: Assets.vec.homeSvg.path,
|
||||||
label: 'خانه',
|
isSelected: controller.currentPage.value == 1,
|
||||||
icon: Assets.vec.homeSvg.path,
|
onTap: () {
|
||||||
isSelected: controller.currentPage.value == 1,
|
Get.nestedKey(
|
||||||
onTap: () {
|
poultryFirstKey,
|
||||||
Get.nestedKey(
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
poultryFirstKey,
|
Get.nestedKey(
|
||||||
)?.currentState?.popUntil((route) => route.isFirst);
|
poultryThirdKey,
|
||||||
Get.nestedKey(
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
poultryThirdKey,
|
controller.changePage(1);
|
||||||
)?.currentState?.popUntil((route) => route.isFirst);
|
},
|
||||||
controller.changePage(1);
|
),
|
||||||
},
|
RBottomNavigationItem(
|
||||||
),
|
label: 'پروفایل',
|
||||||
RBottomNavigationItem(
|
icon: Assets.vec.profileCircleSvg.path,
|
||||||
label: 'پروفایل',
|
isSelected: controller.currentPage.value == 2,
|
||||||
icon: Assets.vec.profileCircleSvg.path,
|
onTap: () {
|
||||||
isSelected: controller.currentPage.value == 2,
|
Get.nestedKey(
|
||||||
onTap: () {
|
poultryFirstKey,
|
||||||
Get.nestedKey(
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
poultryFirstKey,
|
Get.nestedKey(
|
||||||
)?.currentState?.popUntil((route) => route.isFirst);
|
poultrySecondKey,
|
||||||
Get.nestedKey(
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
poultrySecondKey,
|
controller.changePage(2);
|
||||||
)?.currentState?.popUntil((route) => route.isFirst);
|
},
|
||||||
controller.changePage(2);
|
),
|
||||||
},
|
],
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
);
|
],
|
||||||
}, controller.currentPage),
|
);
|
||||||
),
|
}, controller.currentPage),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/sale_buy_card_item.dart';
|
import 'package:rasadyar_chicken/presentation/widget/sale_buy_card_item.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
@@ -27,7 +28,7 @@ class BuyPage extends GetView<BuyLogic> {
|
|||||||
iconPath: Assets.vec.cubeSvg.path,
|
iconPath: Assets.vec.cubeSvg.path,
|
||||||
color: AppColor.greenNormalActive,
|
color: AppColor.greenNormalActive,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(ChickenRoutes.buysInProvinceSteward, id: 0);
|
Get.toNamed(ChickenRoutes.buysInProvinceSteward, id: stewardFirstKey);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
saleOrBuyItemCard(
|
saleOrBuyItemCard(
|
||||||
@@ -35,7 +36,7 @@ class BuyPage extends GetView<BuyLogic> {
|
|||||||
iconPath: Assets.vec.truckFastSvg.path,
|
iconPath: Assets.vec.truckFastSvg.path,
|
||||||
color: AppColor.greenNormalActive,
|
color: AppColor.greenNormalActive,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(ChickenRoutes.buysOutOfProvinceSteward, id: 0);
|
Get.toNamed(ChickenRoutes.buysOutOfProvinceSteward, id: stewardFirstKey);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/steward/buy_in_province_all/view.dart';
|
import 'package:rasadyar_chicken/presentation/pages/steward/buy_in_province_all/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/steward/buy_in_province_waiting/view.dart';
|
import 'package:rasadyar_chicken/presentation/pages/steward/buy_in_province_waiting/view.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/page_route.dart';
|
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
@@ -15,10 +15,13 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ChickenBasePage(
|
return ChickenBasePage(
|
||||||
routes: controller.routesName,
|
routes: controller.routesName,
|
||||||
//todo
|
|
||||||
backId:0,
|
|
||||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||||
filteringWidget: filterBottomSheet(),
|
hasBack: true,
|
||||||
|
backId: stewardFirstKey,
|
||||||
|
|
||||||
|
onFilterTap: () {
|
||||||
|
Get.bottomSheet(filterBottomSheet());
|
||||||
|
},
|
||||||
widgets: [
|
widgets: [
|
||||||
inventoryWidget(controller.rootLogic),
|
inventoryWidget(controller.rootLogic),
|
||||||
segmentWidget(),
|
segmentWidget(),
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
child: ObxValue((data) {
|
child: ObxValue((data) {
|
||||||
|
|||||||
@@ -6,11 +6,10 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
||||||
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import 'package:rasadyar_core/core.dart' hide Image;
|
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
@@ -21,10 +20,11 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ChickenBasePage(
|
return ChickenBasePage(
|
||||||
routes: controller.routesName,
|
routes: controller.routesName,
|
||||||
backId: 0,
|
backId: stewardFirstKey,
|
||||||
|
|
||||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||||
filteringWidget: filterBottomSheet(),
|
onFilterTap: () {
|
||||||
|
Get.bottomSheet(filterBottomSheet());
|
||||||
|
},
|
||||||
widgets: [
|
widgets: [
|
||||||
inventoryWidget(controller.rootLogic),
|
inventoryWidget(controller.rootLogic),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -67,8 +67,7 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
|||||||
ignoreSafeArea: false,
|
ignoreSafeArea: false,
|
||||||
).whenComplete(() {
|
).whenComplete(() {
|
||||||
controller.resetSubmitForm();
|
controller.resetSubmitForm();
|
||||||
|
});
|
||||||
},);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
||||||
@@ -198,7 +197,6 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
|||||||
addPurchasedInformationBottomSheet(true),
|
addPurchasedInformationBottomSheet(true),
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
).whenComplete(() {
|
).whenComplete(() {
|
||||||
|
|
||||||
controller.resetSubmitForm();
|
controller.resetSubmitForm();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart' hide LinearGradient;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/app_bar.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/steward/widely_used/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/steward/widely_used/view.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
@@ -13,153 +13,141 @@ class HomePage extends GetView<HomeLogic> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return ChickenBasePage(
|
||||||
backgroundColor: AppColor.bgLight,
|
scrollable: true,
|
||||||
appBar: chickenAppBar(hasBack: false, hasFilter: false, hasSearch: false),
|
isBase: true,
|
||||||
body: SingleChildScrollView(
|
widgets: [
|
||||||
physics: BouncingScrollPhysics(),
|
InkWell(
|
||||||
child: Column(
|
onTap: () {
|
||||||
spacing: 8,
|
controller.isExpanded.value = !controller.isExpanded.value;
|
||||||
children: [
|
},
|
||||||
InkWell(
|
child: Card(
|
||||||
onTap: () {
|
margin: EdgeInsetsGeometry.all(6),
|
||||||
controller.isExpanded.value = !controller.isExpanded.value;
|
shape: RoundedRectangleBorder(
|
||||||
},
|
borderRadius: BorderRadius.circular(8),
|
||||||
child: Card(
|
side: BorderSide(width: 0.50, color: const Color(0xFFA9A9A9)),
|
||||||
margin: EdgeInsetsGeometry.all(6),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
side: BorderSide(width: 0.50, color: const Color(0xFFA9A9A9)),
|
|
||||||
),
|
|
||||||
|
|
||||||
child: ObxValue((data) {
|
|
||||||
return AnimatedSize(
|
|
||||||
duration: Duration(milliseconds: 300),
|
|
||||||
child: data.value
|
|
||||||
? Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
spacing: 8,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 40,
|
|
||||||
height: 40,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
image: DecorationImage(
|
|
||||||
image: AssetImage(Assets.images.chicken.path),
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(
|
|
||||||
width: 0.25,
|
|
||||||
color: const Color(0xFFB0B0B0),
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'مرغ گرم',
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
style: AppFonts.yekan16.copyWith(
|
|
||||||
color: AppColor.darkGreyDarkActive,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Spacer(),
|
|
||||||
AnimatedRotation(
|
|
||||||
turns: 180,
|
|
||||||
duration: Duration(milliseconds: 3000),
|
|
||||||
child: Icon(CupertinoIcons.chevron_up, size: 18),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 8),
|
|
||||||
_todayShipmentWidget(),
|
|
||||||
|
|
||||||
_inventoryWidget(),
|
|
||||||
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'اطلاعات بارها',
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
style: AppFonts.yekan16,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
_informationShipment(),
|
|
||||||
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'اطلاعات توزیع',
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
style: AppFonts.yekan16,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
distributionInformationWidget(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
spacing: 8,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 40,
|
|
||||||
height: 40,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
image: DecorationImage(
|
|
||||||
image: AssetImage(Assets.images.chicken.path),
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(
|
|
||||||
width: 0.25,
|
|
||||||
color: const Color(0xFFB0B0B0),
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'مرغ گرم',
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
style: AppFonts.yekan16.copyWith(
|
|
||||||
color: AppColor.darkGreyDarkActive,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Spacer(),
|
|
||||||
Icon(CupertinoIcons.chevron_down, size: 18),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
_todayShipmentWidget(),
|
|
||||||
_inventoryWidget(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}, controller.isExpanded),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
|
||||||
WidelyUsedWidget(),
|
child: ObxValue((data) {
|
||||||
SizedBox(height: 20),
|
return AnimatedSize(
|
||||||
],
|
duration: Duration(milliseconds: 300),
|
||||||
|
child: data.value
|
||||||
|
? Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
spacing: 8,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(Assets.images.chicken.path),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'مرغ گرم',
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan16.copyWith(
|
||||||
|
color: AppColor.darkGreyDarkActive,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
AnimatedRotation(
|
||||||
|
turns: 180,
|
||||||
|
duration: Duration(milliseconds: 3000),
|
||||||
|
child: Icon(CupertinoIcons.chevron_up, size: 18),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
_todayShipmentWidget(),
|
||||||
|
|
||||||
|
_inventoryWidget(),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'اطلاعات بارها',
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan16,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
_informationShipment(),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'اطلاعات توزیع',
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan16,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
distributionInformationWidget(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
spacing: 8,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(Assets.images.chicken.path),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'مرغ گرم',
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan16.copyWith(
|
||||||
|
color: AppColor.darkGreyDarkActive,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
Icon(CupertinoIcons.chevron_down, size: 18),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
_todayShipmentWidget(),
|
||||||
|
_inventoryWidget(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, controller.isExpanded),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
|
WidelyUsedWidget(),
|
||||||
|
SizedBox(height: 20),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:rasadyar_chicken/data/data_source/local/chicken_local.dart';
|
import 'package:rasadyar_chicken/data/data_source/local/chicken_local.dart';
|
||||||
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
||||||
@@ -20,6 +21,7 @@ import 'package:rasadyar_core/core.dart';
|
|||||||
enum ErrorLocationType { serviceDisabled, permissionDenied, none }
|
enum ErrorLocationType { serviceDisabled, permissionDenied, none }
|
||||||
|
|
||||||
class StewardRootLogic extends GetxController {
|
class StewardRootLogic extends GetxController {
|
||||||
|
DateTime? _lastBackPressed;
|
||||||
RxInt currentPage = 2.obs;
|
RxInt currentPage = 2.obs;
|
||||||
List<Widget> pages = [BuyPage(), SalePage(), HomePage(), SegmentationPage(), ProfilePage()];
|
List<Widget> pages = [BuyPage(), SalePage(), HomePage(), SegmentationPage(), ProfilePage()];
|
||||||
|
|
||||||
@@ -154,4 +156,27 @@ class StewardRootLogic extends GetxController {
|
|||||||
onError: (error, stacktrace) {},
|
onError: (error, stacktrace) {},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onPopScopTaped() async {
|
||||||
|
final nestedKey = Get.nestedKey(currentPage.value);
|
||||||
|
final currentNavigator = nestedKey?.currentState;
|
||||||
|
|
||||||
|
if (currentNavigator?.canPop() ?? false) {
|
||||||
|
currentNavigator?.pop();
|
||||||
|
} else {
|
||||||
|
final now = DateTime.now();
|
||||||
|
if (_lastBackPressed == null || now.difference(_lastBackPressed!) > Duration(seconds: 2)) {
|
||||||
|
_lastBackPressed = now;
|
||||||
|
Get.snackbar(
|
||||||
|
'خروج از برنامه',
|
||||||
|
'برای خروج دوباره بازگشت را بزنید',
|
||||||
|
snackPosition: SnackPosition.TOP,
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
backgroundColor: AppColor.warning,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
await SystemNavigator.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,141 +1,142 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:rasadyar_chicken/chicken.dart';
|
import 'package:rasadyar_chicken/chicken.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/steward/root/logic.dart';
|
import 'package:rasadyar_chicken/presentation/pages/steward/root/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_core/core.dart' hide LinearGradient;
|
import 'package:rasadyar_core/core.dart' hide LinearGradient;
|
||||||
|
|
||||||
class StewardRootPage extends GetView<StewardRootLogic> {
|
class StewardRootPage extends GetView<StewardRootLogic> {
|
||||||
StewardRootPage({super.key});
|
StewardRootPage({super.key});
|
||||||
|
|
||||||
DateTime? _lastBackPressed;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ObxValue((data) {
|
return ObxValue((data) {
|
||||||
return PopScope(
|
return ChickenBasePage(
|
||||||
canPop: false,
|
isFullScreen: true,
|
||||||
onPopInvokedWithResult: (didPop, result) async {
|
isBase: true,
|
||||||
final nestedKey = Get.nestedKey(controller.currentPage.value);
|
onPopScopTaped: controller.onPopScopTaped,
|
||||||
final currentNavigator = nestedKey?.currentState;
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
IndexedStack(
|
||||||
|
children: [
|
||||||
|
Navigator(
|
||||||
|
key: Get.nestedKey(stewardFirstKey),
|
||||||
|
onGenerateRoute: (settings) {
|
||||||
|
final page = ChickenPages.pages.firstWhere(
|
||||||
|
(e) => e.name == settings.name,
|
||||||
|
orElse: () =>
|
||||||
|
ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.buySteward),
|
||||||
|
);
|
||||||
|
|
||||||
if (currentNavigator?.canPop() ?? false) {
|
return buildRouteFromGetPage(page);
|
||||||
currentNavigator?.pop();
|
},
|
||||||
} else {
|
),
|
||||||
final now = DateTime.now();
|
Navigator(
|
||||||
if (_lastBackPressed == null ||
|
key: Get.nestedKey(stewardSecondKey),
|
||||||
now.difference(_lastBackPressed!) > Duration(seconds: 2)) {
|
onGenerateRoute: (settings) {
|
||||||
_lastBackPressed = now;
|
final page = ChickenPages.pages.firstWhere(
|
||||||
Get.snackbar(
|
(e) => e.name == settings.name,
|
||||||
'خروج از برنامه',
|
orElse: () =>
|
||||||
'برای خروج دوباره بازگشت را بزنید',
|
ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.saleSteward),
|
||||||
snackPosition: SnackPosition.TOP,
|
);
|
||||||
duration: Duration(seconds: 2),
|
|
||||||
backgroundColor: AppColor.warning,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
await SystemNavigator.pop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Scaffold(
|
|
||||||
backgroundColor: AppColor.bgLight,
|
|
||||||
body: IndexedStack(
|
|
||||||
children: [
|
|
||||||
Navigator(
|
|
||||||
key: Get.nestedKey(stewardFirstKey),
|
|
||||||
onGenerateRoute: (settings) {
|
|
||||||
final page = ChickenPages.pages.firstWhere(
|
|
||||||
(e) => e.name == settings.name,
|
|
||||||
orElse: () => ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.buySteward),
|
|
||||||
);
|
|
||||||
|
|
||||||
return buildRouteFromGetPage(page);
|
return buildRouteFromGetPage(page);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Navigator(
|
Navigator(
|
||||||
key: Get.nestedKey(stewardSecondKey),
|
key: Get.nestedKey(stewardThirdKey),
|
||||||
onGenerateRoute: (settings) {
|
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[2]),
|
||||||
final page = ChickenPages.pages.firstWhere(
|
),
|
||||||
(e) => e.name == settings.name,
|
Navigator(
|
||||||
orElse: () =>
|
key: Get.nestedKey(stewardFourthKey),
|
||||||
ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.saleSteward),
|
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[3]),
|
||||||
);
|
),
|
||||||
|
Navigator(
|
||||||
|
key: Get.nestedKey(stewardFifthKey),
|
||||||
|
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[4]),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
index: data.value,
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
right: 0,
|
||||||
|
left: 0,
|
||||||
|
child: RBottomNavigation(
|
||||||
|
items: [
|
||||||
|
RBottomNavigationItem(
|
||||||
|
label: 'خرید',
|
||||||
|
icon: Assets.vec.buySvg.path,
|
||||||
|
isSelected: controller.currentPage.value == 0,
|
||||||
|
onTap: () {
|
||||||
|
Get.nestedKey(
|
||||||
|
stewardSecondKey,
|
||||||
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
|
|
||||||
return buildRouteFromGetPage(page);
|
controller.changePage(0);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Navigator(
|
RBottomNavigationItem(
|
||||||
key: Get.nestedKey(stewardThirdKey),
|
label: 'فروش',
|
||||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[2]),
|
icon: Assets.vec.saleSvg.path,
|
||||||
),
|
isSelected: controller.currentPage.value == 1,
|
||||||
Navigator(
|
onTap: () {
|
||||||
key: Get.nestedKey(stewardFourthKey),
|
Get.nestedKey(
|
||||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[3]),
|
stewardFirstKey,
|
||||||
),
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
Navigator(
|
controller.changePage(1);
|
||||||
key: Get.nestedKey(stewardFifthKey),
|
},
|
||||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[4]),
|
),
|
||||||
),
|
RBottomNavigationItem(
|
||||||
],
|
label: 'خانه',
|
||||||
index: data.value,
|
icon: Assets.vec.homeSvg.path,
|
||||||
),
|
isSelected: controller.currentPage.value == 2,
|
||||||
|
onTap: () {
|
||||||
|
Get.nestedKey(
|
||||||
|
stewardSecondKey,
|
||||||
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
|
Get.nestedKey(
|
||||||
|
stewardFirstKey,
|
||||||
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
|
controller.changePage(2);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
RBottomNavigationItem(
|
||||||
|
label: 'قطعه بندی',
|
||||||
|
icon: Assets.vec.convertCubeSvg.path,
|
||||||
|
isSelected: controller.currentPage.value == 3,
|
||||||
|
onTap: () {
|
||||||
|
Get.nestedKey(
|
||||||
|
stewardSecondKey,
|
||||||
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
|
Get.nestedKey(
|
||||||
|
stewardFirstKey,
|
||||||
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
|
controller.changePage(3);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
RBottomNavigationItem(
|
||||||
|
label: 'پروفایل',
|
||||||
|
icon: Assets.vec.profileCircleSvg.path,
|
||||||
|
isSelected: controller.currentPage.value == 4,
|
||||||
|
onTap: () {
|
||||||
|
Get.nestedKey(
|
||||||
|
stewardSecondKey,
|
||||||
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
|
Get.nestedKey(
|
||||||
|
stewardFirstKey,
|
||||||
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
|
|
||||||
bottomNavigationBar: RBottomNavigation(
|
controller.changePage(4);
|
||||||
items: [
|
},
|
||||||
RBottomNavigationItem(
|
),
|
||||||
label: 'خرید',
|
],
|
||||||
icon: Assets.vec.buySvg.path,
|
|
||||||
isSelected: controller.currentPage.value == 0,
|
|
||||||
onTap: () {
|
|
||||||
Get.nestedKey(stewardSecondKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
|
|
||||||
controller.changePage(0);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
RBottomNavigationItem(
|
),
|
||||||
label: 'فروش',
|
],
|
||||||
icon: Assets.vec.saleSvg.path,
|
|
||||||
isSelected: controller.currentPage.value == 1,
|
|
||||||
onTap: () {
|
|
||||||
Get.nestedKey(stewardFirstKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
controller.changePage(1);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
RBottomNavigationItem(
|
|
||||||
label: 'خانه',
|
|
||||||
icon: Assets.vec.homeSvg.path,
|
|
||||||
isSelected: controller.currentPage.value == 2,
|
|
||||||
onTap: () {
|
|
||||||
Get.nestedKey(stewardSecondKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
Get.nestedKey(stewardFirstKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
controller.changePage(2);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
RBottomNavigationItem(
|
|
||||||
label: 'قطعه بندی',
|
|
||||||
icon: Assets.vec.convertCubeSvg.path,
|
|
||||||
isSelected: controller.currentPage.value == 3,
|
|
||||||
onTap: () {
|
|
||||||
Get.nestedKey(stewardSecondKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
Get.nestedKey(stewardFirstKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
controller.changePage(3);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
RBottomNavigationItem(
|
|
||||||
label: 'پروفایل',
|
|
||||||
icon: Assets.vec.profileCircleSvg.path,
|
|
||||||
isSelected: controller.currentPage.value == 4,
|
|
||||||
onTap: () {
|
|
||||||
Get.nestedKey(stewardSecondKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
Get.nestedKey(stewardFirstKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
|
|
||||||
controller.changePage(4);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}, controller.currentPage);
|
}, controller.currentPage);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/chicken.dart';
|
import 'package:rasadyar_chicken/chicken.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/sale_buy_card_item.dart';
|
import 'package:rasadyar_chicken/presentation/widget/sale_buy_card_item.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
@@ -27,14 +28,14 @@ class SalePage extends GetView<SaleLogic> {
|
|||||||
title: 'فروش داخل استان',
|
title: 'فروش داخل استان',
|
||||||
iconPath: Assets.vec.cubeSvg.path,
|
iconPath: Assets.vec.cubeSvg.path,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(ChickenRoutes.salesInProvinceSteward, id: 1);
|
Get.toNamed(ChickenRoutes.salesInProvinceSteward, id: stewardSecondKey);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
saleOrBuyItemCard(
|
saleOrBuyItemCard(
|
||||||
title: 'فروش خارج استان',
|
title: 'فروش خارج استان',
|
||||||
iconPath: Assets.vec.truckFastSvg.path,
|
iconPath: Assets.vec.truckFastSvg.path,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(ChickenRoutes.salesOutOfProvinceSteward, id: 1);
|
Get.toNamed(ChickenRoutes.salesOutOfProvinceSteward, id: stewardSecondKey);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
||||||
|
|
||||||
import 'package:rasadyar_chicken/presentation/widget/page_route.dart';
|
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
@@ -17,119 +16,134 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return ChickenBasePage(
|
||||||
body: ChickenBasePage(
|
routes: controller.routesName,
|
||||||
|
backId: stewardSecondKey,
|
||||||
|
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||||
|
|
||||||
routes: controller.routesName,
|
onFilterTap: () {
|
||||||
backId:1,
|
Get.bottomSheet(filterBottomSheet());
|
||||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
},
|
||||||
filteringWidget: filterBottomSheet(),
|
child: Stack(
|
||||||
widgets: [
|
children: [
|
||||||
inventoryWidget(controller.rootLogic),
|
Positioned.fill(
|
||||||
Expanded(
|
child: Column(
|
||||||
child: ObxValue((data) {
|
children: [
|
||||||
return RPaginatedListView(
|
inventoryWidget(controller.rootLogic),
|
||||||
listType: ListType.separated,
|
Expanded(
|
||||||
resource: data.value,
|
child: ObxValue((data) {
|
||||||
hasMore: data.value.data?.next != null,
|
return RPaginatedListView(
|
||||||
isPaginating: controller.isLoadingMoreAllocationsMade.value,
|
listType: ListType.separated,
|
||||||
onRefresh: () async {
|
resource: data.value,
|
||||||
controller.currentPage.value = 1;
|
hasMore: data.value.data?.next != null,
|
||||||
await controller.getAllocatedMade();
|
isPaginating: controller.isLoadingMoreAllocationsMade.value,
|
||||||
},
|
onRefresh: () async {
|
||||||
onLoadMore: () async {
|
controller.currentPage.value = 1;
|
||||||
controller.currentPage.value++;
|
await controller.getAllocatedMade();
|
||||||
iLog(controller.currentPage.value);
|
},
|
||||||
await controller.getAllocatedMade(true);
|
onLoadMore: () async {
|
||||||
},
|
controller.currentPage.value++;
|
||||||
padding: EdgeInsets.fromLTRB(8, 8, 8, 80),
|
iLog(controller.currentPage.value);
|
||||||
itemBuilder: (context, index) {
|
await controller.getAllocatedMade(true);
|
||||||
var item = data.value.data!.results![index];
|
},
|
||||||
return ObxValue((val) {
|
padding: EdgeInsets.fromLTRB(8, 8, 8, 80),
|
||||||
return ExpandableListItem2(
|
itemBuilder: (context, index) {
|
||||||
selected: val.contains(index),
|
var item = data.value.data!.results![index];
|
||||||
onTap: () => controller.isExpandedList.toggle(index),
|
return ObxValue((val) {
|
||||||
index: index,
|
return ExpandableListItem2(
|
||||||
child: itemListWidget(item),
|
selected: val.contains(index),
|
||||||
secondChild: itemListExpandedWidget(item, index),
|
onTap: () => controller.isExpandedList.toggle(index),
|
||||||
labelColor: AppColor.blueLight,
|
index: index,
|
||||||
labelIcon: Assets.vec.timerSvg.path,
|
child: itemListWidget(item),
|
||||||
labelIconColor: item.registrationCode == null
|
secondChild: itemListExpandedWidget(item, index),
|
||||||
? AppColor.darkGreyDark
|
labelColor: AppColor.blueLight,
|
||||||
: AppColor.error,
|
labelIcon: Assets.vec.timerSvg.path,
|
||||||
|
labelIconColor: item.registrationCode == null
|
||||||
|
? AppColor.darkGreyDark
|
||||||
|
: AppColor.error,
|
||||||
|
);
|
||||||
|
}, controller.isExpandedList);
|
||||||
|
},
|
||||||
|
itemCount: data.value.data?.results?.length ?? 0,
|
||||||
|
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||||
);
|
);
|
||||||
}, controller.isExpandedList);
|
}, controller.allocatedList),
|
||||||
},
|
),
|
||||||
itemCount: data.value.data?.results?.length ?? 0,
|
],
|
||||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
),
|
||||||
);
|
),
|
||||||
}, controller.allocatedList),
|
Positioned(
|
||||||
|
right: 5,
|
||||||
|
bottom: 15,
|
||||||
|
child: SizedBox(
|
||||||
|
width: Get.width - 30,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
RFab.add(
|
||||||
|
onPressed: () {
|
||||||
|
Get.bottomSheet(
|
||||||
|
addOrEditBottomSheet(),
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
).whenComplete(() {
|
||||||
|
controller.clearForm();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
|
||||||
|
ObxValue((data) {
|
||||||
|
return Visibility(
|
||||||
|
visible: (data.value.data?.results?.length ?? 0) > 1,
|
||||||
|
child: AnimatedFab(
|
||||||
|
onPressed: () async {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'تایید یکجا',
|
||||||
|
middleText: 'آیا از تایید تمامی تخصیص ها اطمینان دارید؟',
|
||||||
|
confirm: ElevatedButton(
|
||||||
|
onPressed: () async {
|
||||||
|
await controller.confirmAllAllocations();
|
||||||
|
controller.getAllocatedMade();
|
||||||
|
controller.rootLogic.getInventory();
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Text('تایید'),
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: AppColor.blueNormal,
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
cancel: OutlinedButton(
|
||||||
|
style: OutlinedButton.styleFrom(
|
||||||
|
foregroundColor: AppColor.error,
|
||||||
|
enableFeedback: true,
|
||||||
|
side: BorderSide(color: AppColor.error, width: 1),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Text('لغو'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
message: 'تایید یکجا',
|
||||||
|
icon: Assets.vec.clipboardTaskSvg.svg(width: 40.w, height: 40.h),
|
||||||
|
backgroundColor: controller.bgConfirmAllColor.value,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, controller.allocatedList),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButton: SizedBox(
|
|
||||||
width: Get.width - 30,
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
RFab.add(
|
|
||||||
onPressed: () {
|
|
||||||
Get.bottomSheet(
|
|
||||||
addOrEditBottomSheet(),
|
|
||||||
isScrollControlled: true,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
).whenComplete(() {
|
|
||||||
controller.clearForm();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
ObxValue((data) {
|
|
||||||
return Visibility(
|
|
||||||
visible: (data.value.data?.results?.length ?? 0) > 1,
|
|
||||||
child: AnimatedFab(
|
|
||||||
onPressed: () async {
|
|
||||||
Get.defaultDialog(
|
|
||||||
title: 'تایید یکجا',
|
|
||||||
middleText: 'آیا از تایید تمامی تخصیص ها اطمینان دارید؟',
|
|
||||||
confirm: ElevatedButton(
|
|
||||||
onPressed: () async {
|
|
||||||
await controller.confirmAllAllocations();
|
|
||||||
controller.getAllocatedMade();
|
|
||||||
controller.rootLogic.getInventory();
|
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
child: Text('تایید'),
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: AppColor.blueNormal,
|
|
||||||
foregroundColor: Colors.white,
|
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
cancel: OutlinedButton(
|
|
||||||
style: OutlinedButton.styleFrom(
|
|
||||||
foregroundColor: AppColor.error,
|
|
||||||
enableFeedback: true,
|
|
||||||
side: BorderSide(color: AppColor.error, width: 1),
|
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
child: Text('لغو'),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
message: 'تایید یکجا',
|
|
||||||
icon: Assets.vec.clipboardTaskSvg.svg(width: 40.w, height: 40.h),
|
|
||||||
backgroundColor: controller.bgConfirmAllColor.value,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}, controller.allocatedList),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,8 +233,6 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
controller.getBuyerInformation(item)?.user?.fullname ?? 'N/A',
|
controller.getBuyerInformation(item)?.user?.fullname ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
@@ -286,11 +298,10 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
/* buildRow(
|
/* buildRow(
|
||||||
title: 'مشخصات خریدار',
|
title: 'مشخصات خریدار',
|
||||||
value: controller.getBuyerInformation(item)?.user?.fullname ?? 'N/A',
|
value: controller.getBuyerInformation(item)?.user?.fullname ?? 'N/A',
|
||||||
),*/
|
),*/
|
||||||
|
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'تلفن خریدار',
|
title: 'تلفن خریدار',
|
||||||
value: controller.getBuyerInformation(item)?.user?.mobile ?? 'N/A',
|
value: controller.getBuyerInformation(item)?.user?.mobile ?? 'N/A',
|
||||||
@@ -298,10 +309,7 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
),
|
),
|
||||||
buildRow(title: 'نوع فروش', value: item.sellType?.faItem ?? 'N/A'),
|
buildRow(title: 'نوع فروش', value: item.sellType?.faItem ?? 'N/A'),
|
||||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||||
buildRow(
|
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
||||||
title: 'نوع تخصیص',
|
|
||||||
value: item.allocationType?.faAllocationType ?? 'N/A',
|
|
||||||
),
|
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'وزن خریداری شده',
|
title: 'وزن خریداری شده',
|
||||||
value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم',
|
value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم',
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:rasadyar_chicken/data/models/response/out_province_carcasses_buy
|
|||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
||||||
@@ -21,9 +22,11 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ChickenBasePage(
|
return ChickenBasePage(
|
||||||
routes: controller.routesName,
|
routes: controller.routesName,
|
||||||
backId: 1,
|
backId: stewardSecondKey,
|
||||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||||
filteringWidget: filterBottomSheet(),
|
onFilterTap: () {
|
||||||
|
Get.bottomSheet(filterBottomSheet());
|
||||||
|
},
|
||||||
widgets: [
|
widgets: [
|
||||||
inventoryWidget(controller.rootLogic),
|
inventoryWidget(controller.rootLogic),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ class SegmentationPage extends GetView<SegmentationLogic> {
|
|||||||
return ChickenBasePage(
|
return ChickenBasePage(
|
||||||
routes: controller.routesName,
|
routes: controller.routesName,
|
||||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||||
filteringWidget: filterBottomSheet(),
|
onFilterTap: () {
|
||||||
|
Get.bottomSheet(filterBottomSheet());
|
||||||
|
},
|
||||||
hasBack: false,
|
hasBack: false,
|
||||||
widgets: [
|
widgets: [
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ class BaseLogic extends GetxController {
|
|||||||
final TextEditingController textEditingController = TextEditingController();
|
final TextEditingController textEditingController = TextEditingController();
|
||||||
|
|
||||||
void setSearchCallback(void Function(String?)? onSearchChanged) {
|
void setSearchCallback(void Function(String?)? onSearchChanged) {
|
||||||
fLog("sssssssssssssssssssssssssssssssss");
|
|
||||||
debounce<String?>(searchValue, (val) {
|
debounce<String?>(searchValue, (val) {
|
||||||
if (val != null && val.trim().isNotEmpty) {
|
if (val != null && val.trim().isNotEmpty) {
|
||||||
onSearchChanged?.call(val);
|
onSearchChanged?.call(val);
|
||||||
|
|||||||
Reference in New Issue
Block a user