add instructions to connect to any user profile (#224)
See https://app.clickup.com/t/86b76734v Reviewed-on: #224 Co-authored-by: Trent Larson <trent@trentlarson.com> Co-committed-by: Trent Larson <trent@trentlarson.com>
This commit was merged in pull request #224.
This commit is contained in:
29
src/constants/contacts.ts
Normal file
29
src/constants/contacts.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Constants for contact-related functionality
|
||||
* Created: 2025-11-16
|
||||
*/
|
||||
|
||||
/**
|
||||
* Contact method types with user-friendly labels
|
||||
* Used in: ContactEditView.vue, DIDView.vue
|
||||
*/
|
||||
export const CONTACT_METHOD_TYPES = [
|
||||
{ value: "CELL", label: "Mobile" },
|
||||
{ value: "EMAIL", label: "Email" },
|
||||
{ value: "WHATSAPP", label: "WhatsApp" },
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* Type for contact method type values
|
||||
*/
|
||||
export type ContactMethodType = (typeof CONTACT_METHOD_TYPES)[number]["value"];
|
||||
|
||||
/**
|
||||
* Helper function to get label for a contact method type
|
||||
* @param type - The contact method type value (e.g., "CELL", "EMAIL")
|
||||
* @returns The user-friendly label or the original type if not found
|
||||
*/
|
||||
export function getContactMethodLabel(type: string): string {
|
||||
const methodType = CONTACT_METHOD_TYPES.find((m) => m.value === type);
|
||||
return methodType ? methodType.label : type;
|
||||
}
|
||||
Reference in New Issue
Block a user