sync from work

This commit is contained in:
2023-04-14 17:40:15 +08:00
parent d702197a3f
commit af78bf0381
13 changed files with 566 additions and 319 deletions

View File

@ -56,7 +56,7 @@ class Contact {
}
item.SaveToCustomer = 1;
if (typeof this.#option.onSave === 'function') {
return this.#option.onSave.call(this, item, c == null);
return this.#option.onSave.call(this, item, 'customerrecord');
}
}
});
@ -69,9 +69,10 @@ class Contact {
if (item == null) {
return false;
}
item.Id = -1;
item.SaveToCustomer = 0;
if (typeof this.#option.onSave === 'function') {
return this.#option.onSave.call(this, item, c == null);
return this.#option.onSave.call(this, item, 'workorder');
}
}
},
@ -162,6 +163,10 @@ class Contact {
let contact = this.#option.contact;
if (contact == null) {
contact = {};
} else if (contact.OptOut !== opt) {
if (opt !== false || contact.OptOut_BC === false) {
contact.selected = !opt;
}
}
contact.Name = name;
contact.ContactPreference = pref;