refactor: update data source and repository structure by removing unused files, enhancing model integration, and adjusting import paths for better organization
This commit is contained in:
@@ -26,10 +26,10 @@ import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_ar
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
abstract class ChickenRemoteDatasource {
|
||||
Future<List<ProductModel>?> getRolesProduct({
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
required String role,
|
||||
CancelToken? cancelToken,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
required String token,
|
||||
@@ -75,11 +75,6 @@ abstract class ChickenRemoteDatasource {
|
||||
required List<String> allocationTokens,
|
||||
});
|
||||
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<GuildModel>?> getGuilds({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
|
||||
@@ -32,24 +32,6 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
|
||||
|
||||
ChickenRemoteDatasourceImp(this._httpClient);
|
||||
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProduct({
|
||||
required String token,
|
||||
required String role,
|
||||
CancelToken? cancelToken,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/roles-products/?role=$role',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: {'role': role},
|
||||
fromJsonList: (json) => (json)
|
||||
.map((item) => ProductModel.fromJson(item as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
required String token,
|
||||
@@ -178,11 +160,13 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/roles-products/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
cancelToken: cancelToken,
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) => json
|
||||
.map((item) => ProductModel.fromJson(item as Map<String, dynamic>))
|
||||
|
||||
@@ -2,14 +2,11 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
abstract class KillHouseRemoteDataSource {
|
||||
|
||||
|
||||
|
||||
|
||||
//region requestKill
|
||||
Future<List<KillHouseResponse>?> getKillHouseList({
|
||||
required String token,
|
||||
@@ -45,9 +42,10 @@ abstract class KillHouseRemoteDataSource {
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
||||
@@ -109,5 +110,24 @@ class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/bars_for_kill_house/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
|
||||
fromJson: (json) => PaginationModel<KillHouseBarsResponse>.fromJson(
|
||||
json,
|
||||
(json) => KillHouseBarsResponse.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -100,7 +100,6 @@ Future<void> setupChickenDI() async {
|
||||
diChicken.registerLazySingleton<KillHouseRepository>(
|
||||
() => KillHouseRepositoryImpl(
|
||||
diChicken.get<KillHouseRemoteDataSource>(),
|
||||
diChicken.get<ChickenRepository>(),
|
||||
),
|
||||
);
|
||||
//endregion
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_house_bars_response.freezed.dart';
|
||||
part 'kill_house_bars_response.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseBarsResponse with _$KillHouseBarsResponse {
|
||||
const factory KillHouseBarsResponse({
|
||||
KillHouseUserModel? killhouseUser,
|
||||
KillHouseUserModel? killer,
|
||||
AddCarModel? addCar,
|
||||
PoultryRequestModel? poultryRequest,
|
||||
WeightInfoModel? weightInfo,
|
||||
String? key,
|
||||
String? createDate,
|
||||
bool? trash,
|
||||
int? quantity,
|
||||
int? barCode,
|
||||
int? quarantineQuantity,
|
||||
String? quarantineCodeState,
|
||||
double? fee,
|
||||
String? time,
|
||||
String? state,
|
||||
String? vetState,
|
||||
String? activeState,
|
||||
String? assignmentStateArchive,
|
||||
String? showKillHouse,
|
||||
CarModel? car,
|
||||
String? killHouseMessage,
|
||||
String? allocationState,
|
||||
bool? auction,
|
||||
String? role,
|
||||
String? clearanceCode,
|
||||
String? trafficCode,
|
||||
RegistrarClearanceCode? registrarClearanceCode,
|
||||
String? editorTrafficCode,
|
||||
String? barRemover,
|
||||
int? extraKilledQuantity,
|
||||
int? acceptedRealQuantity,
|
||||
double? acceptedRealWeight,
|
||||
double? extraKilledWeight,
|
||||
int? vetAcceptedRealQuantity,
|
||||
double? vetAcceptedRealWeight,
|
||||
int? acceptedAssignmentRealQuantity,
|
||||
double? acceptedAssignmentRealWeight,
|
||||
String? message,
|
||||
bool? wareHouseConfirmation,
|
||||
int? wareHouseAcceptedRealQuantity,
|
||||
double? wareHouseAcceptedRealWeight,
|
||||
String? dateOfWareHouse,
|
||||
bool? freezing,
|
||||
bool? archiveWage,
|
||||
double? weightLoss,
|
||||
String? wareHouseInputType,
|
||||
String? documentStatus,
|
||||
String? aggregateCode,
|
||||
bool? aggregateStatus,
|
||||
bool? calculateStatus,
|
||||
bool? temporaryTrash,
|
||||
bool? temporaryDeleted,
|
||||
String? enteredMessage,
|
||||
String? inquiryDate,
|
||||
String? inquiryOrigin,
|
||||
String? inquiryDestination,
|
||||
String? inquiryDriver,
|
||||
String? inquiryPelak,
|
||||
String? settlementType,
|
||||
double? price,
|
||||
String? description,
|
||||
String? barDocumentDescription,
|
||||
String? image,
|
||||
String? priceRegisterar,
|
||||
String? priceRegisterarRole,
|
||||
String? priceRegisterDate,
|
||||
String? priceEditor,
|
||||
String? priceEditorRole,
|
||||
String? priceEditorDate,
|
||||
bool? nonReceipt,
|
||||
bool? nonReceiptReturn,
|
||||
String? nonReceiptReturnMessage,
|
||||
String? nonReceiptMessage,
|
||||
bool? mainNonReceipt,
|
||||
String? nonReceiptState,
|
||||
String? nonReceiptChecker,
|
||||
String? nonReceiptCheckerMessage,
|
||||
String? nonReceiptCheckerMobile,
|
||||
String? nonReceiptCheckDate,
|
||||
String? nonReceiptReturner,
|
||||
String? nonReceiptReturnerMobile,
|
||||
String? nonReceiptReturnDate,
|
||||
bool? fine,
|
||||
double? fineAmount,
|
||||
double? fineCoefficient,
|
||||
String? documentNumber,
|
||||
bool? companyDocument,
|
||||
bool? warehouse,
|
||||
double? warehouseCommitmentWeight,
|
||||
bool? returnTrash,
|
||||
double? amount,
|
||||
int? killRequest,
|
||||
String? realAddCar,
|
||||
String? barDocumentStatus,
|
||||
int? inputWarehouse,
|
||||
}) = _KillHouseBars;
|
||||
|
||||
factory KillHouseBarsResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseBarsFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseUserModel with _$KillHouseUserModel {
|
||||
const factory KillHouseUserModel({
|
||||
KillHouseOperatorModel? killHouseOperator,
|
||||
String? name,
|
||||
bool? killer,
|
||||
String? key,
|
||||
double? maximumLoadVolumeIncrease,
|
||||
double? maximumLoadVolumeReduction,
|
||||
}) = _KillHouseUserModel;
|
||||
|
||||
factory KillHouseUserModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseUserModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseOperatorModel with _$KillHouseOperatorModel {
|
||||
const factory KillHouseOperatorModel({UserDetailModel? user}) =
|
||||
_KillHouseOperatorModel;
|
||||
|
||||
factory KillHouseOperatorModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseOperatorModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserDetailModel with _$UserDetailModel {
|
||||
const factory UserDetailModel({
|
||||
String? fullname,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
int? baseOrder,
|
||||
String? mobile,
|
||||
String? nationalId,
|
||||
String? nationalCode,
|
||||
String? key,
|
||||
CityDetailModel? city,
|
||||
String? unitName,
|
||||
String? unitNationalId,
|
||||
String? unitRegistrationNumber,
|
||||
String? unitEconomicalNumber,
|
||||
String? unitProvince,
|
||||
String? unitCity,
|
||||
String? unitPostalCode,
|
||||
String? unitAddress,
|
||||
}) = _UserDetailModel;
|
||||
|
||||
factory UserDetailModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserDetailModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class CityDetailModel with _$CityDetailModel {
|
||||
const factory CityDetailModel({
|
||||
int? id,
|
||||
String? key,
|
||||
String? createDate,
|
||||
String? modifyDate,
|
||||
bool? trash,
|
||||
int? provinceIdForeignKey,
|
||||
int? cityIdKey,
|
||||
String? name,
|
||||
double? productPrice,
|
||||
bool? provinceCenter,
|
||||
int? cityNumber,
|
||||
String? cityName,
|
||||
int? provinceNumber,
|
||||
String? provinceName,
|
||||
String? createdBy,
|
||||
String? modifiedBy,
|
||||
int? province,
|
||||
}) = _CityDetailModel;
|
||||
|
||||
factory CityDetailModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CityDetailModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class AddCarModel with _$AddCarModel {
|
||||
const factory AddCarModel({DriverModel? driver}) = _AddCarModel;
|
||||
|
||||
factory AddCarModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AddCarModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class DriverModel with _$DriverModel {
|
||||
const factory DriverModel({
|
||||
String? driverName,
|
||||
String? driverMobile,
|
||||
String? typeCar,
|
||||
String? pelak,
|
||||
String? healthCode,
|
||||
}) = _DriverModel;
|
||||
|
||||
factory DriverModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$DriverModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class PoultryRequestModel with _$PoultryRequestModel {
|
||||
const factory PoultryRequestModel({
|
||||
int? poultryReqOrderCode,
|
||||
String? poultryName,
|
||||
String? poultryUserName,
|
||||
String? poultryMobile,
|
||||
String? poultryCity,
|
||||
String? chickenBreed,
|
||||
String? date,
|
||||
bool? freezing,
|
||||
bool? export,
|
||||
bool? freeSaleInProvince,
|
||||
bool? directBuying,
|
||||
}) = _PoultryRequestModel;
|
||||
|
||||
factory PoultryRequestModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryRequestModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class WeightInfoModel with _$WeightInfoModel {
|
||||
const factory WeightInfoModel({
|
||||
double? indexWeight,
|
||||
double? weight,
|
||||
double? finalIndexWeight,
|
||||
double? killHousePrice,
|
||||
int? weightLoss,
|
||||
double? inputLoss,
|
||||
String? state,
|
||||
}) = _WeightInfoModel;
|
||||
|
||||
factory WeightInfoModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$WeightInfoModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class CarModel with _$CarModel {
|
||||
const factory CarModel({
|
||||
int? id,
|
||||
String? key,
|
||||
String? pelak,
|
||||
//Object? capocity,
|
||||
String? typeCar,
|
||||
String? driverName,
|
||||
String? driverMobile,
|
||||
String? weightWithoutLoad,
|
||||
}) = _CarModel;
|
||||
|
||||
factory CarModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CarModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class RegistrarClearanceCode with _$RegistrarClearanceCode {
|
||||
const factory RegistrarClearanceCode({
|
||||
String? date,
|
||||
String? name,
|
||||
String? role,
|
||||
String? mobile,
|
||||
}) = _RegistrarClearanceCode;
|
||||
|
||||
factory RegistrarClearanceCode.fromJson(Map<String, dynamic> json) =>
|
||||
_$RegistrarClearanceCodeFromJson(json);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,474 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'kill_house_bars_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_KillHouseBars _$KillHouseBarsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillHouseBars(
|
||||
killhouseUser: json['killhouse_user'] == null
|
||||
? null
|
||||
: KillHouseUserModel.fromJson(
|
||||
json['killhouse_user'] as Map<String, dynamic>,
|
||||
),
|
||||
killer: json['killer'] == null
|
||||
? null
|
||||
: KillHouseUserModel.fromJson(json['killer'] as Map<String, dynamic>),
|
||||
addCar: json['add_car'] == null
|
||||
? null
|
||||
: AddCarModel.fromJson(json['add_car'] as Map<String, dynamic>),
|
||||
poultryRequest: json['poultry_request'] == null
|
||||
? null
|
||||
: PoultryRequestModel.fromJson(
|
||||
json['poultry_request'] as Map<String, dynamic>,
|
||||
),
|
||||
weightInfo: json['weight_info'] == null
|
||||
? null
|
||||
: WeightInfoModel.fromJson(json['weight_info'] as Map<String, dynamic>),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
barCode: (json['bar_code'] as num?)?.toInt(),
|
||||
quarantineQuantity: (json['quarantine_quantity'] as num?)?.toInt(),
|
||||
quarantineCodeState: json['quarantine_code_state'] as String?,
|
||||
fee: (json['fee'] as num?)?.toDouble(),
|
||||
time: json['time'] as String?,
|
||||
state: json['state'] as String?,
|
||||
vetState: json['vet_state'] as String?,
|
||||
activeState: json['active_state'] as String?,
|
||||
assignmentStateArchive: json['assignment_state_archive'] as String?,
|
||||
showKillHouse: json['show_kill_house'] as String?,
|
||||
car: json['car'] == null
|
||||
? null
|
||||
: CarModel.fromJson(json['car'] as Map<String, dynamic>),
|
||||
killHouseMessage: json['kill_house_message'] as String?,
|
||||
allocationState: json['allocation_state'] as String?,
|
||||
auction: json['auction'] as bool?,
|
||||
role: json['role'] as String?,
|
||||
clearanceCode: json['clearance_code'] as String?,
|
||||
trafficCode: json['traffic_code'] as String?,
|
||||
registrarClearanceCode: json['registrar_clearance_code'] == null
|
||||
? null
|
||||
: RegistrarClearanceCode.fromJson(
|
||||
json['registrar_clearance_code'] as Map<String, dynamic>,
|
||||
),
|
||||
editorTrafficCode: json['editor_traffic_code'] as String?,
|
||||
barRemover: json['bar_remover'] as String?,
|
||||
extraKilledQuantity: (json['extra_killed_quantity'] as num?)?.toInt(),
|
||||
acceptedRealQuantity: (json['accepted_real_quantity'] as num?)?.toInt(),
|
||||
acceptedRealWeight: (json['accepted_real_weight'] as num?)?.toDouble(),
|
||||
extraKilledWeight: (json['extra_killed_weight'] as num?)?.toDouble(),
|
||||
vetAcceptedRealQuantity: (json['vet_accepted_real_quantity'] as num?)
|
||||
?.toInt(),
|
||||
vetAcceptedRealWeight: (json['vet_accepted_real_weight'] as num?)?.toDouble(),
|
||||
acceptedAssignmentRealQuantity:
|
||||
(json['accepted_assignment_real_quantity'] as num?)?.toInt(),
|
||||
acceptedAssignmentRealWeight:
|
||||
(json['accepted_assignment_real_weight'] as num?)?.toDouble(),
|
||||
message: json['message'] as String?,
|
||||
wareHouseConfirmation: json['ware_house_confirmation'] as bool?,
|
||||
wareHouseAcceptedRealQuantity:
|
||||
(json['ware_house_accepted_real_quantity'] as num?)?.toInt(),
|
||||
wareHouseAcceptedRealWeight: (json['ware_house_accepted_real_weight'] as num?)
|
||||
?.toDouble(),
|
||||
dateOfWareHouse: json['date_of_ware_house'] as String?,
|
||||
freezing: json['freezing'] as bool?,
|
||||
archiveWage: json['archive_wage'] as bool?,
|
||||
weightLoss: (json['weight_loss'] as num?)?.toDouble(),
|
||||
wareHouseInputType: json['ware_house_input_type'] as String?,
|
||||
documentStatus: json['document_status'] as String?,
|
||||
aggregateCode: json['aggregate_code'] as String?,
|
||||
aggregateStatus: json['aggregate_status'] as bool?,
|
||||
calculateStatus: json['calculate_status'] as bool?,
|
||||
temporaryTrash: json['temporary_trash'] as bool?,
|
||||
temporaryDeleted: json['temporary_deleted'] as bool?,
|
||||
enteredMessage: json['entered_message'] as String?,
|
||||
inquiryDate: json['inquiry_date'] as String?,
|
||||
inquiryOrigin: json['inquiry_origin'] as String?,
|
||||
inquiryDestination: json['inquiry_destination'] as String?,
|
||||
inquiryDriver: json['inquiry_driver'] as String?,
|
||||
inquiryPelak: json['inquiry_pelak'] as String?,
|
||||
settlementType: json['settlement_type'] as String?,
|
||||
price: (json['price'] as num?)?.toDouble(),
|
||||
description: json['description'] as String?,
|
||||
barDocumentDescription: json['bar_document_description'] as String?,
|
||||
image: json['image'] as String?,
|
||||
priceRegisterar: json['price_registerar'] as String?,
|
||||
priceRegisterarRole: json['price_registerar_role'] as String?,
|
||||
priceRegisterDate: json['price_register_date'] as String?,
|
||||
priceEditor: json['price_editor'] as String?,
|
||||
priceEditorRole: json['price_editor_role'] as String?,
|
||||
priceEditorDate: json['price_editor_date'] as String?,
|
||||
nonReceipt: json['non_receipt'] as bool?,
|
||||
nonReceiptReturn: json['non_receipt_return'] as bool?,
|
||||
nonReceiptReturnMessage: json['non_receipt_return_message'] as String?,
|
||||
nonReceiptMessage: json['non_receipt_message'] as String?,
|
||||
mainNonReceipt: json['main_non_receipt'] as bool?,
|
||||
nonReceiptState: json['non_receipt_state'] as String?,
|
||||
nonReceiptChecker: json['non_receipt_checker'] as String?,
|
||||
nonReceiptCheckerMessage: json['non_receipt_checker_message'] as String?,
|
||||
nonReceiptCheckerMobile: json['non_receipt_checker_mobile'] as String?,
|
||||
nonReceiptCheckDate: json['non_receipt_check_date'] as String?,
|
||||
nonReceiptReturner: json['non_receipt_returner'] as String?,
|
||||
nonReceiptReturnerMobile: json['non_receipt_returner_mobile'] as String?,
|
||||
nonReceiptReturnDate: json['non_receipt_return_date'] as String?,
|
||||
fine: json['fine'] as bool?,
|
||||
fineAmount: (json['fine_amount'] as num?)?.toDouble(),
|
||||
fineCoefficient: (json['fine_coefficient'] as num?)?.toDouble(),
|
||||
documentNumber: json['document_number'] as String?,
|
||||
companyDocument: json['company_document'] as bool?,
|
||||
warehouse: json['warehouse'] as bool?,
|
||||
warehouseCommitmentWeight: (json['warehouse_commitment_weight'] as num?)
|
||||
?.toDouble(),
|
||||
returnTrash: json['return_trash'] as bool?,
|
||||
amount: (json['amount'] as num?)?.toDouble(),
|
||||
killRequest: (json['kill_request'] as num?)?.toInt(),
|
||||
realAddCar: json['real_add_car'] as String?,
|
||||
barDocumentStatus: json['bar_document_status'] as String?,
|
||||
inputWarehouse: (json['input_warehouse'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseBarsToJson(
|
||||
_KillHouseBars instance,
|
||||
) => <String, dynamic>{
|
||||
'killhouse_user': instance.killhouseUser,
|
||||
'killer': instance.killer,
|
||||
'add_car': instance.addCar,
|
||||
'poultry_request': instance.poultryRequest,
|
||||
'weight_info': instance.weightInfo,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'trash': instance.trash,
|
||||
'quantity': instance.quantity,
|
||||
'bar_code': instance.barCode,
|
||||
'quarantine_quantity': instance.quarantineQuantity,
|
||||
'quarantine_code_state': instance.quarantineCodeState,
|
||||
'fee': instance.fee,
|
||||
'time': instance.time,
|
||||
'state': instance.state,
|
||||
'vet_state': instance.vetState,
|
||||
'active_state': instance.activeState,
|
||||
'assignment_state_archive': instance.assignmentStateArchive,
|
||||
'show_kill_house': instance.showKillHouse,
|
||||
'car': instance.car,
|
||||
'kill_house_message': instance.killHouseMessage,
|
||||
'allocation_state': instance.allocationState,
|
||||
'auction': instance.auction,
|
||||
'role': instance.role,
|
||||
'clearance_code': instance.clearanceCode,
|
||||
'traffic_code': instance.trafficCode,
|
||||
'registrar_clearance_code': instance.registrarClearanceCode,
|
||||
'editor_traffic_code': instance.editorTrafficCode,
|
||||
'bar_remover': instance.barRemover,
|
||||
'extra_killed_quantity': instance.extraKilledQuantity,
|
||||
'accepted_real_quantity': instance.acceptedRealQuantity,
|
||||
'accepted_real_weight': instance.acceptedRealWeight,
|
||||
'extra_killed_weight': instance.extraKilledWeight,
|
||||
'vet_accepted_real_quantity': instance.vetAcceptedRealQuantity,
|
||||
'vet_accepted_real_weight': instance.vetAcceptedRealWeight,
|
||||
'accepted_assignment_real_quantity': instance.acceptedAssignmentRealQuantity,
|
||||
'accepted_assignment_real_weight': instance.acceptedAssignmentRealWeight,
|
||||
'message': instance.message,
|
||||
'ware_house_confirmation': instance.wareHouseConfirmation,
|
||||
'ware_house_accepted_real_quantity': instance.wareHouseAcceptedRealQuantity,
|
||||
'ware_house_accepted_real_weight': instance.wareHouseAcceptedRealWeight,
|
||||
'date_of_ware_house': instance.dateOfWareHouse,
|
||||
'freezing': instance.freezing,
|
||||
'archive_wage': instance.archiveWage,
|
||||
'weight_loss': instance.weightLoss,
|
||||
'ware_house_input_type': instance.wareHouseInputType,
|
||||
'document_status': instance.documentStatus,
|
||||
'aggregate_code': instance.aggregateCode,
|
||||
'aggregate_status': instance.aggregateStatus,
|
||||
'calculate_status': instance.calculateStatus,
|
||||
'temporary_trash': instance.temporaryTrash,
|
||||
'temporary_deleted': instance.temporaryDeleted,
|
||||
'entered_message': instance.enteredMessage,
|
||||
'inquiry_date': instance.inquiryDate,
|
||||
'inquiry_origin': instance.inquiryOrigin,
|
||||
'inquiry_destination': instance.inquiryDestination,
|
||||
'inquiry_driver': instance.inquiryDriver,
|
||||
'inquiry_pelak': instance.inquiryPelak,
|
||||
'settlement_type': instance.settlementType,
|
||||
'price': instance.price,
|
||||
'description': instance.description,
|
||||
'bar_document_description': instance.barDocumentDescription,
|
||||
'image': instance.image,
|
||||
'price_registerar': instance.priceRegisterar,
|
||||
'price_registerar_role': instance.priceRegisterarRole,
|
||||
'price_register_date': instance.priceRegisterDate,
|
||||
'price_editor': instance.priceEditor,
|
||||
'price_editor_role': instance.priceEditorRole,
|
||||
'price_editor_date': instance.priceEditorDate,
|
||||
'non_receipt': instance.nonReceipt,
|
||||
'non_receipt_return': instance.nonReceiptReturn,
|
||||
'non_receipt_return_message': instance.nonReceiptReturnMessage,
|
||||
'non_receipt_message': instance.nonReceiptMessage,
|
||||
'main_non_receipt': instance.mainNonReceipt,
|
||||
'non_receipt_state': instance.nonReceiptState,
|
||||
'non_receipt_checker': instance.nonReceiptChecker,
|
||||
'non_receipt_checker_message': instance.nonReceiptCheckerMessage,
|
||||
'non_receipt_checker_mobile': instance.nonReceiptCheckerMobile,
|
||||
'non_receipt_check_date': instance.nonReceiptCheckDate,
|
||||
'non_receipt_returner': instance.nonReceiptReturner,
|
||||
'non_receipt_returner_mobile': instance.nonReceiptReturnerMobile,
|
||||
'non_receipt_return_date': instance.nonReceiptReturnDate,
|
||||
'fine': instance.fine,
|
||||
'fine_amount': instance.fineAmount,
|
||||
'fine_coefficient': instance.fineCoefficient,
|
||||
'document_number': instance.documentNumber,
|
||||
'company_document': instance.companyDocument,
|
||||
'warehouse': instance.warehouse,
|
||||
'warehouse_commitment_weight': instance.warehouseCommitmentWeight,
|
||||
'return_trash': instance.returnTrash,
|
||||
'amount': instance.amount,
|
||||
'kill_request': instance.killRequest,
|
||||
'real_add_car': instance.realAddCar,
|
||||
'bar_document_status': instance.barDocumentStatus,
|
||||
'input_warehouse': instance.inputWarehouse,
|
||||
};
|
||||
|
||||
_KillHouseUserModel _$KillHouseUserModelFromJson(Map<String, dynamic> json) =>
|
||||
_KillHouseUserModel(
|
||||
killHouseOperator: json['kill_house_operator'] == null
|
||||
? null
|
||||
: KillHouseOperatorModel.fromJson(
|
||||
json['kill_house_operator'] as Map<String, dynamic>,
|
||||
),
|
||||
name: json['name'] as String?,
|
||||
killer: json['killer'] as bool?,
|
||||
key: json['key'] as String?,
|
||||
maximumLoadVolumeIncrease: (json['maximum_load_volume_increase'] as num?)
|
||||
?.toDouble(),
|
||||
maximumLoadVolumeReduction:
|
||||
(json['maximum_load_volume_reduction'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseUserModelToJson(_KillHouseUserModel instance) =>
|
||||
<String, dynamic>{
|
||||
'kill_house_operator': instance.killHouseOperator,
|
||||
'name': instance.name,
|
||||
'killer': instance.killer,
|
||||
'key': instance.key,
|
||||
'maximum_load_volume_increase': instance.maximumLoadVolumeIncrease,
|
||||
'maximum_load_volume_reduction': instance.maximumLoadVolumeReduction,
|
||||
};
|
||||
|
||||
_KillHouseOperatorModel _$KillHouseOperatorModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillHouseOperatorModel(
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: UserDetailModel.fromJson(json['user'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseOperatorModelToJson(
|
||||
_KillHouseOperatorModel instance,
|
||||
) => <String, dynamic>{'user': instance.user};
|
||||
|
||||
_UserDetailModel _$UserDetailModelFromJson(Map<String, dynamic> json) =>
|
||||
_UserDetailModel(
|
||||
fullname: json['fullname'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
baseOrder: (json['base_order'] as num?)?.toInt(),
|
||||
mobile: json['mobile'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
nationalCode: json['national_code'] as String?,
|
||||
key: json['key'] as String?,
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: CityDetailModel.fromJson(json['city'] as Map<String, dynamic>),
|
||||
unitName: json['unit_name'] as String?,
|
||||
unitNationalId: json['unit_national_id'] as String?,
|
||||
unitRegistrationNumber: json['unit_registration_number'] as String?,
|
||||
unitEconomicalNumber: json['unit_economical_number'] as String?,
|
||||
unitProvince: json['unit_province'] as String?,
|
||||
unitCity: json['unit_city'] as String?,
|
||||
unitPostalCode: json['unit_postal_code'] as String?,
|
||||
unitAddress: json['unit_address'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserDetailModelToJson(_UserDetailModel instance) =>
|
||||
<String, dynamic>{
|
||||
'fullname': instance.fullname,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'base_order': instance.baseOrder,
|
||||
'mobile': instance.mobile,
|
||||
'national_id': instance.nationalId,
|
||||
'national_code': instance.nationalCode,
|
||||
'key': instance.key,
|
||||
'city': instance.city,
|
||||
'unit_name': instance.unitName,
|
||||
'unit_national_id': instance.unitNationalId,
|
||||
'unit_registration_number': instance.unitRegistrationNumber,
|
||||
'unit_economical_number': instance.unitEconomicalNumber,
|
||||
'unit_province': instance.unitProvince,
|
||||
'unit_city': instance.unitCity,
|
||||
'unit_postal_code': instance.unitPostalCode,
|
||||
'unit_address': instance.unitAddress,
|
||||
};
|
||||
|
||||
_CityDetailModel _$CityDetailModelFromJson(Map<String, dynamic> json) =>
|
||||
_CityDetailModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
modifyDate: json['modify_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
provinceIdForeignKey: (json['province_id_foreign_key'] as num?)?.toInt(),
|
||||
cityIdKey: (json['city_id_key'] as num?)?.toInt(),
|
||||
name: json['name'] as String?,
|
||||
productPrice: (json['product_price'] as num?)?.toDouble(),
|
||||
provinceCenter: json['province_center'] as bool?,
|
||||
cityNumber: (json['city_number'] as num?)?.toInt(),
|
||||
cityName: json['city_name'] as String?,
|
||||
provinceNumber: (json['province_number'] as num?)?.toInt(),
|
||||
provinceName: json['province_name'] as String?,
|
||||
createdBy: json['created_by'] as String?,
|
||||
modifiedBy: json['modified_by'] as String?,
|
||||
province: (json['province'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CityDetailModelToJson(_CityDetailModel instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'modify_date': instance.modifyDate,
|
||||
'trash': instance.trash,
|
||||
'province_id_foreign_key': instance.provinceIdForeignKey,
|
||||
'city_id_key': instance.cityIdKey,
|
||||
'name': instance.name,
|
||||
'product_price': instance.productPrice,
|
||||
'province_center': instance.provinceCenter,
|
||||
'city_number': instance.cityNumber,
|
||||
'city_name': instance.cityName,
|
||||
'province_number': instance.provinceNumber,
|
||||
'province_name': instance.provinceName,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
'province': instance.province,
|
||||
};
|
||||
|
||||
_AddCarModel _$AddCarModelFromJson(Map<String, dynamic> json) => _AddCarModel(
|
||||
driver: json['driver'] == null
|
||||
? null
|
||||
: DriverModel.fromJson(json['driver'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AddCarModelToJson(_AddCarModel instance) =>
|
||||
<String, dynamic>{'driver': instance.driver};
|
||||
|
||||
_DriverModel _$DriverModelFromJson(Map<String, dynamic> json) => _DriverModel(
|
||||
driverName: json['driver_name'] as String?,
|
||||
driverMobile: json['driver_mobile'] as String?,
|
||||
typeCar: json['type_car'] as String?,
|
||||
pelak: json['pelak'] as String?,
|
||||
healthCode: json['health_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DriverModelToJson(_DriverModel instance) =>
|
||||
<String, dynamic>{
|
||||
'driver_name': instance.driverName,
|
||||
'driver_mobile': instance.driverMobile,
|
||||
'type_car': instance.typeCar,
|
||||
'pelak': instance.pelak,
|
||||
'health_code': instance.healthCode,
|
||||
};
|
||||
|
||||
_PoultryRequestModel _$PoultryRequestModelFromJson(Map<String, dynamic> json) =>
|
||||
_PoultryRequestModel(
|
||||
poultryReqOrderCode: (json['poultry_req_order_code'] as num?)?.toInt(),
|
||||
poultryName: json['poultry_name'] as String?,
|
||||
poultryUserName: json['poultry_user_name'] as String?,
|
||||
poultryMobile: json['poultry_mobile'] as String?,
|
||||
poultryCity: json['poultry_city'] as String?,
|
||||
chickenBreed: json['chicken_breed'] as String?,
|
||||
date: json['date'] as String?,
|
||||
freezing: json['freezing'] as bool?,
|
||||
export: json['export'] as bool?,
|
||||
freeSaleInProvince: json['free_sale_in_province'] as bool?,
|
||||
directBuying: json['direct_buying'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryRequestModelToJson(
|
||||
_PoultryRequestModel instance,
|
||||
) => <String, dynamic>{
|
||||
'poultry_req_order_code': instance.poultryReqOrderCode,
|
||||
'poultry_name': instance.poultryName,
|
||||
'poultry_user_name': instance.poultryUserName,
|
||||
'poultry_mobile': instance.poultryMobile,
|
||||
'poultry_city': instance.poultryCity,
|
||||
'chicken_breed': instance.chickenBreed,
|
||||
'date': instance.date,
|
||||
'freezing': instance.freezing,
|
||||
'export': instance.export,
|
||||
'free_sale_in_province': instance.freeSaleInProvince,
|
||||
'direct_buying': instance.directBuying,
|
||||
};
|
||||
|
||||
_WeightInfoModel _$WeightInfoModelFromJson(Map<String, dynamic> json) =>
|
||||
_WeightInfoModel(
|
||||
indexWeight: (json['index_weight'] as num?)?.toDouble(),
|
||||
weight: (json['weight'] as num?)?.toDouble(),
|
||||
finalIndexWeight: (json['final_index_weight'] as num?)?.toDouble(),
|
||||
killHousePrice: (json['kill_house_price'] as num?)?.toDouble(),
|
||||
weightLoss: (json['weight_loss'] as num?)?.toInt(),
|
||||
inputLoss: (json['input_loss'] as num?)?.toDouble(),
|
||||
state: json['state'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WeightInfoModelToJson(_WeightInfoModel instance) =>
|
||||
<String, dynamic>{
|
||||
'index_weight': instance.indexWeight,
|
||||
'weight': instance.weight,
|
||||
'final_index_weight': instance.finalIndexWeight,
|
||||
'kill_house_price': instance.killHousePrice,
|
||||
'weight_loss': instance.weightLoss,
|
||||
'input_loss': instance.inputLoss,
|
||||
'state': instance.state,
|
||||
};
|
||||
|
||||
_CarModel _$CarModelFromJson(Map<String, dynamic> json) => _CarModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
key: json['key'] as String?,
|
||||
pelak: json['pelak'] as String?,
|
||||
typeCar: json['type_car'] as String?,
|
||||
driverName: json['driver_name'] as String?,
|
||||
driverMobile: json['driver_mobile'] as String?,
|
||||
weightWithoutLoad: json['weight_without_load'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CarModelToJson(_CarModel instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'key': instance.key,
|
||||
'pelak': instance.pelak,
|
||||
'type_car': instance.typeCar,
|
||||
'driver_name': instance.driverName,
|
||||
'driver_mobile': instance.driverMobile,
|
||||
'weight_without_load': instance.weightWithoutLoad,
|
||||
};
|
||||
|
||||
_RegistrarClearanceCode _$RegistrarClearanceCodeFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _RegistrarClearanceCode(
|
||||
date: json['date'] as String?,
|
||||
name: json['name'] as String?,
|
||||
role: json['role'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$RegistrarClearanceCodeToJson(
|
||||
_RegistrarClearanceCode instance,
|
||||
) => <String, dynamic>{
|
||||
'date': instance.date,
|
||||
'name': instance.name,
|
||||
'role': instance.role,
|
||||
'mobile': instance.mobile,
|
||||
};
|
||||
@@ -16,6 +16,7 @@ abstract class CreateStewardFreeBar with _$CreateStewardFreeBar {
|
||||
int? numberOfCarcasses,
|
||||
String? date,
|
||||
String? barImage,
|
||||
String? distributionType,
|
||||
}) = _CreateStewardFreeBar;
|
||||
|
||||
factory CreateStewardFreeBar.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$CreateStewardFreeBar {
|
||||
|
||||
String? get productKey; String? get key; String? get killHouseName; String? get killHouseMobile; String? get province; String? get city; int? get weightOfCarcasses; int? get numberOfCarcasses; String? get date; String? get barImage;
|
||||
String? get productKey; String? get key; String? get killHouseName; String? get killHouseMobile; String? get province; String? get city; int? get weightOfCarcasses; int? get numberOfCarcasses; String? get date; String? get barImage; String? get distributionType;
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $CreateStewardFreeBarCopyWith<CreateStewardFreeBar> get copyWith => _$CreateStew
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage);
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage)';
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $CreateStewardFreeBarCopyWith<$Res> {
|
||||
factory $CreateStewardFreeBarCopyWith(CreateStewardFreeBar value, $Res Function(CreateStewardFreeBar) _then) = _$CreateStewardFreeBarCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$CreateStewardFreeBarCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
@@ -77,6 +77,7 @@ as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarca
|
||||
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -162,10 +163,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateStewardFreeBar() when $default != null:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage);case _:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage,_that.distributionType);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -183,10 +184,10 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateStewardFreeBar():
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage);case _:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage,_that.distributionType);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -203,10 +204,10 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateStewardFreeBar() when $default != null:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage);case _:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage,_that.distributionType);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -218,7 +219,7 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
||||
@JsonSerializable()
|
||||
|
||||
class _CreateStewardFreeBar implements CreateStewardFreeBar {
|
||||
const _CreateStewardFreeBar({this.productKey, this.key, this.killHouseName, this.killHouseMobile, this.province, this.city, this.weightOfCarcasses, this.numberOfCarcasses, this.date, this.barImage});
|
||||
const _CreateStewardFreeBar({this.productKey, this.key, this.killHouseName, this.killHouseMobile, this.province, this.city, this.weightOfCarcasses, this.numberOfCarcasses, this.date, this.barImage, this.distributionType});
|
||||
factory _CreateStewardFreeBar.fromJson(Map<String, dynamic> json) => _$CreateStewardFreeBarFromJson(json);
|
||||
|
||||
@override final String? productKey;
|
||||
@@ -231,6 +232,7 @@ class _CreateStewardFreeBar implements CreateStewardFreeBar {
|
||||
@override final int? numberOfCarcasses;
|
||||
@override final String? date;
|
||||
@override final String? barImage;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -245,16 +247,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage);
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage)';
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +267,7 @@ abstract mixin class _$CreateStewardFreeBarCopyWith<$Res> implements $CreateStew
|
||||
factory _$CreateStewardFreeBarCopyWith(_CreateStewardFreeBar value, $Res Function(_CreateStewardFreeBar) _then) = __$CreateStewardFreeBarCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -282,7 +284,7 @@ class __$CreateStewardFreeBarCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_CreateStewardFreeBar(
|
||||
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
@@ -294,6 +296,7 @@ as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarca
|
||||
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ _CreateStewardFreeBar _$CreateStewardFreeBarFromJson(
|
||||
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
||||
date: json['date'] as String?,
|
||||
barImage: json['bar_image'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CreateStewardFreeBarToJson(
|
||||
@@ -34,4 +35,5 @@ Map<String, dynamic> _$CreateStewardFreeBarToJson(
|
||||
'number_of_carcasses': instance.numberOfCarcasses,
|
||||
'date': instance.date,
|
||||
'bar_image': instance.barImage,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
|
||||
@@ -22,6 +22,7 @@ abstract class StewardFreeSaleBarRequest with _$StewardFreeSaleBarRequest {
|
||||
String? quota,
|
||||
String? saleType,
|
||||
String? productionDate,
|
||||
String? distributionType,
|
||||
}) = _StewardFreeSaleBarRequest;
|
||||
|
||||
factory StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$StewardFreeSaleBarRequest {
|
||||
|
||||
String? get buyerKey; String? get buyerMobile; String? get buyerName; String? get city; String? get key; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get date; String? get clearanceCode; String? get productKey; String? get role; String? get registerCode; String? get province; String? get quota; String? get saleType; String? get productionDate;
|
||||
String? get buyerKey; String? get buyerMobile; String? get buyerName; String? get city; String? get key; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get date; String? get clearanceCode; String? get productKey; String? get role; String? get registerCode; String? get province; String? get quota; String? get saleType; String? get productionDate; String? get distributionType;
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $StewardFreeSaleBarRequestCopyWith<StewardFreeSaleBarRequest> get copyWith => _$
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate);
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate)';
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $StewardFreeSaleBarRequestCopyWith<$Res> {
|
||||
factory $StewardFreeSaleBarRequestCopyWith(StewardFreeSaleBarRequest value, $Res Function(StewardFreeSaleBarRequest) _then) = _$StewardFreeSaleBarRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$StewardFreeSaleBarRequestCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerMobile: freezed == buyerMobile ? _self.buyerMobile : buyerMobile // ignore: cast_nullable_to_non_nullable
|
||||
@@ -83,6 +83,7 @@ as String?,province: freezed == province ? _self.province : province // ignore:
|
||||
as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable
|
||||
as String?,saleType: freezed == saleType ? _self.saleType : saleType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -168,10 +169,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StewardFreeSaleBarRequest() when $default != null:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate);case _:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate,_that.distributionType);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -189,10 +190,10 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StewardFreeSaleBarRequest():
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate);case _:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate,_that.distributionType);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -209,10 +210,10 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StewardFreeSaleBarRequest() when $default != null:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate);case _:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate,_that.distributionType);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -224,7 +225,7 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
||||
@JsonSerializable()
|
||||
|
||||
class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
|
||||
const _StewardFreeSaleBarRequest({this.buyerKey, this.buyerMobile, this.buyerName, this.city, this.key, this.numberOfCarcasses, this.weightOfCarcasses, this.date, this.clearanceCode, this.productKey, this.role, this.registerCode, this.province, this.quota, this.saleType, this.productionDate});
|
||||
const _StewardFreeSaleBarRequest({this.buyerKey, this.buyerMobile, this.buyerName, this.city, this.key, this.numberOfCarcasses, this.weightOfCarcasses, this.date, this.clearanceCode, this.productKey, this.role, this.registerCode, this.province, this.quota, this.saleType, this.productionDate, this.distributionType});
|
||||
factory _StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) => _$StewardFreeSaleBarRequestFromJson(json);
|
||||
|
||||
@override final String? buyerKey;
|
||||
@@ -243,6 +244,7 @@ class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
|
||||
@override final String? quota;
|
||||
@override final String? saleType;
|
||||
@override final String? productionDate;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -257,16 +259,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate);
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate)';
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +279,7 @@ abstract mixin class _$StewardFreeSaleBarRequestCopyWith<$Res> implements $Stewa
|
||||
factory _$StewardFreeSaleBarRequestCopyWith(_StewardFreeSaleBarRequest value, $Res Function(_StewardFreeSaleBarRequest) _then) = __$StewardFreeSaleBarRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -294,7 +296,7 @@ class __$StewardFreeSaleBarRequestCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_StewardFreeSaleBarRequest(
|
||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerMobile: freezed == buyerMobile ? _self.buyerMobile : buyerMobile // ignore: cast_nullable_to_non_nullable
|
||||
@@ -312,6 +314,7 @@ as String?,province: freezed == province ? _self.province : province // ignore:
|
||||
as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable
|
||||
as String?,saleType: freezed == saleType ? _self.saleType : saleType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ _StewardFreeSaleBarRequest _$StewardFreeSaleBarRequestFromJson(
|
||||
quota: json['quota'] as String?,
|
||||
saleType: json['sale_type'] as String?,
|
||||
productionDate: json['production_date'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
||||
@@ -46,4 +47,5 @@ Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
||||
'quota': instance.quota,
|
||||
'sale_type': instance.saleType,
|
||||
'production_date': instance.productionDate,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
|
||||
@@ -21,6 +21,7 @@ abstract class SubmitStewardAllocation with _$SubmitStewardAllocation {
|
||||
bool? approvedPriceStatus,
|
||||
String? productionDate,
|
||||
String? date,
|
||||
String? distributionType,
|
||||
}) = _SubmitStewardAllocation;
|
||||
|
||||
factory SubmitStewardAllocation.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$SubmitStewardAllocation {
|
||||
|
||||
String? get sellerType; String? get buyerType; String? get guildKey; String? get productKey; String? get type; String? get allocationType; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get sellType; int? get amount; String? get quota; int? get totalAmount; bool? get approvedPriceStatus; String? get productionDate; String? get date;
|
||||
String? get sellerType; String? get buyerType; String? get guildKey; String? get productKey; String? get type; String? get allocationType; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get sellType; int? get amount; String? get quota; int? get totalAmount; bool? get approvedPriceStatus; String? get productionDate; String? get date; String? get distributionType;
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $SubmitStewardAllocationCopyWith<SubmitStewardAllocation> get copyWith => _$Subm
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date);
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date)';
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $SubmitStewardAllocationCopyWith<$Res> {
|
||||
factory $SubmitStewardAllocationCopyWith(SubmitStewardAllocation value, $Res Function(SubmitStewardAllocation) _then) = _$SubmitStewardAllocationCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$SubmitStewardAllocationCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerType: freezed == buyerType ? _self.buyerType : buyerType // ignore: cast_nullable_to_non_nullable
|
||||
@@ -82,6 +82,7 @@ as String?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount
|
||||
as int?,approvedPriceStatus: freezed == approvedPriceStatus ? _self.approvedPriceStatus : approvedPriceStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -167,10 +168,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SubmitStewardAllocation() when $default != null:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date);case _:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date,_that.distributionType);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -188,10 +189,10 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SubmitStewardAllocation():
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date);case _:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date,_that.distributionType);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -208,10 +209,10 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SubmitStewardAllocation() when $default != null:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date);case _:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date,_that.distributionType);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -223,7 +224,7 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
||||
@JsonSerializable()
|
||||
|
||||
class _SubmitStewardAllocation implements SubmitStewardAllocation {
|
||||
const _SubmitStewardAllocation({this.sellerType, this.buyerType, this.guildKey, this.productKey, this.type, this.allocationType, this.numberOfCarcasses, this.weightOfCarcasses, this.sellType, this.amount, this.quota, this.totalAmount, this.approvedPriceStatus, this.productionDate, this.date});
|
||||
const _SubmitStewardAllocation({this.sellerType, this.buyerType, this.guildKey, this.productKey, this.type, this.allocationType, this.numberOfCarcasses, this.weightOfCarcasses, this.sellType, this.amount, this.quota, this.totalAmount, this.approvedPriceStatus, this.productionDate, this.date, this.distributionType});
|
||||
factory _SubmitStewardAllocation.fromJson(Map<String, dynamic> json) => _$SubmitStewardAllocationFromJson(json);
|
||||
|
||||
@override final String? sellerType;
|
||||
@@ -241,6 +242,7 @@ class _SubmitStewardAllocation implements SubmitStewardAllocation {
|
||||
@override final bool? approvedPriceStatus;
|
||||
@override final String? productionDate;
|
||||
@override final String? date;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -255,16 +257,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date);
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date)';
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -275,7 +277,7 @@ abstract mixin class _$SubmitStewardAllocationCopyWith<$Res> implements $SubmitS
|
||||
factory _$SubmitStewardAllocationCopyWith(_SubmitStewardAllocation value, $Res Function(_SubmitStewardAllocation) _then) = __$SubmitStewardAllocationCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -292,7 +294,7 @@ class __$SubmitStewardAllocationCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_SubmitStewardAllocation(
|
||||
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerType: freezed == buyerType ? _self.buyerType : buyerType // ignore: cast_nullable_to_non_nullable
|
||||
@@ -309,6 +311,7 @@ as String?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount
|
||||
as int?,approvedPriceStatus: freezed == approvedPriceStatus ? _self.approvedPriceStatus : approvedPriceStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ _SubmitStewardAllocation _$SubmitStewardAllocationFromJson(
|
||||
approvedPriceStatus: json['approved_price_status'] as bool?,
|
||||
productionDate: json['production_date'] as String?,
|
||||
date: json['date'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SubmitStewardAllocationToJson(
|
||||
@@ -44,4 +45,5 @@ Map<String, dynamic> _$SubmitStewardAllocationToJson(
|
||||
'approved_price_status': instance.approvedPriceStatus,
|
||||
'production_date': instance.productionDate,
|
||||
'date': instance.date,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
|
||||
@@ -18,6 +18,7 @@ abstract class SegmentationModel with _$SegmentationModel {
|
||||
DateTime? date,
|
||||
ToGuild? toGuild,
|
||||
String? productionDate,
|
||||
String? distributionType,
|
||||
}) = _SegmentationModel;
|
||||
|
||||
factory SegmentationModel.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$SegmentationModel {
|
||||
|
||||
String? get key; String? get productKey; String? get guildKey; String? get result; String? get quota; String? get saleType; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild; String? get productionDate;
|
||||
String? get key; String? get productKey; String? get guildKey; String? get result; String? get quota; String? get saleType; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild; String? get productionDate; String? get distributionType;
|
||||
/// Create a copy of SegmentationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $SegmentationModelCopyWith<SegmentationModel> get copyWith => _$SegmentationMode
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate);
|
||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate)';
|
||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $SegmentationModelCopyWith<$Res> {
|
||||
factory $SegmentationModelCopyWith(SegmentationModel value, $Res Function(SegmentationModel) _then) = _$SegmentationModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate
|
||||
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$SegmentationModelCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SegmentationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
@@ -78,6 +78,7 @@ as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_t
|
||||
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,toGuild: freezed == toGuild ? _self.toGuild : toGuild // ignore: cast_nullable_to_non_nullable
|
||||
as ToGuild?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -187,10 +188,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SegmentationModel() when $default != null:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate,_that.distributionType);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -208,10 +209,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SegmentationModel():
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate,_that.distributionType);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -228,10 +229,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SegmentationModel() when $default != null:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate,_that.distributionType);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -243,7 +244,7 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
|
||||
@JsonSerializable()
|
||||
|
||||
class _SegmentationModel implements SegmentationModel {
|
||||
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.quota, this.saleType, this.weight, this.buyer, this.date, this.toGuild, this.productionDate});
|
||||
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.quota, this.saleType, this.weight, this.buyer, this.date, this.toGuild, this.productionDate, this.distributionType});
|
||||
factory _SegmentationModel.fromJson(Map<String, dynamic> json) => _$SegmentationModelFromJson(json);
|
||||
|
||||
@override final String? key;
|
||||
@@ -257,6 +258,7 @@ class _SegmentationModel implements SegmentationModel {
|
||||
@override final DateTime? date;
|
||||
@override final ToGuild? toGuild;
|
||||
@override final String? productionDate;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of SegmentationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -271,16 +273,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate);
|
||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate)';
|
||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +293,7 @@ abstract mixin class _$SegmentationModelCopyWith<$Res> implements $SegmentationM
|
||||
factory _$SegmentationModelCopyWith(_SegmentationModel value, $Res Function(_SegmentationModel) _then) = __$SegmentationModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate
|
||||
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -308,7 +310,7 @@ class __$SegmentationModelCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SegmentationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_SegmentationModel(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
@@ -321,6 +323,7 @@ as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_t
|
||||
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,toGuild: freezed == toGuild ? _self.toGuild : toGuild // ignore: cast_nullable_to_non_nullable
|
||||
as ToGuild?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ _SegmentationModel _$SegmentationModelFromJson(Map<String, dynamic> json) =>
|
||||
? null
|
||||
: ToGuild.fromJson(json['to_guild'] as Map<String, dynamic>),
|
||||
productionDate: json['production_date'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
|
||||
@@ -40,6 +41,7 @@ Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
|
||||
'date': instance.date?.toIso8601String(),
|
||||
'to_guild': instance.toGuild,
|
||||
'production_date': instance.productionDate,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
|
||||
_Buyer _$BuyerFromJson(Map<String, dynamic> json) => _Buyer(
|
||||
|
||||
@@ -29,13 +29,13 @@ import '../../models/request/create_steward_free_bar/create_steward_free_bar.dar
|
||||
|
||||
abstract class ChickenRepository {
|
||||
//region Remote
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
//region Steward
|
||||
Future<List<ProductModel>?> getRolesProduct({
|
||||
required String token,
|
||||
required String role,
|
||||
CancelToken? cancelToken,
|
||||
});
|
||||
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
required String token,
|
||||
@@ -81,11 +81,6 @@ abstract class ChickenRepository {
|
||||
required List<String> allocationTokens,
|
||||
});
|
||||
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<GuildModel>?> getGuilds({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
|
||||
@@ -37,19 +37,6 @@ class ChickenRepositoryImp implements ChickenRepository {
|
||||
ChickenRepositoryImp({required this.remote, required this.local});
|
||||
|
||||
//region Remote
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProduct({
|
||||
required String token,
|
||||
required String role,
|
||||
CancelToken? cancelToken,
|
||||
}) async {
|
||||
var res = await remote.getRolesProduct(
|
||||
token: token,
|
||||
role: role,
|
||||
cancelToken: cancelToken,
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
@@ -145,10 +132,12 @@ class ChickenRepositoryImp implements ChickenRepository {
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await remote.getRolesProducts(
|
||||
token: token,
|
||||
cancelToken: cancelToken,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
return res;
|
||||
|
||||
@@ -4,11 +4,10 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel
|
||||
show KillRequestList;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.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_core/core.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/data/model/pagination_model/pagination_model.dart';
|
||||
|
||||
|
||||
abstract class KillHouseRepository {
|
||||
|
||||
@@ -48,12 +47,10 @@ abstract class KillHouseRepository {
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<BroadcastPrice?> getBroadcastPrice({required String token});
|
||||
|
||||
Future<List<ProductModel>?> getRolesProducts({required String token});
|
||||
|
||||
|
||||
Future<List<IranProvinceCityModel>?> getProvince({CancelToken? cancelToken});
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -3,21 +3,16 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/chicken_commission_prices/chicken_commission_prices.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.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';
|
||||
as ListModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import '../chicken/chicken_repository.dart';
|
||||
import 'kill_house_repository.dart';
|
||||
|
||||
class KillHouseRepositoryImpl extends KillHouseRepository {
|
||||
final KillHouseRemoteDataSource remoteDataSource;
|
||||
final ChickenRepository chickenRepository;
|
||||
|
||||
KillHouseRepositoryImpl(this.remoteDataSource, this.chickenRepository);
|
||||
KillHouseRepositoryImpl(this.remoteDataSource);
|
||||
|
||||
@override
|
||||
Future<List<KillHouseResponse>?> getKillHouseList({
|
||||
@@ -54,7 +49,7 @@ class KillHouseRepositoryImpl extends KillHouseRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<listModel.KillRequestList>?> getListKillRequest({
|
||||
Future<List<ListModel.KillRequestList>?> getListKillRequest({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
@@ -93,24 +88,14 @@ class KillHouseRepositoryImpl extends KillHouseRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<BroadcastPrice?> getBroadcastPrice({required String token}) async {
|
||||
return await chickenRepository.getBroadcastPrice(token: token);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProducts({required String token}) async {
|
||||
var res = await chickenRepository.getRolesProducts(
|
||||
token: token,
|
||||
queryParameters: buildQueryParams(role: 'KillHouse'),
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<IranProvinceCityModel>?> getProvince({
|
||||
CancelToken? cancelToken,
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await chickenRepository.getProvince(cancelToken: cancelToken);
|
||||
return await remoteDataSource.getBarsForKillHouse(
|
||||
token: token,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/kill_house/kill_house_repository.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/common/profile/view.dart';
|
||||
import 'package:rasadyar_chicken/features/common/profile/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||
@@ -4,7 +4,7 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel;
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/buy/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/buy_in_province_all/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/buy_in_province_waiting/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/buy/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/buy_in_province_entered/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/buy_in_province_waiting/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class WarehouseAndDistributionBuyInProvinceLogic extends GetxController {
|
||||
@@ -11,22 +11,28 @@ class WarehouseAndDistributionBuyInProvinceLogic extends GetxController {
|
||||
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
||||
Rx<Jalali> toDateFilter = Jalali.now().obs;
|
||||
|
||||
WarehouseAndDistributionRootLogic rootLogic = Get.find<WarehouseAndDistributionRootLogic>();
|
||||
WarehouseAndDistributionRootLogic rootLogic =
|
||||
Get.find<WarehouseAndDistributionRootLogic>();
|
||||
|
||||
WarehouseAndDistributionBuyLogic get buyLogic => Get.find<WarehouseAndDistributionBuyLogic>();
|
||||
WarehouseAndDistributionBuyLogic get buyLogic =>
|
||||
Get.find<WarehouseAndDistributionBuyLogic>();
|
||||
RxInt selectedSegmentIndex = 0.obs;
|
||||
|
||||
WarehouseAndDistributionBuyInProvinceAllLogic buyAllLogic = Get.find<WarehouseAndDistributionBuyInProvinceAllLogic>();
|
||||
WarehouseAndDistributionBuyInProvinceWaitingLogic buyWaitingLogic = Get.find<WarehouseAndDistributionBuyInProvinceWaitingLogic>();
|
||||
WarehouseAndDistributionBuyInProvinceEnteredLogic buyAllLogic =
|
||||
Get.find<WarehouseAndDistributionBuyInProvinceEnteredLogic>();
|
||||
WarehouseAndDistributionBuyInProvinceWaitingLogic buyWaitingLogic =
|
||||
Get.find<WarehouseAndDistributionBuyInProvinceWaitingLogic>();
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
routesName.value = [...buyLogic.routesName, 'داخل استان'].toList();
|
||||
routesName.add(selectedSegmentIndex.value == 0 ? 'در انتظار' : 'کل خریدها');
|
||||
routesName.add(
|
||||
selectedSegmentIndex.value == 0 ? 'در انتظار' : 'وارد شده به انبار',
|
||||
);
|
||||
ever(selectedSegmentIndex, (callback) {
|
||||
routesName.removeLast();
|
||||
routesName.add(callback == 0 ? 'در انتظار' : 'کل خریدها');
|
||||
routesName.add(callback == 0 ? 'در انتظار' : 'وارد شده به انبار');
|
||||
});
|
||||
|
||||
ever(fromDateFilter, (callback) => _setFromDateFilter(callback));
|
||||
@@ -66,9 +72,9 @@ class WarehouseAndDistributionBuyInProvinceLogic extends GetxController {
|
||||
Future<void> submitFilter() async {
|
||||
final isWaiting = selectedSegmentIndex.value == 0;
|
||||
if (isWaiting) {
|
||||
buyWaitingLogic.getWaitingArrivals();
|
||||
buyWaitingLogic.getKillHouseBars();
|
||||
} else {
|
||||
buyAllLogic.getAllArrivals();
|
||||
buyAllLogic.getkillHouseBars();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +90,9 @@ class WarehouseAndDistributionBuyInProvinceLogic extends GetxController {
|
||||
|
||||
Future<void> onRefresh() async {
|
||||
await rootLogic.onRefresh();
|
||||
await Future.wait([buyWaitingLogic.getWaitingArrivals(), buyAllLogic.getAllArrivals()]);
|
||||
await Future.wait([
|
||||
buyWaitingLogic.getKillHouseBars(),
|
||||
buyAllLogic.getkillHouseBars(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/buy_in_province_all/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/buy_in_province_waiting/view.dart';
|
||||
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/buy_in_province_entered/view.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/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/inventory/inventory_widget.dart';
|
||||
@@ -27,16 +28,49 @@ class WarehouseAndDistributionBuyInProvincePage
|
||||
child: Column(
|
||||
spacing: 4.h,
|
||||
children: [
|
||||
ObxValue((data) {
|
||||
return InventoryWidget(inventoryModel: data.value);
|
||||
}, controller.rootLogic.inventoryModel),
|
||||
Obx(() {
|
||||
final listInventory = [
|
||||
InventoryItemData(
|
||||
title: 'موجودی انبار',
|
||||
value: controller
|
||||
.rootLogic
|
||||
.rolesProduct
|
||||
.value
|
||||
?.totalRemainWeight
|
||||
?.separatedByCommaFa,
|
||||
color: const Color(0xFFEAFBFC),
|
||||
),
|
||||
InventoryItemData(
|
||||
title: 'مانده دولتی',
|
||||
value: controller
|
||||
.rootLogic
|
||||
.salesInfoDashboard
|
||||
.value
|
||||
?.totalGovernmentalRemainWeight
|
||||
?.separatedByCommaFa,
|
||||
color: const Color(0xFFF5ECEE),
|
||||
),
|
||||
InventoryItemData(
|
||||
title: 'مانده آزاد',
|
||||
value: controller
|
||||
.rootLogic
|
||||
.salesInfoDashboard
|
||||
.value
|
||||
?.totalFreeRemainWeight
|
||||
?.separatedByCommaFa,
|
||||
color: const Color(0xFFF1E7FF),
|
||||
),
|
||||
];
|
||||
|
||||
return InventoryWidget(inventoryModel: listInventory);
|
||||
}),
|
||||
|
||||
segmentWidget(),
|
||||
ObxValue((index) {
|
||||
return Expanded(
|
||||
child: index.value == 0
|
||||
? WarehouseAndDistributionBuyInProvinceWaitingPage()
|
||||
: WarehouseAndDistributionBuyInProvinceAllPage(),
|
||||
: WarehouseAndDistributionBuyInProvinceEnteredPage(),
|
||||
);
|
||||
}, controller.selectedSegmentIndex),
|
||||
],
|
||||
@@ -51,7 +85,7 @@ class WarehouseAndDistributionBuyInProvincePage
|
||||
children: [
|
||||
Expanded(
|
||||
child: RSegment(
|
||||
children: ['وارد شده به انبار', 'کل خریدها'],
|
||||
children: ['در انتظار', 'وارد شده به انبار'],
|
||||
selectedIndex: 0,
|
||||
borderColor: const Color(0xFFB4B4B4),
|
||||
selectedBorderColor: AppColor.blueNormal,
|
||||
@@ -1,10 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/steward_allocation/steward_allocation_request.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
||||
class WarehouseAndDistributionBuyInProvinceEnteredLogic extends GetxController {
|
||||
RxInt isExpandedListIndex = (-1).obs;
|
||||
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
||||
Rx<Jalali> toDateFilter = Jalali.now().obs;
|
||||
@@ -16,8 +17,8 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
||||
WarehouseAndDistributionRootLogic rootLogic =
|
||||
Get.find<WarehouseAndDistributionRootLogic>();
|
||||
|
||||
Rx<Resource<PaginationModel<WaitingArrivalModel>>> allProduct =
|
||||
Resource<PaginationModel<WaitingArrivalModel>>.loading().obs;
|
||||
Rx<Resource<PaginationModel<KillHouseBarsResponse>>> enteredBars =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.loading().obs;
|
||||
|
||||
TextEditingController weightController = TextEditingController();
|
||||
TextEditingController countController = TextEditingController();
|
||||
@@ -29,14 +30,14 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
getAllArrivals();
|
||||
getkillHouseBars();
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
debounce(
|
||||
searchedValue,
|
||||
(callback) => getAllArrivals(),
|
||||
(callback) => getkillHouseBars(),
|
||||
time: Duration(milliseconds: 2000),
|
||||
);
|
||||
super.onReady();
|
||||
@@ -47,12 +48,12 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> getAllArrivals([bool isLoadingMore = false]) async {
|
||||
Future<void> getkillHouseBars([bool isLoadingMore = false]) async {
|
||||
if (isLoadingMore) {
|
||||
isLoadingMoreAllocationsMade.value = true;
|
||||
} else {
|
||||
allProduct.value =
|
||||
Resource<PaginationModel<WaitingArrivalModel>>.loading();
|
||||
enteredBars.value =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.loading();
|
||||
}
|
||||
|
||||
if (searchedValue.value != null &&
|
||||
@@ -61,39 +62,42 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
||||
currentPage.value = 1;
|
||||
}
|
||||
|
||||
// TODO: Fix - chickenRepository doesn't exist in rootLogic
|
||||
safeCall(
|
||||
// call: () async => await rootLogic.chickenRepository.getWaitingArrivals(
|
||||
// token: rootLogic.tokenService.accessToken.value!,
|
||||
// queryParameters: buildQueryParams(
|
||||
// queryParams: {'type': 'all'},
|
||||
// pageSize: 20,
|
||||
// page: currentPage.value,
|
||||
// search: 'filter',
|
||||
// role: 'Steward',
|
||||
// value: searchedValue.value,
|
||||
// fromDate: fromDateFilter.value.toDateTime(),
|
||||
// toDate: toDateFilter.value.toDateTime(),
|
||||
// ),
|
||||
// ),
|
||||
call: () async => null as PaginationModel<WaitingArrivalModel>?,
|
||||
call: () async => await rootLogic.killHouseRepository.getBarsForKillHouse(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
queryParameters: buildQueryParams(
|
||||
queryParams: {'type': 'entered'},
|
||||
pageSize: 20,
|
||||
page: currentPage.value,
|
||||
search: 'filter',
|
||||
role: 'KillHouse',
|
||||
value: searchedValue.value,
|
||||
|
||||
),
|
||||
),
|
||||
|
||||
onSuccess: (res) async {
|
||||
await Future.delayed(Duration(milliseconds: 200));
|
||||
// TODO: Fix - res type issues
|
||||
// if ((res?.count ?? 0) == 0) {
|
||||
// allProduct.value = Resource<PaginationModel<WaitingArrivalModel>>.empty();
|
||||
// } else {
|
||||
// allProduct.value = Resource<PaginationModel<WaitingArrivalModel>>.success(
|
||||
// PaginationModel<WaitingArrivalModel>(
|
||||
// count: res?.count ?? 0,
|
||||
// next: res?.next,
|
||||
// previous: res?.previous,
|
||||
// results: [...(allProduct.value.data?.results ?? []), ...(res?.results ?? [])],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
allProduct.value =
|
||||
Resource<PaginationModel<WaitingArrivalModel>>.empty();
|
||||
|
||||
if ((res?.count ?? 0) == 0) {
|
||||
enteredBars.value =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.empty();
|
||||
} else {
|
||||
enteredBars.value =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.success(
|
||||
PaginationModel<KillHouseBarsResponse>(
|
||||
count: res?.count ?? 0,
|
||||
next: res?.next,
|
||||
previous: res?.previous,
|
||||
results: [
|
||||
...(enteredBars.value.data?.results ?? []),
|
||||
...(res?.results ?? []),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
enteredBars.value =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.empty();
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -121,7 +125,7 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
||||
// ),
|
||||
call: () async {},
|
||||
onSuccess: (result) {
|
||||
getAllArrivals();
|
||||
getkillHouseBars();
|
||||
rootLogic.onRefresh();
|
||||
clearApprovedController();
|
||||
toggleExpansion();
|
||||
@@ -149,7 +153,7 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
||||
eLog(error);
|
||||
},
|
||||
onSuccess: (result) {
|
||||
getAllArrivals();
|
||||
getkillHouseBars();
|
||||
rootLogic.onRefresh();
|
||||
},
|
||||
);
|
||||
@@ -1,13 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.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_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndDistributionBuyInProvinceAllLogic> {
|
||||
const WarehouseAndDistributionBuyInProvinceAllPage({super.key});
|
||||
class WarehouseAndDistributionBuyInProvinceEnteredPage
|
||||
extends GetView<WarehouseAndDistributionBuyInProvinceEnteredLogic> {
|
||||
const WarehouseAndDistributionBuyInProvinceEnteredPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -28,21 +30,21 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
index: index,
|
||||
child: itemListWidget(item),
|
||||
secondChild: itemListExpandedWidget(item),
|
||||
labelColor: getLabelColor(item.receiverState),
|
||||
labelIcon: controller.getVecPathItem(item.receiverState),
|
||||
labelIconColor: controller.getLabelColor(item.receiverState),
|
||||
labelColor: getLabelColor('pending'),
|
||||
labelIcon: controller.getVecPathItem('pending'),
|
||||
labelIconColor: controller.getLabelColor('pending'),
|
||||
);
|
||||
}, controller.isExpandedListIndex);
|
||||
},
|
||||
itemCount: data.value.data?.results?.length ?? 0,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||
onLoadMore: () async => controller.getAllArrivals(true),
|
||||
onLoadMore: () async => controller.getkillHouseBars(true),
|
||||
);
|
||||
}, controller.allProduct),
|
||||
}, controller.enteredBars),
|
||||
);
|
||||
}
|
||||
|
||||
Row itemListWidget(WaitingArrivalModel item) {
|
||||
Row itemListWidget(KillHouseBarsResponse item) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
@@ -55,12 +57,12 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
spacing: 3,
|
||||
children: [
|
||||
Text(
|
||||
item.toSteward?.user?.fullname ?? 'N/A',
|
||||
'item.toSteward?.user?.fullname ' ?? 'N/A',
|
||||
textAlign: TextAlign.start,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
Text(
|
||||
item.date?.formattedJalaliDate ?? 'N/A',
|
||||
'item.date?.formattedJalaliDate' ?? 'N/A',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
||||
),
|
||||
@@ -80,24 +82,31 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
spacing: 6,
|
||||
children: [
|
||||
Visibility(
|
||||
visible: item.product?.name?.contains('مرغ گرم') ?? false,
|
||||
// visible: item.product?.name?.contains('مرغ گرم') ?? false,
|
||||
visible: false,
|
||||
child: Assets.vec.hotChickenSvg.svg(
|
||||
width: 24,
|
||||
height: 24,
|
||||
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||
colorFilter: ColorFilter.mode(
|
||||
AppColor.blueNormal,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
item.weightOfCarcasses?.separatedByCommaFa.addKg ?? 'N/A',
|
||||
'item.weightOfCarcasses?.separatedByCommaFa.addKg ' ??
|
||||
'N/A',
|
||||
textAlign: TextAlign.left,
|
||||
textDirection: TextDirection.ltr,
|
||||
style: AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal),
|
||||
style: AppFonts.yekan12Bold.copyWith(
|
||||
color: AppColor.blueNormal,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Text(
|
||||
item.toSteward?.guildsName ?? 'N/Aaq',
|
||||
' item.toSteward?.guildsName' ?? 'N/Aaq',
|
||||
textAlign: TextAlign.start,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||
),
|
||||
@@ -116,10 +125,13 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
);
|
||||
}
|
||||
|
||||
Container itemListExpandedWidget(WaitingArrivalModel item) {
|
||||
Container itemListExpandedWidget(KillHouseBarsResponse item) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
@@ -127,21 +139,24 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.toSteward?.user?.fullname ?? 'N/A',
|
||||
'item.toSteward?.user?.fullname ' ?? 'N/A',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
item.receiverState?.faItem ?? 'N/A',
|
||||
'item.receiverState?.faItem ' ?? 'N/A',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan10.copyWith(color: AppColor.darkGreyDark),
|
||||
),
|
||||
SizedBox(width: 7),
|
||||
SvgGenImage.vec(controller.getVecPathItem(item.receiverState)).svg(
|
||||
SvgGenImage.vec(controller.getVecPathItem('pending')).svg(
|
||||
width: 16.w,
|
||||
height: 16.h,
|
||||
colorFilter: ColorFilter.mode(AppColor.darkGreyDark, BlendMode.srcIn),
|
||||
colorFilter: ColorFilter.mode(
|
||||
AppColor.darkGreyDark,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -162,59 +177,72 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
spacing: 3,
|
||||
children: [
|
||||
Text(
|
||||
item.date?.toJalali.formatter.wN ?? 'N/A',
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
|
||||
'item.date?.toJalali.formatter.wN ' ?? 'N/A',
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.textColor,
|
||||
),
|
||||
),
|
||||
|
||||
Text(
|
||||
'${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'N/A'}',
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||
'${'item.date?.toJalali.formatter.d '} ${'item.date?.toJalali.formatter.mN ' ?? 'N/A'}',
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.blueNormal,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Text(
|
||||
'${item.date?.toJalali.formatter.y}',
|
||||
'${'item.date?.toJalali.formatter.y '}',
|
||||
style: AppFonts.yekan20.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
|
||||
Text(
|
||||
'${item.date?.toJalali.formatter.tHH}:${item.date?.toJalali.formatter.tMM ?? 'N/A'}',
|
||||
'${'item.date?.toJalali.formatter.tHH '}:${'item.date?.toJalali.formatter.tMM ' ?? 'N/A'}',
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
buildRow(title: 'مشخصات فروشنده', value: item.toSteward?.user?.fullname ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'مشخصات فروشنده',
|
||||
value: 'item.toSteward?.user?.fullname ' ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
title: 'تلفن فروشنده',
|
||||
value: item.toSteward?.user?.mobile ?? 'N/A',
|
||||
value: 'item.toSteward?.user?.mobile ' ?? 'N/A',
|
||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
||||
buildRow(title: ' سهمیه', value: item.quota?.faTitle ?? 'N/A'),
|
||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'نوع تخصیص',
|
||||
value: 'item.allocationType?.faAllocationType ' ?? 'N/A',
|
||||
),
|
||||
buildRow(title: ' سهمیه', value: 'item.quota?.faTitle ' ?? 'N/A'),
|
||||
buildRow(title: 'محصول', value: 'item.product?.name ' ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'وزن خریداری شده',
|
||||
value: item.weightOfCarcasses?.separatedByCommaFa ?? 'N/A',
|
||||
value: 'item.weightOfCarcasses?.separatedByCommaFa ' ?? 'N/A',
|
||||
valueLabel: 'کیلوگرم',
|
||||
),
|
||||
buildRow(
|
||||
title: 'قیمت هر کیلوگرم',
|
||||
titleLabel: (item.approvedPriceStatus ?? false) ? 'مصوب' : 'آزاد',
|
||||
titleLabelStyle: AppFonts.yekan14Bold.copyWith(color: AppColor.greenNormal),
|
||||
titleLabel: (false) ? 'مصوب' : 'آزاد',
|
||||
titleLabelStyle: AppFonts.yekan14Bold.copyWith(
|
||||
color: AppColor.greenNormal,
|
||||
),
|
||||
value: item.amount?.separatedByCommaFa ?? 'N/A',
|
||||
valueLabel: 'ریال',
|
||||
),
|
||||
buildRow(
|
||||
title: 'قیمت کل',
|
||||
value: item.totalAmount?.separatedByCommaFa ?? 'N/A',
|
||||
value: 'item.totalAmount?.separatedByCommaFa ' ?? 'N/A',
|
||||
valueLabel: 'ریال',
|
||||
),
|
||||
|
||||
Visibility(
|
||||
visible: item.receiverState == 'pending',
|
||||
//visible: item.receiverState == 'pending',
|
||||
visible: true,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
spacing: 16.w,
|
||||
@@ -226,13 +254,13 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
height: 40.h,
|
||||
isLoading: data[item.key!] ?? false,
|
||||
onPressed: () async {
|
||||
await Get.bottomSheet(
|
||||
/* await Get.bottomSheet(
|
||||
conformationBottomSheet(item),
|
||||
isScrollControlled: true,
|
||||
).then((value) {
|
||||
Get.back();
|
||||
controller.clearApprovedController();
|
||||
});
|
||||
}); */
|
||||
},
|
||||
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
@@ -240,16 +268,18 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
}, controller.isLoadingConfirmMap),
|
||||
ROutlinedElevated(
|
||||
text: 'رد',
|
||||
textStyle: AppFonts.yekan20.copyWith(color: AppColor.redNormal),
|
||||
textStyle: AppFonts.yekan20.copyWith(
|
||||
color: AppColor.redNormal,
|
||||
),
|
||||
width: 150.w,
|
||||
height: 40.h,
|
||||
onPressed: () {
|
||||
buildWarningDialog(
|
||||
/* buildWarningDialog(
|
||||
title: 'اخطار',
|
||||
middleText: 'آیا از رد شدن این مورد اطمینان دارید؟',
|
||||
onConfirm: () => controller.denyEntries(item),
|
||||
onRefresh: () => controller.getAllArrivals(),
|
||||
);
|
||||
onRefresh: () => controller.getkillHouseBars(),
|
||||
); */
|
||||
},
|
||||
borderColor: AppColor.redNormal,
|
||||
),
|
||||
@@ -285,25 +315,37 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
label: 'وزن(کیلوگرم)',
|
||||
controller: controller.weightController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
SeparatorInputFormatter(),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
RTextField(
|
||||
label: 'حجم(قطعه)',
|
||||
controller: controller.countController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
SeparatorInputFormatter(),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
RTextField(
|
||||
label: 'افت وزن(کیلوگرم)',
|
||||
controller: controller.lossController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
SeparatorInputFormatter(),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
|
||||
Text('تایید ', style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor)),
|
||||
Text(
|
||||
'تایید ',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
ObxValue((data) {
|
||||
return Column(
|
||||
children: [
|
||||
@@ -373,7 +415,12 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
||||
child: Row(
|
||||
children: [
|
||||
Radio(value: value),
|
||||
Text(label, style: textStyle ?? AppFonts.yekan16.copyWith(color: AppColor.textColor)),
|
||||
Text(
|
||||
label,
|
||||
style:
|
||||
textStyle ??
|
||||
AppFonts.yekan16.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -1,9 +1,10 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/steward_allocation/steward_allocation_request.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -16,12 +17,13 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
||||
Rx<Color> bgConfirmAllColor = AppColor.blueNormal.obs;
|
||||
RxInt currentPage = 1.obs;
|
||||
final RxBool isLoadingMoreAllocationsMade = false.obs;
|
||||
|
||||
WarehouseAndDistributionRootLogic rootLogic =
|
||||
Get.find<WarehouseAndDistributionRootLogic>();
|
||||
RxBool isButtonConfirm = false.obs;
|
||||
|
||||
Rx<Resource<PaginationModel<WaitingArrivalModel>>> waitingProduct =
|
||||
Resource<PaginationModel<WaitingArrivalModel>>.loading().obs;
|
||||
Rx<Resource<PaginationModel<KillHouseBarsResponse>>> waitingBars =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.loading().obs;
|
||||
|
||||
TextEditingController weightController = TextEditingController();
|
||||
TextEditingController countController = TextEditingController();
|
||||
@@ -35,7 +37,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
||||
super.onInit();
|
||||
debounce(
|
||||
searchedValue,
|
||||
(callback) => getWaitingArrivals(),
|
||||
(callback) => getKillHouseBars(),
|
||||
time: Duration(milliseconds: timeDebounce),
|
||||
);
|
||||
}
|
||||
@@ -43,7 +45,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
getWaitingArrivals();
|
||||
getKillHouseBars();
|
||||
approvedWithOtpController.addListener(() {
|
||||
isButtonConfirm.value = approvedWithOtpController.text.trim().length > 4;
|
||||
});
|
||||
@@ -53,12 +55,12 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
||||
searchedValue.value = data?.trim();
|
||||
}
|
||||
|
||||
Future<void> getWaitingArrivals([bool isLoadingMore = false]) async {
|
||||
Future<void> getKillHouseBars([bool isLoadingMore = false]) async {
|
||||
if (isLoadingMore) {
|
||||
isLoadingMoreAllocationsMade.value = true;
|
||||
} else {
|
||||
waitingProduct.value =
|
||||
Resource<PaginationModel<WaitingArrivalModel>>.loading();
|
||||
waitingBars.value =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.loading();
|
||||
}
|
||||
|
||||
if (searchedValue.value != null &&
|
||||
@@ -67,40 +69,42 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
||||
currentPage.value = 1;
|
||||
}
|
||||
|
||||
// TODO: Fix - chickenRepository doesn't exist in rootLogic
|
||||
safeCall(
|
||||
// call: () async => await rootLogic.chickenRepository.getWaitingArrivals(
|
||||
// token: rootLogic.tokenService.accessToken.value!,
|
||||
// queryParameters: buildQueryParams(
|
||||
// queryParams: {'type': 'not_entered'},
|
||||
// pageSize: 20,
|
||||
// page: currentPage.value,
|
||||
// search: 'filter',
|
||||
// role: 'Steward',
|
||||
// value: searchedValue.value,
|
||||
// fromDate: fromDateFilter.value.toDateTime(),
|
||||
// toDate: toDateFilter.value.toDateTime(),
|
||||
// ),
|
||||
// ),
|
||||
call: () async => null as PaginationModel<WaitingArrivalModel>?,
|
||||
call: () async => await rootLogic.killHouseRepository.getBarsForKillHouse(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
queryParameters: buildQueryParams(
|
||||
queryParams: {'type': 'notentered'},
|
||||
pageSize: 20,
|
||||
page: currentPage.value,
|
||||
search: 'filter',
|
||||
role: 'KillHouse',
|
||||
value: searchedValue.value,
|
||||
|
||||
),
|
||||
),
|
||||
onSuccess: (res) async {
|
||||
await Future.delayed(Duration(milliseconds: 200));
|
||||
// TODO: Fix - res type issues
|
||||
// if ((res?.count ?? 0) == 0) {
|
||||
// waitingProduct.value = Resource<PaginationModel<WaitingArrivalModel>>.empty();
|
||||
// } else {
|
||||
// waitingProduct.value = Resource<PaginationModel<WaitingArrivalModel>>.success(
|
||||
// PaginationModel<WaitingArrivalModel>(
|
||||
// count: res?.count ?? 0,
|
||||
// next: res?.next,
|
||||
// previous: res?.previous,
|
||||
// results: [...(waitingProduct.value.data?.results ?? []), ...(res?.results ?? [])],
|
||||
// ),
|
||||
// );
|
||||
// flashingFabBgColor();
|
||||
// }
|
||||
waitingProduct.value =
|
||||
Resource<PaginationModel<WaitingArrivalModel>>.empty();
|
||||
|
||||
if ((res?.count ?? 0) == 0) {
|
||||
waitingBars.value =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.empty();
|
||||
} else {
|
||||
waitingBars.value =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.success(
|
||||
PaginationModel<KillHouseBarsResponse>(
|
||||
count: res?.count ?? 0,
|
||||
next: res?.next,
|
||||
previous: res?.previous,
|
||||
results: [
|
||||
...(waitingBars.value.data?.results ?? []),
|
||||
...(res?.results ?? []),
|
||||
],
|
||||
),
|
||||
);
|
||||
flashingFabBgColor();
|
||||
}
|
||||
waitingBars.value =
|
||||
Resource<PaginationModel<KillHouseBarsResponse>>.empty();
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -133,7 +137,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
||||
eLog(error);
|
||||
},
|
||||
onSuccess: (result) {
|
||||
getWaitingArrivals();
|
||||
getKillHouseBars();
|
||||
rootLogic.onRefresh();
|
||||
clearApprovedController();
|
||||
toggleExpansion();
|
||||
@@ -164,7 +168,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
||||
eLog(error);
|
||||
},
|
||||
onSuccess: (result) {
|
||||
getWaitingArrivals();
|
||||
getKillHouseBars();
|
||||
rootLogic.onRefresh();
|
||||
},
|
||||
);
|
||||
@@ -1,12 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.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/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<WarehouseAndDistributionBuyInProvinceWaitingLogic> {
|
||||
class WarehouseAndDistributionBuyInProvinceWaitingPage
|
||||
extends GetView<WarehouseAndDistributionBuyInProvinceWaitingLogic> {
|
||||
const WarehouseAndDistributionBuyInProvinceWaitingPage({super.key});
|
||||
|
||||
@override
|
||||
@@ -38,14 +38,14 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
},
|
||||
itemCount: data.value.data?.results?.length ?? 0,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||
onLoadMore: () async => controller.getWaitingArrivals(true),
|
||||
onLoadMore: () async => controller.getKillHouseBars(true),
|
||||
);
|
||||
}, controller.waitingProduct),
|
||||
}, controller.waitingBars),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Row itemListWidget(WaitingArrivalModel item) {
|
||||
Row itemListWidget(KillHouseBarsResponse item) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
@@ -58,13 +58,14 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
spacing: 3,
|
||||
children: [
|
||||
Text(
|
||||
'${controller.rootLogic.isKillHouse(item) ? 'کشتارگاه' : 'مباشر'} ${controller.rootLogic.isKillHouse(item) ? item.killHouse?.name : item.steward?.user?.fullname} ',
|
||||
// '${controller.rootLogic.isKillHouse(item) ? 'کشتارگاه' : 'مباشر'} ${controller.rootLogic.isKillHouse(item) ? item.killHouse?.name : item.steward?.user?.fullname} ',
|
||||
'asdasd',
|
||||
textAlign: TextAlign.start,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
Text(
|
||||
item.date?.formattedJalaliDate ?? 'ندارد',
|
||||
'item.date?.formattedJalaliDate '?? 'ندارد',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
||||
),
|
||||
@@ -84,18 +85,23 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
spacing: 6,
|
||||
children: [
|
||||
Visibility(
|
||||
visible: item.product?.name?.contains('مرغ گرم') ?? false,
|
||||
visible: false,
|
||||
child: Assets.vec.hotChickenSvg.svg(
|
||||
width: 24,
|
||||
height: 24,
|
||||
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||
colorFilter: ColorFilter.mode(
|
||||
AppColor.blueNormal,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
item.weightOfCarcasses?.separatedByCommaFa.addKg ?? 'ندارد',
|
||||
'item.weightOfCarcasses?.separatedByCommaFa.addKg '?? 'ندارد',
|
||||
textAlign: TextAlign.left,
|
||||
textDirection: TextDirection.ltr,
|
||||
style: AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal),
|
||||
style: AppFonts.yekan12Bold.copyWith(
|
||||
color: AppColor.blueNormal,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -112,14 +118,15 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
spacing: 3,
|
||||
children: [
|
||||
Text(
|
||||
Text('asdasd'),
|
||||
/* Text(
|
||||
(item.approvedPriceStatus ?? false) ? 'دولتی' : 'آزاد',
|
||||
style: AppFonts.yekan12Bold.copyWith(
|
||||
color: (item.approvedPriceStatus ?? false)
|
||||
? AppColor.blueNormal
|
||||
: AppColor.greenNormal,
|
||||
),
|
||||
),
|
||||
),
|
||||
), */
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -127,10 +134,13 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
);
|
||||
}
|
||||
|
||||
Container itemListExpandedWidget(WaitingArrivalModel item) {
|
||||
Container itemListExpandedWidget(KillHouseBarsResponse item) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
@@ -138,7 +148,8 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'${controller.rootLogic.isKillHouse(item) ? item.killHouse?.name : item.steward?.user?.fullname} ',
|
||||
//'${controller.rootLogic.isKillHouse(item) ? item.killHouse?.name : item.steward?.user?.fullname} ',
|
||||
' sasssss ',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||
),
|
||||
@@ -169,24 +180,31 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
spacing: 3,
|
||||
children: [
|
||||
Text(
|
||||
item.date?.toJalali.formatter.wN ?? 'ندارد',
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
|
||||
'item.date?.toJalali.formatter.wN '?? 'ندارد',
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.textColor,
|
||||
),
|
||||
),
|
||||
|
||||
Text(
|
||||
'${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'ندارد'}',
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||
//'${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'ندارد'}',
|
||||
'swwwqqqqqqqqqqq',
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.blueNormal,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Text(
|
||||
'${item.date?.toJalali.formatter.y}',
|
||||
//'${item.date?.toJalali.formatter.y}',
|
||||
'1404',
|
||||
style: AppFonts.yekan20.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
|
||||
Text(
|
||||
'${item.date?.toJalali.formatter.tHH}:${item.date?.toJalali.formatter.tMM ?? 'ندارد'}',
|
||||
//'${item.date?.toJalali.formatter.tHH}:${item.date?.toJalali.formatter.tMM ?? 'ندارد'}',
|
||||
'12:00',
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
],
|
||||
@@ -196,34 +214,47 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
buildRow(
|
||||
title: 'مشخصات فروشنده',
|
||||
value:
|
||||
'${controller.rootLogic.isKillHouse(item) ? item.killHouse?.killHouseOperator?.user?.fullname : item.steward?.user?.fullname} ',
|
||||
//'${controller.rootLogic.isKillHouse(item) ? item.killHouse?.killHouseOperator?.user?.fullname : item.steward?.user?.fullname} ',
|
||||
'sasdasd',
|
||||
),
|
||||
buildRow(
|
||||
title: 'تلفن فروشنده',
|
||||
value:
|
||||
'${controller.rootLogic.isKillHouse(item) ? item.killHouse?.killHouseOperator?.user?.mobile : item.steward?.user?.mobile} ',
|
||||
//'${controller.rootLogic.isKillHouse(item) ? item.killHouse?.killHouseOperator?.user?.mobile : item.steward?.user?.mobile} ',
|
||||
'09123456789',
|
||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'ندارد'),
|
||||
buildRow(title: ' سهمیه', value: item.quota?.faTitle ?? 'ندارد'),
|
||||
buildRow(title: 'نوع فروش', value: item.saleType == "governmental" ? 'دولتی' : 'آزاد'),
|
||||
buildRow(title: 'محصول', value: item.product?.name ?? 'ندارد'),
|
||||
buildRow(
|
||||
title: 'نوع تخصیص',
|
||||
value: 'item.allocationType?.faAllocationType '?? 'ندارد',
|
||||
),
|
||||
buildRow(title: ' سهمیه', value: 'item.quota?.faTitle '?? 'ندارد'),
|
||||
buildRow(
|
||||
title: 'نوع فروش',
|
||||
value: 'asdasd',
|
||||
),
|
||||
buildRow(title: 'محصول', value: 'item.product?.name '?? 'ندارد'),
|
||||
buildRow(
|
||||
title: 'تاریخ تولید گوشت',
|
||||
value: item.productionDate?.toJalali.toJalaliDateTime() ?? 'ندارد',
|
||||
value: 'item.productionDate?.toJalali.toJalaliDateTime() '?? 'ندارد',
|
||||
),
|
||||
buildRow(
|
||||
title: 'وزن خریداری شده',
|
||||
value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم',
|
||||
value: 'item.weightOfCarcasses?.separatedByCommaFa '?? 'ندارد',
|
||||
),
|
||||
buildRow(
|
||||
title: 'قیمت هر کیلوگرم',
|
||||
titleLabel: (item.approvedPriceStatus ?? false) ? 'دولتی' : 'آزاد',
|
||||
titleLabelStyle: AppFonts.yekan14Bold.copyWith(color: AppColor.greenNormal),
|
||||
value: '${item.amount?.separatedByCommaFa} ریال',
|
||||
titleLabel: (false) ? 'دولتی' : 'آزاد',
|
||||
titleLabelStyle: AppFonts.yekan14Bold.copyWith(
|
||||
color: AppColor.greenNormal,
|
||||
),
|
||||
value: 'item.amount?.separatedByCommaFa '?? 'ندارد',
|
||||
),
|
||||
|
||||
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'),
|
||||
buildRow(
|
||||
title: 'قیمت کل',
|
||||
value: 'item.totalAmount?.separatedByCommaFa '?? 'ندارد',
|
||||
),
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -236,7 +267,10 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
height: 40.h,
|
||||
isLoading: data[item.key!] ?? false,
|
||||
onPressed: () async {
|
||||
await Get.bottomSheet(conformationBottomSheet(item), isScrollControlled: true);
|
||||
await Get.bottomSheet(
|
||||
conformationBottomSheet(item),
|
||||
isScrollControlled: true,
|
||||
);
|
||||
},
|
||||
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
@@ -248,12 +282,12 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
width: 150.w,
|
||||
height: 40.h,
|
||||
onPressed: () {
|
||||
buildWarningDialog(
|
||||
/* buildWarningDialog(
|
||||
title: 'اخطار',
|
||||
middleText: 'آیا از رد شدن این مورد اطمینان دارید؟',
|
||||
onConfirm: () => controller.denyEntries(item),
|
||||
onRefresh: () => controller.getWaitingArrivals(),
|
||||
);
|
||||
onRefresh: () => controller.getKillHouseBars(),
|
||||
); */
|
||||
},
|
||||
borderColor: AppColor.redNormal,
|
||||
),
|
||||
@@ -264,8 +298,10 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
);
|
||||
}
|
||||
|
||||
Widget conformationBottomSheet(WaitingArrivalModel item) {
|
||||
controller.weightController.text = item.weightOfCarcasses.separatedByComma;
|
||||
Widget conformationBottomSheet(KillHouseBarsResponse item) {
|
||||
//todo
|
||||
//controller.weightController.text = item.weightOfCarcasses.separatedByComma;
|
||||
controller.weightController.text = 352301.separatedByComma;
|
||||
return BaseBottomSheet(
|
||||
height: 450.h,
|
||||
child: Column(
|
||||
@@ -276,25 +312,37 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
label: 'وزن(کیلوگرم)',
|
||||
controller: controller.weightController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
SeparatorInputFormatter(),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
RTextField(
|
||||
label: 'حجم(قطعه)',
|
||||
controller: controller.countController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
SeparatorInputFormatter(),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
RTextField(
|
||||
label: 'افت وزن(کیلوگرم)',
|
||||
controller: controller.lossController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
SeparatorInputFormatter(),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
|
||||
Text('تایید ', style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor)),
|
||||
Text(
|
||||
'تایید ',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
ObxValue((data) {
|
||||
return Column(
|
||||
children: [
|
||||
@@ -343,7 +391,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
: true,
|
||||
text: 'تایید',
|
||||
onPressed: () async {
|
||||
await controller.acceptEntries(item);
|
||||
// await controller.acceptEntries(item);
|
||||
},
|
||||
isFullWidth: true,
|
||||
);
|
||||
@@ -365,7 +413,12 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
||||
child: Row(
|
||||
children: [
|
||||
Radio(value: value),
|
||||
Text(label, style: textStyle ?? AppFonts.yekan16.copyWith(color: AppColor.textColor)),
|
||||
Text(
|
||||
label,
|
||||
style:
|
||||
textStyle ??
|
||||
AppFonts.yekan16.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -3,9 +3,9 @@ import 'package:rasadyar_chicken/data/models/request/create_steward_free_bar/cre
|
||||
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/pages/kill_house/warehouse_and_distribution/buy/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/buy/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class WarehouseAndDistributionHomeLogic extends GetxController {
|
||||
@@ -3,7 +3,7 @@ import 'dart:async';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/local/widely_used_local_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||
@@ -11,12 +11,13 @@ import 'package:rasadyar_chicken/data/models/response/roles_products/roles_produ
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_remain_weight/steward_remain_weight.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'
|
||||
hide ProductModel;
|
||||
import 'package:rasadyar_chicken/data/repositories/chicken/chicken_repository.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/kill_house/kill_house_repository.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/common/profile/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/buy/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/home/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sale/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/segmentation/view.dart';
|
||||
import 'package:rasadyar_chicken/features/common/profile/view.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/buy/view.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/home/view.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sale/view.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/segmentation/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||
@@ -40,6 +41,7 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
||||
];
|
||||
|
||||
late KillHouseRepository killHouseRepository;
|
||||
late ChickenRepository chickenRepository;
|
||||
|
||||
final defaultRoutes = <int, String>{
|
||||
0: ChickenRoutes.buyWarehouseAndDistribution,
|
||||
@@ -68,6 +70,7 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
||||
super.onInit();
|
||||
|
||||
killHouseRepository = diChicken.get<KillHouseRepository>();
|
||||
chickenRepository = diChicken.get<ChickenRepository>();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -152,7 +155,7 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
||||
_provincesCancelToken = CancelToken();
|
||||
|
||||
try {
|
||||
final res = await killHouseRepository.getProvince(
|
||||
final res = await chickenRepository.getProvince(
|
||||
cancelToken: _provincesCancelToken,
|
||||
);
|
||||
if (res != null) {
|
||||
@@ -170,7 +173,7 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
||||
|
||||
Future<void> getBroadcastPrice() async {
|
||||
safeCall(
|
||||
call: () async => await killHouseRepository.getBroadcastPrice(
|
||||
call: () async => await chickenRepository.getBroadcastPrice(
|
||||
token: tokenService.accessToken.value!,
|
||||
),
|
||||
onSuccess: (result) {
|
||||
@@ -182,8 +185,9 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
||||
|
||||
Future<void> getRolesProducts() async {
|
||||
await safeCall(
|
||||
call: () async => await killHouseRepository.getRolesProducts(
|
||||
call: () async => await chickenRepository.getRolesProducts(
|
||||
token: tokenService.accessToken.value!,
|
||||
queryParameters: buildRawQueryParams(role: 'KillHouse'),
|
||||
),
|
||||
onSuccess: (result) {
|
||||
if (result != null) {
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.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/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/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';
|
||||
@@ -4,7 +4,7 @@ import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_m
|
||||
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/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class WarehouseAndDistributionSaleLogic extends GetxController {
|
||||
@@ -9,8 +9,8 @@ import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_remain_weight/steward_remain_weight.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sales_in_province/widgets/cu_sale_in_provience.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sales_in_province/widgets/cu_sale_in_provience.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';
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sales_in_province/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sales_in_province/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
Widget addOrEditBottomSheet(WarehouseAndDistributionSalesInProvinceLogic controller, {bool isEditMode = false}) {
|
||||
@@ -6,10 +6,10 @@ 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/data/models/response/steward_remain_weight/steward_remain_weight.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sales_out_of_province_buyers/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sales_out_of_province_sales_list/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sales_out_of_province_buyers/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sales_out_of_province_sales_list/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/out_province_carcasses_buyer/out_province_carcasses_buyer.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sales_out_of_province/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sales_out_of_province/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -4,9 +4,9 @@ import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_pr
|
||||
import 'package:rasadyar_chicken/data/models/response/out_province_carcasses_buyer/out_province_carcasses_buyer.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/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/sales_out_of_province_buyers/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sale/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/sales_out_of_province_buyers/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_
|
||||
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/segmentation_model/segmentation_model.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/segmentation_model/segmentation_model.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/segmentation/widgets/cu_bottom_sheet.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/segmentation/widgets/cu_bottom_sheet.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/segmentation/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/kill_house/warehouse_and_distribution/segmentation/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
Widget addOrEditBottomSheet(WarehouseAndDistributionSegmentationLogic controller, {bool isOnEdit = false}) {
|
||||
@@ -2,8 +2,8 @@ export 'buy/logic.dart';
|
||||
export 'buy/view.dart';
|
||||
export 'buy_in_province/logic.dart';
|
||||
export 'buy_in_province/view.dart';
|
||||
export 'buy_in_province_all/logic.dart';
|
||||
export 'buy_in_province_all/view.dart';
|
||||
export 'buy_in_province_entered/logic.dart';
|
||||
export 'buy_in_province_entered/view.dart';
|
||||
export 'buy_in_province_waiting/logic.dart';
|
||||
export 'buy_in_province_waiting/view.dart';
|
||||
export 'buy_out_of_province/logic.dart';
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_farm_inspection/home/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_farm_inspection/home/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
Widget farmInfoWidget({
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_farm_inspection/widgets/card_info.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_farm_inspection/widgets/card_info.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import '../home/logic.dart';
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_farm_inspection/widgets/card_info.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_farm_inspection/widgets/card_info.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import '../home/logic.dart';
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_farm_inspection/widgets/card_info.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_farm_inspection/widgets/card_info.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import '../home/logic.dart';
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_farm_inspection/widgets/card_info.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_farm_inspection/widgets/card_info.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import '../home/logic.dart';
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class ActiveHatchingLogic extends GetxController {
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/active_hatching/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/active_hatching/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';
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/home/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/home/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class FarmLogic extends GetxController {
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/killing_registration/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/killing_registration/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class GenocideLogic extends GetxController {
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/killing_registration/view.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/killing_registration/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/filter_bottom_sheet.dart';
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_core/presentation/widget/custom/information_card_widget.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class InspectionPoultryScienceLogic extends GetxController {
|
||||
@@ -7,8 +7,8 @@ import 'package:rasadyar_chicken/data/models/response/kill_house_poultry/kill_ho
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/genocide/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/genocide/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class KillingRegistrationLogic extends GetxController {
|
||||
@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/poultry_science/poultry_science_repository.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/common/profile/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/home/view.dart';
|
||||
import 'package:rasadyar_chicken/features/common/profile/view.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/home/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:rasadyar_chicken/presentation/pages/steward/buy/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/steward/buy_in_province_all/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/steward/buy_in_province_waiting/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/steward/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/steward/buy/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/steward/buy_in_province_all/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/steward/buy_in_province_waiting/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/steward/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class BuyInProvinceLogic extends GetxController {
|
||||
@@ -1,6 +1,6 @@
|
||||
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/features/steward/buy_in_province_all/view.dart';
|
||||
import 'package:rasadyar_chicken/features/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/inventory/inventory_widget.dart';
|
||||
@@ -22,21 +22,58 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
||||
onFilterTap: () {
|
||||
Get.bottomSheet(filterBottomSheet());
|
||||
},
|
||||
onRefresh: controller.onRefresh,
|
||||
onRefresh: controller.onRefresh,
|
||||
child: Column(
|
||||
children: [
|
||||
ObxValue((data) {
|
||||
return InventoryWidget(inventoryModel: data.value!);
|
||||
}, controller.rootLogic.inventoryModel),
|
||||
|
||||
Obx(() {
|
||||
var list = [
|
||||
InventoryItemData(
|
||||
title: 'موجودی انبار',
|
||||
value: controller
|
||||
.rootLogic
|
||||
.inventoryModel
|
||||
.value
|
||||
?.totalRemainWeight
|
||||
?.separatedByCommaFa,
|
||||
color: const Color(0xFFEAFBFC),
|
||||
),
|
||||
InventoryItemData(
|
||||
title: 'مانده دولتی',
|
||||
value: controller
|
||||
.rootLogic
|
||||
.inventoryModel
|
||||
.value
|
||||
?.totalGovernmentalRemainWeight
|
||||
?.separatedByCommaFa,
|
||||
|
||||
color: const Color(0xFFF5ECEE),
|
||||
),
|
||||
InventoryItemData(
|
||||
title: 'مانده آزاد',
|
||||
value: controller
|
||||
.rootLogic
|
||||
.inventoryModel
|
||||
.value
|
||||
?.totalFreeRemainWeight
|
||||
?.separatedByCommaFa,
|
||||
|
||||
color: const Color(0xFFF1E7FF),
|
||||
),
|
||||
];
|
||||
|
||||
return InventoryWidget(inventoryModel: list);
|
||||
}),
|
||||
|
||||
segmentWidget(),
|
||||
ObxValue((index) {
|
||||
return Expanded(
|
||||
child: index.value == 0 ? BuyInProvinceWaitingPage() : BuyInProvinceAllPage(),
|
||||
child: index.value == 0
|
||||
? BuyInProvinceWaitingPage()
|
||||
: BuyInProvinceAllPage(),
|
||||
);
|
||||
}, controller.selectedSegmentIndex),
|
||||
],
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -52,7 +89,8 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
||||
borderColor: const Color(0xFFB4B4B4),
|
||||
selectedBorderColor: AppColor.blueNormal,
|
||||
selectedBackgroundColor: AppColor.blueLight,
|
||||
onSegmentSelected: (index) => controller.selectedSegmentIndex.value = index,
|
||||
onSegmentSelected: (index) =>
|
||||
controller.selectedSegmentIndex.value = index,
|
||||
backgroundColor: AppColor.whiteGreyNormal,
|
||||
),
|
||||
),
|
||||
@@ -67,14 +105,18 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
||||
child: Column(
|
||||
spacing: 16,
|
||||
children: [
|
||||
Text('فیلترها', style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal)),
|
||||
Text(
|
||||
'فیلترها',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
Expanded(
|
||||
child: dateFilterWidget(
|
||||
date: controller.fromDateFilter,
|
||||
onChanged: (jalali) => controller.fromDateFilter.value = jalali,
|
||||
onChanged: (jalali) =>
|
||||
controller.fromDateFilter.value = jalali,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/steward_allocation/steward_allocation_request.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/steward/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/features/steward/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class BuyInProvinceAllLogic extends GetxController {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user