Add customer->phone info to About

This commit is contained in:
Julia Radzhabova 2022-06-08 12:49:01 +03:00
parent 251d07e1c9
commit 87caaddd4c
3 changed files with 21 additions and 0 deletions

View file

@ -115,6 +115,7 @@
address: 'New-York, 125f-25',
mail: 'support@gmail.com',
www: 'www.superpuper.com',
phone: '1234567890',
info: 'Some info',
logo: '',
logoDark: '', // logo for dark theme

View file

@ -126,6 +126,12 @@ define([
'<a href="mailto:" id="id-about-company-mail"></a>',
'</td>',
'</tr>',
'<tr>',
'<td align="center" class="padding-small">',
'<label class="asc-about-desc-name">' + this.txtTel + '</label>',
'<label class="asc-about-desc" id="id-about-company-tel"></label>',
'</td>',
'</tr>',
'<tr>',
'<td align="center" class="padding-small">',
'<a href="" target="_blank" id="id-about-company-url"></a>',
@ -177,6 +183,7 @@ define([
this.lblCompanyMail = _$l.findById('#id-about-company-mail');
this.lblCompanyUrl = _$l.findById('#id-about-company-url');
this.lblCompanyLic = _$l.findById('#id-about-company-lic');
this.lblCompanyTel = _$l.findById('#id-about-company-tel');
this.$el.html(_$l);
this.$el.addClass('about-dlg');
@ -224,6 +231,11 @@ define([
this.lblCompanyMail.attr('href', "mailto:"+value).text(value) :
this.lblCompanyMail.parents('tr').addClass('hidden');
value = customer.phone;
value && value.length ?
this.lblCompanyTel.text(value) :
this.lblCompanyTel.parents('tr').addClass('hidden');
if ((value = customer.www) && value.length) {
var http = !/^https?:\/{2}/i.test(value) ? "http:\/\/" : '';
this.lblCompanyUrl.attr('href', http+value).text(value);

View file

@ -12,6 +12,7 @@ const PageAbout = props => {
const customer = licInfo ? licInfo.customer : null;
const nameCustomer = customer ? customer.name : null;
const mailCustomer = customer ? customer.mail : null;
const phoneCustomer = customer ? customer.phone : null;
const addressCustomer = customer ? customer.address : null;
const urlCustomer = customer ? customer.www : null;
const infoCustomer = customer ? customer.info : null;
@ -61,6 +62,13 @@ const PageAbout = props => {
<Link id="settings-about-email" external={true} href={"mailto:"+mailCustomer}>{mailCustomer}</Link>
</p>
) : null}
{phoneCustomer && phoneCustomer.length ? (
<p>
<label>{_t.textTel}:</label>
<Link id="settings-about-tel" external={true} href={"tel:"+phoneCustomer}>{phoneCustomer}</Link>
</p>
) : null}
{urlCustomer && urlCustomer.length ? (
<p>
<Link id="settings-about-url" className="external" target="_blank"