Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
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
Vũ Hoàng Anh
canifa_note
Commits
3d63d9d5
Commit
3d63d9d5
authored
Jul 27, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix activity stats
parent
139090fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
UserStatisticsView.tsx
web/src/components/UserStatisticsView.tsx
+2
-7
No files found.
web/src/components/UserStatisticsView.tsx
View file @
3d63d9d5
import
{
Divider
,
Tooltip
}
from
"@mui/joy"
;
import
{
Divider
,
Tooltip
}
from
"@mui/joy"
;
import
clsx
from
"clsx"
;
import
clsx
from
"clsx"
;
import
dayjs
from
"dayjs"
;
import
dayjs
from
"dayjs"
;
import
{
c
hain
}
from
"lodash-es"
;
import
{
c
ountBy
}
from
"lodash-es"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
toast
from
"react-hot-toast"
;
import
toast
from
"react-hot-toast"
;
import
{
memoServiceClient
}
from
"@/grpcweb"
;
import
{
memoServiceClient
}
from
"@/grpcweb"
;
...
@@ -53,14 +53,9 @@ const UserStatisticsView = () => {
...
@@ -53,14 +53,9 @@ const UserStatisticsView = () => {
memoStats
.
incompleteTasks
+=
1
;
memoStats
.
incompleteTasks
+=
1
;
}
}
});
});
const
displayTimes
=
entities
.
map
((
entity
)
=>
entity
.
displayTime
).
filter
(
Boolean
)
as
Date
[];
const
monthStrGroup
=
chain
(
displayTimes
)
.
map
((
date
)
=>
dayjs
(
date
).
format
(
"YYYY-MM-DD"
))
.
countBy
()
.
value
();
setMemoStats
(
memoStats
);
setMemoStats
(
memoStats
);
setMemoAmount
(
entities
.
length
);
setMemoAmount
(
entities
.
length
);
setActivityStats
(
monthStrGroup
);
setActivityStats
(
countBy
(
entities
.
map
((
entity
)
=>
dayjs
(
entity
.
displayTime
).
format
(
"YYYY-MM-DD"
)))
);
},
[
memoStore
.
stateId
]);
},
[
memoStore
.
stateId
]);
const
rebuildMemoTags
=
async
()
=>
{
const
rebuildMemoTags
=
async
()
=>
{
...
...
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