Test
parent
0e720ef48e
commit
728c5b580e
|
@ -88,19 +88,23 @@ const ListTicketsService = async ({
|
||||||
if (searchParam) {
|
if (searchParam) {
|
||||||
const sanitizedSearchParam = searchParam.toLocaleLowerCase().trim();
|
const sanitizedSearchParam = searchParam.toLocaleLowerCase().trim();
|
||||||
|
|
||||||
includeCondition = [
|
//othavio
|
||||||
...includeCondition,
|
|
||||||
{
|
console.log('sanitizedSearchParam:'+ sanitizedSearchParam, ' | sanitizedSearchParam.length: ',sanitizedSearchParam.length)
|
||||||
model: Message,
|
|
||||||
as: "messages",
|
// includeCondition = [
|
||||||
attributes: ["id", "body"],
|
// ...includeCondition,
|
||||||
where: {
|
// {
|
||||||
body: where(fn("LOWER", col("body")), "LIKE", `%${sanitizedSearchParam}%`)
|
// model: Message,
|
||||||
},
|
// as: "messages",
|
||||||
required: false,
|
// attributes: ["id", "body"],
|
||||||
duplicating: false
|
// where: {
|
||||||
}
|
// body: where(fn("LOWER", col("body")), "LIKE", `%${sanitizedSearchParam}%`)
|
||||||
];
|
// },
|
||||||
|
// required: false,
|
||||||
|
// duplicating: false
|
||||||
|
// }
|
||||||
|
// ];
|
||||||
|
|
||||||
whereCondition = {
|
whereCondition = {
|
||||||
...whereCondition,
|
...whereCondition,
|
||||||
|
@ -111,9 +115,9 @@ const ListTicketsService = async ({
|
||||||
|
|
||||||
{ "$contact.number$": { [Op.like]: `%${sanitizedSearchParam}%` } },
|
{ "$contact.number$": { [Op.like]: `%${sanitizedSearchParam}%` } },
|
||||||
|
|
||||||
{
|
// {
|
||||||
"$message.body$": where(fn("LOWER", col("body")), "LIKE", `%${sanitizedSearchParam}%`)
|
// "$message.body$": where(fn("LOWER", col("body")), "LIKE", `%${sanitizedSearchParam}%`)
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,8 @@ const TicketsManager = () => {
|
||||||
let searchTimeout;
|
let searchTimeout;
|
||||||
|
|
||||||
const handleSearch = (e) => {
|
const handleSearch = (e) => {
|
||||||
const searchedTerm = e.target.value.toLowerCase().trim();
|
let searchedTerm = e.target.value.toLowerCase()
|
||||||
|
|
||||||
|
|
||||||
clearTimeout(searchTimeout);
|
clearTimeout(searchTimeout);
|
||||||
|
|
||||||
|
@ -136,7 +137,7 @@ const TicketsManager = () => {
|
||||||
|
|
||||||
searchTimeout = setTimeout(() => {
|
searchTimeout = setTimeout(() => {
|
||||||
setSearchParam(searchedTerm);
|
setSearchParam(searchedTerm);
|
||||||
}, 500);
|
}, 200);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleChangeTab = (e, newValue) => {
|
const handleChangeTab = (e, newValue) => {
|
||||||
|
|
|
@ -391,7 +391,7 @@ const Report = () => {
|
||||||
const queryOnQueue = await apiBroker.get("/reports/status/query/onqueue", {
|
const queryOnQueue = await apiBroker.get("/reports/status/query/onqueue", {
|
||||||
params: {
|
params: {
|
||||||
adminId: userA.id,
|
adminId: userA.id,
|
||||||
baseURL: process.env.REACT_APP_BACKEND_URL,
|
baseURL: process.env.REACT_APP_BACKEND_URL_PRIVATE,
|
||||||
identifier: 'csv'
|
identifier: 'csv'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -454,7 +454,7 @@ const Report = () => {
|
||||||
{
|
{
|
||||||
app: {
|
app: {
|
||||||
adminId: userA.id,
|
adminId: userA.id,
|
||||||
baseURL: process.env.REACT_APP_BACKEND_URL,
|
baseURL: process.env.REACT_APP_BACKEND_URL_PRIVATE,
|
||||||
frontURL: process.env.REACT_APP_FRONTEND_URL,
|
frontURL: process.env.REACT_APP_FRONTEND_URL,
|
||||||
identifier: 'csv'
|
identifier: 'csv'
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue