Skip to content

feat: Order Queue Time Report — real-time management dashboard#29

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-order-queue-time-report
Draft

feat: Order Queue Time Report — real-time management dashboard#29
Copilot wants to merge 2 commits intomainfrom
copilot/add-order-queue-time-report

Conversation

Copy link

Copilot AI commented Mar 13, 2026

Adds a management dashboard for real-time order queue monitoring, prep time analytics, peak hour identification, and CSV report exports.

Backend

  • Order model — added OrderStatus (Pending/InProgress/Completed/Cancelled), OrderType (Pickup/Delivery), StartedAt, CompletedAt timestamps
  • OrderQueueService — new service providing: live queue stats with elapsed times, average prep time (last 24h, optionally filtered by order type), per-hour peak analysis, daily historical metrics, and UTF-8 CSV export
  • QueueController — new endpoints:
    • GET /api/queue/stats — active orders + KPIs
    • GET /api/queue/average-prep-time?orderType= — 24h average
    • GET /api/queue/peak-hours?days= — hourly order volume + avg wait
    • GET /api/queue/history?days= — daily aggregates
    • GET /api/queue/export/csv?days= — file download
  • OrdersController — added PATCH /api/orders/{id}/status with auto-timestamping of StartedAt/CompletedAt
  • Program.cs — registers OrderQueueService, enables StringEnumConverter, seeds ~84 demo orders spanning 14 days for dashboard testing

Frontend

  • ManagementDashboard — new /management page with:
    • KPI cards: queue depth, avg prep time, estimated wait for next order, today's revenue
    • Live order queue table with inline Start / Complete / Cancel actions
    • Peak hours bar chart (9 AM–9 PM, configurable day range)
    • Historical performance table (total orders, completed, avg prep, revenue per day)
    • CSV export with configurable date range (7/30/90 days)
    • Auto-refreshes every 30 s; all heavy memoized appropriately
  • Header — added "📊 Management" nav link
  • types/index.tsOrderStatus, OrderType, QueueStats, ActiveOrderInfo, PeakHourData, DailyMetrics
  • api.ts — queue API functions + browser-side CSV download trigger
Original prompt

This section details on the original issue you should resolve

<issue_title>Order Queue Time Report</issue_title>
<issue_description>Real-time order queue monitoring and analytics dashboard for store management to track preparation times and optimize operations.

Features:

  • Real-time queue visualization with current orders
  • Average preparation time per order type (pickup/delivery)
  • Peak hours analysis with order volume trends
  • Customer wait time estimation
  • Historical performance metrics
  • CSV export for reports

Technical Requirements:

  • Backend: OrderQueueService for timing metrics
  • Frontend: Management dashboard page
  • Database: Order timestamps (created, started, completed)
  • API: Queue stats and historical data endpoints
  • Real-time updates via SignalR or polling

Acceptance Criteria:

  • Dashboard displays current orders with elapsed time
  • Shows average prep time (last 24 hours)
  • Visual peak hour identification
  • Estimated wait time for new orders
  • Daily/weekly/monthly report exports
  • Mobile responsive for tablet access
  • Role-based access (managers only)</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: PagelsR <4490855+PagelsR@users.noreply.github.com>
Copilot AI changed the title [WIP] Add order queue time report functionality feat: Order Queue Time Report — real-time management dashboard Mar 13, 2026
Copilot AI requested a review from PagelsR March 13, 2026 18:05
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.

Order Queue Time Report

2 participants