sync
This commit is contained in:
parent
08e58b3abc
commit
d7728ebfd6
@ -136,7 +136,7 @@ class CustomerCommunication {
|
|||||||
if (c.OptOut || c.OptOut_BC || c.selected === false) {
|
if (c.OptOut || c.OptOut_BC || c.selected === false) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const mp = String(c.MobilePhone).trim();
|
const mp = String(c.MobilePhoneDisplayText).trim();
|
||||||
const email = String(c.Email).trim();
|
const email = String(c.Email).trim();
|
||||||
const pref = String(c.ContactPreference);
|
const pref = String(c.ContactPreference);
|
||||||
if ((pref !== '1') && !isPhone(mp) ||
|
if ((pref !== '1') && !isPhone(mp) ||
|
||||||
@ -228,6 +228,21 @@ class CustomerCommunication {
|
|||||||
div.style.display = '';
|
div.style.display = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param {String} code
|
||||||
|
*/
|
||||||
|
set companyCode(code) {
|
||||||
|
this.#option.companyCode = code;
|
||||||
|
const div = this.#container.querySelector('.title-company');
|
||||||
|
if (nullOrEmpty(this.#option.companyName)) {
|
||||||
|
div.style.display = 'none';
|
||||||
|
} else {
|
||||||
|
div.innerText = this.#option.companyName;
|
||||||
|
if (!nullOrEmpty(code))
|
||||||
|
div.innerText = this.#option.companyName + "/" + code;
|
||||||
|
div.style.display = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
get followers() {
|
get followers() {
|
||||||
return [...this.#followers.children].map(el => {
|
return [...this.#followers.children].map(el => {
|
||||||
@ -335,7 +350,11 @@ class CustomerCommunication {
|
|||||||
if (nullOrEmpty(option.companyName)) {
|
if (nullOrEmpty(option.companyName)) {
|
||||||
div.style.display = 'none';
|
div.style.display = 'none';
|
||||||
} else {
|
} else {
|
||||||
div.innerText = option.companyName;
|
if (nullOrEmpty(option.companyCode)) {
|
||||||
|
div.innerText = option.companyName;
|
||||||
|
} else {
|
||||||
|
div.innerText = option.companyName + "/" + option.companyCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
@ -450,7 +469,11 @@ class CustomerCommunication {
|
|||||||
if (nullOrEmpty(option.companyName)) {
|
if (nullOrEmpty(option.companyName)) {
|
||||||
div.style.display = 'none';
|
div.style.display = 'none';
|
||||||
} else {
|
} else {
|
||||||
div.innerText = option.companyName;
|
if (nullOrEmpty(option.companyCode)) {
|
||||||
|
div.innerText = option.companyName;
|
||||||
|
} else {
|
||||||
|
div.innerText = option.companyName + "/" + option.companyCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
|
@ -32,6 +32,7 @@ $buttonHeight: 28px;
|
|||||||
.ui-popup-container {
|
.ui-popup-container {
|
||||||
min-width: 400px;
|
min-width: 400px;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
max-height: 90vh;
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
border-radius: var(--corner-radius);
|
border-radius: var(--corner-radius);
|
||||||
box-shadow: 0 2px 8px var(--shadow-color);
|
box-shadow: 0 2px 8px var(--shadow-color);
|
||||||
|
2
lib/ui/grid/grid.d.ts
vendored
2
lib/ui/grid/grid.d.ts
vendored
@ -45,7 +45,7 @@ interface GridColumnDefinition {
|
|||||||
allcheck?: boolean;
|
allcheck?: boolean;
|
||||||
events?: { [event: string]: any };
|
events?: { [event: string]: any };
|
||||||
attrs?: { [key: string]: string } | ((item: GridItem | any) => { [key: string]: string });
|
attrs?: { [key: string]: string } | ((item: GridItem | any) => { [key: string]: string });
|
||||||
// TODO: allowFilter?: boolean;
|
allowFilter?: boolean;
|
||||||
filter?: (item: GridItem | any) => any;
|
filter?: (item: GridItem | any) => any;
|
||||||
sortFilter?: (a: GridItem | any, b: GridItem | any) => -1 | 0 | 1;
|
sortFilter?: (a: GridItem | any, b: GridItem | any) => -1 | 0 | 1;
|
||||||
bgFilter?: (item: GridItem | any) => string;
|
bgFilter?: (item: GridItem | any) => string;
|
||||||
|
@ -1116,7 +1116,7 @@ class Grid {
|
|||||||
reset.innerText = this.langs.reset;
|
reset.innerText = this.langs.reset;
|
||||||
reset.addEventListener('click', () => {
|
reset.addEventListener('click', () => {
|
||||||
this.#set(col.key, 'filter', null);
|
this.#set(col.key, 'filter', null);
|
||||||
// TODO: change __filtered
|
this.#colAttrs.__filtered = this.columns.some(c => this.#get(c.key, 'filter') != null)
|
||||||
this.#refreshSource();
|
this.#refreshSource();
|
||||||
if (typeof col.onFiltered === 'function') {
|
if (typeof col.onFiltered === 'function') {
|
||||||
col.onFiltered.call(this, col);
|
col.onFiltered.call(this, col);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user