Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3- format phone numbers #871

Merged
merged 3 commits into from
Nov 8, 2024
Merged

V3- format phone numbers #871

merged 3 commits into from
Nov 8, 2024

Conversation

idamand
Copy link
Contributor

@idamand idamand commented Nov 8, 2024

This PR adds formatting to phone numbers on employees page, employee page, and consultantcard in customerpage.

Formatting for norwegian numbers: +47 xxx xx xxx

Formatting for swedish numbers: +46 xxx-xxx xx xx

Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
variant-no ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 1:44pm
variant-se-2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 1:44pm

Comment on lines 4 to 9
if (firstDigitsOfPhoneNumber == "+47") {
formattedPhoneNumber = `+${phoneNumber.slice(1, 3)} ${phoneNumber.slice(3, 6)} ${phoneNumber.slice(6, 8)} ${phoneNumber.slice(8)}`;
} else if (firstDigitsOfPhoneNumber == "+46") {
formattedPhoneNumber = `+${phoneNumber.slice(1, 3)} 0${phoneNumber.slice(3, 5)}-${phoneNumber.slice(5, 8)} ${phoneNumber.slice(8, 10)} ${phoneNumber.slice(10)}`;
} else {
formattedPhoneNumber = phoneNumber;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legg inn dette som en kommentar kanskje? :D

Formatting for Norwegian numbers: +47 xxx xx xxx
Formatting for Swedish numbers: +46 xxx-xxx xx xx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, i fix!

@idamand idamand merged commit 33fb462 into v3 Nov 8, 2024
6 checks passed
@idamand idamand deleted the v3-format-phone-numbers branch November 8, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants