<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } RBAC::enforce('view.fulfillment'); $sub = $_GET['sub'] ?? 'orders'; $validSubs = ['orders', 'fulfillment', 'payments']; if (!in_array($sub, $validSubs)) $sub = 'orders'; ?> <div class="workspace" id="ws-fulfillment"> <div class="workspace-header"> <h1>Fulfillment</h1> <div class="workspace-actions"> <div class="sub-tabs" id="fulfill-sub-tabs"> <a href="?view=fulfillment&sub=orders" class="sub-tab<?= $sub === 'orders' ? 'active' : '' ?> ">Orders</a> <a href="?view=fulfillment&sub=fulfillment" class="sub-tab<?= $sub === 'fulfillment' ? 'active' : '' ?> ">Fulfillment</a> <a href="?view=fulfillment&sub=payments" class="sub-tab<?= $sub === 'payments' ? 'active' : '' ?> ">Payments</a> </div> </div> </div> <div id="fulfillment-workspace" class="product-workspace"><?php switch ($sub) { case 'orders': ?> <div id="order-list" class="panel"></div> <div id="order-detail" class="panel" style="display:none"></div> <div id="order-audit" class="panel" style="display:none"></div><?php require_once __DIR__.'/../modules/orders/list.php'; require_once __DIR__.'/../modules/orders/viewer.php'; require_once __DIR__.'/../modules/orders/history.php'; require_once __DIR__.'/../modules/orders/payment_verify.php'; require_once __DIR__.'/../modules/orders/etransfer_verify.php'; require_once __DIR__.'/../modules/orders/fraud_scoring.php'; break; case 'fulfillment': ?> <div id="fulfillment-picking" class="panel"></div> <div id="fulfillment-scanner" class="panel"></div> <div id="fulfillment-labels" class="panel" style="display:none"></div><?php require_once __DIR__.'/../modules/fulfillment/picking_view.php'; require_once __DIR__.'/../modules/fulfillment/picking_stage.php'; require_once __DIR__.'/../modules/fulfillment/scanner_validator.php'; require_once __DIR__.'/../modules/fulfillment/labels_canada_post.php'; require_once __DIR__.'/../modules/fulfillment/labels_tracking.php'; break; case 'payments': require_once __DIR__ . '/../modules/orders/payments_ledger.php'; break; } ?> </div> </div>