puwanath commited on
Commit
ad83dcc
·
verified ·
1 Parent(s): 5f6c3de

Upload components/QuickActions.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/QuickActions.jsx +41 -0
components/QuickActions.jsx ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import {
3
+ User,
4
+ Clock,
5
+ TrendingUp,
6
+ Settings,
7
+ Tag,
8
+ CreditCard,
9
+ Trash2,
10
+ RefreshCw
11
+ } from 'lucide-react';
12
+
13
+ const QuickActions = ({ onAction }) => {
14
+ const actions = [
15
+ { id: 'customer', icon: User, label: 'ลูกค้า', color: 'bg-blue-50 text-blue-600 hover:bg-blue-100' },
16
+ { id: 'history', icon: Clock, label: 'ประวัติ', color: 'bg-purple-50 text-purple-600 hover:bg-purple-100' },
17
+ { id: 'reports', icon: TrendingUp, label: 'รายงาน', color: 'bg-green-50 text-green-600 hover:bg-green-100' },
18
+ { id: 'discount', icon: Tag, label: 'ส่วนลด', color: 'bg-orange-50 text-orange-600 hover:bg-orange-100' },
19
+ { id: 'refund', icon: RefreshCw, label: 'คืนสินค้า', color: 'bg-red-50 text-red-600 hover:bg-red-100' },
20
+ { id: 'settings', icon: Settings, label: 'ตั้งค่า', color: 'bg-gray-50 text-gray-600 hover:bg-gray-100' },
21
+ ];
22
+
23
+ return (
24
+ <div className="grid grid-cols-3 md:grid-cols-6 gap-3 mb-4">
25
+ {actions.map((action) => (
26
+ <button
27
+ key={action.id}
28
+ onClick={() => onAction(action.id)}
29
+ className="flex flex-col items-center gap-2 p-3 rounded-xl bg-white border border-pos-border hover:border-primary-300 hover:shadow-md transition-all duration-200"
30
+ >
31
+ <div className={`w-10 h-10 rounded-full flex items-center justify-center ${action.color}`}>
32
+ <action.icon className="w-5 h-5" />
33
+ </div>
34
+ <span className="text-xs font-medium text-pos-text">{action.label}</span>
35
+ </button>
36
+ ))}
37
+ </div>
38
+ );
39
+ };
40
+
41
+ export default QuickActions;