Skip to content

made the reciever connection with the sender and improved the UI of … - #11

Closed
farghalii wants to merge 1 commit into
devfrom
feature/reciever_orders
Closed

made the reciever connection with the sender and improved the UI of …#11
farghalii wants to merge 1 commit into
devfrom
feature/reciever_orders

Conversation

@farghalii

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 18, 2026 20:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the orders feature set by adding receiver-side order flows (“Your Receives”), introducing paginated loading + filtering for both sender and receiver lists, and adding UI/support for a new “declined” order state (including resubmission constraints and status rendering). It also wires order-related push notifications to refresh active list views and includes some UI/perf tweaks (shimmer skeletons, avatar precache, image cache sizing).

Changes:

  • Added receiver orders list + receiver order details with accept/decline actions and supporting Cubit/UseCases/Repo/API endpoints.
  • Refactored sender orders list to use server-side status filtering + pagination (load-more) and added “declined” handling with resubmit/edit guardrails.
  • Updated UI components/constants/assets to support the new screens/statuses and refreshed lists on order-related notifications.

Reviewed changes

Copilot reviewed 45 out of 52 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pubspec.lock Dependency lock updates aligned with new/updated packages.
lib/main.dart Adjusts Flutter image cache limits at app startup.
lib/features/profile/presentation/pages/profile_page.dart Navigates “My Receives” to the new receives route.
lib/features/orders/presentation/widgets/orders_list_shimmer.dart New shimmer/skeleton list + card used during list loading/pagination.
lib/features/orders/presentation/widgets/orders_filter_bar.dart Adds optional “Declined” chip support.
lib/features/orders/presentation/widgets/order_status_chip.dart Adds declined/unknown status styling + labels.
lib/features/orders/presentation/widgets/details/status_sections.dart Adds declined + receiver-awaiting UI sections; renames waiting action to cancel.
lib/features/orders/presentation/util/order_status_strings.dart Adds declined title mapping for list/app-bar titles.
lib/features/orders/presentation/pages/your_receives_page.dart New receiver-side orders list with search, filter, pagination, refresh.
lib/features/orders/presentation/pages/your_orders_page.dart Migrates sender list to server-side filtering + pagination and shimmer loading.
lib/features/orders/presentation/pages/receiver_order_details_page.dart New receiver order details flow including accept/decline confirmation.
lib/features/orders/presentation/pages/order_details_page.dart Adds declined body + cancel flow for waiting orders.
lib/features/orders/presentation/manger/receiver_orders_state.dart New receiver orders state including paging/filter/search metadata.
lib/features/orders/presentation/manger/receiver_orders_intent.dart New receiver intents (load/search/filter/detail/confirm/reset).
lib/features/orders/presentation/manger/receiver_orders_cubit.dart New receiver Cubit implementing list/detail/confirm + pagination.
lib/features/orders/presentation/manger/orders_state.dart Extends sender state with paging/filter/search metadata.
lib/features/orders/presentation/manger/orders_intent.dart Adds intents for load-more and server-side status filtering.
lib/features/orders/presentation/manger/orders_cubit.dart Implements paging, server-side filtering, refreshActiveView, and safer async sequencing.
lib/features/orders/domain/usecase/search_receiver_orders_usecase.dart New use case for receiver search with pagination.
lib/features/orders/domain/usecase/search_orders_usecase.dart Updates sender search use case to return paged results.
lib/features/orders/domain/usecase/get_sender_orders_by_status_usecase.dart New use case for sender status-filtered paging.
lib/features/orders/domain/usecase/get_receiver_orders_usecase.dart New use case for receiver list paging.
lib/features/orders/domain/usecase/get_receiver_orders_by_status_usecase.dart New use case for receiver status-filtered paging.
lib/features/orders/domain/usecase/get_receiver_order_by_id_usecase.dart New use case for receiver order detail.
lib/features/orders/domain/usecase/get_my_orders_usecase.dart Updates sender list use case to return paged results.
lib/features/orders/domain/usecase/confirm_receiver_order_usecase.dart New use case for receiver accept/decline confirmation.
lib/features/orders/domain/repo/order_repo.dart Expands repository API for paging + receiver endpoints + status-filter endpoints.
lib/features/orders/domain/model/orders_page_result.dart New domain model for paged order results.
lib/features/orders/domain/model/order_entity.dart Adds declined status + API status mapping helpers.
lib/features/orders/domain/model/order_draft.dart Adds blockedReceiverEmail to prevent resubmitting to the same declined receiver.
lib/features/orders/data/repo/order_repo_impl.dart Implements new paging + receiver endpoints and maps paged responses.
lib/features/orders/data/impl/order_remote_data_imp.dart Adds paging args and new receiver/status endpoints for the remote data source.
lib/features/orders/data/datascources/order_remote_datasource.dart Extends remote interface for paging + receiver/status endpoints.
lib/features/home/presentation/widgets/service_categories_row.dart Expands home cards to include “My Orders” and “Receiving Orders” navigation.
lib/features/home/presentation/widgets/homeBody.dart Adds avatar precache to reduce perceived UI lag.
lib/features/createOrder/presentation/pages/submit_order_page.dart Refreshes orders list after creating a new order.
lib/features/createOrder/presentation/pages/order_details_step2_page.dart Blocks resubmission to the same receiver after a decline.
lib/features/createOrder/create_order_constants.dart Tweaks paging constants and adds load-more threshold.
lib/app/core/values/app_endpoint_strings.dart Adds endpoint constants for receiver + status-based order APIs.
lib/app/core/ui_helper/assets/images.dart Adds new image asset constants for home cards.
lib/app/core/services/notification_service.dart Refreshes orders/receives on order-related foreground notifications; defers initial-click handling.
lib/app/core/router/route_names.dart Adds routes for receives list and receiver order details.
lib/app/core/router/app_router.dart Registers new receives routes and wires ReceiverOrdersCubit via DI.
lib/app/core/app_constants.dart Adds strings for receives flows + declined/cancel/confirm messaging.
lib/app/core/api_manger/api_client.g.dart Generated Retrofit client updates for new endpoints.
lib/app/core/api_manger/api_client.dart Adds Retrofit declarations for receiver + status endpoints.
lib/app/config/di/di.config.dart Generated DI config updates to register new Cubit/use cases (currently broken by import alias collisions).
lib/app/config/auth_storage/sign_out.dart Resets ReceiverOrdersCubit on sign out.
Files not reviewed (2)
  • lib/app/config/di/di.config.dart: Language not supported
  • lib/app/core/api_manger/api_client.g.dart: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 153 to +155
