feat: replace sales/inventory with e-commerce dashboard and settings
This commit is contained in:
@@ -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' => '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).'],
|
['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 = [
|
$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 {
|
} else {
|
||||||
abort(404);
|
abort(404);
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
<p class="text-sm text-slate-400">Configure thresholds, margins, and default variables for the procurement module.</p>
|
<p class="text-sm text-slate-400">Configure thresholds, margins, and default variables for the procurement module.</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="/admin/settings/sales" class="glass rounded-xl p-6 group transition-all duration-300 hover:border-orange-500/50 hover:bg-white/5 block">
|
<a href="/admin/settings/ecommerce" class="glass rounded-xl p-6 group transition-all duration-300 hover:border-purple-500/50 hover:bg-white/5 block">
|
||||||
<div class="w-12 h-12 rounded-lg bg-orange-500/20 text-orange-500 flex items-center justify-center mb-4 group-hover:scale-110 transition-transform">
|
<div class="w-12 h-12 rounded-lg bg-purple-500/20 text-purple-500 flex items-center justify-center mb-4 group-hover:scale-110 transition-transform">
|
||||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z"/></svg>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="text-lg font-bold text-slate-300 mb-2">Sales Settings (WIP)</h3>
|
<h3 class="text-lg font-bold text-slate-300 mb-2">E-Commerce Settings</h3>
|
||||||
<p class="text-sm text-slate-500">Configure revenue targets and metric parameters for the upcoming sales dashboard.</p>
|
<p class="text-sm text-slate-500">Configure WooCommerce API credentials and integration parameters for the online store dashboard.</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,9 +86,9 @@
|
|||||||
Procurement
|
Procurement
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="/admin/settings/sales" class="nav-link flex items-center gap-3 px-6 py-3 text-sm font-medium text-slate-400 transition-colors {{ request()->is('admin/settings/sales') ? 'active' : '' }}">
|
<a href="/admin/settings/ecommerce" class="nav-link flex items-center gap-3 px-6 py-3 text-sm font-medium text-slate-400 transition-colors {{ request()->is('admin/settings/ecommerce') ? 'active' : '' }}">
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z"/></svg>
|
||||||
Sales (WIP)
|
E-Commerce
|
||||||
</a>
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
|
|||||||
@@ -110,45 +110,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Placeholder: Sales Dashboard -->
|
<!-- Placeholder: E-Commerce Dashboard -->
|
||||||
<div class="glass disabled-card rounded-2xl p-6 flex flex-col fade-in relative" style="animation-delay: 300ms">
|
<a href="/ecommerce" class="dashboard-card glass rounded-2xl p-6 flex flex-col group fade-in relative overflow-hidden block" style="animation-delay: 300ms">
|
||||||
<div class="absolute top-0 right-0 p-4">
|
<div class="absolute top-0 right-0 p-4">
|
||||||
<span class="inline-flex items-center rounded-md bg-slate-500/10 px-2 py-1 text-xs font-medium text-slate-400 ring-1 ring-inset ring-slate-500/20">Coming Soon</span>
|
<span class="inline-flex items-center rounded-md bg-purple-500/10 px-2 py-1 text-xs font-medium text-purple-400 ring-1 ring-inset ring-purple-500/20">Planned</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-14 h-14 rounded-xl bg-slate-800 flex items-center justify-center mb-6">
|
<div class="w-14 h-14 rounded-xl bg-gradient-to-br from-purple-600 to-purple-900 flex items-center justify-center mb-6 shadow-lg shadow-purple-900/40 group-hover:scale-110 transition-transform duration-300">
|
||||||
<svg class="w-7 h-7 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
<svg class="w-7 h-7 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z"/></svg>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="text-xl font-bold text-slate-300 mb-2">Sales Analytics</h2>
|
<h2 class="text-xl font-bold text-white mb-2 group-hover:text-purple-400 transition-colors">E-Commerce</h2>
|
||||||
<p class="text-sm text-slate-500 flex-grow">
|
<p class="text-sm text-slate-400 mb-6 flex-grow">
|
||||||
Monitor revenue streams, customer acquisition costs, and identify top performing regions.
|
Monitor online sales, WooCommerce integration, customer insights, and digital revenue streams.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="text-sm font-medium text-slate-600 flex items-center gap-1 mt-auto">
|
<div class="text-sm font-medium text-purple-500 flex items-center gap-1 mt-auto">
|
||||||
In Development
|
Access Dashboard
|
||||||
|
<svg class="w-4 h-4 transform group-hover:translate-x-1 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"/></svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
|
|
||||||
<!-- Placeholder: Inventory Operations -->
|
|
||||||
<div class="glass disabled-card rounded-2xl p-6 flex flex-col fade-in relative" style="animation-delay: 400ms">
|
|
||||||
<div class="absolute top-0 right-0 p-4">
|
|
||||||
<span class="inline-flex items-center rounded-md bg-slate-500/10 px-2 py-1 text-xs font-medium text-slate-400 ring-1 ring-inset ring-slate-500/20">Planned</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="w-14 h-14 rounded-xl bg-slate-800 flex items-center justify-center mb-6">
|
|
||||||
<svg class="w-7 h-7 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"/></svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2 class="text-xl font-bold text-slate-300 mb-2">Inventory Control</h2>
|
|
||||||
<p class="text-sm text-slate-500 flex-grow">
|
|
||||||
Real-time stock levels, movement history, category tracking and predictive reordering.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="text-sm font-medium text-slate-600 flex items-center gap-1 mt-auto">
|
|
||||||
Future Roadmap
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user