sync working code, and import type-doc
This commit is contained in:
@ -155,11 +155,14 @@ class Contact {
|
||||
.then(() => this.#refs.contactName.focus());
|
||||
return null;
|
||||
}
|
||||
if (nullOrEmpty(email) && nullOrEmpty(phone)) {
|
||||
showAlert(title, r('contactEmailPhoneRequired', 'Email and Mobile Phone cannot both be empty.'), 'warn')
|
||||
.then(() => nullOrEmpty(email) ?
|
||||
this.#refs.contactEmail.focus() :
|
||||
this.#refs.contactMobile.focus());
|
||||
if ((pref == 0 || pref == 2) && nullOrEmpty(phone)) {
|
||||
showAlert(title, r('contactPhoneRequired', 'Mobile cannot be empty.'), 'warn')
|
||||
.then(() => this.#refs.contactMobile.focus());
|
||||
return null;
|
||||
}
|
||||
if (pref == 1 && nullOrEmpty(email)) {
|
||||
showAlert(title, r('contactEmailRequired', 'Email cannot be empty.'), 'warn')
|
||||
.then(() => this.#refs.contactEmail.focus());
|
||||
return null;
|
||||
}
|
||||
if (!nullOrEmpty(email) && !isEmail(email)) {
|
||||
@ -176,6 +179,8 @@ class Contact {
|
||||
contact.selected = !opt;
|
||||
}
|
||||
}
|
||||
contact.OldName = contact.Name;
|
||||
contact.OldMobilePhone = contact.MobilePhone;
|
||||
contact.Name = name;
|
||||
contact.ContactPreference = pref;
|
||||
contact.Email = email;
|
||||
|
Reference in New Issue
Block a user