Shamnadulpila's picture
Add 2 files
73194e8 verified
Raw History Blame Contribute Delete
50.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Merchant Supermarket App</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
body {
font-family: 'Poppins', sans-serif;
background-color: #F7F7F7;
color: #212121;
}
.card {
background-color: white;
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.primary-accent {
background-color: #F4B942;
}
.secondary-text {
color: #888888;
}
.btn-primary {
background-color: #000000;
color: white;
}
.status-new {
background-color: #E3F2FD;
color: #1976D2;
}
.status-accepted {
background-color: #E8F5E9;
color: #388E3C;
}
.status-preparing {
background-color: #FFF8E1;
color: #FFA000;
}
.status-ready {
background-color: #E1F5FE;
color: #0288D1;
}
.status-delivered {
background-color: #F1F8E9;
color: #689F38;
}
.status-cancelled {
background-color: #FFEBEE;
color: #D32F2F;
}
.animate-fade-in {
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.toast {
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from { transform: translateX(100%); }
to { transform: translateX(0); }
}
</style>
</head>
<body class="min-h-screen pb-20">
<!-- Main App Container -->
<div class="container mx-auto px-4 py-3 max-w-md">
<!-- Header -->
<header class="flex justify-between items-center py-3">
<h1 class="text-xl font-bold">My Store</h1>
<div class="flex items-center space-x-3">
<button class="p-2 rounded-full bg-gray-100">
<i class="fas fa-bell text-gray-600"></i>
<span class="absolute top-2 right-2 h-2 w-2 rounded-full bg-red-500"></span>
</button>
<div class="h-8 w-8 rounded-full bg-gray-300"></div>
</div>
</header>
<!-- Main Content Area (changes based on tab selection) -->
<main id="main-content">
<!-- Dashboard View (default) -->
<div id="dashboard-view" class="space-y-4">
<!-- Summary Cards -->
<div class="grid grid-cols-2 gap-3">
<div class="card p-4 animate-fade-in" style="animation-delay: 0.1s;">
<div class="flex items-center">
<div class="p-2 rounded-full bg-blue-100 text-blue-600 mr-3">
<i class="fas fa-shopping-basket"></i>
</div>
<div>
<p class="text-sm secondary-text">Total Orders</p>
<p class="text-xl font-semibold">24</p>
</div>
</div>
</div>
<div class="card p-4 animate-fade-in" style="animation-delay: 0.2s;">
<div class="flex items-center">
<div class="p-2 rounded-full bg-yellow-100 text-yellow-600 mr-3">
<i class="fas fa-spinner"></i>
</div>
<div>
<p class="text-sm secondary-text">In Progress</p>
<p class="text-xl font-semibold">8</p>
</div>
</div>
</div>
<div class="card p-4 animate-fade-in" style="animation-delay: 0.3s;">
<div class="flex items-center">
<div class="p-2 rounded-full bg-green-100 text-green-600 mr-3">
<i class="fas fa-rupee-sign"></i>
</div>
<div>
<p class="text-sm secondary-text">Revenue</p>
<p class="text-xl font-semibold">₹5,420</p>
</div>
</div>
</div>
<div class="card p-4 animate-fade-in" style="animation-delay: 0.4s;">
<div class="flex items-center">
<div class="p-2 rounded-full bg-red-100 text-red-600 mr-3">
<i class="fas fa-exclamation"></i>
</div>
<div>
<p class="text-sm secondary-text">Low Stock</p>
<p class="text-xl font-semibold">3</p>
</div>
</div>
</div>
</div>
<!-- Quick Actions -->
<div class="card p-4">
<h2 class="font-semibold mb-3">Quick Actions</h2>
<div class="grid grid-cols-2 gap-3">
<button class="btn-primary py-3 px-4 rounded-lg flex items-center justify-center">
<i class="fas fa-list mr-2"></i>
<span>All Orders</span>
</button>
<button class="btn-primary py-3 px-4 rounded-lg flex items-center justify-center" onclick="showAddProductModal()">
<i class="fas fa-plus mr-2"></i>
<span>Add Product</span>
</button>
<button class="btn-primary py-3 px-4 rounded-lg flex items-center justify-center col-span-2">
<i class="fas fa-bullhorn mr-2"></i>
<span>Boost Product</span>
</button>
</div>
</div>
<!-- Notifications -->
<div class="card p-4">
<div class="flex justify-between items-center mb-3">
<h2 class="font-semibold">Live Notifications</h2>
<button class="text-sm secondary-text">See All</button>
</div>
<div class="space-y-3">
<div class="flex items-start p-3 bg-blue-50 rounded-lg">
<div class="p-2 rounded-full bg-blue-100 text-blue-600 mr-3">
<i class="fas fa-shopping-basket"></i>
</div>
<div>
<p class="font-medium">New Order #ORD-4567</p>
<p class="text-sm secondary-text">2 items • ₹245 • COD</p>
<p class="text-xs mt-1">2 mins ago</p>
</div>
</div>
<div class="flex items-start p-3 bg-green-50 rounded-lg">
<div class="p-2 rounded-full bg-green-100 text-green-600 mr-3">
<i class="fas fa-check-circle"></i>
</div>
<div>
<p class="font-medium">Promotion Approved</p>
<p class="text-sm secondary-text">"Fresh Apples" is now featured</p>
<p class="text-xs mt-1">1 hour ago</p>
</div>
</div>
</div>
</div>
</div>
<!-- Orders View -->
<div id="orders-view" class="hidden space-y-4">
<!-- Order Filters -->
<div class="flex overflow-x-auto pb-2 space-x-2">
<button class="px-4 py-2 rounded-full status-new whitespace-nowrap">New (5)</button>
<button class="px-4 py-2 rounded-full status-accepted whitespace-nowrap">Accepted (3)</button>
<button class="px-4 py-2 rounded-full status-preparing whitespace-nowrap">Preparing (2)</button>
<button class="px-4 py-2 rounded-full status-ready whitespace-nowrap">Ready (1)</button>
<button class="px-4 py-2 rounded-full status-delivered whitespace-nowrap">Delivered (13)</button>
<button class="px-4 py-2 rounded-full status-cancelled whitespace-nowrap">Cancelled (2)</button>
</div>
<!-- Orders List -->
<div class="space-y-3">
<div class="card p-4" onclick="showOrderDetail()">
<div class="flex justify-between items-start mb-2">
<div>
<p class="font-semibold">#ORD-7890</p>
<p class="text-sm secondary-text">Customer: R***** (9*****3210)</p>
</div>
<span class="px-3 py-1 rounded-full status-new text-xs">New</span>
</div>
<div class="flex justify-between items-center">
<div>
<p class="font-medium">₹420</p>
<p class="text-sm secondary-text">3 items • COD</p>
</div>
<button class="text-sm font-medium text-blue-600">View</button>
</div>
</div>
<div class="card p-4">
<div class="flex justify-between items-start mb-2">
<div>
<p class="font-semibold">#ORD-7889</p>
<p class="text-sm secondary-text">Customer: M***** (8*****4567)</p>
</div>
<span class="px-3 py-1 rounded-full status-accepted text-xs">Accepted</span>
</div>
<div class="flex justify-between items-center">
<div>
<p class="font-medium">₹680</p>
<p class="text-sm secondary-text">5 items • Online</p>
</div>
<button class="text-sm font-medium text-blue-600">View</button>
</div>
</div>
<div class="card p-4">
<div class="flex justify-between items-start mb-2">
<div>
<p class="font-semibold">#ORD-7885</p>
<p class="text-sm secondary-text">Customer: S***** (7*****8910)</p>
</div>
<span class="px-3 py-1 rounded-full status-preparing text-xs">Preparing</span>
</div>
<div class="flex justify-between items-center">
<div>
<p class="font-medium">₹1,250</p>
<p class="text-sm secondary-text">8 items • Online</p>
</div>
<button class="text-sm font-medium text-blue-600">View</button>
</div>
</div>
</div>
</div>
<!-- Inventory View -->
<div id="inventory-view" class="hidden space-y-4">
<div class="flex justify-between items-center">
<h2 class="font-semibold text-lg">Products</h2>
<button class="btn-primary px-4 py-2 rounded-lg" onclick="showAddProductModal()">
<i class="fas fa-plus mr-2"></i>
Add Product
</button>
</div>
<div class="space-y-3">
<div class="card p-3 flex items-center">
<div class="h-16 w-16 rounded-lg bg-gray-200 mr-3"></div>
<div class="flex-grow">
<p class="font-medium">Fresh Apples</p>
<p class="text-sm secondary-text">₹120/kg • 12 in stock</p>
</div>
<div class="flex space-x-2">
<button class="p-2 rounded-full bg-gray-100" onclick="showEditProductModal()">
<i class="fas fa-pen text-gray-600"></i>
</button>
<button class="p-2 rounded-full bg-yellow-100" onclick="showPromoteModal()">
<i class="fas fa-bullhorn text-yellow-600"></i>
</button>
</div>
</div>
<div class="card p-3 flex items-center">
<div class="h-16 w-16 rounded-lg bg-gray-200 mr-3"></div>
<div class="flex-grow">
<p class="font-medium">Organic Milk</p>
<p class="text-sm secondary-text">₹60/liter • 5 in stock</p>
</div>
<div class="flex space-x-2">
<button class="p-2 rounded-full bg-gray-100">
<i class="fas fa-pen text-gray-600"></i>
</button>
<button class="p-2 rounded-full bg-yellow-100">
<i class="fas fa-bullhorn text-yellow-600"></i>
</button>
</div>
</div>
<div class="card p-3 flex items-center">
<div class="h-16 w-16 rounded-lg bg-gray-200 mr-3"></div>
<div class="flex-grow">
<p class="font-medium">Whole Wheat Bread</p>
<p class="text-sm secondary-text">₹45/pack • Out of stock</p>
</div>
<div class="flex space-x-2">
<button class="p-2 rounded-full bg-gray-100">
<i class="fas fa-pen text-gray-600"></i>
</button>
<button class="p-2 rounded-full bg-gray-100" disabled>
<i class="fas fa-bullhorn text-gray-400"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Analytics View -->
<div id="analytics-view" class="hidden space-y-4">
<div class="card p-4">
<div class="flex justify-between items-center mb-4">
<h2 class="font-semibold">Reviews</h2>
<button class="text-sm secondary-text">See All</button>
</div>
<div class="flex items-center mb-4">
<div class="text-3xl font-bold mr-3">4.2</div>
<div class="mr-4">
<div class="flex items-center mb-1">
<div class="w-20 mr-2 text-sm secondary-text">5 stars</div>
<div class="h-2 bg-gray-200 rounded-full flex-grow">
<div class="h-2 bg-yellow-500 rounded-full" style="width: 60%"></div>
</div>
</div>
<div class="flex items-center mb-1">
<div class="w-20 mr-2 text-sm secondary-text">4 stars</div>
<div class="h-2 bg-gray-200 rounded-full flex-grow">
<div class="h-2 bg-yellow-500 rounded-full" style="width: 25%"></div>
</div>
</div>
<div class="flex items-center mb-1">
<div class="w-20 mr-2 text-sm secondary-text">3 stars</div>
<div class="h-2 bg-gray-200 rounded-full flex-grow">
<div class="h-2 bg-yellow-500 rounded-full" style="width: 10%"></div>
</div>
</div>
<div class="flex items-center">
<div class="w-20 mr-2 text-sm secondary-text">1-2 stars</div>
<div class="h-2 bg-gray-200 rounded-full flex-grow">
<div class="h-2 bg-yellow-500 rounded-full" style="width: 5%"></div>
</div>
</div>
</div>
</div>
<div class="space-y-3">
<div class="border-b pb-3">
<div class="flex justify-between mb-1">
<p class="font-medium">Anonymous</p>
<div class="flex text-yellow-400">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
</div>
</div>
<p class="text-sm secondary-text">Fresh and tasty apples. Will buy again!</p>
<p class="text-xs mt-1 secondary-text">2 days ago</p>
</div>
<div class="border-b pb-3">
<div class="flex justify-between mb-1">
<p class="font-medium">Rahul S.</p>
<div class="flex text-yellow-400">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="far fa-star"></i>
</div>
</div>
<p class="text-sm secondary-text">Good quality but delivery was late by 30 mins</p>
<p class="text-xs mt-1 secondary-text">1 week ago</p>
</div>
</div>
</div>
<div class="card p-4">
<h2 class="font-semibold mb-4">Analytics</h2>
<div class="mb-6">
<div class="flex justify-between items-center mb-2">
<p class="font-medium">Daily Orders</p>
<select class="text-sm border rounded px-2 py-1">
<option>Last 7 days</option>
<option>Last 30 days</option>
<option>Last 90 days</option>
</select>
</div>
<div class="h-40 bg-gray-100 rounded-lg flex items-end p-2">
<!-- Simple bar chart -->
<div class="flex-grow flex items-end space-x-1">
<div class="h-1/5 w-full bg-blue-200 rounded-t"></div>
<div class="h-2/5 w-full bg-blue-300 rounded-t"></div>
<div class="h-3/5 w-full bg-blue-400 rounded-t"></div>
<div class="h-4/5 w-full bg-blue-500 rounded-t"></div>
<div class="h-full w-full bg-blue-600 rounded-t"></div>
<div class="h-3/5 w-full bg-blue-500 rounded-t"></div>
<div class="h-2/5 w-full bg-blue-400 rounded-t"></div>
</div>
</div>
</div>
<div class="grid grid-cols-2 gap-4">
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm secondary-text mb-1">Revenue</p>
<p class="font-semibold">₹24,580</p>
<p class="text-xs secondary-text mt-1">+12% from last week</p>
</div>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm secondary-text mb-1">Avg. Order Value</p>
<p class="font-semibold">₹420</p>
<p class="text-xs secondary-text mt-1">+8% from last week</p>
</div>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm secondary-text mb-1">Cancellation Rate</p>
<p class="font-semibold">4.2%</p>
<p class="text-xs secondary-text mt-1">-1% from last week</p>
</div>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm secondary-text mb-1">Prep Time</p>
<p class="font-semibold">22 min</p>
<p class="text-xs secondary-text mt-1">-3 min from last week</p>
</div>
</div>
<button class="btn-primary w-full mt-4 py-2 rounded-lg">
<i class="fas fa-download mr-2"></i>
Export Report
</button>
</div>
</div>
<!-- Profile View -->
<div id="profile-view" class="hidden space-y-4">
<div class="card p-4">
<div class="flex flex-col items-center mb-4">
<div class="h-20 w-20 rounded-full bg-gray-300 mb-3"></div>
<h2 class="font-semibold text-lg">Fresh Mart</h2>
<p class="text-sm secondary-text">Grocery Store</p>
</div>
<div class="space-y-3">
<div>
<p class="text-sm secondary-text mb-1">Owner Name</p>
<p class="font-medium">Rahul Sharma</p>
</div>
<div>
<p class="text-sm secondary-text mb-1">Phone Number</p>
<p class="font-medium">9*****1234</p>
</div>
<div>
<p class="text-sm secondary-text mb-1">Email</p>
<p class="font-medium">rahul@freshmart.com</p>
</div>
<div>
<p class="text-sm secondary-text mb-1">Address</p>
<p class="font-medium">123 Market Street, Bangalore</p>
</div>
<div>
<p class="text-sm secondary-text mb-1">Store Timing</p>
<p class="font-medium">7:00 AM - 10:00 PM (Mon-Sun)</p>
</div>
</div>
<button class="btn-primary w-full mt-4 py-2 rounded-lg">
<i class="fas fa-pen mr-2"></i>
Edit Profile
</button>
</div>
<div class="card p-4">
<h2 class="font-semibold mb-3">Preferences</h2>
<div class="space-y-3">
<div class="flex justify-between items-center">
<p>Language</p>
<select class="text-sm border rounded px-2 py-1">
<option>English</option>
<option>Hindi</option>
<option>Tamil</option>
<option>Malayalam</option>
</select>
</div>
<div class="flex justify-between items-center">
<p>Notification Sounds</p>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked>
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-black"></div>
</label>
</div>
<div class="flex justify-between items-center">
<p>Dark Mode</p>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-black"></div>
</label>
</div>
</div>
</div>
<div class="card p-4">
<h2 class="font-semibold mb-3">Support</h2>
<div class="space-y-3">
<button class="w-full text-left p-3 bg-gray-50 rounded-lg flex items-center">
<div class="p-2 rounded-full bg-blue-100 text-blue-600 mr-3">
<i class="fas fa-phone"></i>
</div>
<div>
<p class="font-medium">Call Support</p>
<p class="text-sm secondary-text">24/7 customer care</p>
</div>
</button>
<button class="w-full text-left p-3 bg-gray-50 rounded-lg flex items-center">
<div class="p-2 rounded-full bg-green-100 text-green-600 mr-3">
<i class="fas fa-comment-dots"></i>
</div>
<div>
<p class="font-medium">In-App Chat</p>
<p class="text-sm secondary-text">Instant messaging</p>
</div>
</button>
<button class="w-full text-left p-3 bg-gray-50 rounded-lg flex items-center">
<div class="p-2 rounded-full bg-yellow-100 text-yellow-600 mr-3">
<i class="fas fa-ticket-alt"></i>
</div>
<div>
<p class="font-medium">Raise Ticket</p>
<p class="text-sm secondary-text">Report an issue</p>
</div>
</button>
</div>
</div>
</div>
</main>
<!-- Order Detail Modal -->
<div id="order-detail-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
<div class="bg-white rounded-lg w-full max-w-md max-h-[90vh] overflow-y-auto">
<div class="p-4 border-b flex justify-between items-center">
<h3 class="font-semibold">Order #ORD-7890</h3>
<span class="px-3 py-1 rounded-full status-new text-xs">New</span>
</div>
<div class="p-4 border-b">
<h4 class="font-medium mb-2">Customer Details</h4>
<div class="space-y-2">
<div class="flex">
<p class="w-24 text-sm secondary-text">Name</p>
<p class="flex-grow">Rahul Sharma</p>
</div>
<div class="flex">
<p class="w-24 text-sm secondary-text">Phone</p>
<p class="flex-grow">9*****3210</p>
</div>
<div class="flex">
<p class="w-24 text-sm secondary-text">Address</p>
<p class="flex-grow">123, Green Park, Bangalore - 560001</p>
</div>
</div>
<div class="mt-3 h-32 bg-gray-100 rounded-lg flex items-center justify-center">
<i class="fas fa-map-marker-alt text-gray-400 text-2xl"></i>
</div>
</div>
<div class="p-4 border-b">
<h4 class="font-medium mb-2">Order Items (3)</h4>
<div class="space-y-3">
<div class="flex justify-between">
<div class="flex">
<div class="h-10 w-10 rounded bg-gray-200 mr-2"></div>
<div>
<p>Fresh Apples</p>
<p class="text-sm secondary-text">1kg</p>
</div>
</div>
<p>₹120</p>
</div>
<div class="flex justify-between">
<div class="flex">
<div class="h-10 w-10 rounded bg-gray-200 mr-2"></div>
<div>
<p>Organic Milk</p>
<p class="text-sm secondary-text">1 liter</p>
</div>
</div>
<p>₹60</p>
</div>
<div class="flex justify-between">
<div class="flex">
<div class="h-10 w-10 rounded bg-gray-200 mr-2"></div>
<div>
<p>Whole Wheat Bread</p>
<p class="text-sm secondary-text">1 pack</p>
</div>
</div>
<p>₹45</p>
</div>
</div>
</div>
<div class="p-4 border-b">
<h4 class="font-medium mb-2">Order Status</h4>
<div class="space-y-3">
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-green-100 text-green-600 flex items-center justify-center mr-3">
<i class="fas fa-check text-xs"></i>
</div>
<div>
<p class="font-medium">Order Received</p>
<p class="text-xs secondary-text">Today, 10:15 AM</p>
</div>
</div>
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-gray-100 text-gray-400 flex items-center justify-center mr-3">
<i class="fas fa-check text-xs"></i>
</div>
<div>
<p class="font-medium text-gray-400">Order Accepted</p>
<p class="text-xs secondary-text">Pending</p>
</div>
</div>
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-gray-100 text-gray-400 flex items-center justify-center mr-3">
<i class="fas fa-check text-xs"></i>
</div>
<div>
<p class="font-medium text-gray-400">Preparing</p>
<p class="text-xs secondary-text">Pending</p>
</div>
</div>
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-gray-100 text-gray-400 flex items-center justify-center mr-3">
<i class="fas fa-check text-xs"></i>
</div>
<div>
<p class="font-medium text-gray-400">Ready for Pickup</p>
<p class="text-xs secondary-text">Pending</p>
</div>
</div>
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-gray-100 text-gray-400 flex items-center justify-center mr-3">
<i class="fas fa-check text-xs"></i>
</div>
<div>
<p class="font-medium text-gray-400">Handed Over</p>
<p class="text-xs secondary-text">Pending</p>
</div>
</div>
</div>
</div>
<div class="p-4 border-b">
<h4 class="font-medium mb-2">Payment Info</h4>
<div class="space-y-2">
<div class="flex justify-between">
<p class="text-sm secondary-text">Subtotal</p>
<p>₹225</p>
</div>
<div class="flex justify-between">
<p class="text-sm secondary-text">Delivery Fee</p>
<p>₹20</p>
</div>
<div class="flex justify-between">
<p class="text-sm secondary-text">Taxes</p>
<p>₹25</p>
</div>
<div class="flex justify-between font-semibold mt-2">
<p>Total</p>
<p>₹270</p>
</div>
<div class="flex justify-between mt-2">
<p class="text-sm secondary-text">Payment Method</p>
<p class="font-medium">Cash on Delivery</p>
</div>
</div>
</div>
<div class="p-4">
<button class="btn-primary w-full py-3 rounded-lg">
Accept Order
</button>
</div>
</div>
</div>
<!-- Add Product Modal -->
<div id="add-product-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
<div class="bg-white rounded-lg w-full max-w-md max-h-[90vh] overflow-y-auto">
<div class="p-4 border-b flex justify-between items-center">
<h3 class="font-semibold">Add New Product</h3>
<button onclick="hideAddProductModal()">
<i class="fas fa-times text-gray-500"></i>
</button>
</div>
<div class="p-4 space-y-4">
<div>
<label class="block text-sm font-medium mb-1">Product Name</label>
<input type="text" class="w-full p-2 border rounded-lg" placeholder="Enter product name">
</div>
<div>
<label class="block text-sm font-medium mb-1">Product Image</label>
<div class="h-32 w-full border-2 border-dashed rounded-lg flex flex-col items-center justify-center">
<i class="fas fa-cloud-upload-alt text-gray-400 text-2xl mb-2"></i>
<p class="text-sm text-gray-500">Click to upload or drag and drop</p>
</div>
</div>
<div>
<label class="block text-sm font-medium mb-1">Category</label>
<select class="w-full p-2 border rounded-lg">
<option>Select category</option>
<option>Fruits & Vegetables</option>
<option>Dairy & Eggs</option>
<option>Bakery</option>
<option>Snacks</option>
<option>Beverages</option>
</select>
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium mb-1">Selling Price (₹)</label>
<input type="number" class="w-full p-2 border rounded-lg" placeholder="0">
</div>
<div>
<label class="block text-sm font-medium mb-1">Unit/Quantity</label>
<input type="text" class="w-full p-2 border rounded-lg" placeholder="e.g. 1kg, 500ml">
</div>
</div>
<div>
<label class="block text-sm font-medium mb-1">Description (Optional)</label>
<textarea class="w-full p-2 border rounded-lg" rows="2" placeholder="Enter product description"></textarea>
</div>
<div>
<label class="block text-sm font-medium mb-1">Initial Stock Count</label>
<input type="number" class="w-full p-2 border rounded-lg" placeholder="0">
</div>
<div class="flex space-x-3 pt-2">
<button class="flex-grow py-2 border rounded-lg" onclick="hideAddProductModal()">
Cancel
</button>
<button class="flex-grow btn-primary py-2 rounded-lg">
Save Product
</button>
</div>
</div>
</div>
</div>
<!-- Promote Product Modal -->
<div id="promote-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
<div class="bg-white rounded-lg w-full max-w-md max-h-[90vh] overflow-y-auto">
<div class="p-4 border-b flex justify-between items-center">
<h3 class="font-semibold">Promote Product</h3>
<button onclick="hidePromoteModal()">
<i class="fas fa-times text-gray-500"></i>
</button>
</div>
<div class="p-4 space-y-4">
<div>
<p class="font-medium">Fresh Apples</p>
<p class="text-sm secondary-text">Currently ₹120/kg</p>
</div>
<div>
<label class="block text-sm font-medium mb-1">Promotion Type</label>
<select class="w-full p-2 border rounded-lg">
<option>Select promotion type</option>
<option>Homepage Banner</option>
<option>Featured in Category</option>
<option>Top Search Result</option>
</select>
</div>
<div>
<label class="block text-sm font-medium mb-1">Banner Image (Optional)</label>
<div class="h-32 w-full border-2 border-dashed rounded-lg flex flex-col items-center justify-center">
<i class="fas fa-cloud-upload-alt text-gray-400 text-2xl mb-2"></i>
<p class="text-sm text-gray-500">Recommended size: 800x400px</p>
</div>
</div>
<div>
<label class="block text-sm font-medium mb-1">Tagline (max 40 chars)</label>
<input type="text" class="w-full p-2 border rounded-lg" placeholder="Special offer!">
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium mb-1">Daily Budget (₹)</label>
<input type="number" class="w-full p-2 border rounded-lg" placeholder="100">
</div>
<div>
<label class="block text-sm font-medium mb-1">Duration (days)</label>
<input type="number" class="w-full p-2 border rounded-lg" placeholder="7">
</div>
</div>
<div>
<label class="block text-sm font-medium mb-1">Payment Method</label>
<select class="w-full p-2 border rounded-lg">
<option>Select payment method</option>
<option>Wallet (₹1,250 available)</option>
<option>UPI</option>
<option>Credit/Debit Card</option>
</select>
</div>
<div class="card p-3 mt-4">
<h4 class="font-medium mb-2">Promotion Preview</h4>
<div class="h-24 w-full bg-gray-100 rounded-lg flex items-center p-3">
<div class="h-16 w-16 rounded bg-gray-200 mr-3"></div>
<div>
<p class="font-medium">Fresh Apples</p>
<p class="text-sm secondary-text">Now ₹110/kg • Limited time offer!</p>
</div>
</div>
</div>
<button class="btn-primary w-full mt-4 py-3 rounded-lg">
Submit for Review
</button>
</div>
</div>
</div>
<!-- Toast Notification -->
<div id="toast-notification" class="fixed bottom-20 right-4 hidden">
<div class="toast bg-green-100 text-green-800 p-3 rounded-lg shadow-lg flex items-start max-w-xs">
<div class="p-1 rounded-full bg-green-200 text-green-600 mr-3">
<i class="fas fa-check-circle"></i>
</div>
<div>
<p class="font-medium">Order Accepted</p>
<p class="text-sm">#ORD-7890 is now being prepared</p>
</div>
<button class="ml-4 text-green-600" onclick="hideToast()">
<i class="fas fa-times"></i>
</button>
</div>
</div>
</div>
<!-- Bottom Navigation -->
<nav class="fixed bottom-0 left-0 right-0 bg-white border-t flex justify-around py-2">
<button class="flex flex-col items-center p-2 text-black" onclick="showTab('dashboard-view')">
<i class="fas fa-home text-lg"></i>
<span class="text-xs mt-1">Dashboard</span>
</button>
<button class="flex flex-col items-center p-2 text-gray-500" onclick="showTab('orders-view')">
<i class="fas fa-clipboard-list text-lg"></i>
<span class="text-xs mt-1">Orders</span>
</button>
<button class="flex flex-col items-center p-2 text-gray-500" onclick="showTab('inventory-view')">
<i class="fas fa-boxes text-lg"></i>
<span class="text-xs mt-1">Inventory</span>
</button>
<button class="flex flex-col items-center p-2 text-gray-500" onclick="showTab('analytics-view')">
<i class="fas fa-chart-line text-lg"></i>
<span class="text-xs mt-1">Analytics</span>
</button>
<button class="flex flex-col items-center p-2 text-gray-500" onclick="showTab('profile-view')">
<i class="fas fa-user text-lg"></i>
<span class="text-xs mt-1">Profile</span>
</button>
</nav>
<script>
// Tab navigation
function showTab(tabId) {
// Hide all views
document.querySelectorAll('main > div').forEach(view => {
view.classList.add('hidden');
});
// Show selected view
document.getElementById(tabId).classList.remove('hidden');
// Update active tab in navigation
const navButtons = document.querySelectorAll('nav button');
navButtons.forEach(button => {
button.classList.remove('text-black');
button.classList.add('text-gray-500');
});
// Find the button that matches the tab and make it active
const activeButton = Array.from(navButtons).find(button => {
return button.textContent.trim().toLowerCase() === tabId.split('-')[0];
});
if (activeButton) {
activeButton.classList.remove('text-gray-500');
activeButton.classList.add('text-black');
}
}
// Modal controls
function showOrderDetail() {
document.getElementById('order-detail-modal').classList.remove('hidden');
}
function hideOrderDetail() {
document.getElementById('order-detail-modal').classList.add('hidden');
}
function showAddProductModal() {
document.getElementById('add-product-modal').classList.remove('hidden');
}
function hideAddProductModal() {
document.getElementById('add-product-modal').classList.add('hidden');
}
function showEditProductModal() {
// Similar to add product but with pre-filled data
showAddProductModal();
}
function showPromoteModal() {
document.getElementById('promote-modal').classList.remove('hidden');
}
function hidePromoteModal() {
document.getElementById('promote-modal').classList.add('hidden');
}
// Toast notification
function showToast() {
const toast = document.getElementById('toast-notification');
toast.classList.remove('hidden');
setTimeout(hideToast, 5000);
}
function hideToast() {
document.getElementById('toast-notification').classList.add('hidden');
}
// Simulate accepting an order
function acceptOrder() {
// In a real app, this would call an API
hideOrderDetail();
showToast();
}
// Initialize the app with dashboard view
document.addEventListener('DOMContentLoaded', function() {
showTab('dashboard-view');
// Add event listener for the Accept Order button
const acceptButton = document.querySelector('#order-detail-modal button.btn-primary');
if (acceptButton) {
acceptButton.addEventListener('click', acceptOrder);
}
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Shamnadulpila/store-keeper-application" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>