🔧 Added checks to stats modules

This commit is contained in:
2022-02-15 21:25:17 -08:00
parent 635e70ba81
commit 829bc488c8
7 changed files with 36 additions and 31 deletions

View File

@@ -43,7 +43,7 @@ export const getWeeklyPullList = (options) => async (dispatch) => {
url: `${COMICVINE_SERVICE_URI}/getWeeklyPullList`,
method: "get",
params: {
startDate: "2022-2-9",
startDate: "2022-2-15",
pageSize: "15",
currentPage: "1",
},

View File

@@ -400,7 +400,7 @@ pre {
display: -webkit-box; /* Not needed if autoprefixing */
display: -ms-flexbox; /* Not needed if autoprefixing */
display: flex;
// margin-left: -30px; /* gutter size offset */
margin-left: -10px; /* gutter size offset */
width: auto;
.issues-column {
max-width: 102px;

View File

@@ -234,6 +234,7 @@ export const ComicDetail = ({}: ComicDetailProps): ReactElement => {
imageUrl={imagePath}
orientation={"vertical"}
hasDetails={false}
cardContainerStyle={{ maxWidth: 275 }}
/>
{/* action dropdown */}
<div className="mt-4 is-size-7">

View File

@@ -53,14 +53,15 @@ export const Dashboard = (): ReactElement => {
</span>{" "}
files
</dd>
{!isUndefined(libraryStatistics.statistics) && (
<dd className="is-size-6">
<span className="has-text-weight-bold">
{libraryStatistics.statistics[0].issues.length}
</span>{" "}
tagged with ComicVine
</dd>
)}
{!isUndefined(libraryStatistics.statistics) &&
!isEmpty(libraryStatistics.statistics[0].issues) && (
<dd className="is-size-6">
<span className="has-text-weight-bold">
{libraryStatistics.statistics[0].issues.length}
</span>{" "}
tagged with ComicVine
</dd>
)}
<dd className="is-size-6">
<span className="has-text-weight-bold">1304</span> with
custom metadata
@@ -82,24 +83,27 @@ export const Dashboard = (): ReactElement => {
{/* file types */}
<div className="box stats-palette p-3 column ml-5">
<dl>
{!isUndefined(libraryStatistics.statistics) && (
<dd className="is-size-6">
<span className="has-text-weight-bold">
{
libraryStatistics.statistics[0]
.publisherWithMostComicsInLibrary[0]._id
}
</span>
{" has the most issues "}(
<span className="has-text-weight-bold">
{
libraryStatistics.statistics[0]
.publisherWithMostComicsInLibrary[0].count
}
</span>
)
</dd>
)}
{!isUndefined(libraryStatistics.statistics) &&
!isEmpty(
libraryStatistics.statistics[0]
.publisherWithMostComicsInLibrary[0],
) && (
<dd className="is-size-6">
<span className="has-text-weight-bold">
{
libraryStatistics.statistics[0]
.publisherWithMostComicsInLibrary[0]._id
}
</span>
{" has the most issues "}
<span className="has-text-weight-bold">
{
libraryStatistics.statistics[0]
.publisherWithMostComicsInLibrary[0].count
}
</span>
</dd>
)}
<dd className="is-size-6">
<span className="has-text-weight-bold">304</span> Volumes
</dd>

View File

@@ -85,12 +85,12 @@ export const PullList = ({ issues }: PullListProps): ReactElement => {
<div className="field has-addons">
<div className="control">
<button className="button is-rounded is-small" onClick={previous}>
<i className="fa-solid fa-caret-left"></i>
<i className="fa-solid fa-caret-left"></i>
</button>
</div>
<div className="control">
<button className="button is-rounded is-small" onClick={next}>
<i className="fa-solid fa-caret-right"></i>
<i className="fa-solid fa-caret-right"></i>
</button>
</div>
</div>

View File

@@ -9,7 +9,6 @@ import { escapePoundSymbol } from "../../shared/utils/formatting.utils";
import prettyBytes from "pretty-bytes";
const PotentialLibraryMatches = (props): ReactElement => {
console.log(props);
const dispatch = useDispatch();
const comicBooks = useSelector(
(state: RootState) => state.comicInfo.comicBooksDetails,

View File

@@ -178,6 +178,7 @@ const VolumeDetails = (props): ReactElement => {
comicBookDetails.sourcedMetadata.comicvine.volumeInformation
.image.small_url
}
cardContainerStyle={{ maxWidth: 275 }}
orientation={"vertical"}
hasDetails={false}
/>