mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
Get/Delete ChatMessage based on startDateTime / endDateTime (#3867)
* Get ChatMessage based on startDateTime / endDateTime - supplements existing startDate / endDate fields * Proper query handling for between case * Return 0 result rather than error * lint fix * update start date and end date query --------- Co-authored-by: Henry <hzj94@hotmail.com>
This commit is contained in:
@@ -167,28 +167,32 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
|
||||
let storagePath = ''
|
||||
|
||||
const onStartDateSelected = (date) => {
|
||||
setStartDate(date)
|
||||
const updatedDate = new Date(date)
|
||||
updatedDate.setHours(0, 0, 0, 0)
|
||||
setStartDate(updatedDate)
|
||||
getChatmessageApi.request(dialogProps.chatflow.id, {
|
||||
startDate: date,
|
||||
startDate: updatedDate,
|
||||
endDate: endDate,
|
||||
chatType: chatTypeFilter.length ? chatTypeFilter : undefined
|
||||
})
|
||||
getStatsApi.request(dialogProps.chatflow.id, {
|
||||
startDate: date,
|
||||
startDate: updatedDate,
|
||||
endDate: endDate,
|
||||
chatType: chatTypeFilter.length ? chatTypeFilter : undefined
|
||||
})
|
||||
}
|
||||
|
||||
const onEndDateSelected = (date) => {
|
||||
setEndDate(date)
|
||||
const updatedDate = new Date(date)
|
||||
updatedDate.setHours(23, 59, 59, 999)
|
||||
setEndDate(updatedDate)
|
||||
getChatmessageApi.request(dialogProps.chatflow.id, {
|
||||
endDate: date,
|
||||
endDate: updatedDate,
|
||||
startDate: startDate,
|
||||
chatType: chatTypeFilter.length ? chatTypeFilter : undefined
|
||||
})
|
||||
getStatsApi.request(dialogProps.chatflow.id, {
|
||||
endDate: date,
|
||||
endDate: updatedDate,
|
||||
startDate: startDate,
|
||||
chatType: chatTypeFilter.length ? chatTypeFilter : undefined
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user