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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
abstract class ChickenRemoteDatasource {
|
abstract class ChickenRemoteDatasource {
|
||||||
Future<List<ProductModel>?> getRolesProduct({
|
Future<List<ProductModel>?> getRolesProducts({
|
||||||
required String token,
|
required String token,
|
||||||
required String role,
|
CancelToken? cancelToken,
|
||||||
CancelToken? cancelToken,
|
Map<String, dynamic>? queryParameters,
|
||||||
});
|
});
|
||||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||||
required String token,
|
required String token,
|
||||||
@@ -75,11 +75,6 @@ abstract class ChickenRemoteDatasource {
|
|||||||
required List<String> allocationTokens,
|
required List<String> allocationTokens,
|
||||||
});
|
});
|
||||||
|
|
||||||
Future<List<ProductModel>?> getRolesProducts({
|
|
||||||
required String token,
|
|
||||||
Map<String, dynamic>? queryParameters,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<List<GuildModel>?> getGuilds({
|
Future<List<GuildModel>?> getGuilds({
|
||||||
required String token,
|
required String token,
|
||||||
Map<String, dynamic>? queryParameters,
|
Map<String, dynamic>? queryParameters,
|
||||||
|
|||||||
@@ -32,24 +32,6 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
|
|||||||
|
|
||||||
ChickenRemoteDatasourceImp(this._httpClient);
|
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
|
@override
|
||||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||||
required String token,
|
required String token,
|
||||||
@@ -178,11 +160,13 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
|
|||||||
@override
|
@override
|
||||||
Future<List<ProductModel>?> getRolesProducts({
|
Future<List<ProductModel>?> getRolesProducts({
|
||||||
required String token,
|
required String token,
|
||||||
|
CancelToken? cancelToken,
|
||||||
Map<String, dynamic>? queryParameters,
|
Map<String, dynamic>? queryParameters,
|
||||||
}) async {
|
}) async {
|
||||||
var res = await _httpClient.get(
|
var res = await _httpClient.get(
|
||||||
'/roles-products/',
|
'/roles-products/',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
|
cancelToken: cancelToken,
|
||||||
queryParameters: queryParameters,
|
queryParameters: queryParameters,
|
||||||
fromJsonList: (json) => json
|
fromJsonList: (json) => json
|
||||||
.map((item) => ProductModel.fromJson(item as Map<String, dynamic>))
|
.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_house/kill_house_response.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||||
as listModel;
|
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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
abstract class KillHouseRemoteDataSource {
|
abstract class KillHouseRemoteDataSource {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//region requestKill
|
//region requestKill
|
||||||
Future<List<KillHouseResponse>?> getKillHouseList({
|
Future<List<KillHouseResponse>?> getKillHouseList({
|
||||||
required String token,
|
required String token,
|
||||||
@@ -45,9 +42,10 @@ abstract class KillHouseRemoteDataSource {
|
|||||||
Map<String, dynamic>? queryParameters,
|
Map<String, dynamic>? queryParameters,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||||
|
required String token,
|
||||||
|
Map<String, dynamic>? queryParameters,
|
||||||
|
});
|
||||||
|
|
||||||
//endregion
|
//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_house/kill_house_response.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||||
as listModel;
|
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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
||||||
@@ -109,5 +110,24 @@ class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
|||||||
return res.data;
|
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
|
//endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ Future<void> setupChickenDI() async {
|
|||||||
diChicken.registerLazySingleton<KillHouseRepository>(
|
diChicken.registerLazySingleton<KillHouseRepository>(
|
||||||
() => KillHouseRepositoryImpl(
|
() => KillHouseRepositoryImpl(
|
||||||
diChicken.get<KillHouseRemoteDataSource>(),
|
diChicken.get<KillHouseRemoteDataSource>(),
|
||||||
diChicken.get<ChickenRepository>(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
//endregion
|
//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,
|
int? numberOfCarcasses,
|
||||||
String? date,
|
String? date,
|
||||||
String? barImage,
|
String? barImage,
|
||||||
|
String? distributionType,
|
||||||
}) = _CreateStewardFreeBar;
|
}) = _CreateStewardFreeBar;
|
||||||
|
|
||||||
factory CreateStewardFreeBar.fromJson(Map<String, dynamic> json) =>
|
factory CreateStewardFreeBar.fromJson(Map<String, dynamic> json) =>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$CreateStewardFreeBar {
|
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
|
/// Create a copy of CreateStewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $CreateStewardFreeBarCopyWith<CreateStewardFreeBar> get copyWith => _$CreateStew
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory $CreateStewardFreeBarCopyWith(CreateStewardFreeBar value, $Res Function(CreateStewardFreeBar) _then) = _$CreateStewardFreeBarCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of CreateStewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? 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(
|
return _then(_self.copyWith(
|
||||||
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
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
|
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?,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 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?,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?,
|
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) {
|
switch (_that) {
|
||||||
case _CreateStewardFreeBar() when $default != null:
|
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();
|
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) {
|
switch (_that) {
|
||||||
case _CreateStewardFreeBar():
|
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');
|
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) {
|
switch (_that) {
|
||||||
case _CreateStewardFreeBar() when $default != null:
|
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;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -218,7 +219,7 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _CreateStewardFreeBar implements CreateStewardFreeBar {
|
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);
|
factory _CreateStewardFreeBar.fromJson(Map<String, dynamic> json) => _$CreateStewardFreeBarFromJson(json);
|
||||||
|
|
||||||
@override final String? productKey;
|
@override final String? productKey;
|
||||||
@@ -231,6 +232,7 @@ class _CreateStewardFreeBar implements CreateStewardFreeBar {
|
|||||||
@override final int? numberOfCarcasses;
|
@override final int? numberOfCarcasses;
|
||||||
@override final String? date;
|
@override final String? date;
|
||||||
@override final String? barImage;
|
@override final String? barImage;
|
||||||
|
@override final String? distributionType;
|
||||||
|
|
||||||
/// Create a copy of CreateStewardFreeBar
|
/// Create a copy of CreateStewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -245,16 +247,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory _$CreateStewardFreeBarCopyWith(_CreateStewardFreeBar value, $Res Function(_CreateStewardFreeBar) _then) = __$CreateStewardFreeBarCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of CreateStewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? 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(
|
return _then(_CreateStewardFreeBar(
|
||||||
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
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
|
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?,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 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?,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?,
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ _CreateStewardFreeBar _$CreateStewardFreeBarFromJson(
|
|||||||
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
||||||
date: json['date'] as String?,
|
date: json['date'] as String?,
|
||||||
barImage: json['bar_image'] as String?,
|
barImage: json['bar_image'] as String?,
|
||||||
|
distributionType: json['distribution_type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$CreateStewardFreeBarToJson(
|
Map<String, dynamic> _$CreateStewardFreeBarToJson(
|
||||||
@@ -34,4 +35,5 @@ Map<String, dynamic> _$CreateStewardFreeBarToJson(
|
|||||||
'number_of_carcasses': instance.numberOfCarcasses,
|
'number_of_carcasses': instance.numberOfCarcasses,
|
||||||
'date': instance.date,
|
'date': instance.date,
|
||||||
'bar_image': instance.barImage,
|
'bar_image': instance.barImage,
|
||||||
|
'distribution_type': instance.distributionType,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ abstract class StewardFreeSaleBarRequest with _$StewardFreeSaleBarRequest {
|
|||||||
String? quota,
|
String? quota,
|
||||||
String? saleType,
|
String? saleType,
|
||||||
String? productionDate,
|
String? productionDate,
|
||||||
|
String? distributionType,
|
||||||
}) = _StewardFreeSaleBarRequest;
|
}) = _StewardFreeSaleBarRequest;
|
||||||
|
|
||||||
factory StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) =>
|
factory StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) =>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$StewardFreeSaleBarRequest {
|
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
|
/// Create a copy of StewardFreeSaleBarRequest
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $StewardFreeSaleBarRequestCopyWith<StewardFreeSaleBarRequest> get copyWith => _$
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory $StewardFreeSaleBarRequestCopyWith(StewardFreeSaleBarRequest value, $Res Function(StewardFreeSaleBarRequest) _then) = _$StewardFreeSaleBarRequestCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of StewardFreeSaleBarRequest
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? 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(
|
return _then(_self.copyWith(
|
||||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
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
|
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?,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?,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?,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?,
|
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) {
|
switch (_that) {
|
||||||
case _StewardFreeSaleBarRequest() when $default != null:
|
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();
|
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) {
|
switch (_that) {
|
||||||
case _StewardFreeSaleBarRequest():
|
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');
|
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) {
|
switch (_that) {
|
||||||
case _StewardFreeSaleBarRequest() when $default != null:
|
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;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -224,7 +225,7 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
|
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);
|
factory _StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) => _$StewardFreeSaleBarRequestFromJson(json);
|
||||||
|
|
||||||
@override final String? buyerKey;
|
@override final String? buyerKey;
|
||||||
@@ -243,6 +244,7 @@ class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
|
|||||||
@override final String? quota;
|
@override final String? quota;
|
||||||
@override final String? saleType;
|
@override final String? saleType;
|
||||||
@override final String? productionDate;
|
@override final String? productionDate;
|
||||||
|
@override final String? distributionType;
|
||||||
|
|
||||||
/// Create a copy of StewardFreeSaleBarRequest
|
/// Create a copy of StewardFreeSaleBarRequest
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -257,16 +259,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory _$StewardFreeSaleBarRequestCopyWith(_StewardFreeSaleBarRequest value, $Res Function(_StewardFreeSaleBarRequest) _then) = __$StewardFreeSaleBarRequestCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of StewardFreeSaleBarRequest
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? 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(
|
return _then(_StewardFreeSaleBarRequest(
|
||||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
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
|
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?,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?,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?,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?,
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ _StewardFreeSaleBarRequest _$StewardFreeSaleBarRequestFromJson(
|
|||||||
quota: json['quota'] as String?,
|
quota: json['quota'] as String?,
|
||||||
saleType: json['sale_type'] as String?,
|
saleType: json['sale_type'] as String?,
|
||||||
productionDate: json['production_date'] as String?,
|
productionDate: json['production_date'] as String?,
|
||||||
|
distributionType: json['distribution_type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
||||||
@@ -46,4 +47,5 @@ Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
|||||||
'quota': instance.quota,
|
'quota': instance.quota,
|
||||||
'sale_type': instance.saleType,
|
'sale_type': instance.saleType,
|
||||||
'production_date': instance.productionDate,
|
'production_date': instance.productionDate,
|
||||||
|
'distribution_type': instance.distributionType,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ abstract class SubmitStewardAllocation with _$SubmitStewardAllocation {
|
|||||||
bool? approvedPriceStatus,
|
bool? approvedPriceStatus,
|
||||||
String? productionDate,
|
String? productionDate,
|
||||||
String? date,
|
String? date,
|
||||||
|
String? distributionType,
|
||||||
}) = _SubmitStewardAllocation;
|
}) = _SubmitStewardAllocation;
|
||||||
|
|
||||||
factory SubmitStewardAllocation.fromJson(Map<String, dynamic> json) =>
|
factory SubmitStewardAllocation.fromJson(Map<String, dynamic> json) =>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SubmitStewardAllocation {
|
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
|
/// Create a copy of SubmitStewardAllocation
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $SubmitStewardAllocationCopyWith<SubmitStewardAllocation> get copyWith => _$Subm
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory $SubmitStewardAllocationCopyWith(SubmitStewardAllocation value, $Res Function(SubmitStewardAllocation) _then) = _$SubmitStewardAllocationCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of SubmitStewardAllocation
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? 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(
|
return _then(_self.copyWith(
|
||||||
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable
|
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
|
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 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 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?,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?,
|
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) {
|
switch (_that) {
|
||||||
case _SubmitStewardAllocation() when $default != null:
|
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();
|
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) {
|
switch (_that) {
|
||||||
case _SubmitStewardAllocation():
|
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');
|
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) {
|
switch (_that) {
|
||||||
case _SubmitStewardAllocation() when $default != null:
|
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;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -223,7 +224,7 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SubmitStewardAllocation implements SubmitStewardAllocation {
|
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);
|
factory _SubmitStewardAllocation.fromJson(Map<String, dynamic> json) => _$SubmitStewardAllocationFromJson(json);
|
||||||
|
|
||||||
@override final String? sellerType;
|
@override final String? sellerType;
|
||||||
@@ -241,6 +242,7 @@ class _SubmitStewardAllocation implements SubmitStewardAllocation {
|
|||||||
@override final bool? approvedPriceStatus;
|
@override final bool? approvedPriceStatus;
|
||||||
@override final String? productionDate;
|
@override final String? productionDate;
|
||||||
@override final String? date;
|
@override final String? date;
|
||||||
|
@override final String? distributionType;
|
||||||
|
|
||||||
/// Create a copy of SubmitStewardAllocation
|
/// Create a copy of SubmitStewardAllocation
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -255,16 +257,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory _$SubmitStewardAllocationCopyWith(_SubmitStewardAllocation value, $Res Function(_SubmitStewardAllocation) _then) = __$SubmitStewardAllocationCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of SubmitStewardAllocation
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? 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(
|
return _then(_SubmitStewardAllocation(
|
||||||
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable
|
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
|
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 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 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?,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?,
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ _SubmitStewardAllocation _$SubmitStewardAllocationFromJson(
|
|||||||
approvedPriceStatus: json['approved_price_status'] as bool?,
|
approvedPriceStatus: json['approved_price_status'] as bool?,
|
||||||
productionDate: json['production_date'] as String?,
|
productionDate: json['production_date'] as String?,
|
||||||
date: json['date'] as String?,
|
date: json['date'] as String?,
|
||||||
|
distributionType: json['distribution_type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SubmitStewardAllocationToJson(
|
Map<String, dynamic> _$SubmitStewardAllocationToJson(
|
||||||
@@ -44,4 +45,5 @@ Map<String, dynamic> _$SubmitStewardAllocationToJson(
|
|||||||
'approved_price_status': instance.approvedPriceStatus,
|
'approved_price_status': instance.approvedPriceStatus,
|
||||||
'production_date': instance.productionDate,
|
'production_date': instance.productionDate,
|
||||||
'date': instance.date,
|
'date': instance.date,
|
||||||
|
'distribution_type': instance.distributionType,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ abstract class SegmentationModel with _$SegmentationModel {
|
|||||||
DateTime? date,
|
DateTime? date,
|
||||||
ToGuild? toGuild,
|
ToGuild? toGuild,
|
||||||
String? productionDate,
|
String? productionDate,
|
||||||
|
String? distributionType,
|
||||||
}) = _SegmentationModel;
|
}) = _SegmentationModel;
|
||||||
|
|
||||||
factory SegmentationModel.fromJson(Map<String, dynamic> json) =>
|
factory SegmentationModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SegmentationModel {
|
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
|
/// Create a copy of SegmentationModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $SegmentationModelCopyWith<SegmentationModel> get copyWith => _$SegmentationMode
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory $SegmentationModelCopyWith(SegmentationModel value, $Res Function(SegmentationModel) _then) = _$SegmentationModelCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of SegmentationModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? 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(
|
return _then(_self.copyWith(
|
||||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -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 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 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 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?,
|
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) {
|
switch (_that) {
|
||||||
case _SegmentationModel() when $default != null:
|
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();
|
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) {
|
switch (_that) {
|
||||||
case _SegmentationModel():
|
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');
|
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) {
|
switch (_that) {
|
||||||
case _SegmentationModel() when $default != null:
|
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;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -243,7 +244,7 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SegmentationModel implements SegmentationModel {
|
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);
|
factory _SegmentationModel.fromJson(Map<String, dynamic> json) => _$SegmentationModelFromJson(json);
|
||||||
|
|
||||||
@override final String? key;
|
@override final String? key;
|
||||||
@@ -257,6 +258,7 @@ class _SegmentationModel implements SegmentationModel {
|
|||||||
@override final DateTime? date;
|
@override final DateTime? date;
|
||||||
@override final ToGuild? toGuild;
|
@override final ToGuild? toGuild;
|
||||||
@override final String? productionDate;
|
@override final String? productionDate;
|
||||||
|
@override final String? distributionType;
|
||||||
|
|
||||||
/// Create a copy of SegmentationModel
|
/// Create a copy of SegmentationModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -271,16 +273,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory _$SegmentationModelCopyWith(_SegmentationModel value, $Res Function(_SegmentationModel) _then) = __$SegmentationModelCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of SegmentationModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? 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(
|
return _then(_SegmentationModel(
|
||||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -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 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 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 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?,
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ _SegmentationModel _$SegmentationModelFromJson(Map<String, dynamic> json) =>
|
|||||||
? null
|
? null
|
||||||
: ToGuild.fromJson(json['to_guild'] as Map<String, dynamic>),
|
: ToGuild.fromJson(json['to_guild'] as Map<String, dynamic>),
|
||||||
productionDate: json['production_date'] as String?,
|
productionDate: json['production_date'] as String?,
|
||||||
|
distributionType: json['distribution_type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
|
Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
|
||||||
@@ -40,6 +41,7 @@ Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
|
|||||||
'date': instance.date?.toIso8601String(),
|
'date': instance.date?.toIso8601String(),
|
||||||
'to_guild': instance.toGuild,
|
'to_guild': instance.toGuild,
|
||||||
'production_date': instance.productionDate,
|
'production_date': instance.productionDate,
|
||||||
|
'distribution_type': instance.distributionType,
|
||||||
};
|
};
|
||||||
|
|
||||||
_Buyer _$BuyerFromJson(Map<String, dynamic> json) => _Buyer(
|
_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 {
|
abstract class ChickenRepository {
|
||||||
//region Remote
|
//region Remote
|
||||||
|
Future<List<ProductModel>?> getRolesProducts({
|
||||||
|
required String token,
|
||||||
|
CancelToken? cancelToken,
|
||||||
|
Map<String, dynamic>? queryParameters,
|
||||||
|
});
|
||||||
|
|
||||||
//region Steward
|
//region Steward
|
||||||
Future<List<ProductModel>?> getRolesProduct({
|
|
||||||
required String token,
|
|
||||||
required String role,
|
|
||||||
CancelToken? cancelToken,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||||
required String token,
|
required String token,
|
||||||
@@ -81,11 +81,6 @@ abstract class ChickenRepository {
|
|||||||
required List<String> allocationTokens,
|
required List<String> allocationTokens,
|
||||||
});
|
});
|
||||||
|
|
||||||
Future<List<ProductModel>?> getRolesProducts({
|
|
||||||
required String token,
|
|
||||||
Map<String, dynamic>? queryParameters,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<List<GuildModel>?> getGuilds({
|
Future<List<GuildModel>?> getGuilds({
|
||||||
required String token,
|
required String token,
|
||||||
Map<String, dynamic>? queryParameters,
|
Map<String, dynamic>? queryParameters,
|
||||||
|
|||||||
@@ -37,19 +37,6 @@ class ChickenRepositoryImp implements ChickenRepository {
|
|||||||
ChickenRepositoryImp({required this.remote, required this.local});
|
ChickenRepositoryImp({required this.remote, required this.local});
|
||||||
|
|
||||||
//region Remote
|
//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
|
@override
|
||||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||||
@@ -145,10 +132,12 @@ class ChickenRepositoryImp implements ChickenRepository {
|
|||||||
@override
|
@override
|
||||||
Future<List<ProductModel>?> getRolesProducts({
|
Future<List<ProductModel>?> getRolesProducts({
|
||||||
required String token,
|
required String token,
|
||||||
|
CancelToken? cancelToken,
|
||||||
Map<String, dynamic>? queryParameters,
|
Map<String, dynamic>? queryParameters,
|
||||||
}) async {
|
}) async {
|
||||||
var res = await remote.getRolesProducts(
|
var res = await remote.getRolesProducts(
|
||||||
token: token,
|
token: token,
|
||||||
|
cancelToken: cancelToken,
|
||||||
queryParameters: queryParameters,
|
queryParameters: queryParameters,
|
||||||
);
|
);
|
||||||
return res;
|
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'
|
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||||
as listModel
|
as listModel
|
||||||
show KillRequestList;
|
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/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.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/response/iran_province_city/iran_province_city_model.dart';
|
import 'package:rasadyar_core/data/model/pagination_model/pagination_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
|
||||||
import 'package:rasadyar_core/core.dart';
|
|
||||||
|
|
||||||
abstract class KillHouseRepository {
|
abstract class KillHouseRepository {
|
||||||
|
|
||||||
@@ -48,12 +47,10 @@ abstract class KillHouseRepository {
|
|||||||
Map<String, dynamic>? queryParameters,
|
Map<String, dynamic>? queryParameters,
|
||||||
});
|
});
|
||||||
|
|
||||||
Future<BroadcastPrice?> getBroadcastPrice({required String token});
|
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||||
|
required String token,
|
||||||
Future<List<ProductModel>?> getRolesProducts({required String token});
|
Map<String, dynamic>? queryParameters,
|
||||||
|
});
|
||||||
|
|
||||||
Future<List<IranProvinceCityModel>?> getProvince({CancelToken? cancelToken});
|
|
||||||
|
|
||||||
//endregion
|
//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/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_house/kill_house_response.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||||
as listModel;
|
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/response/broadcast_price/broadcast_price.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/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_core/core.dart';
|
||||||
|
|
||||||
import '../chicken/chicken_repository.dart';
|
|
||||||
import 'kill_house_repository.dart';
|
import 'kill_house_repository.dart';
|
||||||
|
|
||||||
class KillHouseRepositoryImpl extends KillHouseRepository {
|
class KillHouseRepositoryImpl extends KillHouseRepository {
|
||||||
final KillHouseRemoteDataSource remoteDataSource;
|
final KillHouseRemoteDataSource remoteDataSource;
|
||||||
final ChickenRepository chickenRepository;
|
|
||||||
|
|
||||||
KillHouseRepositoryImpl(this.remoteDataSource, this.chickenRepository);
|
KillHouseRepositoryImpl(this.remoteDataSource);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<List<KillHouseResponse>?> getKillHouseList({
|
Future<List<KillHouseResponse>?> getKillHouseList({
|
||||||
@@ -54,7 +49,7 @@ class KillHouseRepositoryImpl extends KillHouseRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<List<listModel.KillRequestList>?> getListKillRequest({
|
Future<List<ListModel.KillRequestList>?> getListKillRequest({
|
||||||
required String token,
|
required String token,
|
||||||
Map<String, dynamic>? queryParameters,
|
Map<String, dynamic>? queryParameters,
|
||||||
}) async {
|
}) async {
|
||||||
@@ -93,24 +88,14 @@ class KillHouseRepositoryImpl extends KillHouseRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<BroadcastPrice?> getBroadcastPrice({required String token}) async {
|
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||||
return await chickenRepository.getBroadcastPrice(token: token);
|
required String token,
|
||||||
}
|
Map<String, dynamic>? queryParameters,
|
||||||
|
|
||||||
@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,
|
|
||||||
}) async {
|
}) async {
|
||||||
return await chickenRepository.getProvince(cancelToken: cancelToken);
|
return await remoteDataSource.getBarsForKillHouse(
|
||||||
|
token: token,
|
||||||
|
queryParameters: queryParameters,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//endregion
|
//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/broadcast_price/broadcast_price.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/data/repositories/kill_house/kill_house_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/features/common/profile/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/routes/pages.dart';
|
import 'package:rasadyar_chicken/presentation/routes/pages.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
import 'package:rasadyar_chicken/presentation/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_house/kill_house_response.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||||
as listModel;
|
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_chicken/presentation/widget/base_page/logic.dart';
|
||||||
import 'package:rasadyar_core/core.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/features/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/features/kill_house/warehouse_and_distribution/buy_in_province_entered/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/buy_in_province_waiting/logic.dart';
|
import 'package:rasadyar_chicken/features/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/root/logic.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class WarehouseAndDistributionBuyInProvinceLogic extends GetxController {
|
class WarehouseAndDistributionBuyInProvinceLogic extends GetxController {
|
||||||
@@ -11,22 +11,28 @@ class WarehouseAndDistributionBuyInProvinceLogic extends GetxController {
|
|||||||
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
||||||
Rx<Jalali> toDateFilter = 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;
|
RxInt selectedSegmentIndex = 0.obs;
|
||||||
|
|
||||||
WarehouseAndDistributionBuyInProvinceAllLogic buyAllLogic = Get.find<WarehouseAndDistributionBuyInProvinceAllLogic>();
|
WarehouseAndDistributionBuyInProvinceEnteredLogic buyAllLogic =
|
||||||
WarehouseAndDistributionBuyInProvinceWaitingLogic buyWaitingLogic = Get.find<WarehouseAndDistributionBuyInProvinceWaitingLogic>();
|
Get.find<WarehouseAndDistributionBuyInProvinceEnteredLogic>();
|
||||||
|
WarehouseAndDistributionBuyInProvinceWaitingLogic buyWaitingLogic =
|
||||||
|
Get.find<WarehouseAndDistributionBuyInProvinceWaitingLogic>();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
routesName.value = [...buyLogic.routesName, 'داخل استان'].toList();
|
routesName.value = [...buyLogic.routesName, 'داخل استان'].toList();
|
||||||
routesName.add(selectedSegmentIndex.value == 0 ? 'در انتظار' : 'کل خریدها');
|
routesName.add(
|
||||||
|
selectedSegmentIndex.value == 0 ? 'در انتظار' : 'وارد شده به انبار',
|
||||||
|
);
|
||||||
ever(selectedSegmentIndex, (callback) {
|
ever(selectedSegmentIndex, (callback) {
|
||||||
routesName.removeLast();
|
routesName.removeLast();
|
||||||
routesName.add(callback == 0 ? 'در انتظار' : 'کل خریدها');
|
routesName.add(callback == 0 ? 'در انتظار' : 'وارد شده به انبار');
|
||||||
});
|
});
|
||||||
|
|
||||||
ever(fromDateFilter, (callback) => _setFromDateFilter(callback));
|
ever(fromDateFilter, (callback) => _setFromDateFilter(callback));
|
||||||
@@ -66,9 +72,9 @@ class WarehouseAndDistributionBuyInProvinceLogic extends GetxController {
|
|||||||
Future<void> submitFilter() async {
|
Future<void> submitFilter() async {
|
||||||
final isWaiting = selectedSegmentIndex.value == 0;
|
final isWaiting = selectedSegmentIndex.value == 0;
|
||||||
if (isWaiting) {
|
if (isWaiting) {
|
||||||
buyWaitingLogic.getWaitingArrivals();
|
buyWaitingLogic.getKillHouseBars();
|
||||||
} else {
|
} else {
|
||||||
buyAllLogic.getAllArrivals();
|
buyAllLogic.getkillHouseBars();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,6 +90,9 @@ class WarehouseAndDistributionBuyInProvinceLogic extends GetxController {
|
|||||||
|
|
||||||
Future<void> onRefresh() async {
|
Future<void> onRefresh() async {
|
||||||
await rootLogic.onRefresh();
|
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: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/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/inventory/inventory_widget.dart';
|
import 'package:rasadyar_chicken/presentation/widget/inventory/inventory_widget.dart';
|
||||||
@@ -27,16 +28,49 @@ class WarehouseAndDistributionBuyInProvincePage
|
|||||||
child: Column(
|
child: Column(
|
||||||
spacing: 4.h,
|
spacing: 4.h,
|
||||||
children: [
|
children: [
|
||||||
ObxValue((data) {
|
Obx(() {
|
||||||
return InventoryWidget(inventoryModel: data.value);
|
final listInventory = [
|
||||||
}, controller.rootLogic.inventoryModel),
|
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(),
|
segmentWidget(),
|
||||||
ObxValue((index) {
|
ObxValue((index) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: index.value == 0
|
child: index.value == 0
|
||||||
? WarehouseAndDistributionBuyInProvinceWaitingPage()
|
? WarehouseAndDistributionBuyInProvinceWaitingPage()
|
||||||
: WarehouseAndDistributionBuyInProvinceAllPage(),
|
: WarehouseAndDistributionBuyInProvinceEnteredPage(),
|
||||||
);
|
);
|
||||||
}, controller.selectedSegmentIndex),
|
}, controller.selectedSegmentIndex),
|
||||||
],
|
],
|
||||||
@@ -51,7 +85,7 @@ class WarehouseAndDistributionBuyInProvincePage
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: RSegment(
|
child: RSegment(
|
||||||
children: ['وارد شده به انبار', 'کل خریدها'],
|
children: ['در انتظار', 'وارد شده به انبار'],
|
||||||
selectedIndex: 0,
|
selectedIndex: 0,
|
||||||
borderColor: const Color(0xFFB4B4B4),
|
borderColor: const Color(0xFFB4B4B4),
|
||||||
selectedBorderColor: AppColor.blueNormal,
|
selectedBorderColor: AppColor.blueNormal,
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/request/steward_allocation/steward_allocation_request.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
class WarehouseAndDistributionBuyInProvinceEnteredLogic extends GetxController {
|
||||||
RxInt isExpandedListIndex = (-1).obs;
|
RxInt isExpandedListIndex = (-1).obs;
|
||||||
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
||||||
Rx<Jalali> toDateFilter = Jalali.now().obs;
|
Rx<Jalali> toDateFilter = Jalali.now().obs;
|
||||||
@@ -16,8 +17,8 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
|||||||
WarehouseAndDistributionRootLogic rootLogic =
|
WarehouseAndDistributionRootLogic rootLogic =
|
||||||
Get.find<WarehouseAndDistributionRootLogic>();
|
Get.find<WarehouseAndDistributionRootLogic>();
|
||||||
|
|
||||||
Rx<Resource<PaginationModel<WaitingArrivalModel>>> allProduct =
|
Rx<Resource<PaginationModel<KillHouseBarsResponse>>> enteredBars =
|
||||||
Resource<PaginationModel<WaitingArrivalModel>>.loading().obs;
|
Resource<PaginationModel<KillHouseBarsResponse>>.loading().obs;
|
||||||
|
|
||||||
TextEditingController weightController = TextEditingController();
|
TextEditingController weightController = TextEditingController();
|
||||||
TextEditingController countController = TextEditingController();
|
TextEditingController countController = TextEditingController();
|
||||||
@@ -29,14 +30,14 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
|||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
getAllArrivals();
|
getkillHouseBars();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
debounce(
|
debounce(
|
||||||
searchedValue,
|
searchedValue,
|
||||||
(callback) => getAllArrivals(),
|
(callback) => getkillHouseBars(),
|
||||||
time: Duration(milliseconds: 2000),
|
time: Duration(milliseconds: 2000),
|
||||||
);
|
);
|
||||||
super.onReady();
|
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) {
|
if (isLoadingMore) {
|
||||||
isLoadingMoreAllocationsMade.value = true;
|
isLoadingMoreAllocationsMade.value = true;
|
||||||
} else {
|
} else {
|
||||||
allProduct.value =
|
enteredBars.value =
|
||||||
Resource<PaginationModel<WaitingArrivalModel>>.loading();
|
Resource<PaginationModel<KillHouseBarsResponse>>.loading();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchedValue.value != null &&
|
if (searchedValue.value != null &&
|
||||||
@@ -61,39 +62,42 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
|||||||
currentPage.value = 1;
|
currentPage.value = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Fix - chickenRepository doesn't exist in rootLogic
|
|
||||||
safeCall(
|
safeCall(
|
||||||
// call: () async => await rootLogic.chickenRepository.getWaitingArrivals(
|
call: () async => await rootLogic.killHouseRepository.getBarsForKillHouse(
|
||||||
// token: rootLogic.tokenService.accessToken.value!,
|
token: rootLogic.tokenService.accessToken.value!,
|
||||||
// queryParameters: buildQueryParams(
|
queryParameters: buildQueryParams(
|
||||||
// queryParams: {'type': 'all'},
|
queryParams: {'type': 'entered'},
|
||||||
// pageSize: 20,
|
pageSize: 20,
|
||||||
// page: currentPage.value,
|
page: currentPage.value,
|
||||||
// search: 'filter',
|
search: 'filter',
|
||||||
// role: 'Steward',
|
role: 'KillHouse',
|
||||||
// value: searchedValue.value,
|
value: searchedValue.value,
|
||||||
// fromDate: fromDateFilter.value.toDateTime(),
|
|
||||||
// toDate: toDateFilter.value.toDateTime(),
|
),
|
||||||
// ),
|
),
|
||||||
// ),
|
|
||||||
call: () async => null as PaginationModel<WaitingArrivalModel>?,
|
|
||||||
onSuccess: (res) async {
|
onSuccess: (res) async {
|
||||||
await Future.delayed(Duration(milliseconds: 200));
|
await Future.delayed(Duration(milliseconds: 200));
|
||||||
// TODO: Fix - res type issues
|
|
||||||
// if ((res?.count ?? 0) == 0) {
|
if ((res?.count ?? 0) == 0) {
|
||||||
// allProduct.value = Resource<PaginationModel<WaitingArrivalModel>>.empty();
|
enteredBars.value =
|
||||||
// } else {
|
Resource<PaginationModel<KillHouseBarsResponse>>.empty();
|
||||||
// allProduct.value = Resource<PaginationModel<WaitingArrivalModel>>.success(
|
} else {
|
||||||
// PaginationModel<WaitingArrivalModel>(
|
enteredBars.value =
|
||||||
// count: res?.count ?? 0,
|
Resource<PaginationModel<KillHouseBarsResponse>>.success(
|
||||||
// next: res?.next,
|
PaginationModel<KillHouseBarsResponse>(
|
||||||
// previous: res?.previous,
|
count: res?.count ?? 0,
|
||||||
// results: [...(allProduct.value.data?.results ?? []), ...(res?.results ?? [])],
|
next: res?.next,
|
||||||
// ),
|
previous: res?.previous,
|
||||||
// );
|
results: [
|
||||||
// }
|
...(enteredBars.value.data?.results ?? []),
|
||||||
allProduct.value =
|
...(res?.results ?? []),
|
||||||
Resource<PaginationModel<WaitingArrivalModel>>.empty();
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
enteredBars.value =
|
||||||
|
Resource<PaginationModel<KillHouseBarsResponse>>.empty();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -121,7 +125,7 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
|||||||
// ),
|
// ),
|
||||||
call: () async {},
|
call: () async {},
|
||||||
onSuccess: (result) {
|
onSuccess: (result) {
|
||||||
getAllArrivals();
|
getkillHouseBars();
|
||||||
rootLogic.onRefresh();
|
rootLogic.onRefresh();
|
||||||
clearApprovedController();
|
clearApprovedController();
|
||||||
toggleExpansion();
|
toggleExpansion();
|
||||||
@@ -149,7 +153,7 @@ class WarehouseAndDistributionBuyInProvinceAllLogic extends GetxController {
|
|||||||
eLog(error);
|
eLog(error);
|
||||||
},
|
},
|
||||||
onSuccess: (result) {
|
onSuccess: (result) {
|
||||||
getAllArrivals();
|
getkillHouseBars();
|
||||||
rootLogic.onRefresh();
|
rootLogic.onRefresh();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.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/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndDistributionBuyInProvinceAllLogic> {
|
class WarehouseAndDistributionBuyInProvinceEnteredPage
|
||||||
const WarehouseAndDistributionBuyInProvinceAllPage({super.key});
|
extends GetView<WarehouseAndDistributionBuyInProvinceEnteredLogic> {
|
||||||
|
const WarehouseAndDistributionBuyInProvinceEnteredPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -28,21 +30,21 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
|||||||
index: index,
|
index: index,
|
||||||
child: itemListWidget(item),
|
child: itemListWidget(item),
|
||||||
secondChild: itemListExpandedWidget(item),
|
secondChild: itemListExpandedWidget(item),
|
||||||
labelColor: getLabelColor(item.receiverState),
|
labelColor: getLabelColor('pending'),
|
||||||
labelIcon: controller.getVecPathItem(item.receiverState),
|
labelIcon: controller.getVecPathItem('pending'),
|
||||||
labelIconColor: controller.getLabelColor(item.receiverState),
|
labelIconColor: controller.getLabelColor('pending'),
|
||||||
);
|
);
|
||||||
}, controller.isExpandedListIndex);
|
}, controller.isExpandedListIndex);
|
||||||
},
|
},
|
||||||
itemCount: data.value.data?.results?.length ?? 0,
|
itemCount: data.value.data?.results?.length ?? 0,
|
||||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
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(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
@@ -55,12 +57,12 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
|||||||
spacing: 3,
|
spacing: 3,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.toSteward?.user?.fullname ?? 'N/A',
|
'item.toSteward?.user?.fullname ' ?? 'N/A',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
item.date?.formattedJalaliDate ?? 'N/A',
|
'item.date?.formattedJalaliDate' ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
||||||
),
|
),
|
||||||
@@ -80,24 +82,31 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
|||||||
spacing: 6,
|
spacing: 6,
|
||||||
children: [
|
children: [
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: item.product?.name?.contains('مرغ گرم') ?? false,
|
// visible: item.product?.name?.contains('مرغ گرم') ?? false,
|
||||||
|
visible: false,
|
||||||
child: Assets.vec.hotChickenSvg.svg(
|
child: Assets.vec.hotChickenSvg.svg(
|
||||||
width: 24,
|
width: 24,
|
||||||
height: 24,
|
height: 24,
|
||||||
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
colorFilter: ColorFilter.mode(
|
||||||
|
AppColor.blueNormal,
|
||||||
|
BlendMode.srcIn,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
item.weightOfCarcasses?.separatedByCommaFa.addKg ?? 'N/A',
|
'item.weightOfCarcasses?.separatedByCommaFa.addKg ' ??
|
||||||
|
'N/A',
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
style: AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal),
|
style: AppFonts.yekan12Bold.copyWith(
|
||||||
|
color: AppColor.blueNormal,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
item.toSteward?.guildsName ?? 'N/Aaq',
|
' item.toSteward?.guildsName' ?? 'N/Aaq',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
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(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
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(
|
child: Column(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
@@ -127,21 +139,24 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.toSteward?.user?.fullname ?? 'N/A',
|
'item.toSteward?.user?.fullname ' ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||||
),
|
),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text(
|
Text(
|
||||||
item.receiverState?.faItem ?? 'N/A',
|
'item.receiverState?.faItem ' ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan10.copyWith(color: AppColor.darkGreyDark),
|
style: AppFonts.yekan10.copyWith(color: AppColor.darkGreyDark),
|
||||||
),
|
),
|
||||||
SizedBox(width: 7),
|
SizedBox(width: 7),
|
||||||
SvgGenImage.vec(controller.getVecPathItem(item.receiverState)).svg(
|
SvgGenImage.vec(controller.getVecPathItem('pending')).svg(
|
||||||
width: 16.w,
|
width: 16.w,
|
||||||
height: 16.h,
|
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,
|
spacing: 3,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.date?.toJalali.formatter.wN ?? 'N/A',
|
'item.date?.toJalali.formatter.wN ' ?? 'N/A',
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
|
style: AppFonts.yekan14.copyWith(
|
||||||
|
color: AppColor.textColor,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
'${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'N/A'}',
|
'${'item.date?.toJalali.formatter.d '} ${'item.date?.toJalali.formatter.mN ' ?? 'N/A'}',
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
style: AppFonts.yekan14.copyWith(
|
||||||
|
color: AppColor.blueNormal,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
'${item.date?.toJalali.formatter.y}',
|
'${'item.date?.toJalali.formatter.y '}',
|
||||||
style: AppFonts.yekan20.copyWith(color: AppColor.textColor),
|
style: AppFonts.yekan20.copyWith(color: AppColor.textColor),
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
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),
|
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(
|
buildRow(
|
||||||
title: 'تلفن فروشنده',
|
title: 'تلفن فروشنده',
|
||||||
value: item.toSteward?.user?.mobile ?? 'N/A',
|
value: 'item.toSteward?.user?.mobile ' ?? 'N/A',
|
||||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'),
|
buildRow(
|
||||||
buildRow(title: ' سهمیه', value: item.quota?.faTitle ?? 'N/A'),
|
title: 'نوع تخصیص',
|
||||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
value: 'item.allocationType?.faAllocationType ' ?? 'N/A',
|
||||||
|
),
|
||||||
|
buildRow(title: ' سهمیه', value: 'item.quota?.faTitle ' ?? 'N/A'),
|
||||||
|
buildRow(title: 'محصول', value: 'item.product?.name ' ?? 'N/A'),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'وزن خریداری شده',
|
title: 'وزن خریداری شده',
|
||||||
value: item.weightOfCarcasses?.separatedByCommaFa ?? 'N/A',
|
value: 'item.weightOfCarcasses?.separatedByCommaFa ' ?? 'N/A',
|
||||||
valueLabel: 'کیلوگرم',
|
valueLabel: 'کیلوگرم',
|
||||||
),
|
),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'قیمت هر کیلوگرم',
|
title: 'قیمت هر کیلوگرم',
|
||||||
titleLabel: (item.approvedPriceStatus ?? false) ? 'مصوب' : 'آزاد',
|
titleLabel: (false) ? 'مصوب' : 'آزاد',
|
||||||
titleLabelStyle: AppFonts.yekan14Bold.copyWith(color: AppColor.greenNormal),
|
titleLabelStyle: AppFonts.yekan14Bold.copyWith(
|
||||||
|
color: AppColor.greenNormal,
|
||||||
|
),
|
||||||
value: item.amount?.separatedByCommaFa ?? 'N/A',
|
value: item.amount?.separatedByCommaFa ?? 'N/A',
|
||||||
valueLabel: 'ریال',
|
valueLabel: 'ریال',
|
||||||
),
|
),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'قیمت کل',
|
title: 'قیمت کل',
|
||||||
value: item.totalAmount?.separatedByCommaFa ?? 'N/A',
|
value: 'item.totalAmount?.separatedByCommaFa ' ?? 'N/A',
|
||||||
valueLabel: 'ریال',
|
valueLabel: 'ریال',
|
||||||
),
|
),
|
||||||
|
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: item.receiverState == 'pending',
|
//visible: item.receiverState == 'pending',
|
||||||
|
visible: true,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
spacing: 16.w,
|
spacing: 16.w,
|
||||||
@@ -226,13 +254,13 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
|||||||
height: 40.h,
|
height: 40.h,
|
||||||
isLoading: data[item.key!] ?? false,
|
isLoading: data[item.key!] ?? false,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await Get.bottomSheet(
|
/* await Get.bottomSheet(
|
||||||
conformationBottomSheet(item),
|
conformationBottomSheet(item),
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
).then((value) {
|
).then((value) {
|
||||||
Get.back();
|
Get.back();
|
||||||
controller.clearApprovedController();
|
controller.clearApprovedController();
|
||||||
});
|
}); */
|
||||||
},
|
},
|
||||||
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
||||||
backgroundColor: AppColor.greenNormal,
|
backgroundColor: AppColor.greenNormal,
|
||||||
@@ -240,16 +268,18 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
|||||||
}, controller.isLoadingConfirmMap),
|
}, controller.isLoadingConfirmMap),
|
||||||
ROutlinedElevated(
|
ROutlinedElevated(
|
||||||
text: 'رد',
|
text: 'رد',
|
||||||
textStyle: AppFonts.yekan20.copyWith(color: AppColor.redNormal),
|
textStyle: AppFonts.yekan20.copyWith(
|
||||||
|
color: AppColor.redNormal,
|
||||||
|
),
|
||||||
width: 150.w,
|
width: 150.w,
|
||||||
height: 40.h,
|
height: 40.h,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
buildWarningDialog(
|
/* buildWarningDialog(
|
||||||
title: 'اخطار',
|
title: 'اخطار',
|
||||||
middleText: 'آیا از رد شدن این مورد اطمینان دارید؟',
|
middleText: 'آیا از رد شدن این مورد اطمینان دارید؟',
|
||||||
onConfirm: () => controller.denyEntries(item),
|
onConfirm: () => controller.denyEntries(item),
|
||||||
onRefresh: () => controller.getAllArrivals(),
|
onRefresh: () => controller.getkillHouseBars(),
|
||||||
);
|
); */
|
||||||
},
|
},
|
||||||
borderColor: AppColor.redNormal,
|
borderColor: AppColor.redNormal,
|
||||||
),
|
),
|
||||||
@@ -285,25 +315,37 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
|||||||
label: 'وزن(کیلوگرم)',
|
label: 'وزن(کیلوگرم)',
|
||||||
controller: controller.weightController,
|
controller: controller.weightController,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
SeparatorInputFormatter(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
RTextField(
|
RTextField(
|
||||||
label: 'حجم(قطعه)',
|
label: 'حجم(قطعه)',
|
||||||
controller: controller.countController,
|
controller: controller.countController,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
SeparatorInputFormatter(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
RTextField(
|
RTextField(
|
||||||
label: 'افت وزن(کیلوگرم)',
|
label: 'افت وزن(کیلوگرم)',
|
||||||
controller: controller.lossController,
|
controller: controller.lossController,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
SeparatorInputFormatter(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
|
|
||||||
Text('تایید ', style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor)),
|
Text(
|
||||||
|
'تایید ',
|
||||||
|
style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor),
|
||||||
|
),
|
||||||
ObxValue((data) {
|
ObxValue((data) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
@@ -373,7 +415,12 @@ class WarehouseAndDistributionBuyInProvinceAllPage extends GetView<WarehouseAndD
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Radio(value: value),
|
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 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
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/request/steward_allocation/steward_allocation_request.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/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_chicken/presentation/utils/utils.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
@@ -16,12 +17,13 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
|||||||
Rx<Color> bgConfirmAllColor = AppColor.blueNormal.obs;
|
Rx<Color> bgConfirmAllColor = AppColor.blueNormal.obs;
|
||||||
RxInt currentPage = 1.obs;
|
RxInt currentPage = 1.obs;
|
||||||
final RxBool isLoadingMoreAllocationsMade = false.obs;
|
final RxBool isLoadingMoreAllocationsMade = false.obs;
|
||||||
|
|
||||||
WarehouseAndDistributionRootLogic rootLogic =
|
WarehouseAndDistributionRootLogic rootLogic =
|
||||||
Get.find<WarehouseAndDistributionRootLogic>();
|
Get.find<WarehouseAndDistributionRootLogic>();
|
||||||
RxBool isButtonConfirm = false.obs;
|
RxBool isButtonConfirm = false.obs;
|
||||||
|
|
||||||
Rx<Resource<PaginationModel<WaitingArrivalModel>>> waitingProduct =
|
Rx<Resource<PaginationModel<KillHouseBarsResponse>>> waitingBars =
|
||||||
Resource<PaginationModel<WaitingArrivalModel>>.loading().obs;
|
Resource<PaginationModel<KillHouseBarsResponse>>.loading().obs;
|
||||||
|
|
||||||
TextEditingController weightController = TextEditingController();
|
TextEditingController weightController = TextEditingController();
|
||||||
TextEditingController countController = TextEditingController();
|
TextEditingController countController = TextEditingController();
|
||||||
@@ -35,7 +37,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
|||||||
super.onInit();
|
super.onInit();
|
||||||
debounce(
|
debounce(
|
||||||
searchedValue,
|
searchedValue,
|
||||||
(callback) => getWaitingArrivals(),
|
(callback) => getKillHouseBars(),
|
||||||
time: Duration(milliseconds: timeDebounce),
|
time: Duration(milliseconds: timeDebounce),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -43,7 +45,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
|||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
super.onReady();
|
super.onReady();
|
||||||
getWaitingArrivals();
|
getKillHouseBars();
|
||||||
approvedWithOtpController.addListener(() {
|
approvedWithOtpController.addListener(() {
|
||||||
isButtonConfirm.value = approvedWithOtpController.text.trim().length > 4;
|
isButtonConfirm.value = approvedWithOtpController.text.trim().length > 4;
|
||||||
});
|
});
|
||||||
@@ -53,12 +55,12 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
|||||||
searchedValue.value = data?.trim();
|
searchedValue.value = data?.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getWaitingArrivals([bool isLoadingMore = false]) async {
|
Future<void> getKillHouseBars([bool isLoadingMore = false]) async {
|
||||||
if (isLoadingMore) {
|
if (isLoadingMore) {
|
||||||
isLoadingMoreAllocationsMade.value = true;
|
isLoadingMoreAllocationsMade.value = true;
|
||||||
} else {
|
} else {
|
||||||
waitingProduct.value =
|
waitingBars.value =
|
||||||
Resource<PaginationModel<WaitingArrivalModel>>.loading();
|
Resource<PaginationModel<KillHouseBarsResponse>>.loading();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchedValue.value != null &&
|
if (searchedValue.value != null &&
|
||||||
@@ -67,40 +69,42 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
|||||||
currentPage.value = 1;
|
currentPage.value = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Fix - chickenRepository doesn't exist in rootLogic
|
|
||||||
safeCall(
|
safeCall(
|
||||||
// call: () async => await rootLogic.chickenRepository.getWaitingArrivals(
|
call: () async => await rootLogic.killHouseRepository.getBarsForKillHouse(
|
||||||
// token: rootLogic.tokenService.accessToken.value!,
|
token: rootLogic.tokenService.accessToken.value!,
|
||||||
// queryParameters: buildQueryParams(
|
queryParameters: buildQueryParams(
|
||||||
// queryParams: {'type': 'not_entered'},
|
queryParams: {'type': 'notentered'},
|
||||||
// pageSize: 20,
|
pageSize: 20,
|
||||||
// page: currentPage.value,
|
page: currentPage.value,
|
||||||
// search: 'filter',
|
search: 'filter',
|
||||||
// role: 'Steward',
|
role: 'KillHouse',
|
||||||
// value: searchedValue.value,
|
value: searchedValue.value,
|
||||||
// fromDate: fromDateFilter.value.toDateTime(),
|
|
||||||
// toDate: toDateFilter.value.toDateTime(),
|
),
|
||||||
// ),
|
),
|
||||||
// ),
|
|
||||||
call: () async => null as PaginationModel<WaitingArrivalModel>?,
|
|
||||||
onSuccess: (res) async {
|
onSuccess: (res) async {
|
||||||
await Future.delayed(Duration(milliseconds: 200));
|
await Future.delayed(Duration(milliseconds: 200));
|
||||||
// TODO: Fix - res type issues
|
|
||||||
// if ((res?.count ?? 0) == 0) {
|
if ((res?.count ?? 0) == 0) {
|
||||||
// waitingProduct.value = Resource<PaginationModel<WaitingArrivalModel>>.empty();
|
waitingBars.value =
|
||||||
// } else {
|
Resource<PaginationModel<KillHouseBarsResponse>>.empty();
|
||||||
// waitingProduct.value = Resource<PaginationModel<WaitingArrivalModel>>.success(
|
} else {
|
||||||
// PaginationModel<WaitingArrivalModel>(
|
waitingBars.value =
|
||||||
// count: res?.count ?? 0,
|
Resource<PaginationModel<KillHouseBarsResponse>>.success(
|
||||||
// next: res?.next,
|
PaginationModel<KillHouseBarsResponse>(
|
||||||
// previous: res?.previous,
|
count: res?.count ?? 0,
|
||||||
// results: [...(waitingProduct.value.data?.results ?? []), ...(res?.results ?? [])],
|
next: res?.next,
|
||||||
// ),
|
previous: res?.previous,
|
||||||
// );
|
results: [
|
||||||
// flashingFabBgColor();
|
...(waitingBars.value.data?.results ?? []),
|
||||||
// }
|
...(res?.results ?? []),
|
||||||
waitingProduct.value =
|
],
|
||||||
Resource<PaginationModel<WaitingArrivalModel>>.empty();
|
),
|
||||||
|
);
|
||||||
|
flashingFabBgColor();
|
||||||
|
}
|
||||||
|
waitingBars.value =
|
||||||
|
Resource<PaginationModel<KillHouseBarsResponse>>.empty();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -133,7 +137,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
|||||||
eLog(error);
|
eLog(error);
|
||||||
},
|
},
|
||||||
onSuccess: (result) {
|
onSuccess: (result) {
|
||||||
getWaitingArrivals();
|
getKillHouseBars();
|
||||||
rootLogic.onRefresh();
|
rootLogic.onRefresh();
|
||||||
clearApprovedController();
|
clearApprovedController();
|
||||||
toggleExpansion();
|
toggleExpansion();
|
||||||
@@ -164,7 +168,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingLogic extends GetxController {
|
|||||||
eLog(error);
|
eLog(error);
|
||||||
},
|
},
|
||||||
onSuccess: (result) {
|
onSuccess: (result) {
|
||||||
getWaitingArrivals();
|
getKillHouseBars();
|
||||||
rootLogic.onRefresh();
|
rootLogic.onRefresh();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.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/presentation/utils/string_utils.dart';
|
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<WarehouseAndDistributionBuyInProvinceWaitingLogic> {
|
class WarehouseAndDistributionBuyInProvinceWaitingPage
|
||||||
|
extends GetView<WarehouseAndDistributionBuyInProvinceWaitingLogic> {
|
||||||
const WarehouseAndDistributionBuyInProvinceWaitingPage({super.key});
|
const WarehouseAndDistributionBuyInProvinceWaitingPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -38,14 +38,14 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
},
|
},
|
||||||
itemCount: data.value.data?.results?.length ?? 0,
|
itemCount: data.value.data?.results?.length ?? 0,
|
||||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
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(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
@@ -58,13 +58,14 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
spacing: 3,
|
spacing: 3,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
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,
|
textAlign: TextAlign.start,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
item.date?.formattedJalaliDate ?? 'ندارد',
|
'item.date?.formattedJalaliDate '?? 'ندارد',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
||||||
),
|
),
|
||||||
@@ -84,18 +85,23 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
spacing: 6,
|
spacing: 6,
|
||||||
children: [
|
children: [
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: item.product?.name?.contains('مرغ گرم') ?? false,
|
visible: false,
|
||||||
child: Assets.vec.hotChickenSvg.svg(
|
child: Assets.vec.hotChickenSvg.svg(
|
||||||
width: 24,
|
width: 24,
|
||||||
height: 24,
|
height: 24,
|
||||||
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
colorFilter: ColorFilter.mode(
|
||||||
|
AppColor.blueNormal,
|
||||||
|
BlendMode.srcIn,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
item.weightOfCarcasses?.separatedByCommaFa.addKg ?? 'ندارد',
|
'item.weightOfCarcasses?.separatedByCommaFa.addKg '?? 'ندارد',
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
textDirection: TextDirection.ltr,
|
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,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
spacing: 3,
|
spacing: 3,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text('asdasd'),
|
||||||
|
/* Text(
|
||||||
(item.approvedPriceStatus ?? false) ? 'دولتی' : 'آزاد',
|
(item.approvedPriceStatus ?? false) ? 'دولتی' : 'آزاد',
|
||||||
style: AppFonts.yekan12Bold.copyWith(
|
style: AppFonts.yekan12Bold.copyWith(
|
||||||
color: (item.approvedPriceStatus ?? false)
|
color: (item.approvedPriceStatus ?? false)
|
||||||
? AppColor.blueNormal
|
? AppColor.blueNormal
|
||||||
: AppColor.greenNormal,
|
: AppColor.greenNormal,
|
||||||
),
|
),
|
||||||
),
|
), */
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -127,10 +134,13 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Container itemListExpandedWidget(WaitingArrivalModel item) {
|
Container itemListExpandedWidget(KillHouseBarsResponse item) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
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(
|
child: Column(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
@@ -138,7 +148,8 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
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,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||||
),
|
),
|
||||||
@@ -169,24 +180,31 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
spacing: 3,
|
spacing: 3,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.date?.toJalali.formatter.wN ?? 'ندارد',
|
'item.date?.toJalali.formatter.wN '?? 'ندارد',
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
|
style: AppFonts.yekan14.copyWith(
|
||||||
|
color: AppColor.textColor,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
'${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'ندارد'}',
|
//'${item.date?.toJalali.formatter.d} ${item.date?.toJalali.formatter.mN ?? 'ندارد'}',
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
'swwwqqqqqqqqqqq',
|
||||||
|
style: AppFonts.yekan14.copyWith(
|
||||||
|
color: AppColor.blueNormal,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
'${item.date?.toJalali.formatter.y}',
|
//'${item.date?.toJalali.formatter.y}',
|
||||||
|
'1404',
|
||||||
style: AppFonts.yekan20.copyWith(color: AppColor.textColor),
|
style: AppFonts.yekan20.copyWith(color: AppColor.textColor),
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
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),
|
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -196,34 +214,47 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
buildRow(
|
buildRow(
|
||||||
title: 'مشخصات فروشنده',
|
title: 'مشخصات فروشنده',
|
||||||
value:
|
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(
|
buildRow(
|
||||||
title: 'تلفن فروشنده',
|
title: 'تلفن فروشنده',
|
||||||
value:
|
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),
|
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'ندارد'),
|
buildRow(
|
||||||
buildRow(title: ' سهمیه', value: item.quota?.faTitle ?? 'ندارد'),
|
title: 'نوع تخصیص',
|
||||||
buildRow(title: 'نوع فروش', value: item.saleType == "governmental" ? 'دولتی' : 'آزاد'),
|
value: 'item.allocationType?.faAllocationType '?? 'ندارد',
|
||||||
buildRow(title: 'محصول', value: item.product?.name ?? 'ندارد'),
|
),
|
||||||
|
buildRow(title: ' سهمیه', value: 'item.quota?.faTitle '?? 'ندارد'),
|
||||||
|
buildRow(
|
||||||
|
title: 'نوع فروش',
|
||||||
|
value: 'asdasd',
|
||||||
|
),
|
||||||
|
buildRow(title: 'محصول', value: 'item.product?.name '?? 'ندارد'),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'تاریخ تولید گوشت',
|
title: 'تاریخ تولید گوشت',
|
||||||
value: item.productionDate?.toJalali.toJalaliDateTime() ?? 'ندارد',
|
value: 'item.productionDate?.toJalali.toJalaliDateTime() '?? 'ندارد',
|
||||||
),
|
),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'وزن خریداری شده',
|
title: 'وزن خریداری شده',
|
||||||
value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم',
|
value: 'item.weightOfCarcasses?.separatedByCommaFa '?? 'ندارد',
|
||||||
),
|
),
|
||||||
buildRow(
|
buildRow(
|
||||||
title: 'قیمت هر کیلوگرم',
|
title: 'قیمت هر کیلوگرم',
|
||||||
titleLabel: (item.approvedPriceStatus ?? false) ? 'دولتی' : 'آزاد',
|
titleLabel: (false) ? 'دولتی' : 'آزاد',
|
||||||
titleLabelStyle: AppFonts.yekan14Bold.copyWith(color: AppColor.greenNormal),
|
titleLabelStyle: AppFonts.yekan14Bold.copyWith(
|
||||||
value: '${item.amount?.separatedByCommaFa} ریال',
|
color: AppColor.greenNormal,
|
||||||
|
),
|
||||||
|
value: 'item.amount?.separatedByCommaFa '?? 'ندارد',
|
||||||
),
|
),
|
||||||
|
|
||||||
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'),
|
buildRow(
|
||||||
|
title: 'قیمت کل',
|
||||||
|
value: 'item.totalAmount?.separatedByCommaFa '?? 'ندارد',
|
||||||
|
),
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@@ -236,7 +267,10 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
height: 40.h,
|
height: 40.h,
|
||||||
isLoading: data[item.key!] ?? false,
|
isLoading: data[item.key!] ?? false,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await Get.bottomSheet(conformationBottomSheet(item), isScrollControlled: true);
|
await Get.bottomSheet(
|
||||||
|
conformationBottomSheet(item),
|
||||||
|
isScrollControlled: true,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
||||||
backgroundColor: AppColor.greenNormal,
|
backgroundColor: AppColor.greenNormal,
|
||||||
@@ -248,12 +282,12 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
width: 150.w,
|
width: 150.w,
|
||||||
height: 40.h,
|
height: 40.h,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
buildWarningDialog(
|
/* buildWarningDialog(
|
||||||
title: 'اخطار',
|
title: 'اخطار',
|
||||||
middleText: 'آیا از رد شدن این مورد اطمینان دارید؟',
|
middleText: 'آیا از رد شدن این مورد اطمینان دارید؟',
|
||||||
onConfirm: () => controller.denyEntries(item),
|
onConfirm: () => controller.denyEntries(item),
|
||||||
onRefresh: () => controller.getWaitingArrivals(),
|
onRefresh: () => controller.getKillHouseBars(),
|
||||||
);
|
); */
|
||||||
},
|
},
|
||||||
borderColor: AppColor.redNormal,
|
borderColor: AppColor.redNormal,
|
||||||
),
|
),
|
||||||
@@ -264,8 +298,10 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget conformationBottomSheet(WaitingArrivalModel item) {
|
Widget conformationBottomSheet(KillHouseBarsResponse item) {
|
||||||
controller.weightController.text = item.weightOfCarcasses.separatedByComma;
|
//todo
|
||||||
|
//controller.weightController.text = item.weightOfCarcasses.separatedByComma;
|
||||||
|
controller.weightController.text = 352301.separatedByComma;
|
||||||
return BaseBottomSheet(
|
return BaseBottomSheet(
|
||||||
height: 450.h,
|
height: 450.h,
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -276,25 +312,37 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
label: 'وزن(کیلوگرم)',
|
label: 'وزن(کیلوگرم)',
|
||||||
controller: controller.weightController,
|
controller: controller.weightController,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
SeparatorInputFormatter(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
RTextField(
|
RTextField(
|
||||||
label: 'حجم(قطعه)',
|
label: 'حجم(قطعه)',
|
||||||
controller: controller.countController,
|
controller: controller.countController,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
SeparatorInputFormatter(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
RTextField(
|
RTextField(
|
||||||
label: 'افت وزن(کیلوگرم)',
|
label: 'افت وزن(کیلوگرم)',
|
||||||
controller: controller.lossController,
|
controller: controller.lossController,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
SeparatorInputFormatter(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
|
|
||||||
Text('تایید ', style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor)),
|
Text(
|
||||||
|
'تایید ',
|
||||||
|
style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor),
|
||||||
|
),
|
||||||
ObxValue((data) {
|
ObxValue((data) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
@@ -343,7 +391,7 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
: true,
|
: true,
|
||||||
text: 'تایید',
|
text: 'تایید',
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await controller.acceptEntries(item);
|
// await controller.acceptEntries(item);
|
||||||
},
|
},
|
||||||
isFullWidth: true,
|
isFullWidth: true,
|
||||||
);
|
);
|
||||||
@@ -365,7 +413,12 @@ class WarehouseAndDistributionBuyInProvinceWaitingPage extends GetView<Warehouse
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Radio(value: value),
|
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/iran_province_city/iran_province_city_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/warehouse_and_distribution/buy/logic.dart';
|
import 'package:rasadyar_chicken/features/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/features/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/sale/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||||
import 'package:rasadyar_core/core.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/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/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/features/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/warehouse_and_distribution/root/logic.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class WarehouseAndDistributionHomeLogic extends GetxController {
|
class WarehouseAndDistributionHomeLogic extends GetxController {
|
||||||
@@ -3,7 +3,7 @@ import 'dart:async';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:rasadyar_chicken/data/di/chicken_di.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/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/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/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/steward_remain_weight/steward_remain_weight.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'
|
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'
|
||||||
hide ProductModel;
|
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/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/pages/kill_house/warehouse_and_distribution/buy/view.dart';
|
import 'package:rasadyar_chicken/features/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/features/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/features/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/kill_house/warehouse_and_distribution/segmentation/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||||
@@ -40,6 +41,7 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
|||||||
];
|
];
|
||||||
|
|
||||||
late KillHouseRepository killHouseRepository;
|
late KillHouseRepository killHouseRepository;
|
||||||
|
late ChickenRepository chickenRepository;
|
||||||
|
|
||||||
final defaultRoutes = <int, String>{
|
final defaultRoutes = <int, String>{
|
||||||
0: ChickenRoutes.buyWarehouseAndDistribution,
|
0: ChickenRoutes.buyWarehouseAndDistribution,
|
||||||
@@ -68,6 +70,7 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
|||||||
super.onInit();
|
super.onInit();
|
||||||
|
|
||||||
killHouseRepository = diChicken.get<KillHouseRepository>();
|
killHouseRepository = diChicken.get<KillHouseRepository>();
|
||||||
|
chickenRepository = diChicken.get<ChickenRepository>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -152,7 +155,7 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
|||||||
_provincesCancelToken = CancelToken();
|
_provincesCancelToken = CancelToken();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final res = await killHouseRepository.getProvince(
|
final res = await chickenRepository.getProvince(
|
||||||
cancelToken: _provincesCancelToken,
|
cancelToken: _provincesCancelToken,
|
||||||
);
|
);
|
||||||
if (res != null) {
|
if (res != null) {
|
||||||
@@ -170,7 +173,7 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
|||||||
|
|
||||||
Future<void> getBroadcastPrice() async {
|
Future<void> getBroadcastPrice() async {
|
||||||
safeCall(
|
safeCall(
|
||||||
call: () async => await killHouseRepository.getBroadcastPrice(
|
call: () async => await chickenRepository.getBroadcastPrice(
|
||||||
token: tokenService.accessToken.value!,
|
token: tokenService.accessToken.value!,
|
||||||
),
|
),
|
||||||
onSuccess: (result) {
|
onSuccess: (result) {
|
||||||
@@ -182,8 +185,9 @@ class WarehouseAndDistributionRootLogic extends GetxController {
|
|||||||
|
|
||||||
Future<void> getRolesProducts() async {
|
Future<void> getRolesProducts() async {
|
||||||
await safeCall(
|
await safeCall(
|
||||||
call: () async => await killHouseRepository.getRolesProducts(
|
call: () async => await chickenRepository.getRolesProducts(
|
||||||
token: tokenService.accessToken.value!,
|
token: tokenService.accessToken.value!,
|
||||||
|
queryParameters: buildRawQueryParams(role: 'KillHouse'),
|
||||||
),
|
),
|
||||||
onSuccess: (result) {
|
onSuccess: (result) {
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/chicken.dart';
|
import 'package:rasadyar_chicken/chicken.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/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/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_core/core.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/guild/guild_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class WarehouseAndDistributionSaleLogic extends GetxController {
|
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/guild_profile/guild_profile.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_remain_weight/steward_remain_weight.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/features/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/sale/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||||
import 'package:rasadyar_chicken/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/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
Widget addOrEditBottomSheet(WarehouseAndDistributionSalesInProvinceLogic controller, {bool isEditMode = false}) {
|
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/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_remain_weight/steward_remain_weight.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/features/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/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/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/sales_out_of_province_sales_list/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||||
import 'package:rasadyar_core/core.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/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/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/features/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/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/sales_out_of_province/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||||
import 'package:rasadyar_core/core.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/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/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/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/pages/kill_house/warehouse_and_distribution/sale/logic.dart';
|
import 'package:rasadyar_chicken/features/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/sales_out_of_province_buyers/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
|
||||||
import 'package:rasadyar_core/core.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/guild/guild_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/segmentation_model/segmentation_model.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_chicken/presentation/utils/utils.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/segmentation_model/segmentation_model.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/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
Widget addOrEditBottomSheet(WarehouseAndDistributionSegmentationLogic controller, {bool isOnEdit = false}) {
|
Widget addOrEditBottomSheet(WarehouseAndDistributionSegmentationLogic controller, {bool isOnEdit = false}) {
|
||||||
@@ -2,8 +2,8 @@ export 'buy/logic.dart';
|
|||||||
export 'buy/view.dart';
|
export 'buy/view.dart';
|
||||||
export 'buy_in_province/logic.dart';
|
export 'buy_in_province/logic.dart';
|
||||||
export 'buy_in_province/view.dart';
|
export 'buy_in_province/view.dart';
|
||||||
export 'buy_in_province_all/logic.dart';
|
export 'buy_in_province_entered/logic.dart';
|
||||||
export 'buy_in_province_all/view.dart';
|
export 'buy_in_province_entered/view.dart';
|
||||||
export 'buy_in_province_waiting/logic.dart';
|
export 'buy_in_province_waiting/logic.dart';
|
||||||
export 'buy_in_province_waiting/view.dart';
|
export 'buy_in_province_waiting/view.dart';
|
||||||
export 'buy_out_of_province/logic.dart';
|
export 'buy_out_of_province/logic.dart';
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
Widget farmInfoWidget({
|
Widget farmInfoWidget({
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
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 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import '../home/logic.dart';
|
import '../home/logic.dart';
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
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 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import '../home/logic.dart';
|
import '../home/logic.dart';
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
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 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import '../home/logic.dart';
|
import '../home/logic.dart';
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
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 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import '../home/logic.dart';
|
import '../home/logic.dart';
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart';
|
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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class ActiveHatchingLogic extends GetxController {
|
class ActiveHatchingLogic extends GetxController {
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.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/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.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/features/poultry_science/home/logic.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/core.dart';
|
||||||
|
|
||||||
class FarmLogic extends GetxController {
|
class FarmLogic extends GetxController {
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
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/features/poultry_science/killing_registration/logic.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/core.dart';
|
||||||
|
|
||||||
class GenocideLogic extends GetxController {
|
class GenocideLogic extends GetxController {
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.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/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/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/core.dart';
|
||||||
import 'package:rasadyar_core/presentation/widget/custom/information_card_widget.dart';
|
import 'package:rasadyar_core/presentation/widget/custom/information_card_widget.dart';
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.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/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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class InspectionPoultryScienceLogic extends GetxController {
|
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/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/poultry_hatching/poultry_hatching.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.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/features/poultry_science/genocide/logic.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/core.dart';
|
||||||
|
|
||||||
class KillingRegistrationLogic extends GetxController {
|
class KillingRegistrationLogic extends GetxController {
|
||||||
@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:rasadyar_chicken/data/di/chicken_di.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/data/repositories/poultry_science/poultry_science_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/pages/poultry_science/home/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/pages.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:rasadyar_chicken/presentation/pages/steward/buy/logic.dart';
|
import 'package:rasadyar_chicken/features/steward/buy/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/steward/buy_in_province_all/logic.dart';
|
import 'package:rasadyar_chicken/features/steward/buy_in_province_all/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/steward/buy_in_province_waiting/logic.dart';
|
import 'package:rasadyar_chicken/features/steward/buy_in_province_waiting/logic.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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class BuyInProvinceLogic extends GetxController {
|
class BuyInProvinceLogic extends GetxController {
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/steward/buy_in_province_all/view.dart';
|
import 'package:rasadyar_chicken/features/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_waiting/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/inventory/inventory_widget.dart';
|
import 'package:rasadyar_chicken/presentation/widget/inventory/inventory_widget.dart';
|
||||||
@@ -22,21 +22,58 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
|||||||
onFilterTap: () {
|
onFilterTap: () {
|
||||||
Get.bottomSheet(filterBottomSheet());
|
Get.bottomSheet(filterBottomSheet());
|
||||||
},
|
},
|
||||||
onRefresh: controller.onRefresh,
|
onRefresh: controller.onRefresh,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
ObxValue((data) {
|
Obx(() {
|
||||||
return InventoryWidget(inventoryModel: data.value!);
|
var list = [
|
||||||
}, controller.rootLogic.inventoryModel),
|
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(),
|
segmentWidget(),
|
||||||
ObxValue((index) {
|
ObxValue((index) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: index.value == 0 ? BuyInProvinceWaitingPage() : BuyInProvinceAllPage(),
|
child: index.value == 0
|
||||||
|
? BuyInProvinceWaitingPage()
|
||||||
|
: BuyInProvinceAllPage(),
|
||||||
);
|
);
|
||||||
}, controller.selectedSegmentIndex),
|
}, controller.selectedSegmentIndex),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +89,8 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
|||||||
borderColor: const Color(0xFFB4B4B4),
|
borderColor: const Color(0xFFB4B4B4),
|
||||||
selectedBorderColor: AppColor.blueNormal,
|
selectedBorderColor: AppColor.blueNormal,
|
||||||
selectedBackgroundColor: AppColor.blueLight,
|
selectedBackgroundColor: AppColor.blueLight,
|
||||||
onSegmentSelected: (index) => controller.selectedSegmentIndex.value = index,
|
onSegmentSelected: (index) =>
|
||||||
|
controller.selectedSegmentIndex.value = index,
|
||||||
backgroundColor: AppColor.whiteGreyNormal,
|
backgroundColor: AppColor.whiteGreyNormal,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -67,14 +105,18 @@ class BuyInProvincePage extends GetView<BuyInProvinceLogic> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
spacing: 16,
|
spacing: 16,
|
||||||
children: [
|
children: [
|
||||||
Text('فیلترها', style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal)),
|
Text(
|
||||||
|
'فیلترها',
|
||||||
|
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: dateFilterWidget(
|
child: dateFilterWidget(
|
||||||
date: controller.fromDateFilter,
|
date: controller.fromDateFilter,
|
||||||
onChanged: (jalali) => controller.fromDateFilter.value = jalali,
|
onChanged: (jalali) =>
|
||||||
|
controller.fromDateFilter.value = jalali,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/request/steward_allocation/steward_allocation_request.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/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';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class BuyInProvinceAllLogic extends GetxController {
|
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