feat: Update Orders to follow CRUD pattern SOP

Following PROJECT_SOP.md section 5.7 CRUD Module Pattern:

**Backend (NavigationRegistry.php):**
- Added Orders submenu: All orders | New
- Prepared for future tabs (Drafts, Recurring)

**Frontend (Orders/index.tsx):**
- Removed 'New order' button from toolbar
- Kept bulk actions (Delete) in toolbar
- Filters remain in toolbar

**Result:**
- Orders now consistent with Products pattern
- Follows industry standard (Shopify, WooCommerce)
- Submenu for main actions, toolbar for filters/bulk actions

**Next:**
- Implement variable product handling in OrderForm
This commit is contained in:
dwindown
2025-11-20 09:19:49 +07:00
parent 9058273f5a
commit 746148cc5f
2 changed files with 5 additions and 7 deletions

View File

@@ -117,7 +117,11 @@ class NavigationRegistry {
'label' => __('Orders', 'woonoow'),
'path' => '/orders',
'icon' => 'receipt-text',
'children' => [], // Orders has no submenu by design
'children' => [
['label' => __('All orders', 'woonoow'), 'mode' => 'spa', 'path' => '/orders'],
['label' => __('New', 'woonoow'), 'mode' => 'spa', 'path' => '/orders/new'],
// Future: Drafts, Recurring, etc.
],
],
[
'key' => 'products',