
Corrects API endpoints for creating, processing with, and processing without backorder confirmations. Adds a new `isBackorder` getter to stock picking records for identifying backordered items, and improves the robustness of the `isDone` getter. Integrates backorder detection into the reception validation process, prompting a dedicated confirmation dialog when a backorder is present. Introduces new state management and methods (`withBackorder`, `withoutBackorder`) in the reception details model to handle the backorder confirmation logic. Enhances the primary button component with a `backgroundColor` property for greater customization.
170 lines
9.5 KiB
Dart
170 lines
9.5 KiB
Dart
// dart format width=80
|
|
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'reception_details_page_model.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
/// @nodoc
|
|
mixin _$ReceptionDetailsPageState implements DiagnosticableTreeMixin {
|
|
|
|
StockPickingRecordEntity? get reception; bool get loading; bool get validateLoading; bool get saveLoading; bool get withBackorderLoading; bool get withoutBackorderLoading;
|
|
/// Create a copy of ReceptionDetailsPageState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ReceptionDetailsPageStateCopyWith<ReceptionDetailsPageState> get copyWith => _$ReceptionDetailsPageStateCopyWithImpl<ReceptionDetailsPageState>(this as ReceptionDetailsPageState, _$identity);
|
|
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'ReceptionDetailsPageState'))
|
|
..add(DiagnosticsProperty('reception', reception))..add(DiagnosticsProperty('loading', loading))..add(DiagnosticsProperty('validateLoading', validateLoading))..add(DiagnosticsProperty('saveLoading', saveLoading))..add(DiagnosticsProperty('withBackorderLoading', withBackorderLoading))..add(DiagnosticsProperty('withoutBackorderLoading', withoutBackorderLoading));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ReceptionDetailsPageState&&(identical(other.reception, reception) || other.reception == reception)&&(identical(other.loading, loading) || other.loading == loading)&&(identical(other.validateLoading, validateLoading) || other.validateLoading == validateLoading)&&(identical(other.saveLoading, saveLoading) || other.saveLoading == saveLoading)&&(identical(other.withBackorderLoading, withBackorderLoading) || other.withBackorderLoading == withBackorderLoading)&&(identical(other.withoutBackorderLoading, withoutBackorderLoading) || other.withoutBackorderLoading == withoutBackorderLoading));
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,reception,loading,validateLoading,saveLoading,withBackorderLoading,withoutBackorderLoading);
|
|
|
|
@override
|
|
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
|
return 'ReceptionDetailsPageState(reception: $reception, loading: $loading, validateLoading: $validateLoading, saveLoading: $saveLoading, withBackorderLoading: $withBackorderLoading, withoutBackorderLoading: $withoutBackorderLoading)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ReceptionDetailsPageStateCopyWith<$Res> {
|
|
factory $ReceptionDetailsPageStateCopyWith(ReceptionDetailsPageState value, $Res Function(ReceptionDetailsPageState) _then) = _$ReceptionDetailsPageStateCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
StockPickingRecordEntity? reception, bool loading, bool validateLoading, bool saveLoading, bool withBackorderLoading, bool withoutBackorderLoading
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$ReceptionDetailsPageStateCopyWithImpl<$Res>
|
|
implements $ReceptionDetailsPageStateCopyWith<$Res> {
|
|
_$ReceptionDetailsPageStateCopyWithImpl(this._self, this._then);
|
|
|
|
final ReceptionDetailsPageState _self;
|
|
final $Res Function(ReceptionDetailsPageState) _then;
|
|
|
|
/// Create a copy of ReceptionDetailsPageState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? reception = freezed,Object? loading = null,Object? validateLoading = null,Object? saveLoading = null,Object? withBackorderLoading = null,Object? withoutBackorderLoading = null,}) {
|
|
return _then(_self.copyWith(
|
|
reception: freezed == reception ? _self.reception : reception // ignore: cast_nullable_to_non_nullable
|
|
as StockPickingRecordEntity?,loading: null == loading ? _self.loading : loading // ignore: cast_nullable_to_non_nullable
|
|
as bool,validateLoading: null == validateLoading ? _self.validateLoading : validateLoading // ignore: cast_nullable_to_non_nullable
|
|
as bool,saveLoading: null == saveLoading ? _self.saveLoading : saveLoading // ignore: cast_nullable_to_non_nullable
|
|
as bool,withBackorderLoading: null == withBackorderLoading ? _self.withBackorderLoading : withBackorderLoading // ignore: cast_nullable_to_non_nullable
|
|
as bool,withoutBackorderLoading: null == withoutBackorderLoading ? _self.withoutBackorderLoading : withoutBackorderLoading // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
class _ReceptionDetailsPageState with DiagnosticableTreeMixin implements ReceptionDetailsPageState {
|
|
const _ReceptionDetailsPageState({this.reception, this.loading = false, this.validateLoading = false, this.saveLoading = false, this.withBackorderLoading = false, this.withoutBackorderLoading = false});
|
|
|
|
|
|
@override final StockPickingRecordEntity? reception;
|
|
@override@JsonKey() final bool loading;
|
|
@override@JsonKey() final bool validateLoading;
|
|
@override@JsonKey() final bool saveLoading;
|
|
@override@JsonKey() final bool withBackorderLoading;
|
|
@override@JsonKey() final bool withoutBackorderLoading;
|
|
|
|
/// Create a copy of ReceptionDetailsPageState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ReceptionDetailsPageStateCopyWith<_ReceptionDetailsPageState> get copyWith => __$ReceptionDetailsPageStateCopyWithImpl<_ReceptionDetailsPageState>(this, _$identity);
|
|
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'ReceptionDetailsPageState'))
|
|
..add(DiagnosticsProperty('reception', reception))..add(DiagnosticsProperty('loading', loading))..add(DiagnosticsProperty('validateLoading', validateLoading))..add(DiagnosticsProperty('saveLoading', saveLoading))..add(DiagnosticsProperty('withBackorderLoading', withBackorderLoading))..add(DiagnosticsProperty('withoutBackorderLoading', withoutBackorderLoading));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ReceptionDetailsPageState&&(identical(other.reception, reception) || other.reception == reception)&&(identical(other.loading, loading) || other.loading == loading)&&(identical(other.validateLoading, validateLoading) || other.validateLoading == validateLoading)&&(identical(other.saveLoading, saveLoading) || other.saveLoading == saveLoading)&&(identical(other.withBackorderLoading, withBackorderLoading) || other.withBackorderLoading == withBackorderLoading)&&(identical(other.withoutBackorderLoading, withoutBackorderLoading) || other.withoutBackorderLoading == withoutBackorderLoading));
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,reception,loading,validateLoading,saveLoading,withBackorderLoading,withoutBackorderLoading);
|
|
|
|
@override
|
|
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
|
return 'ReceptionDetailsPageState(reception: $reception, loading: $loading, validateLoading: $validateLoading, saveLoading: $saveLoading, withBackorderLoading: $withBackorderLoading, withoutBackorderLoading: $withoutBackorderLoading)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ReceptionDetailsPageStateCopyWith<$Res> implements $ReceptionDetailsPageStateCopyWith<$Res> {
|
|
factory _$ReceptionDetailsPageStateCopyWith(_ReceptionDetailsPageState value, $Res Function(_ReceptionDetailsPageState) _then) = __$ReceptionDetailsPageStateCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
StockPickingRecordEntity? reception, bool loading, bool validateLoading, bool saveLoading, bool withBackorderLoading, bool withoutBackorderLoading
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$ReceptionDetailsPageStateCopyWithImpl<$Res>
|
|
implements _$ReceptionDetailsPageStateCopyWith<$Res> {
|
|
__$ReceptionDetailsPageStateCopyWithImpl(this._self, this._then);
|
|
|
|
final _ReceptionDetailsPageState _self;
|
|
final $Res Function(_ReceptionDetailsPageState) _then;
|
|
|
|
/// Create a copy of ReceptionDetailsPageState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? reception = freezed,Object? loading = null,Object? validateLoading = null,Object? saveLoading = null,Object? withBackorderLoading = null,Object? withoutBackorderLoading = null,}) {
|
|
return _then(_ReceptionDetailsPageState(
|
|
reception: freezed == reception ? _self.reception : reception // ignore: cast_nullable_to_non_nullable
|
|
as StockPickingRecordEntity?,loading: null == loading ? _self.loading : loading // ignore: cast_nullable_to_non_nullable
|
|
as bool,validateLoading: null == validateLoading ? _self.validateLoading : validateLoading // ignore: cast_nullable_to_non_nullable
|
|
as bool,saveLoading: null == saveLoading ? _self.saveLoading : saveLoading // ignore: cast_nullable_to_non_nullable
|
|
as bool,withBackorderLoading: null == withBackorderLoading ? _self.withBackorderLoading : withBackorderLoading // ignore: cast_nullable_to_non_nullable
|
|
as bool,withoutBackorderLoading: null == withoutBackorderLoading ? _self.withoutBackorderLoading : withoutBackorderLoading // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// dart format on
|