fix : new ui changes
This commit is contained in:
@@ -472,7 +472,7 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
|
|||||||
required String token,
|
required String token,
|
||||||
required String key,
|
required String key,
|
||||||
}) async {
|
}) async {
|
||||||
var res = await _httpClient.delete(
|
var res = await _httpClient.delete<SegmentationModel?>(
|
||||||
'/app-segmentation/0/',
|
'/app-segmentation/0/',
|
||||||
queryParameters: {'key': key},
|
queryParameters: {'key': key},
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ abstract class SegmentationModel with _$SegmentationModel {
|
|||||||
String? key,
|
String? key,
|
||||||
String? productKey,
|
String? productKey,
|
||||||
String? guildKey,
|
String? guildKey,
|
||||||
|
String? result,
|
||||||
int? weight,
|
int? weight,
|
||||||
Buyer? buyer,
|
Buyer? buyer,
|
||||||
DateTime? date,
|
DateTime? date,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SegmentationModel {
|
mixin _$SegmentationModel {
|
||||||
|
|
||||||
String? get key; String? get productKey; String? get guildKey; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild;
|
String? get key; String? get productKey; String? get guildKey; String? get result; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild;
|
||||||
/// Create a copy of SegmentationModel
|
/// Create a copy of SegmentationModel
|
||||||
/// 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)
|
||||||
@@ -29,16 +29,16 @@ $SegmentationModelCopyWith<SegmentationModel> get copyWith => _$SegmentationMode
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,weight,buyer,date,toGuild);
|
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,weight,buyer,date,toGuild);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)';
|
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ abstract mixin class $SegmentationModelCopyWith<$Res> {
|
|||||||
factory $SegmentationModelCopyWith(SegmentationModel value, $Res Function(SegmentationModel) _then) = _$SegmentationModelCopyWithImpl;
|
factory $SegmentationModelCopyWith(SegmentationModel value, $Res Function(SegmentationModel) _then) = _$SegmentationModelCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String? key, String? productKey, String? guildKey, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild
|
String? key, String? productKey, String? guildKey, String? result, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -66,11 +66,12 @@ class _$SegmentationModelCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SegmentationModel
|
/// Create a copy of SegmentationModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,guildKey: freezed == guildKey ? _self.guildKey : guildKey // ignore: cast_nullable_to_non_nullable
|
as String?,guildKey: freezed == guildKey ? _self.guildKey : guildKey // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,result: freezed == result ? _self.result : result // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nullable_to_non_nullable
|
as String?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable
|
as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable
|
||||||
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -110,12 +111,13 @@ $ToGuildCopyWith<$Res>? get toGuild {
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SegmentationModel implements SegmentationModel {
|
class _SegmentationModel implements SegmentationModel {
|
||||||
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.weight, this.buyer, this.date, this.toGuild});
|
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.weight, this.buyer, this.date, this.toGuild});
|
||||||
factory _SegmentationModel.fromJson(Map<String, dynamic> json) => _$SegmentationModelFromJson(json);
|
factory _SegmentationModel.fromJson(Map<String, dynamic> json) => _$SegmentationModelFromJson(json);
|
||||||
|
|
||||||
@override final String? key;
|
@override final String? key;
|
||||||
@override final String? productKey;
|
@override final String? productKey;
|
||||||
@override final String? guildKey;
|
@override final String? guildKey;
|
||||||
|
@override final String? result;
|
||||||
@override final int? weight;
|
@override final int? weight;
|
||||||
@override final Buyer? buyer;
|
@override final Buyer? buyer;
|
||||||
@override final DateTime? date;
|
@override final DateTime? date;
|
||||||
@@ -134,16 +136,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,weight,buyer,date,toGuild);
|
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,weight,buyer,date,toGuild);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)';
|
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -154,7 +156,7 @@ abstract mixin class _$SegmentationModelCopyWith<$Res> implements $SegmentationM
|
|||||||
factory _$SegmentationModelCopyWith(_SegmentationModel value, $Res Function(_SegmentationModel) _then) = __$SegmentationModelCopyWithImpl;
|
factory _$SegmentationModelCopyWith(_SegmentationModel value, $Res Function(_SegmentationModel) _then) = __$SegmentationModelCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String? key, String? productKey, String? guildKey, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild
|
String? key, String? productKey, String? guildKey, String? result, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -171,11 +173,12 @@ class __$SegmentationModelCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SegmentationModel
|
/// Create a copy of SegmentationModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,}) {
|
||||||
return _then(_SegmentationModel(
|
return _then(_SegmentationModel(
|
||||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,guildKey: freezed == guildKey ? _self.guildKey : guildKey // ignore: cast_nullable_to_non_nullable
|
as String?,guildKey: freezed == guildKey ? _self.guildKey : guildKey // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,result: freezed == result ? _self.result : result // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nullable_to_non_nullable
|
as String?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable
|
as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable
|
||||||
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ _SegmentationModel _$SegmentationModelFromJson(Map<String, dynamic> json) =>
|
|||||||
key: json['key'] as String?,
|
key: json['key'] as String?,
|
||||||
productKey: json['product_key'] as String?,
|
productKey: json['product_key'] as String?,
|
||||||
guildKey: json['guild_key'] as String?,
|
guildKey: json['guild_key'] as String?,
|
||||||
|
result: json['result'] as String?,
|
||||||
weight: (json['weight'] as num?)?.toInt(),
|
weight: (json['weight'] as num?)?.toInt(),
|
||||||
buyer: json['buyer'] == null
|
buyer: json['buyer'] == null
|
||||||
? null
|
? null
|
||||||
@@ -28,6 +29,7 @@ Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
|
|||||||
'key': instance.key,
|
'key': instance.key,
|
||||||
'product_key': instance.productKey,
|
'product_key': instance.productKey,
|
||||||
'guild_key': instance.guildKey,
|
'guild_key': instance.guildKey,
|
||||||
|
'result': instance.result,
|
||||||
'weight': instance.weight,
|
'weight': instance.weight,
|
||||||
'buyer': instance.buyer,
|
'buyer': instance.buyer,
|
||||||
'date': instance.date?.toIso8601String(),
|
'date': instance.date?.toIso8601String(),
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
spacing: 3,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@@ -98,7 +99,11 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(height: 2),
|
Text(
|
||||||
|
item.steward?.guildsName ?? 'N/A',
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -186,7 +191,7 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'نام و نام خانوادگی فروشنده',
|
title: 'مشخصات فروشنده',
|
||||||
value: item.steward?.user?.fullname ?? 'N/A',
|
value: item.steward?.user?.fullname ?? 'N/A',
|
||||||
),
|
),
|
||||||
buildRow(
|
buildRow(
|
||||||
@@ -194,7 +199,10 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
|||||||
value: item.steward?.user?.mobile ?? 'N/A',
|
value: item.steward?.user?.mobile ?? 'N/A',
|
||||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
|
buildRow(
|
||||||
|
title: 'نوع تخصیص',
|
||||||
|
value: item.allocationType?.faAllocationType ?? 'N/A',
|
||||||
|
),
|
||||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'وزن خریداری شده',
|
title: 'وزن خریداری شده',
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
@@ -75,7 +76,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
spacing: 3,
|
spacing: 3,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.toSteward?.user?.fullname ?? 'N/A',
|
item.steward?.user?.fullname ?? 'N/A',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
@@ -90,6 +91,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
spacing: 3,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@@ -114,7 +116,11 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(height: 2),
|
Text(
|
||||||
|
item.steward?.guildsName ?? 'N/A',
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -197,7 +203,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'نام و نام خانوادگی فروشنده',
|
title: 'مشخصات فروشنده',
|
||||||
value: item.steward?.user?.fullname ?? 'N/A',
|
value: item.steward?.user?.fullname ?? 'N/A',
|
||||||
),
|
),
|
||||||
buildRow(
|
buildRow(
|
||||||
@@ -205,7 +211,10 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
value: item.steward?.user?.mobile ?? 'N/A',
|
value: item.steward?.user?.mobile ?? 'N/A',
|
||||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
|
buildRow(
|
||||||
|
title: 'نوع تخصیص',
|
||||||
|
value: item.allocationType?.faAllocationType ?? 'N/A',
|
||||||
|
),
|
||||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'وزن خریداری شده',
|
title: 'وزن خریداری شده',
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
spacing: 4,
|
spacing: 4,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.steward?.user?.fullname ?? 'N/A',
|
controller.getBuyerInformation(item)?.user?.fullname ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
@@ -219,8 +219,10 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
item.steward?.user?.fullname ?? 'N/A',
|
controller.getBuyerInformation(item)?.user?.fullname ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||||
),
|
),
|
||||||
@@ -284,18 +286,22 @@ 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',
|
||||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
buildRow(title: 'نوع فروش', value: item.sellType?.faItem ?? 'N/A'),
|
buildRow(title: 'نوع فروش', value: item.sellType?.faItem ?? 'N/A'),
|
||||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||||
|
buildRow(
|
||||||
|
title: 'نوع تخصیص',
|
||||||
|
value: item.allocationType?.faAllocationType ?? 'N/A',
|
||||||
|
),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'وزن خریداری شده',
|
title: 'وزن خریداری شده',
|
||||||
value: '${item.weightOfCarcasses?.separatedByComma} کیلوگرم',
|
value: '${item.weightOfCarcasses?.separatedByComma} کیلوگرم',
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ class SalesOutOfProvinceLogic extends GetxController {
|
|||||||
(callback) => getOutProvinceSales(),
|
(callback) => getOutProvinceSales(),
|
||||||
time: Duration(milliseconds: timeDebounce),
|
time: Duration(milliseconds: timeDebounce),
|
||||||
);
|
);
|
||||||
|
setupListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setSearchValue(String? value) {
|
void setSearchValue(String? value) {
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'${item.province}-${item.city}',
|
'${item.province} - ${item.city}',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ class SegmentationLogic extends GetxController {
|
|||||||
|
|
||||||
Future<void> deleteSegmentation(String key) async {
|
Future<void> deleteSegmentation(String key) async {
|
||||||
await safeCall(
|
await safeCall(
|
||||||
showError: true,
|
showError: false,
|
||||||
call: () => rootLogic.chickenRepository.deleteSegmentation(
|
call: () => rootLogic.chickenRepository.deleteSegmentation(
|
||||||
token: rootLogic.tokenService.accessToken.value!,
|
token: rootLogic.tokenService.accessToken.value!,
|
||||||
key: key,
|
key: key,
|
||||||
|
|||||||
@@ -128,6 +128,12 @@ class DioRemote implements IHttpClient {
|
|||||||
options: Options(headers: headers),
|
options: Options(headers: headers),
|
||||||
cancelToken: ApiHandler.globalCancelToken,
|
cancelToken: ApiHandler.globalCancelToken,
|
||||||
);
|
);
|
||||||
|
if (fromJson != null) {
|
||||||
|
final rawData = response.data;
|
||||||
|
final parsedData = rawData is Map<String, dynamic> ? fromJson(rawData) : null;
|
||||||
|
response.data = parsedData;
|
||||||
|
return DioResponse<T>(response);
|
||||||
|
}
|
||||||
return DioResponse<T>(response);
|
return DioResponse<T>(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ Future<T?> gSafeCall<T>({
|
|||||||
} catch (error, stackTrace) {
|
} catch (error, stackTrace) {
|
||||||
retryCount++;
|
retryCount++;
|
||||||
|
|
||||||
|
eLog('Error in gSafeCall: $error, retryCount: $retryCount , stackTrace : $stackTrace ');
|
||||||
|
|
||||||
if (error is DioException && error.response?.statusCode == 401) {
|
if (error is DioException && error.response?.statusCode == 401) {
|
||||||
if (showError) {
|
if (showError) {
|
||||||
@@ -79,7 +80,7 @@ Future<T?> gSafeCall<T>({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// صبر قبل از retry
|
|
||||||
if (retryCount <= maxRetries) {
|
if (retryCount <= maxRetries) {
|
||||||
await Future.delayed(retryDelay);
|
await Future.delayed(retryDelay);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user