feat: replace sales/inventory with e-commerce dashboard and settings

This commit is contained in:
theRAD
2026-03-06 05:04:55 +02:00
parent 3fc2f3340b
commit fd87ac0b93
4 changed files with 24 additions and 41 deletions

View File

@@ -22,9 +22,11 @@ public function dashboardSettings($dashboard)
['key' => 'low_stock_threshold', 'name' => 'Low Stock Warning', 'type' => 'integer', 'default' => 50, 'description' => 'Quantity at which a product is considered low stock.'],
['key' => 'default_date_range', 'name' => 'Default Date Filter', 'type' => 'string', 'default' => 'YTD', 'description' => 'Default date range on load (e.g. YTD, All).'],
];
} else if ($dashboard === 'sales') {
} else if ($dashboard === 'ecommerce') {
$schema = [
['key' => 'monthly_target', 'name' => 'Monthly Sales Target', 'type' => 'integer', 'default' => 100000, 'description' => 'Overall monthly sales target.'],
['key' => 'woo_store_url', 'name' => 'WooCommerce Store URL', 'type' => 'string', 'default' => 'https://example.com', 'description' => 'The base URL of your WooCommerce store (e.g. https://shop.stargas.co.za).'],
['key' => 'woo_consumer_key', 'name' => 'Consumer Key', 'type' => 'string', 'default' => '', 'description' => 'WooCommerce REST API Consumer Key (ck_...).'],
['key' => 'woo_consumer_secret', 'name' => 'Consumer Secret', 'type' => 'string', 'default' => '', 'description' => 'WooCommerce REST API Consumer Secret (cs_...).'],
];
} else {
abort(404);