Changed format

This commit is contained in:
Joan Sanchez 2020-03-04 09:32:18 +01:00
parent 80248238d2
commit 2f511d1718
1 changed files with 3 additions and 1 deletions

View File

@ -5,8 +5,10 @@ export default class Controller extends Component {
onSubmit() {
const orgData = this.$.watcher.orgData;
delete this.client.despiteOfClient;
const hasContactData = this.client.email || this.client.phone || this.client.mobile;
if (!orgData.isTaxDataChecked && this.client.isTaxDataChecked && hasContactData)
const isDataChecked = !orgData.isTaxDataChecked && this.client.isTaxDataChecked;
if (isDataChecked && hasContactData)
this.checkExistingClient();
else this.save();
}