diff --git a/src/client/assets/scss/App.scss b/src/client/assets/scss/App.scss index 0e61f2f..e360039 100644 --- a/src/client/assets/scss/App.scss +++ b/src/client/assets/scss/App.scss @@ -42,15 +42,7 @@ pre { } // Dashboard -// Comic Detail -.stats-palette { - background-color: ghostwhite; - display: inline-block; - p { - display: flex; - // padding: 1.5rem 2rem; - } -} + // slick slider overrides .slick-slider { margin-left: -10px; diff --git a/src/client/components/Dashboard/Dashboard.tsx b/src/client/components/Dashboard/Dashboard.tsx index d6a8244..f0c6105 100644 --- a/src/client/components/Dashboard/Dashboard.tsx +++ b/src/client/components/Dashboard/Dashboard.tsx @@ -6,7 +6,7 @@ import { VolumeGroups } from "./VolumeGroups"; import { PullList } from "./PullList"; import { getComicBooks } from "../../actions/fileops.actions"; import { getLibraryStatistics } from "../../actions/comicinfo.actions"; -import { isEmpty, isNil, isUndefined } from "lodash"; +import { isEmpty, isNil, isUndefined, map } from "lodash"; export const Dashboard = (): ReactElement => { const dispatch = useDispatch(); @@ -43,10 +43,11 @@ export const Dashboard = (): ReactElement => { {/* stats */} -
-

Statistics

-
-
+ +

Statistics

+
+
+
{libraryStatistics.totalDocuments} @@ -69,20 +70,40 @@ export const Dashboard = (): ReactElement => {
-
-
+
+
Issues
304 Volumes
+
+ {!isUndefined(libraryStatistics.statistics) && + !isEmpty(libraryStatistics.statistics[0].fileTypes) && + map( + libraryStatistics.statistics[0].fileTypes, + (fileType) => { + return ( + <> + + {fileType.data.length} + + + {fileType._id} + + + ); + }, + )} +
{/* file types */} -
-
+
+ {/* publisher with most issues */} +
{!isUndefined(libraryStatistics.statistics) && !isEmpty( libraryStatistics.statistics[0] diff --git a/src/client/components/Dashboard/PullList.tsx b/src/client/components/Dashboard/PullList.tsx index 5fd9baf..17f8cf8 100644 --- a/src/client/components/Dashboard/PullList.tsx +++ b/src/client/components/Dashboard/PullList.tsx @@ -99,9 +99,10 @@ export const PullList = ({ issues }: PullListProps): ReactElement => { (sliderRef = c)}> {!isNil(pullList) && pullList && - map(pullList, (issue) => { + map(pullList, (issue, idx) => { return (