KDS: show Start Preparing for new orders in station view

Previously station-filtered view skipped the acknowledge step and went
straight to "Mark Station Done" for new orders. Now new orders show
"Start Preparing" first, then "Mark Station Done" once preparing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-03-08 11:00:43 -07:00
parent 6cdbff129f
commit 0a252e6569
2 changed files with 6 additions and 3 deletions

View file

@ -130,6 +130,6 @@
</div> </div>
</div> </div>
<script src="kds.js?v=7"></script> <script src="kds.js?v=8"></script>
</body> </body>
</html> </html>

View file

@ -449,8 +449,11 @@ function renderActionButtons(order) {
const isFiltering = config.stationId && config.stationId > 0; const isFiltering = config.stationId && config.stationId > 0;
if (isFiltering) { if (isFiltering) {
// Station worker view: per-station "Done" button // Station worker view: acknowledge new orders, then mark station done
if (order.StatusID === STATUS.NEW || order.StatusID === STATUS.PREPARING) { if (order.StatusID === STATUS.NEW) {
return `<button class="btn btn-start" onclick="updateOrderStatus(${order.OrderID}, ${STATUS.PREPARING})">Start Preparing</button>`;
}
if (order.StatusID === STATUS.PREPARING) {
if (isStationDoneForOrder(order)) { if (isStationDoneForOrder(order)) {
return `<button class="btn btn-station-done" disabled>Station Done</button>`; return `<button class="btn btn-station-done" disabled>Station Done</button>`;
} else { } else {