2import { useState } from "react";
3import Link from "next/link";
5export default function ConfigPage() {
6 const [activeSection, setActiveSection] = useState<string>("general");
9 { id: "general", title: "General", icon: "โ๏ธ" },
10 { id: "pos", title: "POS Settings", icon: "๐" },
11 { id: "hardware", title: "Hardware", icon: "๐จ๏ธ" },
12 { id: "payments", title: "Payment Methods", icon: "๐ณ" },
13 { id: "taxes", title: "Tax Configuration", icon: "๐" },
14 { id: "receipts", title: "Receipts", icon: "๐งพ" },
15 { id: "security", title: "Security", icon: "๐" },
16 { id: "integrations", title: "Integrations", icon: "๐" }
20 <div className="min-h-screen bg-gray-50">
21 <div className="max-w-7xl mx-auto p-6">
22 <div className="mb-8">
23 <h1 className="text-3xl font-bold text-gray-900 mb-2">System Configuration</h1>
24 <p className="text-gray-600">Configure system settings, hardware, and integrations</p>
27 <div className="grid grid-cols-1 lg:grid-cols-4 gap-6">
29 <div className="lg:col-span-1">
30 <div className="bg-white rounded-lg shadow-sm border border-gray-200 p-4 sticky top-6">
31 <h2 className="text-sm font-semibold text-gray-500 uppercase mb-3">Settings</h2>
32 <nav className="space-y-1">
33 {sections.map((section) => (
36 onClick={() => setActiveSection(section.id)}
37 className={`w-full text-left px-3 py-2 rounded-md text-sm transition-colors ${
38 activeSection === section.id
39 ? "bg-blue-50 text-blue-700 font-medium"
40 : "text-gray-700 hover:bg-gray-50"
43 <span className="mr-2">{section.icon}</span>
48 <div className="mt-6 pt-6 border-t border-gray-200">
50 href="/pages/settings/stores"
51 className="text-sm text-blue-600 hover:text-blue-700 block mb-2"
56 href="/pages/settings/staff"
57 className="text-sm text-blue-600 hover:text-blue-700 block"
66 <div className="lg:col-span-3">
67 <div className="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
68 {activeSection === "general" && (
70 <h2 className="text-2xl font-bold text-gray-900 mb-6">General Settings</h2>
72 <div className="space-y-6">
73 <div className="border-b border-gray-200 pb-4">
74 <label className="block text-sm font-medium text-gray-700 mb-2">
79 defaultValue="EverydayPOS"
80 className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
84 <div className="border-b border-gray-200 pb-4">
85 <label className="block text-sm font-medium text-gray-700 mb-2">
88 <select className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
89 <option>USD - US Dollar</option>
90 <option>EUR - Euro</option>
91 <option>GBP - British Pound</option>
92 <option>AUD - Australian Dollar</option>
93 <option>NZD - New Zealand Dollar</option>
97 <div className="border-b border-gray-200 pb-4">
98 <label className="block text-sm font-medium text-gray-700 mb-2">
101 <select className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
102 <option>Pacific/Auckland (NZST)</option>
103 <option>Australia/Sydney (AEDT)</option>
104 <option>America/Los_Angeles (PST)</option>
105 <option>America/New_York (EST)</option>
106 <option>Europe/London (GMT)</option>
110 <div className="border-b border-gray-200 pb-4">
111 <label className="flex items-center">
112 <input type="checkbox" className="mr-2" defaultChecked />
113 <span className="text-sm text-gray-700">Enable automatic backups</span>
117 <button className="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition">
124 {activeSection === "pos" && (
126 <h2 className="text-2xl font-bold text-gray-900 mb-6">POS Settings</h2>
127 <div className="bg-blue-50 border border-blue-200 rounded-lg p-6 text-center">
128 <div className="text-4xl mb-4">๐</div>
129 <p className="text-gray-700">POS configuration options coming soon</p>
134 {activeSection === "hardware" && (
136 <h2 className="text-2xl font-bold text-gray-900 mb-6">Hardware Configuration</h2>
137 <div className="space-y-4">
138 <div className="border border-gray-200 rounded-lg p-4">
139 <h3 className="font-semibold text-gray-900 mb-2">๐จ๏ธ Receipt Printers</h3>
140 <p className="text-sm text-gray-600 mb-3">Configure thermal and network printers</p>
141 <button className="px-3 py-1 text-sm bg-blue-600 text-white rounded hover:bg-blue-700">
145 <div className="border border-gray-200 rounded-lg p-4">
146 <h3 className="font-semibold text-gray-900 mb-2">๐ฑ Barcode Scanners</h3>
147 <p className="text-sm text-gray-600 mb-3">USB and Bluetooth scanner setup</p>
148 <button className="px-3 py-1 text-sm bg-blue-600 text-white rounded hover:bg-blue-700">
152 <div className="border border-gray-200 rounded-lg p-4">
153 <h3 className="font-semibold text-gray-900 mb-2">๐ต Cash Drawers</h3>
154 <p className="text-sm text-gray-600 mb-3">Configure cash drawer kick mechanisms</p>
155 <button className="px-3 py-1 text-sm bg-blue-600 text-white rounded hover:bg-blue-700">
163 {activeSection === "payments" && (
165 <h2 className="text-2xl font-bold text-gray-900 mb-6">Payment Methods</h2>
166 <div className="space-y-4">
167 <div className="flex items-center justify-between p-4 border border-gray-200 rounded-lg">
169 <h3 className="font-semibold text-gray-900">๐ต Cash</h3>
170 <p className="text-sm text-gray-600">Accept cash payments</p>
172 <label className="relative inline-flex items-center cursor-pointer">
173 <input type="checkbox" className="sr-only peer" defaultChecked />
174 <div className="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 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-blue-600"></div>
177 <div className="flex items-center justify-between p-4 border border-gray-200 rounded-lg">
179 <h3 className="font-semibold text-gray-900">๐ณ Card Payments</h3>
180 <p className="text-sm text-gray-600">Credit/Debit card processing</p>
182 <label className="relative inline-flex items-center cursor-pointer">
183 <input type="checkbox" className="sr-only peer" defaultChecked />
184 <div className="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 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-blue-600"></div>
187 <div className="flex items-center justify-between p-4 border border-gray-200 rounded-lg">
189 <h3 className="font-semibold text-gray-900">๐ฑ Digital Wallets</h3>
190 <p className="text-sm text-gray-600">Apple Pay, Google Pay, etc.</p>
192 <label className="relative inline-flex items-center cursor-pointer">
193 <input type="checkbox" className="sr-only peer" />
194 <div className="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 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-blue-600"></div>
201 {activeSection === "taxes" && (
203 <h2 className="text-2xl font-bold text-gray-900 mb-6">Tax Configuration</h2>
204 <div className="bg-green-50 border border-green-200 rounded-lg p-6 text-center">
205 <div className="text-4xl mb-4">๐</div>
206 <p className="text-gray-700">Tax rate configuration coming soon</p>
211 {activeSection === "receipts" && (
213 <h2 className="text-2xl font-bold text-gray-900 mb-6">Receipt Configuration</h2>
214 <div className="bg-purple-50 border border-purple-200 rounded-lg p-6 text-center">
215 <div className="text-4xl mb-4">๐งพ</div>
216 <p className="text-gray-700">Receipt template editor coming soon</p>
221 {activeSection === "security" && (
223 <h2 className="text-2xl font-bold text-gray-900 mb-6">Security Settings</h2>
224 <div className="space-y-4">
225 <div className="border-b border-gray-200 pb-4">
226 <label className="flex items-center">
227 <input type="checkbox" className="mr-2" defaultChecked />
228 <span className="text-sm text-gray-700">Require password for void/refund</span>
231 <div className="border-b border-gray-200 pb-4">
232 <label className="flex items-center">
233 <input type="checkbox" className="mr-2" defaultChecked />
234 <span className="text-sm text-gray-700">Enable audit logging</span>
237 <div className="border-b border-gray-200 pb-4">
238 <label className="flex items-center">
239 <input type="checkbox" className="mr-2" />
240 <span className="text-sm text-gray-700">Two-factor authentication</span>
245 className="inline-block px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition"
253 {activeSection === "integrations" && (
255 <h2 className="text-2xl font-bold text-gray-900 mb-6">Third-Party Integrations</h2>
256 <div className="space-y-4">
257 <div className="border border-gray-200 rounded-lg p-4">
258 <div className="flex items-center justify-between mb-2">
259 <h3 className="font-semibold text-gray-900">Fieldpine Backend</h3>
260 <span className="px-2 py-1 bg-green-100 text-green-800 text-xs rounded-full border border-green-200">
264 <p className="text-sm text-gray-600">Integrated retail management platform</p>
266 <div className="border border-gray-200 rounded-lg p-4 opacity-60">
267 <div className="flex items-center justify-between mb-2">
268 <h3 className="font-semibold text-gray-900">Accounting Software</h3>
269 <span className="px-2 py-1 bg-gray-100 text-gray-600 text-xs rounded-full">
273 <p className="text-sm text-gray-600">QuickBooks, Xero, MYOB integration</p>