diff --git a/apps/mobile/packages/domain/lib/krow_domain.dart b/apps/mobile/packages/domain/lib/krow_domain.dart index e1ca4d10..74199646 100644 --- a/apps/mobile/packages/domain/lib/krow_domain.dart +++ b/apps/mobile/packages/domain/lib/krow_domain.dart @@ -34,7 +34,6 @@ export 'src/entities/shifts/break/break.dart'; export 'src/adapters/shifts/break/break_adapter.dart'; // Orders & Requests -export 'src/entities/orders/order_type.dart'; export 'src/entities/orders/one_time_order.dart'; export 'src/entities/orders/one_time_order_position.dart'; export 'src/entities/orders/recurring_order.dart'; diff --git a/apps/mobile/packages/domain/lib/src/entities/orders/order_type.dart b/apps/mobile/packages/domain/lib/src/entities/orders/order_type.dart deleted file mode 100644 index e1448be7..00000000 --- a/apps/mobile/packages/domain/lib/src/entities/orders/order_type.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:equatable/equatable.dart'; - -/// Represents a type of order that can be created (e.g., Rapid, One-Time). -/// -/// This entity defines the identity and display metadata (keys) for the order type. -/// UI-specific properties like colors and icons are handled by the presentation layer. -class OrderType extends Equatable { - - const OrderType({ - required this.id, - required this.titleKey, - required this.descriptionKey, - }); - /// Unique identifier for the order type. - final String id; - - /// Translation key for the title. - final String titleKey; - - /// Translation key for the description. - final String descriptionKey; - - @override - List get props => [id, titleKey, descriptionKey]; -} diff --git a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/utils/constants/order_types.dart b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/utils/constants/order_types.dart index 53564d2e..68b48b75 100644 --- a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/utils/constants/order_types.dart +++ b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/utils/constants/order_types.dart @@ -1,25 +1,35 @@ -import 'package:krow_domain/krow_domain.dart' as domain; +class UiOrderType { + const UiOrderType({ + required this.id, + required this.titleKey, + required this.descriptionKey, + }); + + final String id; + final String titleKey; + final String descriptionKey; +} /// Order type constants for the create order feature -const List orderTypes = [ +const List orderTypes = [ /// TODO: FEATURE_NOT_YET_IMPLEMENTED - // domain.OrderType( + // UiOrderType( // id: 'rapid', // titleKey: 'client_create_order.types.rapid', // descriptionKey: 'client_create_order.types.rapid_desc', // ), - domain.OrderType( + UiOrderType( id: 'one-time', titleKey: 'client_create_order.types.one_time', descriptionKey: 'client_create_order.types.one_time_desc', ), - domain.OrderType( + UiOrderType( id: 'recurring', titleKey: 'client_create_order.types.recurring', descriptionKey: 'client_create_order.types.recurring_desc', ), - domain.OrderType( + UiOrderType( id: 'permanent', titleKey: 'client_create_order.types.permanent', descriptionKey: 'client_create_order.types.permanent_desc', diff --git a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/widgets/create_order/create_order_view.dart b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/widgets/create_order/create_order_view.dart index fff5cd46..0c39efdd 100644 --- a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/widgets/create_order/create_order_view.dart +++ b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/widgets/create_order/create_order_view.dart @@ -68,7 +68,7 @@ class CreateOrderView extends StatelessWidget { ), itemCount: orderTypes.length, itemBuilder: (BuildContext context, int index) { - final OrderType type = orderTypes[index]; + final UiOrderType type = orderTypes[index]; final OrderTypeUiMetadata ui = OrderTypeUiMetadata.fromId( id: type.id, ); diff --git a/apps/mobile/packages/features/client/orders/view_orders/lib/src/data/repositories/view_orders_repository_impl.dart b/apps/mobile/packages/features/client/orders/view_orders/lib/src/data/repositories/view_orders_repository_impl.dart index b0f8446b..49a99455 100644 --- a/apps/mobile/packages/features/client/orders/view_orders/lib/src/data/repositories/view_orders_repository_impl.dart +++ b/apps/mobile/packages/features/client/orders/view_orders/lib/src/data/repositories/view_orders_repository_impl.dart @@ -1,4 +1,5 @@ import 'package:firebase_data_connect/firebase_data_connect.dart' as fdc; +import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:krow_data_connect/krow_data_connect.dart' as dc; import 'package:krow_domain/krow_domain.dart' as domain; @@ -31,7 +32,7 @@ class ViewOrdersRepositoryImpl implements IViewOrdersRepository { end: endTimestamp, ) .execute(); - print( + debugPrint( 'ViewOrders range start=${start.toIso8601String()} end=${end.toIso8601String()} shiftRoles=${result.data.shiftRoles.length}', ); @@ -51,7 +52,7 @@ class ViewOrdersRepositoryImpl implements IViewOrdersRepository { // final String status = filled >= workersNeeded ? 'filled' : 'open'; final String status = shiftRole.shift.status?.stringValue ?? 'OPEN'; - print( + debugPrint( 'ViewOrders item: date=$dateStr status=$status shiftId=${shiftRole.shiftId} ' 'roleId=${shiftRole.roleId} start=${shiftRole.startTime?.toJson()} ' 'end=${shiftRole.endTime?.toJson()} hours=$hours totalValue=$totalValue',