Browse Source

fix(dashboard): Add order property to navigation items for improved sorting

David Höck 7 months ago
parent
commit
82a1b7f8a0
1 changed files with 24 additions and 0 deletions
  1. 24 0
      packages/dashboard/src/lib/framework/defaults.ts

+ 24 - 0
packages/dashboard/src/lib/framework/defaults.ts

@@ -37,26 +37,31 @@ export function registerDefaults() {
                         id: 'products',
                         title: 'Products',
                         url: '/products',
+                        order: 100,
                     },
                     {
                         id: 'product-variants',
                         title: 'Product Variants',
                         url: '/product-variants',
+                        order: 200,
                     },
                     {
                         id: 'facets',
                         title: 'Facets',
                         url: '/facets',
+                        order: 300,
                     },
                     {
                         id: 'collections',
                         title: 'Collections',
                         url: '/collections',
+                        order: 400,
                     },
                     {
                         id: 'assets',
                         title: 'Assets',
                         url: '/assets',
+                        order: 500,
                     },
                 ],
             },
@@ -72,6 +77,7 @@ export function registerDefaults() {
                         id: 'orders',
                         title: 'Orders',
                         url: '/orders',
+                        order: 100,
                     },
                 ],
             },
@@ -87,11 +93,13 @@ export function registerDefaults() {
                         id: 'customers',
                         title: 'Customers',
                         url: '/customers',
+                        order: 100,
                     },
                     {
                         id: 'customer-groups',
                         title: 'Customer Groups',
                         url: '/customer-groups',
+                        order: 200,
                     },
                 ],
             },
@@ -107,6 +115,7 @@ export function registerDefaults() {
                         id: 'promotions',
                         title: 'Promotions',
                         url: '/promotions',
+                        order: 100,
                     },
                 ],
             },
@@ -122,16 +131,19 @@ export function registerDefaults() {
                         id: 'job-queue',
                         title: 'Job Queue',
                         url: '/job-queue',
+                        order: 100,
                     },
                     {
                         id: 'healthchecks',
                         title: 'Healthchecks',
                         url: '/healthchecks',
+                        order: 200,
                     },
                     {
                         id: 'scheduled-tasks',
                         title: 'Scheduled Tasks',
                         url: '/scheduled-tasks',
+                        order: 300,
                     },
                 ],
             },
@@ -147,61 +159,73 @@ export function registerDefaults() {
                         id: 'sellers',
                         title: 'Sellers',
                         url: '/sellers',
+                        order: 100,
                     },
                     {
                         id: 'channels',
                         title: 'Channels',
                         url: '/channels',
+                        order: 200,
                     },
                     {
                         id: 'stock-locations',
                         title: 'Stock Locations',
                         url: '/stock-locations',
+                        order: 300,
                     },
                     {
                         id: 'administrators',
                         title: 'Administrators',
                         url: '/administrators',
+                        order: 400,
                     },
                     {
                         id: 'roles',
                         title: 'Roles',
                         url: '/roles',
+                        order: 500,
                     },
                     {
                         id: 'shipping-methods',
                         title: 'Shipping Methods',
                         url: '/shipping-methods',
+                        order: 600,
                     },
                     {
                         id: 'payment-methods',
                         title: 'Payment Methods',
                         url: '/payment-methods',
+                        order: 700,
                     },
                     {
                         id: 'tax-categories',
                         title: 'Tax Categories',
                         url: '/tax-categories',
+                        order: 800,
                     },
                     {
                         id: 'tax-rates',
                         title: 'Tax Rates',
                         url: '/tax-rates',
+                        order: 900,
                     },
                     {
                         id: 'countries',
                         title: 'Countries',
                         url: '/countries',
+                        order: 1000,
                     },
                     {
                         id: 'zones',
                         title: 'Zones',
                         url: '/zones',
+                        order: 1100,
                     },
                     {
                         id: 'global-settings',
                         title: 'Global Settings',
                         url: '/global-settings',
+                        order: 1200,
                     },
                 ],
             },