Skip to content

Sprint 3 — admin quick-actions, order status, and Entra sign-in scaffold#101

Open
CarsonL15 wants to merge 8 commits into
mainfrom
sprint-3-admin
Open

Sprint 3 — admin quick-actions, order status, and Entra sign-in scaffold#101
CarsonL15 wants to merge 8 commits into
mainfrom
sprint-3-admin

Conversation

@CarsonL15
Copy link
Copy Markdown
Contributor

Summary

Sprint 3 work on the Admin & Maintenance App (#18): bot quick-actions, a customer order-status view, and a staff sign-in scaffold.

Closes #51. Closes #53. Tracks #54 (scaffolded, see below).

#51 — Quick-action a bot (recharge / toggle servicing)

  • Recharge and Mark Active/Idle now route through the admin.js double-write orchestrator.
  • Recharge also sets the simulator's powerLevel to 100 (BotNet + simulator stay in sync); partial failures surface in the banner.
  • Toggle servicing is BotNet-only by necessity — the simulator's UpdateBotRequest has no settable status field (documented in code).
  • 4 new tests.

#53 — View customer order status

  • New read-only Orders tab: order ID, customer, assigned bot, status pill, timestamp, with a status filter. Replaces the placeholder.
  • New orders.js client (mock fallback like the bots page).
  • Order Service: GET /api/orders now returns all orders when customerId is omitted (backward compatible) — the admin needs a cross-customer list. Adds GetAllOrdersAsync.
  • Order Service CORS added for the admin origin.

#54 — Sign in as staff (Entra ID) — scaffolded, not yet enabled

  • MSAL (@azure/msal-browser + @azure/msal-react): sign-in redirect, sign-out + user name in the nav, DeliveryBot-Admin group guard, bearer token attached to outbound API calls.
  • Gated behind blank VITE_ENTRA_* env vars → auth is disabled, app runs open. Once the Entra app registration exists, the three IDs get filled into the workflow env and pushed (before merge) to switch sign-in on.
  • Caveat: "identity attached to all API calls" is best-effort until the backends validate tokens.

Go-live notes

All 20 unit tests pass; build clean.

Relates to #18.

@CarsonL15 CarsonL15 requested a review from a team June 2, 2026 20:54
CarsonL15 added 4 commits June 2, 2026 14:06
# Conflicts:
#	.github/workflows/AdminWebpage-Deploy-WF.yml
#	OrderService/OrderService/Services/IOrderService.cs
#	OrderService/OrderService/Services/OrderService.cs
Copy link
Copy Markdown
Contributor

@philspokas philspokas left a comment

Choose a reason for hiding this comment

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

lgtm

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.

View customer order status Quick-action a bot (recharge / toggle servicing)

2 participants