# New Order Management [Figma](https://www.figma.com/design/WcmdkwYfiAqLDh3OWoafwi/Kame---Web-App-New-Project?t=PWIv0XiC5hGAluvC-0) ## Response Order List ```jsonld= { "id": orders.id, "customerName": users.name, "number": orders.number, "orderDate": orders.createdAt, "itemsCount": len(orders.orderItems), "totalPrice": orders.totalPrice, "paymentMethod": balanceInvoicePayment + xenditInvoicePayment, "status": orders.status, "deliveryMethod": order.deliveryMethod, "shippingType": orders.orderShippings.shippingServiceType, "shippingOptionName": orders.orderShippings.shippingServiceName, "serviceTimeName": orders.serviceTimeDeliveryOptionName, "orderItems": [ { "id": orderItem.id, "title": orderItem.titleId, "specSet": orderItem.specSet, "qty": orderItem.qty, "notes": orderItem.notes, "artworkUrl": orderItem.artworkUrl, "woNumber": orderItem.woNumber, "grType": orderItem.gr } ] } ``` ## Dropdown Filter Order List - Order Status ```jsonld= { "paymentOptions": [ list payment channel ], "shippingOptions": [ ], "shippingType": [ ], "serviceTime": [ ], "grType": [ list gr from master gang runs ], "orderSource": [ "Kame","Primagraphia" ] } ``` ## Tables **order_item_step_logs** | name | type | desc | | | ------------- |:----------------- | ---- | ------------------------------------- | | id | int | | | | order_item_id | int | | | | status | varchar(255) | | ex: prepress, press, postpres, qc_packing | | action | varchar(255) | | ex: to do, in progress, hold, continue, completed | | action_at | timestamp with tz | | | | action_by | int | | | **order_items** | name | type | desc | | ------ | ---- | ----------- | | gr_id | int | gr -> gr_id | | status | Text | default: prepress ex: prepress, press, postpres, qc_packing | | action | default: to do | ex: to do, in progress, hold, continue, completed | ### Action Update Order Status **status order prepress** - update order status jadi prepress - update semua order item status jadi prepress - update semua order item action jadi to do - insert semua order item ke table order_item_step_logs dg status prepress, action to do, action_at, action_by dan seterusnya ### Action Click Action Prepress, Press, Postpress, Qc - ## Endpoint Show WO List `v1/orders/order-items?status=prepress` - query semua order item dg status `prepress` dan order item status `prepress` ## Timer Start QC Packing Simulasi Order A [Start Qc Packing] 09.00 WO 1 Prepress WO 2 QC -> action = to do WO 3 QC -> action = to do Order A [Hold Qc Packing][Done Qc Packing(disabled)] WO 1 Prepress WO 2 QC -> action = in progress -> complete 10.00 WO 3 QC -> action = in progress -> hold 10.30 Order A [Continue Qc Packing][Done Qc Packing] 11.00 WO 1 Prepress WO 2 QC -> action = hold WO 3 QC -> action = hold Order A [Hold Qc Packing] WO 1 QC -> action = in progress 11.30 WO 2 QC -> action = in progress WO 3 QC -> action = in progress Order A [Hold Qc Packing] WO 1 QC -> action = in progress WO 2 QC -> action = complete WO 3 QC -> action = complete 11.30 Order A [done] 12.00 durasi 2.30 mnt WO 1 QC -> action = complete durasi 30mnt WO 2 QC -> action = complete durasi 1jam WO 3 QC -> action = complete durasi 2jam Order A [done] 12.00 durasi 2.30 mnt WO 1 QC -> action = done durasi 30mnt WO 2 QC -> action = done durasi 1jam WO 3 QC -> action = done durasi 2jam Order A [Continue Qc Packing][Done Qc Packing] WO 1 QC -> action = hold WO 2 QC -> action = hold WO 3 QC -> action = hold 1. Start QC & Packing --- status: To Do 2. Checklist --- status: In Progress 3. Hold --- status: In progress 4. Cont. QC & Packing --- status: In progress 5. Checklist completed all -- In progress 6. QC & Packing done --- ganti status perlu dikirim (pindah tab) ### Button QC Packing - button QC Packing Start | action = to_do - if order_item.status = qc_packing && order_item.action = to_do - button QC Packing Hold | action = inprogress - if order_item.status = qc_packing && order_item.action = inprogress || order_item.status = qc_packing && order_item.action = completed - button QC Packing Continue | action = hold - if order_item.status = qc_packing && order_item.action = hold - butotn QC Packing Done | action = completed - if **all** order_item.status = qc_packing && order_item.action = completed order a status prepress action inprogress ### Simulasi Qc Packing Order Item 1 -> qcpacking -> inprogress Item 2 -> prepress Item 3 -> press Order Item 1 -> qcpacking -> inprogress Item 2 -> prepress -> Item 3 -> qcpacking -> inprogress