261 lines
14 KiB
HTML
261 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Quote Management System - Bay Area Affiliates</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<style>
|
|
.modal {
|
|
display: none;
|
|
}
|
|
.modal.active {
|
|
display: flex;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="bg-gray-100">
|
|
<div class="min-h-screen">
|
|
<!-- Navigation -->
|
|
<nav class="bg-blue-900 text-white shadow-lg">
|
|
<div class="container mx-auto px-6 py-4">
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<h1 class="text-2xl font-bold">Bay Area Affiliates, Inc.</h1>
|
|
<p class="text-sm text-blue-200">Quote Management System</p>
|
|
</div>
|
|
<div class="flex space-x-4">
|
|
<button onclick="showTab('quotes')" id="tab-quotes" class="px-4 py-2 rounded hover:bg-blue-800 tab-btn">Quotes</button>
|
|
<button onclick="showTab('customers')" id="tab-customers" class="px-4 py-2 rounded hover:bg-blue-800 tab-btn">Customers</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Main Content -->
|
|
<div class="container mx-auto px-6 py-8">
|
|
<!-- Quotes Tab -->
|
|
<div id="quotes-tab" class="tab-content">
|
|
<div class="flex justify-between items-center mb-6">
|
|
<h2 class="text-3xl font-bold text-gray-800">Quotes</h2>
|
|
<button onclick="openQuoteModal()" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-semibold shadow-md">
|
|
+ New Quote
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Quotes List -->
|
|
<div class="bg-white rounded-lg shadow-md overflow-hidden">
|
|
<table class="min-w-full divide-y divide-gray-200">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Quote #</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Customer</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="quotes-list" class="bg-white divide-y divide-gray-200">
|
|
<!-- Quotes will be loaded here -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Customers Tab -->
|
|
<div id="customers-tab" class="tab-content hidden">
|
|
<div class="flex justify-between items-center mb-6">
|
|
<h2 class="text-3xl font-bold text-gray-800">Customers</h2>
|
|
<button onclick="openCustomerModal()" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-semibold shadow-md">
|
|
+ New Customer
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Customers List -->
|
|
<div class="bg-white rounded-lg shadow-md overflow-hidden">
|
|
<table class="min-w-full divide-y divide-gray-200">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Address</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Account #</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="customers-list" class="bg-white divide-y divide-gray-200">
|
|
<!-- Customers will be loaded here -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Customer Modal -->
|
|
<div id="customer-modal" class="modal fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full items-center justify-center">
|
|
<div class="relative mx-auto p-8 border w-full max-w-2xl shadow-lg rounded-lg bg-white">
|
|
<div class="flex justify-between items-center mb-6">
|
|
<h3 class="text-2xl font-bold text-gray-900" id="customer-modal-title">New Customer</h3>
|
|
<button onclick="closeCustomerModal()" class="text-gray-400 hover:text-gray-500">
|
|
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
<form id="customer-form" class="space-y-4">
|
|
<input type="hidden" id="customer-id">
|
|
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">Company Name</label>
|
|
<input type="text" id="customer-name" required
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
|
</div>
|
|
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">Street Address</label>
|
|
<input type="text" id="customer-street" required
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
|
</div>
|
|
|
|
<div class="grid grid-cols-3 gap-4">
|
|
<div class="col-span-2">
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">City</label>
|
|
<input type="text" id="customer-city" required
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">State</label>
|
|
<input type="text" id="customer-state" required maxlength="2" placeholder="TX"
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-2 gap-4">
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">Zip Code</label>
|
|
<input type="text" id="customer-zip" required
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">Account Number</label>
|
|
<input type="text" id="customer-account"
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex justify-end space-x-3 pt-4">
|
|
<button type="button" onclick="closeCustomerModal()"
|
|
class="px-6 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50">
|
|
Cancel
|
|
</button>
|
|
<button type="submit"
|
|
class="px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
|
|
Save Customer
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Quote Modal -->
|
|
<div id="quote-modal" class="modal fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full items-center justify-center">
|
|
<div class="relative mx-auto p-8 border w-full max-w-6xl shadow-lg rounded-lg bg-white my-8">
|
|
<div class="flex justify-between items-center mb-6">
|
|
<h3 class="text-2xl font-bold text-gray-900" id="quote-modal-title">New Quote</h3>
|
|
<button onclick="closeQuoteModal()" class="text-gray-400 hover:text-gray-500">
|
|
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
<form id="quote-form" class="space-y-6">
|
|
<input type="hidden" id="quote-id">
|
|
|
|
<div class="grid grid-cols-3 gap-4">
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">Customer</label>
|
|
<select id="quote-customer" required
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
|
<option value="">Select Customer...</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">Quote Number</label>
|
|
<input type="text" id="quote-number" readonly
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md bg-gray-50">
|
|
</div>
|
|
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">Date</label>
|
|
<input type="date" id="quote-date" required
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex items-center">
|
|
<input type="checkbox" id="quote-tax-exempt" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
|
|
<label for="quote-tax-exempt" class="ml-2 block text-sm text-gray-900">
|
|
Tax Exempt (Church, Non-Profit, etc.)
|
|
</label>
|
|
</div>
|
|
|
|
<!-- Items Section -->
|
|
<div>
|
|
<div class="flex justify-between items-center mb-3">
|
|
<h4 class="text-lg font-semibold text-gray-900">Line Items</h4>
|
|
<button type="button" onclick="addQuoteItem()"
|
|
class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-md text-sm">
|
|
+ Add Item
|
|
</button>
|
|
</div>
|
|
|
|
<div id="quote-items" class="space-y-3">
|
|
<!-- Items will be added here -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- TBD Note -->
|
|
<div id="tbd-note-section" class="hidden">
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">TBD Footnote</label>
|
|
<input type="text" id="quote-tbd-note"
|
|
placeholder="e.g., Total excludes labor charges which will be determined..."
|
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
|
</div>
|
|
|
|
<!-- Total -->
|
|
<div class="border-t pt-4">
|
|
<div class="flex justify-end space-x-8 text-lg">
|
|
<div class="text-right">
|
|
<div class="text-gray-600">Subtotal:</div>
|
|
<div class="text-gray-600" id="tax-row">Tax (8.25%):</div>
|
|
<div class="font-bold text-xl">Total:</div>
|
|
</div>
|
|
<div class="text-right">
|
|
<div id="quote-subtotal">$0.00</div>
|
|
<div id="quote-tax">$0.00</div>
|
|
<div class="font-bold text-xl" id="quote-total">$0.00</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex justify-end space-x-3 pt-4 border-t">
|
|
<button type="button" onclick="closeQuoteModal()"
|
|
class="px-6 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50">
|
|
Cancel
|
|
</button>
|
|
<button type="submit"
|
|
class="px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
|
|
Save Quote
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|