Show WhatsApp link on contact modal on map

Strips '+' and ' ' characters from the phone number for the generated
link, but doesn't guarantee the link is valid because the number
registered isn't validated for now.
This commit is contained in:
Arthur Vieira
2022-06-03 19:33:55 -03:00
parent 79e762a815
commit 77360f41af
5 changed files with 21 additions and 10 deletions

View File

@@ -1,8 +1,11 @@
%div.contact-container
%div.modal-centered{"ng-if" => "::enterprise.email_address || enterprise.website || enterprise.phone"}
%div.modal-centered{"ng-if" => "::enterprise.email_address || enterprise.website || enterprise.phone || enterprise.whatsapp_phone"}
%p.modal-header {{'contact' | t}}
%p{"ng-if" => "::enterprise.phone", "ng-bind" => "::enterprise.phone"}
%p{"ng-if" => "::enterprise.whatsapp_phone"}
%a{"ng-href" => "http://wa.me/{{::enterprise.whatsapp_phone}}", target: "_blank", "ng-bind" => "::enterprise.whatsapp_phone"}
%p{"ng-if" => "::enterprise.email_address"}
%a{"ng-href" => "{{::enterprise.email_address | stripUrl}}", target: "_blank", mailto: true}
%span.obfuscatedEmail.email{"ng-bind" => "::enterprise.email_address | stripUrl"}