Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
thecybernanny-webapp
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
asranov0003
thecybernanny-webapp
Commits
056d4711
Commit
056d4711
authored
Jul 31, 2025
by
asranov0003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: filter history default to date
parent
a7c21989
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
9 deletions
+61
-9
BrowserHistory.tsx
src/pages/BrowserHistory/BrowserHistory.tsx
+18
-2
Calls.tsx
src/pages/Calls/Calls.tsx
+23
-5
Messengers.tsx
src/pages/Messengers/Messengers.tsx
+20
-2
No files found.
src/pages/BrowserHistory/BrowserHistory.tsx
View file @
056d4711
...
...
@@ -31,11 +31,27 @@ const BrowserHistory: React.FC = () => {
const
filterBrowserHistory
=
()
=>
{
if
(
selectedDevice
?.
id
)
{
const
from
=
new
Date
(
fromDate
);
const
to
=
new
Date
(
toDate
);
const
isToday
=
toDate
===
today
;
if
(
isToday
)
{
const
now
=
new
Date
();
to
.
setHours
(
now
.
getHours
(),
now
.
getMinutes
(),
now
.
getSeconds
(),
now
.
getMilliseconds
()
);
}
else
{
to
.
setHours
(
23
,
59
,
59
,
999
);
}
dispatch
(
fetchBrowserHistory
({
deviceId
:
selectedDevice
.
id
,
dateFrom
:
new
Date
(
fromDate
)
,
dateTo
:
new
Date
(
toDate
)
,
dateFrom
:
from
,
dateTo
:
to
,
recStart
:
0
,
})
);
...
...
src/pages/Calls/Calls.tsx
View file @
056d4711
...
...
@@ -42,17 +42,35 @@ const Calls: React.FC = () => {
useEffect
(()
=>
{
if
(
selectedDevice
?.
id
)
{
filter
Browser
History
();
filter
Call
History
();
}
},
[
dispatch
,
selectedDevice
]);
const
filter
Browser
History
=
()
=>
{
const
filter
Call
History
=
()
=>
{
if
(
selectedDevice
?.
id
)
{
const
from
=
new
Date
(
fromDate
);
const
to
=
new
Date
(
toDate
);
const
todayStr
=
new
Date
().
toISOString
().
split
(
"T"
)[
0
];
const
isToday
=
toDate
===
todayStr
;
if
(
isToday
)
{
const
now
=
new
Date
();
to
.
setHours
(
now
.
getHours
(),
now
.
getMinutes
(),
now
.
getSeconds
(),
now
.
getMilliseconds
()
);
}
else
{
to
.
setHours
(
23
,
59
,
59
,
999
);
}
dispatch
(
fetchCallHistory
({
deviceId
:
selectedDevice
.
id
,
dateFrom
:
new
Date
(
fromDate
)
,
dateTo
:
new
Date
(
toDate
)
,
dateFrom
:
from
,
dateTo
:
to
,
recStart
:
0
,
})
);
...
...
@@ -125,7 +143,7 @@ const Calls: React.FC = () => {
<
CButton
title=
{
t
(
"button.search"
)
}
onClick=
{
filter
Browser
History
}
onClick=
{
filter
Call
History
}
isLoading=
{
loading
}
/>
</
div
>
...
...
src/pages/Messengers/Messengers.tsx
View file @
056d4711
...
...
@@ -30,12 +30,30 @@ const Messengers: React.FC = () => {
const
fetchMessengerHistories
=
()
=>
{
if
(
selectedDevice
?.
id
)
{
const
from
=
new
Date
(
fromDate
);
const
to
=
new
Date
(
toDate
);
const
today
=
new
Date
().
toISOString
().
split
(
"T"
)[
0
];
const
isToday
=
toDate
===
today
;
if
(
isToday
)
{
const
now
=
new
Date
();
to
.
setHours
(
now
.
getHours
(),
now
.
getMinutes
(),
now
.
getSeconds
(),
now
.
getMilliseconds
()
);
}
else
{
to
.
setHours
(
23
,
59
,
59
,
999
);
}
dispatch
(
fetchMessengerHistory
({
deviceId
:
selectedDevice
.
id
,
messengerId
:
selectedMessenger
.
id
,
dateFrom
:
new
Date
(
fromDate
)
,
dateTo
:
new
Date
(
toDate
)
,
dateFrom
:
from
,
dateTo
:
to
,
recStart
:
0
,
})
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment