Skip to content
Documentation sections

What this screen is for

The screen that lists a business's orders and lets it act on them: accepting, marking preparing or ready, shipping, marking delivered, cancelling, approving or rejecting a return — all of it built and working in the code. But today there is no entry point at all for a customer to place an order: the product preview offers no way to buy, and no interface code calls the server function that creates one. So the list is always empty today, and none of the actions above ever appear on any order.

When you would use this

Once online ordering opens to customers, a business owner will come here to process an incoming order. As things stand, no order is ever created for the list to hold, so there's no situation that brings anyone to this screen.

Who sees it

Only the user matching the owner field on the business document can open this screen. The server's read rule also lets the customer who placed an order read that order, but that read belongs to a separate customer screen, outside this document's scope.

Where it lives

The screen exists on both the mobile app and the web panel; both read the same orders collection, limited to the business's own orders.

What you can do here

See open orders, hide finished ones

The list shows only open (unfinished) orders by default; the count of finished orders is shown on a button, and tapping it also shows the finished ones.

Advance the status

The actions on an order card change with its status: accept, mark preparing or ready, ship, mark delivered. Each action only moves it to the one next status valid from where it is.

On the panel, the ship action also asks for a carrier and a tracking number; both are optional. Mobile never asks for either — its shipping is recorded with empty tracking information.

Cancel / reject a return

A reason is requested; it may be left blank, but the action does not fire until the dialog is confirmed.

Approve / complete a return

A delivered order's return request can be approved, and an approved return can be marked complete.

Collection deadline

For an order marked ready, the card shows its collection deadline, computed from the business's collection window setting.

What the server accepts and refuses

Only the server changes an order status

The Firestore rule closes client writes to the orders collection entirely; a status changes only through the updateOrderStatus function, following a table of who may move it from which status to which.

Only the two parties can read an order

An order can only be read by the customer who placed it or the owner of the business it belongs to; the server rule limits reads to those two users.

A return may only be requested within the post-delivery window, for a delivered order

A return request is only accepted for an order in the delivered status and before the business's return window has expired; if the window is zero, the business accepts no returns at all and the request is refused server-side.