From 78b9ebf04e1ef6fadd254d2887a1f5d936e83d5e Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Tue, 20 Jun 2017 14:20:54 +0200 Subject: [PATCH] Better handling of phone links Some Weboob backends were returning multiple phone numbers (comma-separated) or phone numbers in different formats (with or without spaces, with or without separating dots, etc). This commit harmonizes all of this so that all phone links will be rendered correctly and be usable to call in a single click. Related, https://git.weboob.org/weboob/devel/merge_requests/42. --- flatisfy/web/js_src/views/details.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/flatisfy/web/js_src/views/details.vue b/flatisfy/web/js_src/views/details.vue index 5f4b094..80dafc5 100644 --- a/flatisfy/web/js_src/views/details.vue +++ b/flatisfy/web/js_src/views/details.vue @@ -118,7 +118,11 @@

{{ $t("flatsDetails.Contact") }}

- {{ flat.phone }} + @@ -305,6 +309,12 @@ export default { this.overloadNotation = null }, + normalizePhoneNumber (phoneNumber) { + phoneNumber = phoneNumber.replace(/ /g, '') + phoneNumber = phoneNumber.replace(/\./g, '') + return phoneNumber + }, + capitalize: capitalize, range: range