feat: implement dynamic contact info and availability mapping from field values, and enhance phone number masking.

This commit is contained in:
pradeepkumar
2026-02-02 10:19:55 +05:30
parent b5106945dc
commit 1faed9140c
4 changed files with 77 additions and 34 deletions

View File

@@ -18,7 +18,8 @@ function maskEmail(email: string): string {
// Helper function to mask phone
function maskPhone(phone: string): string {
if (phone.length <= 4) return '********';
if (!phone || phone.trim() === '') return '-';
if (phone.length <= 4) return '****' + phone;
return phone.slice(0, -4).replace(/./g, '*') + phone.slice(-4);
}