thai-uxui
This commit is contained in:
@@ -56,12 +56,12 @@ export async function GET(request: NextRequest) {
|
||||
|
||||
if (section === 'revenue-analytics') {
|
||||
rows = [
|
||||
['Dimension', 'Customer Code', 'Customer Name', 'Revenue', 'Quotation Count', 'Won Revenue'],
|
||||
['มิติรายงาน', 'รหัสลูกค้า', 'ชื่อลูกค้า', 'มูลค่าใบเสนอราคา', 'จำนวนใบเสนอราคา', 'มูลค่างานที่ชนะ'],
|
||||
...[
|
||||
['End Customer', ...data.revenueAnalytics.topEndCustomers],
|
||||
['Billing Customer', ...data.revenueAnalytics.topBillingCustomers],
|
||||
['Contractor', ...data.revenueAnalytics.topContractors],
|
||||
['Consultant', ...data.revenueAnalytics.topConsultants]
|
||||
['เจ้าของโครงการ', ...data.revenueAnalytics.topEndCustomers],
|
||||
['ลูกค้าผู้รับใบเสนอราคา', ...data.revenueAnalytics.topBillingCustomers],
|
||||
['ผู้รับเหมา', ...data.revenueAnalytics.topContractors],
|
||||
['ที่ปรึกษา', ...data.revenueAnalytics.topConsultants]
|
||||
].flatMap(([dimension, ...entries]) =>
|
||||
(entries as typeof data.revenueAnalytics.topEndCustomers).map((row) => [
|
||||
String(dimension),
|
||||
@@ -75,7 +75,7 @@ export async function GET(request: NextRequest) {
|
||||
];
|
||||
} else if (section === 'pipeline-funnel') {
|
||||
rows = [
|
||||
['Stage', 'Count', 'Value', 'Conversion Rate'],
|
||||
['ขั้นตอน', 'จำนวน', 'มูลค่า', 'อัตราการเปลี่ยนสถานะ'],
|
||||
...data.funnel.map((row) => [
|
||||
row.label,
|
||||
String(row.count),
|
||||
@@ -85,7 +85,7 @@ export async function GET(request: NextRequest) {
|
||||
];
|
||||
} else {
|
||||
rows = [
|
||||
['Sales Person', 'Lead Count', 'Enquiry Count', 'Quotation Count', 'Approved Quotations', 'Won Revenue', 'Conversion Rate'],
|
||||
['ฝ่ายขาย', 'จำนวนลีด', 'จำนวนโอกาสขาย', 'จำนวนใบเสนอราคา', 'จำนวนใบเสนอราคาที่อนุมัติแล้ว', 'มูลค่างานที่ชนะ', 'อัตราการเปลี่ยนสถานะ'],
|
||||
...data.salesRanking.map((row) => [
|
||||
row.salesPersonName,
|
||||
String(row.leadCount),
|
||||
|
||||
Reference in New Issue
Block a user