task-fix
This commit is contained in:
@@ -14,39 +14,35 @@ export const CRM_TERMS = {
|
||||
contact: 'ผู้ติดต่อ',
|
||||
contacts: 'ผู้ติดต่อ',
|
||||
billingCustomer: 'ลูกค้าผู้รับใบเสนอราคา',
|
||||
projectParties: 'ผู้เกี่ยวข้องในโครงการ',
|
||||
crmSettings: 'ตั้งค่า CRM',
|
||||
leadCount: 'จำนวนลีด',
|
||||
opportunityCount: 'จำนวนโอกาสขาย',
|
||||
wonCount: 'จำนวนงานที่ชนะ',
|
||||
lostCount: 'จำนวนงานที่แพ้',
|
||||
revenue: 'มูลค่าใบเสนอราคา',
|
||||
conversionRate: 'อัตราการเปลี่ยนสถานะ'
|
||||
contractor: 'ผู้รับเหมา',
|
||||
consultant: 'ที่ปรึกษา',
|
||||
endCustomer: 'ผู้ใช้งานปลายทาง',
|
||||
projectParty: 'ผู้เกี่ยวข้องในโครงการ'
|
||||
} as const;
|
||||
|
||||
export const PIPELINE_STAGE_THAI_LABELS = {
|
||||
lead: 'ลีด',
|
||||
opportunity: 'โอกาสขาย',
|
||||
closed_won: 'ชนะ',
|
||||
closed_lost: 'แพ้'
|
||||
} as const;
|
||||
|
||||
export const PROJECT_PARTY_ROLE_THAI_LABELS: Record<string, string> = {
|
||||
const PROJECT_PARTY_ROLE_LABELS: Record<string, string> = {
|
||||
billing_customer: 'ลูกค้าผู้รับใบเสนอราคา',
|
||||
customer: 'ลูกค้า',
|
||||
consultant: 'ที่ปรึกษา',
|
||||
contractor: 'ผู้รับเหมา',
|
||||
end_customer: 'เจ้าของโครงการ',
|
||||
end_customer: 'ผู้ใช้งานปลายทาง',
|
||||
other: 'อื่น ๆ'
|
||||
};
|
||||
|
||||
const PIPELINE_STAGE_LABELS: Record<string, string> = {
|
||||
lead: 'ลีด',
|
||||
opportunity: 'โอกาสขาย',
|
||||
quotation_created: 'ออกใบเสนอราคาแล้ว',
|
||||
negotiation: 'กำลังเจรจา',
|
||||
closed: 'ปิดงาน',
|
||||
closed_won: 'ชนะ',
|
||||
closed_lost: 'แพ้'
|
||||
};
|
||||
|
||||
export function getProjectPartyRoleThaiLabel(roleCode: string, fallback?: string | null) {
|
||||
return PROJECT_PARTY_ROLE_THAI_LABELS[roleCode] ?? fallback ?? roleCode;
|
||||
return PROJECT_PARTY_ROLE_LABELS[roleCode] ?? fallback ?? roleCode;
|
||||
}
|
||||
|
||||
export function getPipelineStageThaiLabel(
|
||||
stage: keyof typeof PIPELINE_STAGE_THAI_LABELS | string
|
||||
) {
|
||||
return PIPELINE_STAGE_THAI_LABELS[stage as keyof typeof PIPELINE_STAGE_THAI_LABELS] ?? stage;
|
||||
export function getPipelineStageThaiLabel(stageCode: string, fallback?: string | null) {
|
||||
return PIPELINE_STAGE_LABELS[stageCode] ?? fallback ?? stageCode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user