This commit is contained in:
2023-04-28 15:06:47 +08:00
parent 58de68a878
commit 9bf9e7da27
6 changed files with 64 additions and 48 deletions

View File

@ -435,7 +435,7 @@ class CustomerCommunication {
#createContacts(container, option) {
const readonly = option.readonly;
const recordReadonly = option.recordReadonly;
const contacts = createElement('div');
const contacts = createElement('div', 'bar-list-container');
container.append(
createElement('div', 'contact-bar',
createElement('div', 'bar-icon',
@ -491,7 +491,7 @@ class CustomerCommunication {
}));
button.addEventListener('click', () => {
const add = new Contact({
company: !nullOrEmpty(this.#data.companyCode),
company: !nullOrEmpty(this.#data.companyName),
onSave: item => {
const exists = this.#gridContact.source.some(s => s.Name === item.Name && s.MobilePhone === item.MobilePhone);
if (exists) {
@ -535,14 +535,14 @@ class CustomerCommunication {
}),
createElement('div', null,
createElement('div', div => {
if (nullOrEmpty(this.#data.companyCode)) {
if (nullOrEmpty(this.#data.companyName)) {
div.style.display = 'none';
}
div.style.fontWeight = 'bold';
div.innerText = r('contactFromRecord', 'Contacts from Customer Record');
}),
createElement('div', div => {
if (nullOrEmpty(this.#data.companyCode)) {
if (nullOrEmpty(this.#data.companyName)) {
div.style.display = 'none';
}
div.className = 'contacts-record';
@ -606,7 +606,7 @@ class CustomerCommunication {
onclick: function () {
const edit = new Contact({
contact: this,
company: !nullOrEmpty(This.#data.companyCode),
company: !nullOrEmpty(This.#data.companyName),
onSave: (item, _op) => {
const exists =
This.#gridContact.source.some(s => s !== this && s.Name === item.Name && s.MobilePhone === item.MobilePhone) ||
@ -804,7 +804,7 @@ class CustomerCommunication {
#createFollowers(container, option) {
const readonly = option.readonly;
const recordReadonly = option.recordReadonly;
const followers = createElement('div');
const followers = createElement('div', 'bar-list-container');
const buttonEditFollower = createElement('button', button => {
button.className = 'roundbtn button-edit-followers';
button.style.backgroundColor = 'rgb(48, 107, 255)';
@ -872,6 +872,7 @@ class CustomerCommunication {
div.className = 'followers-record';
div.style.maxHeight = '400px';
div.style.width = '660px';
div.style.overflow = 'auto';
})
)
);