import '../../../features/orders/presentation/manger/orders_cubit.dart' as _i4;
import '../../../features/orders/presentation/manger/receiver_orders_cubit.dart'
as _i4;
Comment thread lib/main.dart
Comment on lines +16 to +17
PaintingBinding.instance.imageCache.maximumSizeBytes = 256 << 20;
PaintingBinding.instance.imageCache.maximumSize = 2000;
Comment on lines +145 to 149
final items = resource.data ?? const <OrderEntity>[];

if (filtered.isEmpty) {
if (items.isEmpty) {
return _EmptyView(isEnglish: isEnglish);
}
Comment on lines +121 to +125
final items = resource.data ?? const <OrderEntity>[];

if (items.isEmpty) {
return _EmptyView(isEnglish: isEnglish);
}
Comment on lines +439 to +449
child: AppButton(
text: isEnglish ? AppConstants.accept : AppConstants.acceptAR,
onPressed: isProcessing ? () {} : (onAccept ?? () {}),
),
),
const SizedBox(width: 12),
Expanded(
child: AppButton(
text: isEnglish ? AppConstants.decline : AppConstants.declineAR,
onPressed: isProcessing ? () {} : (onDecline ?? () {}),
backgroundColor: Colors.red,
Comment on lines +140 to +142
static const String yourReceives = 'Your receives';
static const String yourReceivesAR = 'استلاماتك';
static const String searchYourReceives = 'Search your receives';
@farghalii farghalii closed this May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants