add printer checker checks

This commit is contained in:
Efril 2026-05-28 18:11:02 +07:00
parent b9fcd79962
commit 2ab20a1150
13 changed files with 128 additions and 10 deletions

View File

@ -99,6 +99,7 @@ class VoidFormBloc extends Bloc<VoidFormEvent, VoidFormState> {
updatedAt: originalItem.updatedAt, updatedAt: originalItem.updatedAt,
printerType: originalItem.printerType, printerType: originalItem.printerType,
paidQuantity: originalItem.paidQuantity, paidQuantity: originalItem.paidQuantity,
printToChecker: originalItem.printToChecker,
), ),
); );
}); });

View File

@ -125,6 +125,7 @@ class Order with _$Order {
createdAt: DateTime.now().subtract(const Duration(hours: 1)), createdAt: DateTime.now().subtract(const Duration(hours: 1)),
updatedAt: DateTime.now(), updatedAt: DateTime.now(),
printerType: 'Barista', printerType: 'Barista',
printToChecker: false,
paidQuantity: 2, paidQuantity: 2,
categoryId: 'CAT-001', categoryId: 'CAT-001',
categoryName: 'Minuman', categoryName: 'Minuman',
@ -145,6 +146,7 @@ class Order with _$Order {
createdAt: DateTime.now().subtract(const Duration(hours: 1)), createdAt: DateTime.now().subtract(const Duration(hours: 1)),
updatedAt: DateTime.now(), updatedAt: DateTime.now(),
printerType: 'Kitchen', printerType: 'Kitchen',
printToChecker: false,
paidQuantity: 1, paidQuantity: 1,
categoryId: 'CAT-002', categoryId: 'CAT-002',
categoryName: 'Makanan', categoryName: 'Makanan',
@ -165,6 +167,7 @@ class Order with _$Order {
createdAt: DateTime.now().subtract(const Duration(hours: 1)), createdAt: DateTime.now().subtract(const Duration(hours: 1)),
updatedAt: DateTime.now(), updatedAt: DateTime.now(),
printerType: 'Kitchen', printerType: 'Kitchen',
printToChecker: false,
paidQuantity: 1, paidQuantity: 1,
categoryId: 'CAT-002', categoryId: 'CAT-002',
categoryName: 'Makanan', categoryName: 'Makanan',
@ -230,6 +233,7 @@ class OrderItem with _$OrderItem {
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
required String printerType, required String printerType,
required bool printToChecker,
required int paidQuantity, required int paidQuantity,
required String categoryId, required String categoryId,
required String categoryName, required String categoryName,
@ -251,6 +255,7 @@ class OrderItem with _$OrderItem {
createdAt: DateTime(1970), createdAt: DateTime(1970),
updatedAt: DateTime(1970), updatedAt: DateTime(1970),
printerType: '', printerType: '',
printToChecker: false,
paidQuantity: 0, paidQuantity: 0,
categoryId: '', categoryId: '',
categoryName: '', categoryName: '',
@ -274,6 +279,7 @@ class OrderItem with _$OrderItem {
createdAt: DateTime.now(), createdAt: DateTime.now(),
updatedAt: DateTime.now(), updatedAt: DateTime.now(),
printerType: productQuantity.product.printerType, printerType: productQuantity.product.printerType,
printToChecker: productQuantity.product.printToChecker,
paidQuantity: 0, paidQuantity: 0,
categoryId: '', categoryId: '',
categoryName: '', categoryName: '',

View File

@ -1002,6 +1002,7 @@ mixin _$OrderItem {
DateTime get createdAt => throw _privateConstructorUsedError; DateTime get createdAt => throw _privateConstructorUsedError;
DateTime get updatedAt => throw _privateConstructorUsedError; DateTime get updatedAt => throw _privateConstructorUsedError;
String get printerType => throw _privateConstructorUsedError; String get printerType => throw _privateConstructorUsedError;
bool get printToChecker => throw _privateConstructorUsedError;
int get paidQuantity => throw _privateConstructorUsedError; int get paidQuantity => throw _privateConstructorUsedError;
String get categoryId => throw _privateConstructorUsedError; String get categoryId => throw _privateConstructorUsedError;
String get categoryName => throw _privateConstructorUsedError; String get categoryName => throw _privateConstructorUsedError;
@ -1034,6 +1035,7 @@ abstract class $OrderItemCopyWith<$Res> {
DateTime createdAt, DateTime createdAt,
DateTime updatedAt, DateTime updatedAt,
String printerType, String printerType,
bool printToChecker,
int paidQuantity, int paidQuantity,
String categoryId, String categoryId,
String categoryName, String categoryName,
@ -1070,6 +1072,7 @@ class _$OrderItemCopyWithImpl<$Res, $Val extends OrderItem>
Object? createdAt = null, Object? createdAt = null,
Object? updatedAt = null, Object? updatedAt = null,
Object? printerType = null, Object? printerType = null,
Object? printToChecker = null,
Object? paidQuantity = null, Object? paidQuantity = null,
Object? categoryId = null, Object? categoryId = null,
Object? categoryName = null, Object? categoryName = null,
@ -1136,6 +1139,10 @@ class _$OrderItemCopyWithImpl<$Res, $Val extends OrderItem>
? _value.printerType ? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable : printerType // ignore: cast_nullable_to_non_nullable
as String, as String,
printToChecker: null == printToChecker
? _value.printToChecker
: printToChecker // ignore: cast_nullable_to_non_nullable
as bool,
paidQuantity: null == paidQuantity paidQuantity: null == paidQuantity
? _value.paidQuantity ? _value.paidQuantity
: paidQuantity // ignore: cast_nullable_to_non_nullable : paidQuantity // ignore: cast_nullable_to_non_nullable
@ -1179,6 +1186,7 @@ abstract class _$$OrderItemImplCopyWith<$Res>
DateTime createdAt, DateTime createdAt,
DateTime updatedAt, DateTime updatedAt,
String printerType, String printerType,
bool printToChecker,
int paidQuantity, int paidQuantity,
String categoryId, String categoryId,
String categoryName, String categoryName,
@ -1214,6 +1222,7 @@ class __$$OrderItemImplCopyWithImpl<$Res>
Object? createdAt = null, Object? createdAt = null,
Object? updatedAt = null, Object? updatedAt = null,
Object? printerType = null, Object? printerType = null,
Object? printToChecker = null,
Object? paidQuantity = null, Object? paidQuantity = null,
Object? categoryId = null, Object? categoryId = null,
Object? categoryName = null, Object? categoryName = null,
@ -1280,6 +1289,10 @@ class __$$OrderItemImplCopyWithImpl<$Res>
? _value.printerType ? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable : printerType // ignore: cast_nullable_to_non_nullable
as String, as String,
printToChecker: null == printToChecker
? _value.printToChecker
: printToChecker // ignore: cast_nullable_to_non_nullable
as bool,
paidQuantity: null == paidQuantity paidQuantity: null == paidQuantity
? _value.paidQuantity ? _value.paidQuantity
: paidQuantity // ignore: cast_nullable_to_non_nullable : paidQuantity // ignore: cast_nullable_to_non_nullable
@ -1316,6 +1329,7 @@ class _$OrderItemImpl implements _OrderItem {
required this.createdAt, required this.createdAt,
required this.updatedAt, required this.updatedAt,
required this.printerType, required this.printerType,
required this.printToChecker,
required this.paidQuantity, required this.paidQuantity,
required this.categoryId, required this.categoryId,
required this.categoryName, required this.categoryName,
@ -1358,6 +1372,8 @@ class _$OrderItemImpl implements _OrderItem {
@override @override
final String printerType; final String printerType;
@override @override
final bool printToChecker;
@override
final int paidQuantity; final int paidQuantity;
@override @override
final String categoryId; final String categoryId;
@ -1366,7 +1382,7 @@ class _$OrderItemImpl implements _OrderItem {
@override @override
String toString() { String toString() {
return 'OrderItem(id: $id, orderId: $orderId, productId: $productId, productName: $productName, productVariantId: $productVariantId, productVariantName: $productVariantName, quantity: $quantity, unitPrice: $unitPrice, totalPrice: $totalPrice, modifiers: $modifiers, notes: $notes, status: $status, createdAt: $createdAt, updatedAt: $updatedAt, printerType: $printerType, paidQuantity: $paidQuantity, categoryId: $categoryId, categoryName: $categoryName)'; return 'OrderItem(id: $id, orderId: $orderId, productId: $productId, productName: $productName, productVariantId: $productVariantId, productVariantName: $productVariantName, quantity: $quantity, unitPrice: $unitPrice, totalPrice: $totalPrice, modifiers: $modifiers, notes: $notes, status: $status, createdAt: $createdAt, updatedAt: $updatedAt, printerType: $printerType, printToChecker: $printToChecker, paidQuantity: $paidQuantity, categoryId: $categoryId, categoryName: $categoryName)';
} }
@override @override
@ -1402,6 +1418,8 @@ class _$OrderItemImpl implements _OrderItem {
other.updatedAt == updatedAt) && other.updatedAt == updatedAt) &&
(identical(other.printerType, printerType) || (identical(other.printerType, printerType) ||
other.printerType == printerType) && other.printerType == printerType) &&
(identical(other.printToChecker, printToChecker) ||
other.printToChecker == printToChecker) &&
(identical(other.paidQuantity, paidQuantity) || (identical(other.paidQuantity, paidQuantity) ||
other.paidQuantity == paidQuantity) && other.paidQuantity == paidQuantity) &&
(identical(other.categoryId, categoryId) || (identical(other.categoryId, categoryId) ||
@ -1411,7 +1429,7 @@ class _$OrderItemImpl implements _OrderItem {
} }
@override @override
int get hashCode => Object.hash( int get hashCode => Object.hashAll([
runtimeType, runtimeType,
id, id,
orderId, orderId,
@ -1428,10 +1446,11 @@ class _$OrderItemImpl implements _OrderItem {
createdAt, createdAt,
updatedAt, updatedAt,
printerType, printerType,
printToChecker,
paidQuantity, paidQuantity,
categoryId, categoryId,
categoryName, categoryName,
); ]);
/// Create a copy of OrderItem /// Create a copy of OrderItem
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -1459,6 +1478,7 @@ abstract class _OrderItem implements OrderItem {
required final DateTime createdAt, required final DateTime createdAt,
required final DateTime updatedAt, required final DateTime updatedAt,
required final String printerType, required final String printerType,
required final bool printToChecker,
required final int paidQuantity, required final int paidQuantity,
required final String categoryId, required final String categoryId,
required final String categoryName, required final String categoryName,
@ -1495,6 +1515,8 @@ abstract class _OrderItem implements OrderItem {
@override @override
String get printerType; String get printerType;
@override @override
bool get printToChecker;
@override
int get paidQuantity; int get paidQuantity;
@override @override
String get categoryId; String get categoryId;

View File

@ -33,6 +33,7 @@ class Product with _$Product {
required String businessType, required String businessType,
required String imageUrl, required String imageUrl,
required String printerType, required String printerType,
required bool printToChecker,
required Map<String, dynamic> metadata, required Map<String, dynamic> metadata,
required bool isActive, required bool isActive,
required String createdAt, required String createdAt,
@ -52,6 +53,7 @@ class Product with _$Product {
businessType: '', businessType: '',
imageUrl: '', imageUrl: '',
printerType: '', printerType: '',
printToChecker: false,
metadata: {}, metadata: {},
isActive: false, isActive: false,
createdAt: '', createdAt: '',

View File

@ -279,6 +279,7 @@ mixin _$Product {
String get businessType => throw _privateConstructorUsedError; String get businessType => throw _privateConstructorUsedError;
String get imageUrl => throw _privateConstructorUsedError; String get imageUrl => throw _privateConstructorUsedError;
String get printerType => throw _privateConstructorUsedError; String get printerType => throw _privateConstructorUsedError;
bool get printToChecker => throw _privateConstructorUsedError;
Map<String, dynamic> get metadata => throw _privateConstructorUsedError; Map<String, dynamic> get metadata => throw _privateConstructorUsedError;
bool get isActive => throw _privateConstructorUsedError; bool get isActive => throw _privateConstructorUsedError;
String get createdAt => throw _privateConstructorUsedError; String get createdAt => throw _privateConstructorUsedError;
@ -308,6 +309,7 @@ abstract class $ProductCopyWith<$Res> {
String businessType, String businessType,
String imageUrl, String imageUrl,
String printerType, String printerType,
bool printToChecker,
Map<String, dynamic> metadata, Map<String, dynamic> metadata,
bool isActive, bool isActive,
String createdAt, String createdAt,
@ -342,6 +344,7 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
Object? businessType = null, Object? businessType = null,
Object? imageUrl = null, Object? imageUrl = null,
Object? printerType = null, Object? printerType = null,
Object? printToChecker = null,
Object? metadata = null, Object? metadata = null,
Object? isActive = null, Object? isActive = null,
Object? createdAt = null, Object? createdAt = null,
@ -394,6 +397,10 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
? _value.printerType ? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable : printerType // ignore: cast_nullable_to_non_nullable
as String, as String,
printToChecker: null == printToChecker
? _value.printToChecker
: printToChecker // ignore: cast_nullable_to_non_nullable
as bool,
metadata: null == metadata metadata: null == metadata
? _value.metadata ? _value.metadata
: metadata // ignore: cast_nullable_to_non_nullable : metadata // ignore: cast_nullable_to_non_nullable
@ -440,6 +447,7 @@ abstract class _$$ProductImplCopyWith<$Res> implements $ProductCopyWith<$Res> {
String businessType, String businessType,
String imageUrl, String imageUrl,
String printerType, String printerType,
bool printToChecker,
Map<String, dynamic> metadata, Map<String, dynamic> metadata,
bool isActive, bool isActive,
String createdAt, String createdAt,
@ -473,6 +481,7 @@ class __$$ProductImplCopyWithImpl<$Res>
Object? businessType = null, Object? businessType = null,
Object? imageUrl = null, Object? imageUrl = null,
Object? printerType = null, Object? printerType = null,
Object? printToChecker = null,
Object? metadata = null, Object? metadata = null,
Object? isActive = null, Object? isActive = null,
Object? createdAt = null, Object? createdAt = null,
@ -525,6 +534,10 @@ class __$$ProductImplCopyWithImpl<$Res>
? _value.printerType ? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable : printerType // ignore: cast_nullable_to_non_nullable
as String, as String,
printToChecker: null == printToChecker
? _value.printToChecker
: printToChecker // ignore: cast_nullable_to_non_nullable
as bool,
metadata: null == metadata metadata: null == metadata
? _value._metadata ? _value._metadata
: metadata // ignore: cast_nullable_to_non_nullable : metadata // ignore: cast_nullable_to_non_nullable
@ -565,6 +578,7 @@ class _$ProductImpl with DiagnosticableTreeMixin implements _Product {
required this.businessType, required this.businessType,
required this.imageUrl, required this.imageUrl,
required this.printerType, required this.printerType,
required this.printToChecker,
required final Map<String, dynamic> metadata, required final Map<String, dynamic> metadata,
required this.isActive, required this.isActive,
required this.createdAt, required this.createdAt,
@ -595,6 +609,8 @@ class _$ProductImpl with DiagnosticableTreeMixin implements _Product {
final String imageUrl; final String imageUrl;
@override @override
final String printerType; final String printerType;
@override
final bool printToChecker;
final Map<String, dynamic> _metadata; final Map<String, dynamic> _metadata;
@override @override
Map<String, dynamic> get metadata { Map<String, dynamic> get metadata {
@ -619,7 +635,7 @@ class _$ProductImpl with DiagnosticableTreeMixin implements _Product {
@override @override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'Product(id: $id, organizationId: $organizationId, categoryId: $categoryId, sku: $sku, name: $name, description: $description, price: $price, cost: $cost, businessType: $businessType, imageUrl: $imageUrl, printerType: $printerType, metadata: $metadata, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt, variants: $variants)'; return 'Product(id: $id, organizationId: $organizationId, categoryId: $categoryId, sku: $sku, name: $name, description: $description, price: $price, cost: $cost, businessType: $businessType, imageUrl: $imageUrl, printerType: $printerType, printToChecker: $printToChecker, metadata: $metadata, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt, variants: $variants)';
} }
@override @override
@ -638,6 +654,7 @@ class _$ProductImpl with DiagnosticableTreeMixin implements _Product {
..add(DiagnosticsProperty('businessType', businessType)) ..add(DiagnosticsProperty('businessType', businessType))
..add(DiagnosticsProperty('imageUrl', imageUrl)) ..add(DiagnosticsProperty('imageUrl', imageUrl))
..add(DiagnosticsProperty('printerType', printerType)) ..add(DiagnosticsProperty('printerType', printerType))
..add(DiagnosticsProperty('printToChecker', printToChecker))
..add(DiagnosticsProperty('metadata', metadata)) ..add(DiagnosticsProperty('metadata', metadata))
..add(DiagnosticsProperty('isActive', isActive)) ..add(DiagnosticsProperty('isActive', isActive))
..add(DiagnosticsProperty('createdAt', createdAt)) ..add(DiagnosticsProperty('createdAt', createdAt))
@ -667,6 +684,8 @@ class _$ProductImpl with DiagnosticableTreeMixin implements _Product {
other.imageUrl == imageUrl) && other.imageUrl == imageUrl) &&
(identical(other.printerType, printerType) || (identical(other.printerType, printerType) ||
other.printerType == printerType) && other.printerType == printerType) &&
(identical(other.printToChecker, printToChecker) ||
other.printToChecker == printToChecker) &&
const DeepCollectionEquality().equals(other._metadata, _metadata) && const DeepCollectionEquality().equals(other._metadata, _metadata) &&
(identical(other.isActive, isActive) || (identical(other.isActive, isActive) ||
other.isActive == isActive) && other.isActive == isActive) &&
@ -691,6 +710,7 @@ class _$ProductImpl with DiagnosticableTreeMixin implements _Product {
businessType, businessType,
imageUrl, imageUrl,
printerType, printerType,
printToChecker,
const DeepCollectionEquality().hash(_metadata), const DeepCollectionEquality().hash(_metadata),
isActive, isActive,
createdAt, createdAt,
@ -720,6 +740,7 @@ abstract class _Product implements Product {
required final String businessType, required final String businessType,
required final String imageUrl, required final String imageUrl,
required final String printerType, required final String printerType,
required final bool printToChecker,
required final Map<String, dynamic> metadata, required final Map<String, dynamic> metadata,
required final bool isActive, required final bool isActive,
required final String createdAt, required final String createdAt,
@ -750,6 +771,8 @@ abstract class _Product implements Product {
@override @override
String get printerType; String get printerType;
@override @override
bool get printToChecker;
@override
Map<String, dynamic> get metadata; Map<String, dynamic> get metadata;
@override @override
bool get isActive; bool get isActive;

View File

@ -114,6 +114,7 @@ class OrderItemDto with _$OrderItemDto {
@JsonKey(name: "created_at") String? createdAt, @JsonKey(name: "created_at") String? createdAt,
@JsonKey(name: "updated_at") String? updatedAt, @JsonKey(name: "updated_at") String? updatedAt,
@JsonKey(name: "printer_type") String? printerType, @JsonKey(name: "printer_type") String? printerType,
@JsonKey(name: "print_to_checker") bool? printToChecker,
@JsonKey(name: "paid_quantity") int? paidQuantity, @JsonKey(name: "paid_quantity") int? paidQuantity,
@JsonKey(name: "category_id") String? categoryId, @JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName, @JsonKey(name: "category_name") String? categoryName,
@ -139,6 +140,7 @@ class OrderItemDto with _$OrderItemDto {
createdAt: createdAt != null ? DateTime.parse(createdAt!) : DateTime(1970), createdAt: createdAt != null ? DateTime.parse(createdAt!) : DateTime(1970),
updatedAt: updatedAt != null ? DateTime.parse(updatedAt!) : DateTime(1970), updatedAt: updatedAt != null ? DateTime.parse(updatedAt!) : DateTime(1970),
printerType: printerType ?? '', printerType: printerType ?? '',
printToChecker: printToChecker ?? false,
paidQuantity: paidQuantity ?? 0, paidQuantity: paidQuantity ?? 0,
categoryId: categoryId ?? '', categoryId: categoryId ?? '',
categoryName: categoryName ?? '', categoryName: categoryName ?? '',
@ -160,6 +162,7 @@ class OrderItemDto with _$OrderItemDto {
createdAt: orderItem.createdAt.toIso8601String(), createdAt: orderItem.createdAt.toIso8601String(),
updatedAt: orderItem.updatedAt.toIso8601String(), updatedAt: orderItem.updatedAt.toIso8601String(),
printerType: orderItem.printerType, printerType: orderItem.printerType,
printToChecker: orderItem.printToChecker,
paidQuantity: orderItem.paidQuantity, paidQuantity: orderItem.paidQuantity,
categoryId: orderItem.categoryId, categoryId: orderItem.categoryId,
categoryName: orderItem.categoryName, categoryName: orderItem.categoryName,

View File

@ -1169,6 +1169,8 @@ mixin _$OrderItemDto {
String? get updatedAt => throw _privateConstructorUsedError; String? get updatedAt => throw _privateConstructorUsedError;
@JsonKey(name: "printer_type") @JsonKey(name: "printer_type")
String? get printerType => throw _privateConstructorUsedError; String? get printerType => throw _privateConstructorUsedError;
@JsonKey(name: "print_to_checker")
bool? get printToChecker => throw _privateConstructorUsedError;
@JsonKey(name: "paid_quantity") @JsonKey(name: "paid_quantity")
int? get paidQuantity => throw _privateConstructorUsedError; int? get paidQuantity => throw _privateConstructorUsedError;
@JsonKey(name: "category_id") @JsonKey(name: "category_id")
@ -1209,6 +1211,7 @@ abstract class $OrderItemDtoCopyWith<$Res> {
@JsonKey(name: "created_at") String? createdAt, @JsonKey(name: "created_at") String? createdAt,
@JsonKey(name: "updated_at") String? updatedAt, @JsonKey(name: "updated_at") String? updatedAt,
@JsonKey(name: "printer_type") String? printerType, @JsonKey(name: "printer_type") String? printerType,
@JsonKey(name: "print_to_checker") bool? printToChecker,
@JsonKey(name: "paid_quantity") int? paidQuantity, @JsonKey(name: "paid_quantity") int? paidQuantity,
@JsonKey(name: "category_id") String? categoryId, @JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName, @JsonKey(name: "category_name") String? categoryName,
@ -1245,6 +1248,7 @@ class _$OrderItemDtoCopyWithImpl<$Res, $Val extends OrderItemDto>
Object? createdAt = freezed, Object? createdAt = freezed,
Object? updatedAt = freezed, Object? updatedAt = freezed,
Object? printerType = freezed, Object? printerType = freezed,
Object? printToChecker = freezed,
Object? paidQuantity = freezed, Object? paidQuantity = freezed,
Object? categoryId = freezed, Object? categoryId = freezed,
Object? categoryName = freezed, Object? categoryName = freezed,
@ -1311,6 +1315,10 @@ class _$OrderItemDtoCopyWithImpl<$Res, $Val extends OrderItemDto>
? _value.printerType ? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable : printerType // ignore: cast_nullable_to_non_nullable
as String?, as String?,
printToChecker: freezed == printToChecker
? _value.printToChecker
: printToChecker // ignore: cast_nullable_to_non_nullable
as bool?,
paidQuantity: freezed == paidQuantity paidQuantity: freezed == paidQuantity
? _value.paidQuantity ? _value.paidQuantity
: paidQuantity // ignore: cast_nullable_to_non_nullable : paidQuantity // ignore: cast_nullable_to_non_nullable
@ -1354,6 +1362,7 @@ abstract class _$$OrderItemDtoImplCopyWith<$Res>
@JsonKey(name: "created_at") String? createdAt, @JsonKey(name: "created_at") String? createdAt,
@JsonKey(name: "updated_at") String? updatedAt, @JsonKey(name: "updated_at") String? updatedAt,
@JsonKey(name: "printer_type") String? printerType, @JsonKey(name: "printer_type") String? printerType,
@JsonKey(name: "print_to_checker") bool? printToChecker,
@JsonKey(name: "paid_quantity") int? paidQuantity, @JsonKey(name: "paid_quantity") int? paidQuantity,
@JsonKey(name: "category_id") String? categoryId, @JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName, @JsonKey(name: "category_name") String? categoryName,
@ -1389,6 +1398,7 @@ class __$$OrderItemDtoImplCopyWithImpl<$Res>
Object? createdAt = freezed, Object? createdAt = freezed,
Object? updatedAt = freezed, Object? updatedAt = freezed,
Object? printerType = freezed, Object? printerType = freezed,
Object? printToChecker = freezed,
Object? paidQuantity = freezed, Object? paidQuantity = freezed,
Object? categoryId = freezed, Object? categoryId = freezed,
Object? categoryName = freezed, Object? categoryName = freezed,
@ -1455,6 +1465,10 @@ class __$$OrderItemDtoImplCopyWithImpl<$Res>
? _value.printerType ? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable : printerType // ignore: cast_nullable_to_non_nullable
as String?, as String?,
printToChecker: freezed == printToChecker
? _value.printToChecker
: printToChecker // ignore: cast_nullable_to_non_nullable
as bool?,
paidQuantity: freezed == paidQuantity paidQuantity: freezed == paidQuantity
? _value.paidQuantity ? _value.paidQuantity
: paidQuantity // ignore: cast_nullable_to_non_nullable : paidQuantity // ignore: cast_nullable_to_non_nullable
@ -1491,6 +1505,7 @@ class _$OrderItemDtoImpl extends _OrderItemDto {
@JsonKey(name: "created_at") this.createdAt, @JsonKey(name: "created_at") this.createdAt,
@JsonKey(name: "updated_at") this.updatedAt, @JsonKey(name: "updated_at") this.updatedAt,
@JsonKey(name: "printer_type") this.printerType, @JsonKey(name: "printer_type") this.printerType,
@JsonKey(name: "print_to_checker") this.printToChecker,
@JsonKey(name: "paid_quantity") this.paidQuantity, @JsonKey(name: "paid_quantity") this.paidQuantity,
@JsonKey(name: "category_id") this.categoryId, @JsonKey(name: "category_id") this.categoryId,
@JsonKey(name: "category_name") this.categoryName, @JsonKey(name: "category_name") this.categoryName,
@ -1554,6 +1569,9 @@ class _$OrderItemDtoImpl extends _OrderItemDto {
@JsonKey(name: "printer_type") @JsonKey(name: "printer_type")
final String? printerType; final String? printerType;
@override @override
@JsonKey(name: "print_to_checker")
final bool? printToChecker;
@override
@JsonKey(name: "paid_quantity") @JsonKey(name: "paid_quantity")
final int? paidQuantity; final int? paidQuantity;
@override @override
@ -1565,7 +1583,7 @@ class _$OrderItemDtoImpl extends _OrderItemDto {
@override @override
String toString() { String toString() {
return 'OrderItemDto(id: $id, orderId: $orderId, productId: $productId, productName: $productName, productVariantId: $productVariantId, productVariantName: $productVariantName, quantity: $quantity, unitPrice: $unitPrice, totalPrice: $totalPrice, modifiers: $modifiers, notes: $notes, status: $status, createdAt: $createdAt, updatedAt: $updatedAt, printerType: $printerType, paidQuantity: $paidQuantity, categoryId: $categoryId, categoryName: $categoryName)'; return 'OrderItemDto(id: $id, orderId: $orderId, productId: $productId, productName: $productName, productVariantId: $productVariantId, productVariantName: $productVariantName, quantity: $quantity, unitPrice: $unitPrice, totalPrice: $totalPrice, modifiers: $modifiers, notes: $notes, status: $status, createdAt: $createdAt, updatedAt: $updatedAt, printerType: $printerType, printToChecker: $printToChecker, paidQuantity: $paidQuantity, categoryId: $categoryId, categoryName: $categoryName)';
} }
@override @override
@ -1601,6 +1619,8 @@ class _$OrderItemDtoImpl extends _OrderItemDto {
other.updatedAt == updatedAt) && other.updatedAt == updatedAt) &&
(identical(other.printerType, printerType) || (identical(other.printerType, printerType) ||
other.printerType == printerType) && other.printerType == printerType) &&
(identical(other.printToChecker, printToChecker) ||
other.printToChecker == printToChecker) &&
(identical(other.paidQuantity, paidQuantity) || (identical(other.paidQuantity, paidQuantity) ||
other.paidQuantity == paidQuantity) && other.paidQuantity == paidQuantity) &&
(identical(other.categoryId, categoryId) || (identical(other.categoryId, categoryId) ||
@ -1611,7 +1631,7 @@ class _$OrderItemDtoImpl extends _OrderItemDto {
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash( int get hashCode => Object.hashAll([
runtimeType, runtimeType,
id, id,
orderId, orderId,
@ -1628,10 +1648,11 @@ class _$OrderItemDtoImpl extends _OrderItemDto {
createdAt, createdAt,
updatedAt, updatedAt,
printerType, printerType,
printToChecker,
paidQuantity, paidQuantity,
categoryId, categoryId,
categoryName, categoryName,
); ]);
/// Create a copy of OrderItemDto /// Create a copy of OrderItemDto
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -1664,6 +1685,7 @@ abstract class _OrderItemDto extends OrderItemDto {
@JsonKey(name: "created_at") final String? createdAt, @JsonKey(name: "created_at") final String? createdAt,
@JsonKey(name: "updated_at") final String? updatedAt, @JsonKey(name: "updated_at") final String? updatedAt,
@JsonKey(name: "printer_type") final String? printerType, @JsonKey(name: "printer_type") final String? printerType,
@JsonKey(name: "print_to_checker") final bool? printToChecker,
@JsonKey(name: "paid_quantity") final int? paidQuantity, @JsonKey(name: "paid_quantity") final int? paidQuantity,
@JsonKey(name: "category_id") final String? categoryId, @JsonKey(name: "category_id") final String? categoryId,
@JsonKey(name: "category_name") final String? categoryName, @JsonKey(name: "category_name") final String? categoryName,
@ -1719,6 +1741,9 @@ abstract class _OrderItemDto extends OrderItemDto {
@JsonKey(name: "printer_type") @JsonKey(name: "printer_type")
String? get printerType; String? get printerType;
@override @override
@JsonKey(name: "print_to_checker")
bool? get printToChecker;
@override
@JsonKey(name: "paid_quantity") @JsonKey(name: "paid_quantity")
int? get paidQuantity; int? get paidQuantity;
@override @override

View File

@ -109,6 +109,7 @@ _$OrderItemDtoImpl _$$OrderItemDtoImplFromJson(Map<String, dynamic> json) =>
createdAt: json['created_at'] as String?, createdAt: json['created_at'] as String?,
updatedAt: json['updated_at'] as String?, updatedAt: json['updated_at'] as String?,
printerType: json['printer_type'] as String?, printerType: json['printer_type'] as String?,
printToChecker: json['print_to_checker'] as bool?,
paidQuantity: (json['paid_quantity'] as num?)?.toInt(), paidQuantity: (json['paid_quantity'] as num?)?.toInt(),
categoryId: json['category_id'] as String?, categoryId: json['category_id'] as String?,
categoryName: json['category_name'] as String?, categoryName: json['category_name'] as String?,
@ -131,6 +132,7 @@ Map<String, dynamic> _$$OrderItemDtoImplToJson(_$OrderItemDtoImpl instance) =>
'created_at': instance.createdAt, 'created_at': instance.createdAt,
'updated_at': instance.updatedAt, 'updated_at': instance.updatedAt,
'printer_type': instance.printerType, 'printer_type': instance.printerType,
'print_to_checker': instance.printToChecker,
'paid_quantity': instance.paidQuantity, 'paid_quantity': instance.paidQuantity,
'category_id': instance.categoryId, 'category_id': instance.categoryId,
'category_name': instance.categoryName, 'category_name': instance.categoryName,

View File

@ -40,6 +40,7 @@ class ProductDto with _$ProductDto {
@JsonKey(name: "business_type") String? businessType, @JsonKey(name: "business_type") String? businessType,
@JsonKey(name: "image_url") String? imageUrl, @JsonKey(name: "image_url") String? imageUrl,
@JsonKey(name: "printer_type") String? printerType, @JsonKey(name: "printer_type") String? printerType,
@JsonKey(name: "print_to_checker") bool? printToChecker,
@JsonKey(name: "metadata") Map<String, dynamic>? metadata, @JsonKey(name: "metadata") Map<String, dynamic>? metadata,
@JsonKey(name: "is_active") bool? isActive, @JsonKey(name: "is_active") bool? isActive,
@JsonKey(name: "created_at") String? createdAt, @JsonKey(name: "created_at") String? createdAt,
@ -63,6 +64,7 @@ class ProductDto with _$ProductDto {
businessType: businessType ?? '', businessType: businessType ?? '',
imageUrl: imageUrl ?? '', imageUrl: imageUrl ?? '',
printerType: printerType ?? '', printerType: printerType ?? '',
printToChecker: printToChecker ?? false,
metadata: metadata ?? {}, metadata: metadata ?? {},
isActive: isActive ?? false, isActive: isActive ?? false,
createdAt: createdAt ?? '', createdAt: createdAt ?? '',
@ -82,6 +84,7 @@ class ProductDto with _$ProductDto {
'business_type': businessType, 'business_type': businessType,
'image_url': imageUrl, 'image_url': imageUrl,
'printer_type': printerType, 'printer_type': printerType,
'print_to_checker': printToChecker == true ? 1 : 0,
'metadata': metadata != null ? jsonEncode(metadata) : null, 'metadata': metadata != null ? jsonEncode(metadata) : null,
'is_active': isActive == true ? 1 : 0, 'is_active': isActive == true ? 1 : 0,
'created_at': createdAt, 'created_at': createdAt,
@ -103,6 +106,9 @@ class ProductDto with _$ProductDto {
businessType: map['business_type'] as String?, businessType: map['business_type'] as String?,
imageUrl: map['image_url'] as String?, imageUrl: map['image_url'] as String?,
printerType: map['printer_type'] as String?, printerType: map['printer_type'] as String?,
printToChecker: map['print_to_checker'] != null
? (map['print_to_checker'] as int) == 1
: null,
metadata: map['metadata'] != null metadata: map['metadata'] != null
? jsonDecode(map['metadata'] as String) as Map<String, dynamic> ? jsonDecode(map['metadata'] as String) as Map<String, dynamic>
: null, : null,
@ -125,6 +131,7 @@ class ProductDto with _$ProductDto {
businessType: product.businessType, businessType: product.businessType,
imageUrl: product.imageUrl, imageUrl: product.imageUrl,
printerType: product.printerType, printerType: product.printerType,
printToChecker: product.printToChecker,
metadata: product.metadata, metadata: product.metadata,
isActive: product.isActive, isActive: product.isActive,
createdAt: product.createdAt, createdAt: product.createdAt,

View File

@ -321,6 +321,8 @@ mixin _$ProductDto {
String? get imageUrl => throw _privateConstructorUsedError; String? get imageUrl => throw _privateConstructorUsedError;
@JsonKey(name: "printer_type") @JsonKey(name: "printer_type")
String? get printerType => throw _privateConstructorUsedError; String? get printerType => throw _privateConstructorUsedError;
@JsonKey(name: "print_to_checker")
bool? get printToChecker => throw _privateConstructorUsedError;
@JsonKey(name: "metadata") @JsonKey(name: "metadata")
Map<String, dynamic>? get metadata => throw _privateConstructorUsedError; Map<String, dynamic>? get metadata => throw _privateConstructorUsedError;
@JsonKey(name: "is_active") @JsonKey(name: "is_active")
@ -361,6 +363,7 @@ abstract class $ProductDtoCopyWith<$Res> {
@JsonKey(name: "business_type") String? businessType, @JsonKey(name: "business_type") String? businessType,
@JsonKey(name: "image_url") String? imageUrl, @JsonKey(name: "image_url") String? imageUrl,
@JsonKey(name: "printer_type") String? printerType, @JsonKey(name: "printer_type") String? printerType,
@JsonKey(name: "print_to_checker") bool? printToChecker,
@JsonKey(name: "metadata") Map<String, dynamic>? metadata, @JsonKey(name: "metadata") Map<String, dynamic>? metadata,
@JsonKey(name: "is_active") bool? isActive, @JsonKey(name: "is_active") bool? isActive,
@JsonKey(name: "created_at") String? createdAt, @JsonKey(name: "created_at") String? createdAt,
@ -395,6 +398,7 @@ class _$ProductDtoCopyWithImpl<$Res, $Val extends ProductDto>
Object? businessType = freezed, Object? businessType = freezed,
Object? imageUrl = freezed, Object? imageUrl = freezed,
Object? printerType = freezed, Object? printerType = freezed,
Object? printToChecker = freezed,
Object? metadata = freezed, Object? metadata = freezed,
Object? isActive = freezed, Object? isActive = freezed,
Object? createdAt = freezed, Object? createdAt = freezed,
@ -447,6 +451,10 @@ class _$ProductDtoCopyWithImpl<$Res, $Val extends ProductDto>
? _value.printerType ? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable : printerType // ignore: cast_nullable_to_non_nullable
as String?, as String?,
printToChecker: freezed == printToChecker
? _value.printToChecker
: printToChecker // ignore: cast_nullable_to_non_nullable
as bool?,
metadata: freezed == metadata metadata: freezed == metadata
? _value.metadata ? _value.metadata
: metadata // ignore: cast_nullable_to_non_nullable : metadata // ignore: cast_nullable_to_non_nullable
@ -494,6 +502,7 @@ abstract class _$$ProductDtoImplCopyWith<$Res>
@JsonKey(name: "business_type") String? businessType, @JsonKey(name: "business_type") String? businessType,
@JsonKey(name: "image_url") String? imageUrl, @JsonKey(name: "image_url") String? imageUrl,
@JsonKey(name: "printer_type") String? printerType, @JsonKey(name: "printer_type") String? printerType,
@JsonKey(name: "print_to_checker") bool? printToChecker,
@JsonKey(name: "metadata") Map<String, dynamic>? metadata, @JsonKey(name: "metadata") Map<String, dynamic>? metadata,
@JsonKey(name: "is_active") bool? isActive, @JsonKey(name: "is_active") bool? isActive,
@JsonKey(name: "created_at") String? createdAt, @JsonKey(name: "created_at") String? createdAt,
@ -527,6 +536,7 @@ class __$$ProductDtoImplCopyWithImpl<$Res>
Object? businessType = freezed, Object? businessType = freezed,
Object? imageUrl = freezed, Object? imageUrl = freezed,
Object? printerType = freezed, Object? printerType = freezed,
Object? printToChecker = freezed,
Object? metadata = freezed, Object? metadata = freezed,
Object? isActive = freezed, Object? isActive = freezed,
Object? createdAt = freezed, Object? createdAt = freezed,
@ -579,6 +589,10 @@ class __$$ProductDtoImplCopyWithImpl<$Res>
? _value.printerType ? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable : printerType // ignore: cast_nullable_to_non_nullable
as String?, as String?,
printToChecker: freezed == printToChecker
? _value.printToChecker
: printToChecker // ignore: cast_nullable_to_non_nullable
as bool?,
metadata: freezed == metadata metadata: freezed == metadata
? _value._metadata ? _value._metadata
: metadata // ignore: cast_nullable_to_non_nullable : metadata // ignore: cast_nullable_to_non_nullable
@ -619,6 +633,7 @@ class _$ProductDtoImpl extends _ProductDto {
@JsonKey(name: "business_type") this.businessType, @JsonKey(name: "business_type") this.businessType,
@JsonKey(name: "image_url") this.imageUrl, @JsonKey(name: "image_url") this.imageUrl,
@JsonKey(name: "printer_type") this.printerType, @JsonKey(name: "printer_type") this.printerType,
@JsonKey(name: "print_to_checker") this.printToChecker,
@JsonKey(name: "metadata") final Map<String, dynamic>? metadata, @JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
@JsonKey(name: "is_active") this.isActive, @JsonKey(name: "is_active") this.isActive,
@JsonKey(name: "created_at") this.createdAt, @JsonKey(name: "created_at") this.createdAt,
@ -664,6 +679,9 @@ class _$ProductDtoImpl extends _ProductDto {
@override @override
@JsonKey(name: "printer_type") @JsonKey(name: "printer_type")
final String? printerType; final String? printerType;
@override
@JsonKey(name: "print_to_checker")
final bool? printToChecker;
final Map<String, dynamic>? _metadata; final Map<String, dynamic>? _metadata;
@override @override
@JsonKey(name: "metadata") @JsonKey(name: "metadata")
@ -697,7 +715,7 @@ class _$ProductDtoImpl extends _ProductDto {
@override @override
String toString() { String toString() {
return 'ProductDto(id: $id, organizationId: $organizationId, categoryId: $categoryId, sku: $sku, name: $name, description: $description, price: $price, cost: $cost, businessType: $businessType, imageUrl: $imageUrl, printerType: $printerType, metadata: $metadata, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt, variants: $variants)'; return 'ProductDto(id: $id, organizationId: $organizationId, categoryId: $categoryId, sku: $sku, name: $name, description: $description, price: $price, cost: $cost, businessType: $businessType, imageUrl: $imageUrl, printerType: $printerType, printToChecker: $printToChecker, metadata: $metadata, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt, variants: $variants)';
} }
@override @override
@ -722,6 +740,8 @@ class _$ProductDtoImpl extends _ProductDto {
other.imageUrl == imageUrl) && other.imageUrl == imageUrl) &&
(identical(other.printerType, printerType) || (identical(other.printerType, printerType) ||
other.printerType == printerType) && other.printerType == printerType) &&
(identical(other.printToChecker, printToChecker) ||
other.printToChecker == printToChecker) &&
const DeepCollectionEquality().equals(other._metadata, _metadata) && const DeepCollectionEquality().equals(other._metadata, _metadata) &&
(identical(other.isActive, isActive) || (identical(other.isActive, isActive) ||
other.isActive == isActive) && other.isActive == isActive) &&
@ -747,6 +767,7 @@ class _$ProductDtoImpl extends _ProductDto {
businessType, businessType,
imageUrl, imageUrl,
printerType, printerType,
printToChecker,
const DeepCollectionEquality().hash(_metadata), const DeepCollectionEquality().hash(_metadata),
isActive, isActive,
createdAt, createdAt,
@ -781,6 +802,7 @@ abstract class _ProductDto extends ProductDto {
@JsonKey(name: "business_type") final String? businessType, @JsonKey(name: "business_type") final String? businessType,
@JsonKey(name: "image_url") final String? imageUrl, @JsonKey(name: "image_url") final String? imageUrl,
@JsonKey(name: "printer_type") final String? printerType, @JsonKey(name: "printer_type") final String? printerType,
@JsonKey(name: "print_to_checker") final bool? printToChecker,
@JsonKey(name: "metadata") final Map<String, dynamic>? metadata, @JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
@JsonKey(name: "is_active") final bool? isActive, @JsonKey(name: "is_active") final bool? isActive,
@JsonKey(name: "created_at") final String? createdAt, @JsonKey(name: "created_at") final String? createdAt,
@ -826,6 +848,9 @@ abstract class _ProductDto extends ProductDto {
@JsonKey(name: "printer_type") @JsonKey(name: "printer_type")
String? get printerType; String? get printerType;
@override @override
@JsonKey(name: "print_to_checker")
bool? get printToChecker;
@override
@JsonKey(name: "metadata") @JsonKey(name: "metadata")
Map<String, dynamic>? get metadata; Map<String, dynamic>? get metadata;
@override @override

View File

@ -40,6 +40,7 @@ _$ProductDtoImpl _$$ProductDtoImplFromJson(Map<String, dynamic> json) =>
businessType: json['business_type'] as String?, businessType: json['business_type'] as String?,
imageUrl: json['image_url'] as String?, imageUrl: json['image_url'] as String?,
printerType: json['printer_type'] as String?, printerType: json['printer_type'] as String?,
printToChecker: json['print_to_checker'] as bool?,
metadata: json['metadata'] as Map<String, dynamic>?, metadata: json['metadata'] as Map<String, dynamic>?,
isActive: json['is_active'] as bool?, isActive: json['is_active'] as bool?,
createdAt: json['created_at'] as String?, createdAt: json['created_at'] as String?,
@ -62,6 +63,7 @@ Map<String, dynamic> _$$ProductDtoImplToJson(_$ProductDtoImpl instance) =>
'business_type': instance.businessType, 'business_type': instance.businessType,
'image_url': instance.imageUrl, 'image_url': instance.imageUrl,
'printer_type': instance.printerType, 'printer_type': instance.printerType,
'print_to_checker': instance.printToChecker,
'metadata': instance.metadata, 'metadata': instance.metadata,
'is_active': instance.isActive, 'is_active': instance.isActive,
'created_at': instance.createdAt, 'created_at': instance.createdAt,

View File

@ -117,7 +117,7 @@ class PrintUi {
bytes += builder.separator(); bytes += builder.separator();
// Items qty NAMA (uppercase), variant indent // Items qty NAMA (uppercase), variant indent
for (final item in order.orderItems) { for (final item in order.orderItems.where((e) => e.printToChecker)) {
final name = item.productName.toUpperCase(); final name = item.productName.toUpperCase();
bytes += builder.itemText('${item.quantity} $name'); bytes += builder.itemText('${item.quantity} $name');
if (item.productVariantName.isNotEmpty) { if (item.productVariantName.isNotEmpty) {

View File

@ -3,7 +3,7 @@ description: "A new Flutter project."
publish_to: "none" publish_to: "none"
version: 1.0.8+14 version: 1.0.9+15
environment: environment:
sdk: ^3.8.1 sdk: ^3.8.1