Tailoring Orders
Tailoring Orders records a stitching (NEW) or alteration job for a customer — garment type, description of work, assigned tailor, delivery date and advance payment — and tracks it through a PENDING → IN_PROGRESS → READY → DELIVERED status flow, with an automatic SMS sent to the customer the moment an order becomes Ready.
Overview
Each order stores the customer (with name and phone, and a live customer search/autocomplete against the Customers module), an Order Type (NEW or ALTERATION), a Garment Type (shirt, pant, kurta, salwar, blouse, saree, jacket, suit, or other), a free-text Description of the work, an optional assigned Tailor, a Delivery Date, Total Amount and Advance Paid, and Notes.
Orders are shown as a card grid, each with a coloured status badge, the order number, order type and garment type, the assigned tailor (prefixed with a scissors icon) if set, a delivery-date line that turns red for overdue or amber for due-today, and the total/advance amount.
Each card carries a one-click "Mark
Clicking a card opens a detail drawer on the right with the full order information plus buttons to advance status, cancel the order, edit every field, or permanently delete it.
Before You Start
- Only Customer Name is required to save an order — phone, garment type/order type default sensibly, and delivery date, tailor, amounts and notes can all be left blank and filled in later.
- The customer name field is a live-typeahead against
GET /customers(search, limit 8) — picking a suggestion also fills in that customer's phone automatically, but typing a brand-new name that does not match anyone is also accepted (it does not have to be an existing customer record). - The automatic "order ready" SMS to the customer only fires if an SMS gateway integration is configured in Settings and the order has a saved customer phone number — without both, the status still updates but no SMS is sent.
Step-by-Step Guide
1 Create a new tailoring or alteration order
- Click + New Order.
- Start typing in Customer Name * — a dropdown of matching customers appears after a brief pause; click one to auto-fill Phone, or simply type a new name.
- Fill in Phone if not auto-filled, choose Order Type (NEW or ALTERATION) and Garment Type (shirt, pant, kurta, salwar, blouse, saree, jacket, suit, other).
- Set a Delivery Date, and enter Total Amount and Advance Paid if known.
- Describe the work under Description / Work (e.g. "Stitch new kurta, alter waist…"), optionally type a name under Assign Tailor, and add any Notes.
- Click Create Order.
2 Move an order through its status
- On any order card, click the Mark
button — it always shows only the single next status in the sequence PENDING → IN_PROGRESS → READY → DELIVERED, never lets you skip a stage or go backwards from the card. - When an order card or its detail drawer is used to mark a job READY, the customer automatically receives an SMS ("Your order #ORD-… (
) is ready for pickup.") if an SMS gateway is configured and the order has a saved phone number. - Open the detail drawer (click the card) for the same "Mark as
" action, plus a dedicated Cancel Order button for any order not already Delivered or Cancelled.
3 Search, filter and edit orders
- Use the search box to filter by customer name, order number or phone.
- Use the status chip row (ALL, PENDING, IN_PROGRESS, READY, DELIVERED, CANCELLED) — each chip shows a live count.
- Open the detail drawer and click Edit Order to change any field, including reassigning the tailor or correcting amounts.
- Click Delete Order in the drawer to permanently remove an order after a confirmation prompt.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
+ New Order | Opens the blank order form. |
Customer Name * | Required; live-searches /customers as you type and offers a pick-list; picking a result also fills Phone. |
Phone | Optional customer contact number; required only if you want the automatic ready-for-pickup SMS to be sent. |
Order Type | NEW (fresh stitching) or ALTERATION. |
Garment Type | shirt, pant, kurta, salwar, blouse, saree, jacket, suit, or other. |
Delivery Date | Promised completion/pickup date; drives the Due Today / Overdue styling on cards and the dashboard. |
Total Amount / Advance Paid | Job cost and any upfront payment; the detail drawer shows the computed Balance (Total − Advance) once both are set. |
Description / Work | Free-text description of the stitching or alteration work required. |
Assign Tailor | Free-text tailor name (not a linked staff/user record); shown with a scissors icon on the card and in the drawer once set. |
Notes | Free-text notes on the order. |
Status badge | PENDING (amber), IN_PROGRESS (blue), READY (green), DELIVERED (grey), or CANCELLED (red). |
Mark <next status> button | Advances the order exactly one step along PENDING → IN_PROGRESS → READY → DELIVERED; not shown once an order is Delivered or Cancelled. |
Cancel Order | Sets status to CANCELLED; only shown in the detail drawer for orders not already Delivered or Cancelled. |
Search box | Filters by customer name, order number, or phone. |
Status chip filters | ALL, PENDING, IN_PROGRESS, READY, DELIVERED, CANCELLED — each shows a live count. |
Edit Order / Delete Order | Edit opens the form pre-filled with every field; Delete permanently removes the order after a confirmation prompt. |
Tips & Best Practices
- Always record a customer phone number if you want the automatic "ready for pickup" SMS — orders saved without one are updated silently with no reminder sent to the customer.
- Use the one-tap "Mark
" button on the card for day-to-day progress instead of opening the full edit form — it is faster and cannot accidentally change other fields. - Fill in Assign Tailor even though it is optional — with multiple tailors working from the same order list, it is the fastest way to tell at a glance who owns which job.
- Set realistic Delivery Dates rather than leaving them blank — the Overdue/Due Today highlighting (on both this page and the dashboard) only works for orders that have a date.
Troubleshooting & FAQ
The customer got no SMS when I marked their order Ready.
I marked an order Ready by mistake and now want to undo it.
A cancelled order still shows a "Mark <next>" button.
The customer search dropdown is not showing a customer I know exists.
I cannot find a way to reorder or reassign which tailor is working on a job in bulk.
🧑💻 Developer Notes
Source component(s):
frontend-app/pos-app-garment/src/pages/garment/TailoringOrderPage.jsx
Backend endpoints used:
GET /garment/ordersPOST /garment/ordersPUT /garment/orders/:idDELETE /garment/orders/:idGET /customers (typeahead)
Related tables (db-core repositories):
GarmentOrder
Redux slices:
None — local component state only
Feature flag key: billing
The pos-core getOrders() query caps results at 300 rows and sorts by deliveryDate ascending then createdAt descending, with status/search filtering applied client-side in JS after the DB round-trip rather than in the SQL query itself. Order numbers are generated by getNextOrderNumber(), which computes MAX(CAST(REPLACE(orderNumber, 'ORD-', '') AS INTEGER)) — a simple sequential scheme, not collision-safe under concurrent creates from two terminals at the exact same instant, though the window is small in practice for a single-shop workload. The tailorName column was added later via an idempotent ALTER TABLE "GarmentOrder" ADD COLUMN IF NOT EXISTS "tailorName" TEXT in backend/src/lib/db.js rather than being in the original CREATE TABLE — this is a free-text field, not a foreign key to a staff/tailor record, so there is no reporting rollup by tailor anywhere in the product. The "mark Ready → send SMS" logic lives in the controller (updateOrder in backend/src/controllers/garment.controller.js), not in pos-core, and is wrapped in .catch(() => {}) — a failed SMS send is silently swallowed with no retry and no error surfaced to the user or logged as a failure the shop can see.