🔧 Added checks to stats modules
This commit is contained in:
@@ -43,7 +43,7 @@ export const getWeeklyPullList = (options) => async (dispatch) => {
|
|||||||
url: `${COMICVINE_SERVICE_URI}/getWeeklyPullList`,
|
url: `${COMICVINE_SERVICE_URI}/getWeeklyPullList`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params: {
|
params: {
|
||||||
startDate: "2022-2-9",
|
startDate: "2022-2-15",
|
||||||
pageSize: "15",
|
pageSize: "15",
|
||||||
currentPage: "1",
|
currentPage: "1",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -400,7 +400,7 @@ pre {
|
|||||||
display: -webkit-box; /* Not needed if autoprefixing */
|
display: -webkit-box; /* Not needed if autoprefixing */
|
||||||
display: -ms-flexbox; /* Not needed if autoprefixing */
|
display: -ms-flexbox; /* Not needed if autoprefixing */
|
||||||
display: flex;
|
display: flex;
|
||||||
// margin-left: -30px; /* gutter size offset */
|
margin-left: -10px; /* gutter size offset */
|
||||||
width: auto;
|
width: auto;
|
||||||
.issues-column {
|
.issues-column {
|
||||||
max-width: 102px;
|
max-width: 102px;
|
||||||
|
|||||||
@@ -234,6 +234,7 @@ export const ComicDetail = ({}: ComicDetailProps): ReactElement => {
|
|||||||
imageUrl={imagePath}
|
imageUrl={imagePath}
|
||||||
orientation={"vertical"}
|
orientation={"vertical"}
|
||||||
hasDetails={false}
|
hasDetails={false}
|
||||||
|
cardContainerStyle={{ maxWidth: 275 }}
|
||||||
/>
|
/>
|
||||||
{/* action dropdown */}
|
{/* action dropdown */}
|
||||||
<div className="mt-4 is-size-7">
|
<div className="mt-4 is-size-7">
|
||||||
|
|||||||
@@ -53,14 +53,15 @@ export const Dashboard = (): ReactElement => {
|
|||||||
</span>{" "}
|
</span>{" "}
|
||||||
files
|
files
|
||||||
</dd>
|
</dd>
|
||||||
{!isUndefined(libraryStatistics.statistics) && (
|
{!isUndefined(libraryStatistics.statistics) &&
|
||||||
<dd className="is-size-6">
|
!isEmpty(libraryStatistics.statistics[0].issues) && (
|
||||||
<span className="has-text-weight-bold">
|
<dd className="is-size-6">
|
||||||
{libraryStatistics.statistics[0].issues.length}
|
<span className="has-text-weight-bold">
|
||||||
</span>{" "}
|
{libraryStatistics.statistics[0].issues.length}
|
||||||
tagged with ComicVine
|
</span>{" "}
|
||||||
</dd>
|
tagged with ComicVine
|
||||||
)}
|
</dd>
|
||||||
|
)}
|
||||||
<dd className="is-size-6">
|
<dd className="is-size-6">
|
||||||
<span className="has-text-weight-bold">1304</span> with
|
<span className="has-text-weight-bold">1304</span> with
|
||||||
custom metadata
|
custom metadata
|
||||||
@@ -82,24 +83,27 @@ export const Dashboard = (): ReactElement => {
|
|||||||
{/* file types */}
|
{/* file types */}
|
||||||
<div className="box stats-palette p-3 column ml-5">
|
<div className="box stats-palette p-3 column ml-5">
|
||||||
<dl>
|
<dl>
|
||||||
{!isUndefined(libraryStatistics.statistics) && (
|
{!isUndefined(libraryStatistics.statistics) &&
|
||||||
<dd className="is-size-6">
|
!isEmpty(
|
||||||
<span className="has-text-weight-bold">
|
libraryStatistics.statistics[0]
|
||||||
{
|
.publisherWithMostComicsInLibrary[0],
|
||||||
libraryStatistics.statistics[0]
|
) && (
|
||||||
.publisherWithMostComicsInLibrary[0]._id
|
<dd className="is-size-6">
|
||||||
}
|
<span className="has-text-weight-bold">
|
||||||
</span>
|
{
|
||||||
{" has the most issues "}(
|
libraryStatistics.statistics[0]
|
||||||
<span className="has-text-weight-bold">
|
.publisherWithMostComicsInLibrary[0]._id
|
||||||
{
|
}
|
||||||
libraryStatistics.statistics[0]
|
</span>
|
||||||
.publisherWithMostComicsInLibrary[0].count
|
{" has the most issues "}
|
||||||
}
|
<span className="has-text-weight-bold">
|
||||||
</span>
|
{
|
||||||
)
|
libraryStatistics.statistics[0]
|
||||||
</dd>
|
.publisherWithMostComicsInLibrary[0].count
|
||||||
)}
|
}
|
||||||
|
</span>
|
||||||
|
</dd>
|
||||||
|
)}
|
||||||
<dd className="is-size-6">
|
<dd className="is-size-6">
|
||||||
<span className="has-text-weight-bold">304</span> Volumes
|
<span className="has-text-weight-bold">304</span> Volumes
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
@@ -85,12 +85,12 @@ export const PullList = ({ issues }: PullListProps): ReactElement => {
|
|||||||
<div className="field has-addons">
|
<div className="field has-addons">
|
||||||
<div className="control">
|
<div className="control">
|
||||||
<button className="button is-rounded is-small" onClick={previous}>
|
<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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="control">
|
<div className="control">
|
||||||
<button className="button is-rounded is-small" onClick={next}>
|
<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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { escapePoundSymbol } from "../../shared/utils/formatting.utils";
|
|||||||
import prettyBytes from "pretty-bytes";
|
import prettyBytes from "pretty-bytes";
|
||||||
|
|
||||||
const PotentialLibraryMatches = (props): ReactElement => {
|
const PotentialLibraryMatches = (props): ReactElement => {
|
||||||
console.log(props);
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const comicBooks = useSelector(
|
const comicBooks = useSelector(
|
||||||
(state: RootState) => state.comicInfo.comicBooksDetails,
|
(state: RootState) => state.comicInfo.comicBooksDetails,
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ const VolumeDetails = (props): ReactElement => {
|
|||||||
comicBookDetails.sourcedMetadata.comicvine.volumeInformation
|
comicBookDetails.sourcedMetadata.comicvine.volumeInformation
|
||||||
.image.small_url
|
.image.small_url
|
||||||
}
|
}
|
||||||
|
cardContainerStyle={{ maxWidth: 275 }}
|
||||||
orientation={"vertical"}
|
orientation={"vertical"}
|
||||||
hasDetails={false}
|
hasDetails={false}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user