Telephone Link
Christopher Vollick
created 3 years ago
Sometimes I need to go there to look something up or change a setting,
and every time I do I have to navigate through the UI to a number I
already know.
This should make that faster.
Change summary
forms/admin_info.rb | 8 ++++++++
lib/customer_info.rb | 9 +++++++++
2 files changed, 17 insertions(+)
Detailed changes
@@ -23,6 +23,14 @@ field(
value: @admin_info.customer_id
)
+if @admin_info.info.tel
+ field(
+ var: "tel_link",
+ label: "Phone Number Info",
+ value: @admin_info.tel_link
+ )
+end
+
if @admin_info.fwd.uri
field(
var: "fwd",
@@ -118,4 +118,13 @@ class AdminInfo
def form
FormTemplate.render("admin_info", admin_info: self)
end
+
+ def tel_link
+ [
+ "https://dashboard.bandwidth.com/portal/r/a",
+ CONFIG[:creds][:account],
+ "numbers/details",
+ info.tel.gsub(/\A\+1/, "")
+ ].join("/")
+ end
end