EverydayTech Platform - Developer Reference
Complete Source Code Documentation - All Applications
Loading...
Searching...
No Matches
QuickActions.tsx
Go to the documentation of this file.
1"use client";
2import Link from "next/link";
3import React from "react";
4import { Icon } from '@/contexts/IconContext';
5
6const ACTIONS = [
7 { title: "Sell", icon: "shopping_cart", path: "/sales", desc: "Open selling tools and common sales workflows" },
8 { title: "Products", icon: "inventory_2", path: "/products", desc: "Maintain products, barcodes, and catalog data" },
9 { title: "Print labels", icon: "local_offer", path: "/pages/products/signs-labels", desc: "Manage shelf labels, signage, and print queues" },
10 { title: "End of Day", icon: "receipt_long", path: "/pages/sales/end-of-day", desc: "Close out, check summaries, and reconcile" },
11 { title: "Customers", icon: "group", path: "/pages/customers", desc: "Find customers, manage accounts and loyalty." },
12 { title: "Reports", icon: "assessment", path: "/pages/allreports", desc: "Browse the report library and exports." }
13];
14
15export default function QuickActions() {
16 return (
17 <div className="card p-4">
18 <div className="flex items-center justify-between mb-3">
19 <div className="text-sm font-semibold">Quick actions</div>
20 <div className="text-xs text-muted">The most common things people do</div>
21 </div>
22
23 <div className="grid grid-cols-2 md:grid-cols-3 gap-4">
24 {ACTIONS.map((a) => (
25 <Link
26 key={a.title}
27 href={a.path}
28 aria-label={`${a.title} - ${a.desc}`}
29 className="group relative block bg-gradient-to-br from-surface to-surface-2 border border-border rounded-xl p-4 hover:shadow-xl hover:scale-[1.02] hover:border-brand/50 hover:from-brand/5 hover:to-brand/10 transition-all duration-300 overflow-hidden"
30 >
31 <div className="absolute inset-0 bg-gradient-to-br from-brand/0 to-brand/0 group-hover:from-brand/5 group-hover:to-brand/10 transition-all duration-300"></div>
32 <div className="relative z-10 flex flex-col gap-2">
33 <div className="flex items-center gap-3">
34 <div className="w-12 h-12 rounded-xl bg-gradient-to-br from-brand/10 to-brand/20 group-hover:from-brand/20 group-hover:to-brand/30 flex items-center justify-center shadow-sm group-hover:shadow-md transition-all duration-300">
35 <Icon name={a.icon} size={24} className="text-brand group-hover:scale-110 transition-transform duration-300" />
36 </div>
37 <div className="font-semibold text-text group-hover:text-brand transition-colors duration-200">{a.title}</div>
38 </div>
39 <div className="text-xs text-muted">{a.desc}</div>
40 </div>
41 </Link>
42 ))}
43 </div>
44 </div>
45 );
46}