This commit is contained in:
phaichayon
2026-04-23 15:37:01 +07:00
parent 67960174d3
commit a330abf9b6
36 changed files with 4656 additions and 278 deletions

132
src/lib/mock-data.ts Normal file
View File

@@ -0,0 +1,132 @@
import { Customer } from "@/types/customer";
export const mockCustomers: Customer[] = [
{
id: "cust-001",
branch: "branch-01",
name: "สมชาย ใจดี",
email: "somchai@example.com",
phone: "081-234-5678",
company: "บริษัท ไทยธุรกิจ จำกัด",
address: "123 ถนนสุขุมวิท แขวงคลองตัน เขตคลองเตย กรุงเทพฯ 10110",
status: "active",
createdAt: "2024-01-15T09:00:00Z",
updatedAt: "2024-01-15T09:00:00Z",
},
{
id: "cust-002",
branch: "branch-01",
name: "วิภา สุขสันต์",
email: "wipa@example.com",
phone: "082-345-6789",
company: "บริษัท นวัตกรรมไทย จำกัด",
address: "456 ถนนพระราม 4 แขวงคลองเตย เขตคลองเตย กรุงเทพฯ 10110",
status: "active",
createdAt: "2024-02-20T10:30:00Z",
updatedAt: "2024-02-20T10:30:00Z",
},
{
id: "cust-003",
branch: "branch-01",
name: "อนุชิต กล้าหาญ",
email: "anuchit@example.com",
phone: "083-456-7890",
company: "บริษัท พัฒนาธุรกิจ จำกัด",
address: "789 ถนนสีลม แขวงสีลม เขตบางรัก กรุงเทพฯ 10500",
status: "active",
createdAt: "2024-03-10T14:15:00Z",
updatedAt: "2024-03-10T14:15:00Z",
},
{
id: "cust-004",
branch: "branch-02",
name: "มานี มีสุข",
email: "manee@example.com",
phone: "084-567-8901",
company: "บริษัท ค้าส่งสินค้า จำกัด",
address: "321 ถนนจรัญสนิทวงศ์ แขวงบางพลัด เขตบางพลัด กรุงเทพฯ 10700",
status: "active",
createdAt: "2024-01-25T11:00:00Z",
updatedAt: "2024-01-25T11:00:00Z",
},
{
id: "cust-005",
branch: "branch-02",
name: "ประยุทธ์ จริงใจ",
email: "prayut@example.com",
phone: "085-678-9012",
company: "บริษัท อิเล็กทรอนิกส์ ไทย จำกัด",
address: "654 ถนนเพชรบุรี แขวงทุ่งพญาไท เขตราชเทวี กรุงเทพฯ 10400",
status: "inactive",
createdAt: "2024-02-05T08:45:00Z",
updatedAt: "2024-04-01T10:00:00Z",
},
{
id: "cust-006",
branch: "branch-02",
name: "สมหญิง แก้วสะอาด",
email: "somying@example.com",
phone: "086-789-0123",
company: "บริษัท อาหารแห้ง จำกัด",
address: "987 ถนนลาดพร้าว แขวงลาดพร้าว เขตลาดพร้าว กรุงเทพฯ 10230",
status: "pending",
createdAt: "2024-04-15T16:20:00Z",
updatedAt: "2024-04-15T16:20:00Z",
},
{
id: "cust-007",
branch: "head-office",
name: "ภูมิ รักษ์โลก",
email: "phumi@example.com",
phone: "087-890-1234",
company: "บริษัท เคมีภัณฑ์ ไทย จำกัด",
address: "147 ถนนวิภาวดีรังสิต แขวงดอนเมือง เขตดอนเมือง กรุงเทพฯ 10210",
status: "active",
createdAt: "2024-01-10T09:30:00Z",
updatedAt: "2024-01-10T09:30:00Z",
},
{
id: "cust-008",
branch: "head-office",
name: "กัญญา มีเมตตา",
email: "kanya@example.com",
phone: "088-901-2345",
company: "บริษัท สิ่งทอ ไทย จำกัด",
address: "258 ถนนพหลโยธิน แขวงสามเสนใน เขตพญาไท กรุงเทพฯ 10400",
status: "active",
createdAt: "2024-03-20T13:00:00Z",
updatedAt: "2024-03-20T13:00:00Z",
},
{
id: "cust-009",
branch: "head-office",
name: "สุเมธ รัตนา",
email: "sumet@example.com",
phone: "089-012-3456",
company: "บริษัท ก่อสร้าง รุ่งเรือง จำกัด",
address: "369 ถนนนิมิตรใหม่ แขวงบางบอน เขตบางบอน กรุงเทพฯ 10150",
status: "active",
createdAt: "2024-02-28T15:45:00Z",
updatedAt: "2024-02-28T15:45:00Z",
},
{
id: "cust-010",
branch: "branch-01",
name: "นภา รัตนา",
email: "napha@example.com",
phone: "090-123-4567",
company: "บริษัท ซอฟต์แวร์ ไทย จำกัด",
address: "741 ถนนเทพรัตน แขวงบางนา เขตบางนา กรุงเทพฯ 10260",
status: "pending",
createdAt: "2024-04-10T11:30:00Z",
updatedAt: "2024-04-10T11:30:00Z",
},
];
export const getCustomersByBranch = (branch: string): Customer[] => {
return mockCustomers.filter((customer) => customer.branch === branch);
};
export const getCustomerById = (id: string): Customer | undefined => {
return mockCustomers.find((customer) => customer.id === id);
};