refactor : steward pages
This commit is contained in:
@@ -44,7 +44,7 @@ abstract class AllocatedMadeModel with _$AllocatedMadeModel {
|
||||
int? totalAmount,
|
||||
int? totalAmountPaid,
|
||||
int? totalAmountRemain,
|
||||
String? loggedRegistrationCode,
|
||||
int? loggedRegistrationCode,
|
||||
String? state,
|
||||
String? receiverState,
|
||||
String? allocationState,
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(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; 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
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -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, 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?,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 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?,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
|
||||
@@ -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) {
|
||||
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 _:
|
||||
@@ -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) {
|
||||
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 _:
|
||||
@@ -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) {
|
||||
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 _:
|
||||
@@ -340,7 +340,7 @@ class _AllocatedMadeModel implements AllocatedMadeModel {
|
||||
@override final int? totalAmount;
|
||||
@override final int? totalAmountPaid;
|
||||
@override final int? totalAmountRemain;
|
||||
@override final String? loggedRegistrationCode;
|
||||
@override final int? loggedRegistrationCode;
|
||||
@override final String? state;
|
||||
@override final String? receiverState;
|
||||
@override final String? allocationState;
|
||||
@@ -391,7 +391,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, 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?,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 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?,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
|
||||
|
||||
@@ -55,7 +55,7 @@ _AllocatedMadeModel _$AllocatedMadeModelFromJson(
|
||||
totalAmount: (json['total_amount'] as num?)?.toInt(),
|
||||
totalAmountPaid: (json['total_amount_paid'] 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?,
|
||||
receiverState: json['receiver_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();
|
||||
GlobalKey<NavigatorState>? currentNestedKey = Get.nestedKey(nestedKeyId);
|
||||
|
||||
|
||||
@@ -10,71 +10,68 @@ class PoultryScienceRootPage extends GetView<PoultryScienceRootLogic> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvokedWithResult: controller.popBackTaped,
|
||||
child: ChickenBasePage(
|
||||
isFullScreen: true,
|
||||
child: ObxValue((data) {
|
||||
return Stack(
|
||||
children: [
|
||||
IndexedStack(children: controller.pages, index: data.value),
|
||||
Positioned(
|
||||
right: 0,
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
child: RBottomNavigation(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
items: [
|
||||
RBottomNavigationItem(
|
||||
label: 'عملیات',
|
||||
icon: Assets.vec.settingSvg.path,
|
||||
isSelected: controller.currentPage.value == 0,
|
||||
onTap: () {
|
||||
Get.nestedKey(
|
||||
poultrySecondKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
Get.nestedKey(
|
||||
poultryFirstKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
controller.changePage(0);
|
||||
},
|
||||
),
|
||||
RBottomNavigationItem(
|
||||
label: 'خانه',
|
||||
icon: Assets.vec.homeSvg.path,
|
||||
isSelected: controller.currentPage.value == 1,
|
||||
onTap: () {
|
||||
Get.nestedKey(
|
||||
poultryFirstKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
Get.nestedKey(
|
||||
poultryThirdKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
controller.changePage(1);
|
||||
},
|
||||
),
|
||||
RBottomNavigationItem(
|
||||
label: 'پروفایل',
|
||||
icon: Assets.vec.profileCircleSvg.path,
|
||||
isSelected: controller.currentPage.value == 2,
|
||||
onTap: () {
|
||||
Get.nestedKey(
|
||||
poultryFirstKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
Get.nestedKey(
|
||||
poultrySecondKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
controller.changePage(2);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
return ChickenBasePage(
|
||||
isFullScreen: true,
|
||||
onPopScopTaped: controller.popBackTaped,
|
||||
child: ObxValue((data) {
|
||||
return Stack(
|
||||
children: [
|
||||
IndexedStack(children: controller.pages, index: data.value),
|
||||
Positioned(
|
||||
right: 0,
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
child: RBottomNavigation(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
items: [
|
||||
RBottomNavigationItem(
|
||||
label: 'عملیات',
|
||||
icon: Assets.vec.settingSvg.path,
|
||||
isSelected: controller.currentPage.value == 0,
|
||||
onTap: () {
|
||||
Get.nestedKey(
|
||||
poultrySecondKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
Get.nestedKey(
|
||||
poultryFirstKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
controller.changePage(0);
|
||||
},
|
||||
),
|
||||
RBottomNavigationItem(
|
||||
label: 'خانه',
|
||||
icon: Assets.vec.homeSvg.path,
|
||||
isSelected: controller.currentPage.value == 1,
|
||||
onTap: () {
|
||||
Get.nestedKey(
|
||||
poultryFirstKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
Get.nestedKey(
|
||||
poultryThirdKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
controller.changePage(1);
|
||||
},
|
||||
),
|
||||
RBottomNavigationItem(
|
||||
label: 'پروفایل',
|
||||
icon: Assets.vec.profileCircleSvg.path,
|
||||
isSelected: controller.currentPage.value == 2,
|
||||
onTap: () {
|
||||
Get.nestedKey(
|
||||
poultryFirstKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
Get.nestedKey(
|
||||
poultrySecondKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
controller.changePage(2);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}, controller.currentPage),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}, controller.currentPage),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.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/sale_buy_card_item.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
@@ -27,7 +28,7 @@ class BuyPage extends GetView<BuyLogic> {
|
||||
iconPath: Assets.vec.cubeSvg.path,
|
||||
color: AppColor.greenNormalActive,
|
||||
onTap: () {
|
||||
Get.toNamed(ChickenRoutes.buysInProvinceSteward, id: 0);
|
||||
Get.toNamed(ChickenRoutes.buysInProvinceSteward, id: stewardFirstKey);
|
||||
},
|
||||
),
|
||||
saleOrBuyItemCard(
|
||||
@@ -35,7 +36,7 @@ class BuyPage extends GetView<BuyLogic> {
|
||||
iconPath: Assets.vec.truckFastSvg.path,
|
||||
color: AppColor.greenNormalActive,
|
||||
onTap: () {
|
||||
Get.toNamed(ChickenRoutes.buysOutOfProvinceSteward, id: 0);
|
||||
Get.toNamed(ChickenRoutes.buysOutOfProvinceSteward, id: stewardFirstKey);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
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_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/steward/inventory_widget.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/page_route.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
@@ -15,10 +15,13 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
||||
Widget build(BuildContext context) {
|
||||
return ChickenBasePage(
|
||||
routes: controller.routesName,
|
||||
//todo
|
||||
backId:0,
|
||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||
filteringWidget: filterBottomSheet(),
|
||||
hasBack: true,
|
||||
backId: stewardFirstKey,
|
||||
|
||||
onFilterTap: () {
|
||||
Get.bottomSheet(filterBottomSheet());
|
||||
},
|
||||
widgets: [
|
||||
inventoryWidget(controller.rootLogic),
|
||||
segmentWidget(),
|
||||
|
||||
@@ -13,6 +13,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
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/roles_products/roles_products.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/steward/inventory_widget.dart';
|
||||
|
||||
|
||||
import 'package:rasadyar_core/core.dart' hide Image;
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -21,10 +20,11 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
||||
Widget build(BuildContext context) {
|
||||
return ChickenBasePage(
|
||||
routes: controller.routesName,
|
||||
backId: 0,
|
||||
|
||||
backId: stewardFirstKey,
|
||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||
filteringWidget: filterBottomSheet(),
|
||||
onFilterTap: () {
|
||||
Get.bottomSheet(filterBottomSheet());
|
||||
},
|
||||
widgets: [
|
||||
inventoryWidget(controller.rootLogic),
|
||||
Expanded(
|
||||
@@ -67,8 +67,7 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
||||
ignoreSafeArea: false,
|
||||
).whenComplete(() {
|
||||
controller.resetSubmitForm();
|
||||
|
||||
},);
|
||||
});
|
||||
},
|
||||
),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
||||
@@ -198,7 +197,6 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
||||
addPurchasedInformationBottomSheet(true),
|
||||
isScrollControlled: true,
|
||||
).whenComplete(() {
|
||||
|
||||
controller.resetSubmitForm();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart' hide LinearGradient;
|
||||
import 'package:flutter/material.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/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_core/core.dart';
|
||||
|
||||
@@ -13,153 +13,141 @@ class HomePage extends GetView<HomeLogic> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.bgLight,
|
||||
appBar: chickenAppBar(hasBack: false, hasFilter: false, hasSearch: false),
|
||||
body: SingleChildScrollView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
child: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.isExpanded.value = !controller.isExpanded.value;
|
||||
},
|
||||
child: Card(
|
||||
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),
|
||||
),
|
||||
return ChickenBasePage(
|
||||
scrollable: true,
|
||||
isBase: true,
|
||||
widgets: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.isExpanded.value = !controller.isExpanded.value;
|
||||
},
|
||||
child: Card(
|
||||
margin: EdgeInsetsGeometry.all(6),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
side: BorderSide(width: 0.50, color: const Color(0xFFA9A9A9)),
|
||||
),
|
||||
|
||||
WidelyUsedWidget(),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
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(),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/local/chicken_local.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 }
|
||||
|
||||
class StewardRootLogic extends GetxController {
|
||||
DateTime? _lastBackPressed;
|
||||
RxInt currentPage = 2.obs;
|
||||
List<Widget> pages = [BuyPage(), SalePage(), HomePage(), SegmentationPage(), ProfilePage()];
|
||||
|
||||
@@ -154,4 +156,27 @@ class StewardRootLogic extends GetxController {
|
||||
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/services.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/presentation/pages/steward/root/logic.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;
|
||||
|
||||
class StewardRootPage extends GetView<StewardRootLogic> {
|
||||
StewardRootPage({super.key});
|
||||
|
||||
DateTime? _lastBackPressed;
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ObxValue((data) {
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvokedWithResult: (didPop, result) async {
|
||||
final nestedKey = Get.nestedKey(controller.currentPage.value);
|
||||
final currentNavigator = nestedKey?.currentState;
|
||||
return ChickenBasePage(
|
||||
isFullScreen: true,
|
||||
isBase: true,
|
||||
onPopScopTaped: controller.onPopScopTaped,
|
||||
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) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
},
|
||||
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);
|
||||
},
|
||||
),
|
||||
Navigator(
|
||||
key: Get.nestedKey(stewardSecondKey),
|
||||
onGenerateRoute: (settings) {
|
||||
final page = ChickenPages.pages.firstWhere(
|
||||
(e) => e.name == settings.name,
|
||||
orElse: () =>
|
||||
ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.saleSteward),
|
||||
);
|
||||
|
||||
return buildRouteFromGetPage(page);
|
||||
},
|
||||
),
|
||||
Navigator(
|
||||
key: Get.nestedKey(stewardSecondKey),
|
||||
onGenerateRoute: (settings) {
|
||||
final page = ChickenPages.pages.firstWhere(
|
||||
(e) => e.name == settings.name,
|
||||
orElse: () =>
|
||||
ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.saleSteward),
|
||||
);
|
||||
return buildRouteFromGetPage(page);
|
||||
},
|
||||
),
|
||||
Navigator(
|
||||
key: Get.nestedKey(stewardThirdKey),
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[2]),
|
||||
),
|
||||
Navigator(
|
||||
key: Get.nestedKey(stewardFourthKey),
|
||||
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);
|
||||
},
|
||||
),
|
||||
Navigator(
|
||||
key: Get.nestedKey(stewardThirdKey),
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[2]),
|
||||
),
|
||||
Navigator(
|
||||
key: Get.nestedKey(stewardFourthKey),
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[3]),
|
||||
),
|
||||
Navigator(
|
||||
key: Get.nestedKey(stewardFifthKey),
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[4]),
|
||||
),
|
||||
],
|
||||
index: data.value,
|
||||
),
|
||||
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);
|
||||
|
||||
bottomNavigationBar: RBottomNavigation(
|
||||
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);
|
||||
},
|
||||
controller.changePage(4);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
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);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.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/presentation/utils/nested_keys_utils.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_core/core.dart';
|
||||
@@ -27,14 +28,14 @@ class SalePage extends GetView<SaleLogic> {
|
||||
title: 'فروش داخل استان',
|
||||
iconPath: Assets.vec.cubeSvg.path,
|
||||
onTap: () {
|
||||
Get.toNamed(ChickenRoutes.salesInProvinceSteward, id: 1);
|
||||
Get.toNamed(ChickenRoutes.salesInProvinceSteward, id: stewardSecondKey);
|
||||
},
|
||||
),
|
||||
saleOrBuyItemCard(
|
||||
title: 'فروش خارج استان',
|
||||
iconPath: Assets.vec.truckFastSvg.path,
|
||||
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/guild/guild_model.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/widget/base_page/view.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 'logic.dart';
|
||||
@@ -17,119 +16,134 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: ChickenBasePage(
|
||||
return ChickenBasePage(
|
||||
routes: controller.routesName,
|
||||
backId: stewardSecondKey,
|
||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||
|
||||
routes: controller.routesName,
|
||||
backId:1,
|
||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||
filteringWidget: filterBottomSheet(),
|
||||
widgets: [
|
||||
inventoryWidget(controller.rootLogic),
|
||||
Expanded(
|
||||
child: ObxValue((data) {
|
||||
return RPaginatedListView(
|
||||
listType: ListType.separated,
|
||||
resource: data.value,
|
||||
hasMore: data.value.data?.next != null,
|
||||
isPaginating: controller.isLoadingMoreAllocationsMade.value,
|
||||
onRefresh: () async {
|
||||
controller.currentPage.value = 1;
|
||||
await controller.getAllocatedMade();
|
||||
},
|
||||
onLoadMore: () async {
|
||||
controller.currentPage.value++;
|
||||
iLog(controller.currentPage.value);
|
||||
await controller.getAllocatedMade(true);
|
||||
},
|
||||
padding: EdgeInsets.fromLTRB(8, 8, 8, 80),
|
||||
itemBuilder: (context, index) {
|
||||
var item = data.value.data!.results![index];
|
||||
return ObxValue((val) {
|
||||
return ExpandableListItem2(
|
||||
selected: val.contains(index),
|
||||
onTap: () => controller.isExpandedList.toggle(index),
|
||||
index: index,
|
||||
child: itemListWidget(item),
|
||||
secondChild: itemListExpandedWidget(item, index),
|
||||
labelColor: AppColor.blueLight,
|
||||
labelIcon: Assets.vec.timerSvg.path,
|
||||
labelIconColor: item.registrationCode == null
|
||||
? AppColor.darkGreyDark
|
||||
: AppColor.error,
|
||||
onFilterTap: () {
|
||||
Get.bottomSheet(filterBottomSheet());
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: Column(
|
||||
children: [
|
||||
inventoryWidget(controller.rootLogic),
|
||||
Expanded(
|
||||
child: ObxValue((data) {
|
||||
return RPaginatedListView(
|
||||
listType: ListType.separated,
|
||||
resource: data.value,
|
||||
hasMore: data.value.data?.next != null,
|
||||
isPaginating: controller.isLoadingMoreAllocationsMade.value,
|
||||
onRefresh: () async {
|
||||
controller.currentPage.value = 1;
|
||||
await controller.getAllocatedMade();
|
||||
},
|
||||
onLoadMore: () async {
|
||||
controller.currentPage.value++;
|
||||
iLog(controller.currentPage.value);
|
||||
await controller.getAllocatedMade(true);
|
||||
},
|
||||
padding: EdgeInsets.fromLTRB(8, 8, 8, 80),
|
||||
itemBuilder: (context, index) {
|
||||
var item = data.value.data!.results![index];
|
||||
return ObxValue((val) {
|
||||
return ExpandableListItem2(
|
||||
selected: val.contains(index),
|
||||
onTap: () => controller.isExpandedList.toggle(index),
|
||||
index: index,
|
||||
child: itemListWidget(item),
|
||||
secondChild: itemListExpandedWidget(item, index),
|
||||
labelColor: AppColor.blueLight,
|
||||
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);
|
||||
},
|
||||
itemCount: data.value.data?.results?.length ?? 0,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||
);
|
||||
}, controller.allocatedList),
|
||||
}, 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(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
|
||||
Text(
|
||||
controller.getBuyerInformation(item)?.user?.fullname ?? 'N/A',
|
||||
textAlign: TextAlign.center,
|
||||
@@ -286,11 +298,10 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
||||
),
|
||||
),
|
||||
|
||||
/* buildRow(
|
||||
/* buildRow(
|
||||
title: 'مشخصات خریدار',
|
||||
value: controller.getBuyerInformation(item)?.user?.fullname ?? 'N/A',
|
||||
),*/
|
||||
|
||||
buildRow(
|
||||
title: 'تلفن خریدار',
|
||||
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.product?.name ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'نوع تخصیص',
|
||||
value: item.allocationType?.faAllocationType ?? 'N/A',
|
||||
),
|
||||
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'وزن خریداری شده',
|
||||
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/steward_free_sale_bar/steward_free_sale_bar.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/filter_bottom_sheet.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
||||
@@ -21,9 +22,11 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
||||
Widget build(BuildContext context) {
|
||||
return ChickenBasePage(
|
||||
routes: controller.routesName,
|
||||
backId: 1,
|
||||
backId: stewardSecondKey,
|
||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||
filteringWidget: filterBottomSheet(),
|
||||
onFilterTap: () {
|
||||
Get.bottomSheet(filterBottomSheet());
|
||||
},
|
||||
widgets: [
|
||||
inventoryWidget(controller.rootLogic),
|
||||
Expanded(
|
||||
|
||||
@@ -17,7 +17,9 @@ class SegmentationPage extends GetView<SegmentationLogic> {
|
||||
return ChickenBasePage(
|
||||
routes: controller.routesName,
|
||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||
filteringWidget: filterBottomSheet(),
|
||||
onFilterTap: () {
|
||||
Get.bottomSheet(filterBottomSheet());
|
||||
},
|
||||
hasBack: false,
|
||||
widgets: [
|
||||
Expanded(
|
||||
|
||||
@@ -8,7 +8,6 @@ class BaseLogic extends GetxController {
|
||||
final TextEditingController textEditingController = TextEditingController();
|
||||
|
||||
void setSearchCallback(void Function(String?)? onSearchChanged) {
|
||||
fLog("sssssssssssssssssssssssssssssssss");
|
||||
debounce<String?>(searchValue, (val) {
|
||||
if (val != null && val.trim().isNotEmpty) {
|
||||
onSearchChanged?.call(val);
|
||||
|
||||
Reference in New Issue
Block a user