diff --git a/src/components/Inputs/Button.tsx b/src/components/Inputs/Button.tsx
index f5ccc38..3033c4b 100644
--- a/src/components/Inputs/Button.tsx
+++ b/src/components/Inputs/Button.tsx
@@ -52,7 +52,7 @@ export const Button = ({
{
- if (isDefined(href) || isDefined(locale)) {
+ if (!isDefined(target) && (isDefined(href) || isDefined(locale))) {
router.push(href ?? router.asPath, href, {
locale: locale,
});
diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx
index 2b16276..ee8f483 100644
--- a/src/components/Markdown/Markdawn.tsx
+++ b/src/components/Markdown/Markdawn.tsx
@@ -199,8 +199,8 @@ export const Markdawn = ({
Line: {
component: (compProps) => (
<>
-
- {compProps.name}
+
+
{compProps.children}
>
@@ -427,11 +427,17 @@ enum HeaderLevels {
const preprocessMarkDawn = (text: string, playerName = ""): string => {
if (!text) return "";
+ const processedPlayerName = playerName
+ .replaceAll("_", "\\_")
+ .replaceAll("*", "\\*");
+
let preprocessed = text
.replaceAll("--", "—")
.replaceAll(
"@player",
- isDefinedAndNotEmpty(playerName) ? playerName : "(player)"
+ isDefinedAndNotEmpty(processedPlayerName)
+ ? processedPlayerName
+ : "(player)"
);
console.log();
diff --git a/src/components/PreviewLine.tsx b/src/components/PreviewLine.tsx
index 7e39e12..cd8b3fb 100644
--- a/src/components/PreviewLine.tsx
+++ b/src/components/PreviewLine.tsx
@@ -39,7 +39,7 @@ export const PreviewLine = ({
>
{thumbnail ? (
-
+
) : (
diff --git a/src/graphql/operations/devGetContents.graphql b/src/graphql/operations/devGetContents.graphql
index 030ab45..33070b0 100644
--- a/src/graphql/operations/devGetContents.graphql
+++ b/src/graphql/operations/devGetContents.graphql
@@ -24,6 +24,9 @@ query devGetContents {
language {
data {
id
+ attributes {
+ code
+ }
}
}
title
@@ -32,6 +35,9 @@ query devGetContents {
source_language {
data {
id
+ attributes {
+ code
+ }
}
}
status
diff --git a/src/helpers/types/Report.ts b/src/helpers/types/Report.ts
new file mode 100644
index 0000000..07a5816
--- /dev/null
+++ b/src/helpers/types/Report.ts
@@ -0,0 +1,23 @@
+export type Report = {
+ title: string;
+ lines: ReportLine[];
+};
+
+export type ReportLine = {
+ subitems: string[];
+ name: string;
+ type: "Error" | "Improvement" | "Missing";
+ severity: Severity;
+ description: string;
+ recommandation: string;
+ backendUrl: string;
+ frontendUrl: string;
+};
+
+export enum Severity {
+ VeryLow = 0,
+ Low = 1,
+ Medium = 2,
+ High = 3,
+ VeryHigh = 4,
+}
diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx
index a2d616e..1d7d149 100644
--- a/src/pages/contents/index.tsx
+++ b/src/pages/contents/index.tsx
@@ -271,7 +271,7 @@ const Contents = ({
keepInfoVisible={keepInfoVisible}
/>
)}
- className="grid-cols-2 items-end desktop:grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))]"
+ className="grid-cols-2 desktop:grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))]"
groupingFunction={groupingFunction}
filteringFunction={filteringFunction}
searchingTerm={searchName}
diff --git a/src/pages/dev/checkup/contents.tsx b/src/pages/dev/checkup/contents.tsx
index b9a0667..20d953d 100644
--- a/src/pages/dev/checkup/contents.tsx
+++ b/src/pages/dev/checkup/contents.tsx
@@ -12,6 +12,7 @@ import { DevGetContentsQuery } from "graphql/generated";
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { filterDefined, filterHasAttributes } from "helpers/others";
+import { Report, Severity } from "helpers/types/Report";
/*
* ╭────────╮
@@ -23,7 +24,7 @@ interface Props extends AppStaticProps {
}
const CheckupContents = ({ contents, ...otherProps }: Props): JSX.Element => {
- const testReport = testingContent(contents);
+ const testReport = useMemo(() => testingContent(contents), [contents]);
const contentPanel = useMemo(
() => (
@@ -40,44 +41,47 @@ const CheckupContents = ({ contents, ...otherProps }: Props): JSX.Element => {
Description
- {testReport.lines.map((line, index) => (
-
-
-
-
{line.subitems.join(" -> ")}
-
{line.name}
-
-
-
- {line.description}
-
-
- ))}
+ >
+
+
+ {line.subitems.join(" -> ")}
+ {line.name}
+
+
+
+ {line.description}
+
+
+ ))}
),
[testReport.lines, testReport.title]
@@ -115,22 +119,6 @@ export const getStaticProps: GetStaticProps = async (context) => {
* ─────────────────────────────────────╯ PRIVATE METHODS ╰───────────────────────────────────────
*/
-type Report = {
- title: string;
- lines: ReportLine[];
-};
-
-type ReportLine = {
- subitems: string[];
- name: string;
- type: "Error" | "Improvement" | "Missing";
- severity: "High" | "Low" | "Medium" | "Very High" | "Very Low";
- description: string;
- recommandation: string;
- backendUrl: string;
- frontendUrl: string;
-};
-
const testingContent = (contents: Props["contents"]): Report => {
const report: Report = {
title: "Contents",
@@ -147,7 +135,7 @@ const testingContent = (contents: Props["contents"]): Report => {
subitems: [content.attributes.slug],
name: "No Category",
type: "Missing",
- severity: "Medium",
+ severity: Severity.High,
description: "The Content has no Category.",
recommandation: "Select a Category in relation with the Content",
backendUrl: backendUrl,
@@ -158,9 +146,9 @@ const testingContent = (contents: Props["contents"]): Report => {
if (!content.attributes.type?.data?.id) {
report.lines.push({
subitems: [content.attributes.slug],
- name: "No Category",
+ name: "No Type",
type: "Missing",
- severity: "Medium",
+ severity: Severity.High,
description: "The Content has no Type.",
recommandation: 'If unsure, use the "Other" Type.',
backendUrl: backendUrl,
@@ -173,7 +161,7 @@ const testingContent = (contents: Props["contents"]): Report => {
subitems: [content.attributes.slug],
name: "No Ranged Content",
type: "Improvement",
- severity: "Low",
+ severity: Severity.Low,
description: "The Content has no Ranged Content.",
recommandation:
"If this Content is available in one or multiple Library Item(s), create a Range Content to connect the Content to its Library Item(s).",
@@ -187,7 +175,7 @@ const testingContent = (contents: Props["contents"]): Report => {
subitems: [content.attributes.slug],
name: "No Thumbnail",
type: "Missing",
- severity: "High",
+ severity: Severity.High,
description: "The Content has no Thumbnail.",
recommandation: "",
backendUrl: backendUrl,
@@ -200,7 +188,7 @@ const testingContent = (contents: Props["contents"]): Report => {
subitems: [content.attributes.slug],
name: "No Titles",
type: "Missing",
- severity: "High",
+ severity: Severity.High,
description: "The Content has no Titles.",
recommandation: "",
backendUrl: backendUrl,
@@ -209,248 +197,90 @@ const testingContent = (contents: Props["contents"]): Report => {
} else {
const titleLanguages: string[] = [];
- filterDefined(content.attributes.translations).map(
- (translation, titleIndex) => {
- if (translation.language?.data?.id) {
- if (translation.language.data.id in titleLanguages) {
+ if (
+ content.attributes.translations &&
+ content.attributes.translations.length > 0
+ ) {
+ filterDefined(content.attributes.translations).map(
+ (translation, titleIndex) => {
+ if (translation.language?.data?.id) {
+ if (translation.language.data.id in titleLanguages) {
+ report.lines.push({
+ subitems: [
+ content.attributes.slug,
+ `Title ${titleIndex.toString()}`,
+ ],
+ name: "Duplicate Language",
+ type: "Error",
+ severity: Severity.High,
+ description: "",
+ recommandation: "",
+ backendUrl: backendUrl,
+ frontendUrl: frontendUrl,
+ });
+ } else {
+ titleLanguages.push(translation.language.data.id);
+ }
+ } else {
report.lines.push({
subitems: [
content.attributes.slug,
`Title ${titleIndex.toString()}`,
],
- name: "Duplicate Language",
+ name: "No Language",
type: "Error",
- severity: "High",
+ severity: Severity.VeryHigh,
+ description: "",
+ recommandation: "",
+ backendUrl: backendUrl,
+ frontendUrl: frontendUrl,
+ });
+ }
+ if (!translation.description) {
+ report.lines.push({
+ subitems: [
+ content.attributes.slug,
+ `Title ${titleIndex.toString()}`,
+ ],
+ name: "No Description",
+ type: "Missing",
+ severity: Severity.Medium,
description: "",
recommandation: "",
backendUrl: backendUrl,
frontendUrl: frontendUrl,
});
- } else {
- titleLanguages.push(translation.language.data.id);
}
- } else {
- report.lines.push({
- subitems: [
- content.attributes.slug,
- `Title ${titleIndex.toString()}`,
- ],
- name: "No Language",
- type: "Error",
- severity: "Very High",
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!translation.description) {
- report.lines.push({
- subitems: [
- content.attributes.slug,
- `Title ${titleIndex.toString()}`,
- ],
- name: "No Description",
- type: "Missing",
- severity: "Medium",
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (translation.text_set) {
- report.lines.push({
- subitems: [content.attributes.slug],
- name: "No Text Set",
- type: "Missing",
- severity: "Medium",
- description: "The Content has no Text Set.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- } else {
- /*
- *const textSetLanguages: string[] = [];
- *if (content.attributes && textSet) {
- * if (textSet.language?.data?.id) {
- * if (textSet.language.data.id in textSetLanguages) {
- * report.lines.push({
- * subitems: [
- * content.attributes.slug,
- * `TextSet ${textSetIndex.toString()}`,
- * ],
- * name: "Duplicate Language",
- * type: "Error",
- * severity: "High",
- * description: "",
- * recommandation: "",
- * backendUrl: backendUrl,
- * frontendUrl: frontendUrl,
- * });
- * } else {
- * textSetLanguages.push(textSet.language.data.id);
- * }
- * } else {
- * report.lines.push({
- * subitems: [
- * content.attributes.slug,
- * `TextSet ${textSetIndex.toString()}`,
- * ],
- * name: "No Language",
- * type: "Error",
- * severity: "Very High",
- * description: "",
- * recommandation: "",
- * backendUrl: backendUrl,
- * frontendUrl: frontendUrl,
- * });
- * }
- *
- * if (!textSet.source_language?.data?.id) {
- * report.lines.push({
- * subitems: [
- * content.attributes.slug,
- * `TextSet ${textSetIndex.toString()}`,
- * ],
- * name: "No Source Language",
- * type: "Error",
- * severity: "High",
- * description: "",
- * recommandation: "",
- * backendUrl: backendUrl,
- * frontendUrl: frontendUrl,
- * });
- * }
- *
- * if (textSet.status !== Enum_Componentsetstextset_Status.Done) {
- * report.lines.push({
- * subitems: [
- * content.attributes.slug,
- * `TextSet ${textSetIndex.toString()}`,
- * ],
- * name: "Not Done Status",
- * type: "Improvement",
- * severity: "Low",
- * description: "",
- * recommandation: "",
- * backendUrl: backendUrl,
- * frontendUrl: frontendUrl,
- * });
- * }
- *
- * if (!textSet.text || textSet.text.length < 10) {
- * report.lines.push({
- * subitems: [
- * content.attributes.slug,
- * `TextSet ${textSetIndex.toString()}`,
- * ],
- * name: "No Text",
- * type: "Missing",
- * severity: "Medium",
- * description: "",
- * recommandation: "",
- * backendUrl: backendUrl,
- * frontendUrl: frontendUrl,
- * });
- * }
- *
- * if (
- * textSet.source_language?.data?.id ===
- * textSet.language?.data?.id
- * ) {
- * if (textSet.transcribers?.data.length === 0) {
- * report.lines.push({
- * subitems: [
- * content.attributes.slug,
- * `TextSet ${textSetIndex.toString()}`,
- * ],
- * name: "No Transcribers",
- * type: "Missing",
- * severity: "High",
- * description:
- * "The Content is a Transcription but doesn't credit any Transcribers.",
- * recommandation: "Add the appropriate Transcribers.",
- * backendUrl: backendUrl,
- * frontendUrl: frontendUrl,
- * });
- * }
- * if (
- * textSet.translators?.data &&
- * textSet.translators.data.length > 0
- * ) {
- * report.lines.push({
- * subitems: [
- * content.attributes.slug,
- * `TextSet ${textSetIndex.toString()}`,
- * ],
- * name: "Credited Translators",
- * type: "Error",
- * severity: "High",
- * description:
- * "The Content is a Transcription but credits one or more Translators.",
- * recommandation:
- * "If appropriate, create a Translation Text Set with the Translator credited there.",
- * backendUrl: backendUrl,
- * frontendUrl: frontendUrl,
- * });
- * }
- * } else {
- * if (textSet.translators?.data.length === 0) {
- * report.lines.push({
- * subitems: [
- * content.attributes.slug,
- * `TextSet ${textSetIndex.toString()}`,
- * ],
- * name: "No Translators",
- * type: "Missing",
- * severity: "High",
- * description:
- * "The Content is a Transcription but doesn't credit any Translators.",
- * recommandation: "Add the appropriate Translators.",
- * backendUrl: backendUrl,
- * frontendUrl: frontendUrl,
- * });
- * }
- * if (
- * textSet.transcribers?.data &&
- * textSet.transcribers.data.length > 0
- * ) {
- * report.lines.push({
- * subitems: [
- * content.attributes.slug,
- * `TextSet ${textSetIndex.toString()}`,
- * ],
- * name: "Credited Transcribers",
- * type: "Error",
- * severity: "High",
- * description:
- * "The Content is a Translation but credits one or more Transcribers.",
- * recommandation:
- * "If appropriate, create a Transcription Text Set with the Transcribers credited there.",
- * backendUrl: backendUrl,
- * frontendUrl: frontendUrl,
- * });
- * }
- * }
- *}
- */
+ if (!translation.text_set) {
+ report.lines.push({
+ subitems: [
+ content.attributes.slug,
+ translation.language?.data?.attributes?.code ?? "",
+ ],
+ name: "No Text Set",
+ type: "Missing",
+ severity: Severity.High,
+ description: "The Content has no Text Set.",
+ recommandation: "",
+ backendUrl: backendUrl,
+ frontendUrl: frontendUrl,
+ });
+ }
}
-
- report.lines.push({
- subitems: [content.attributes.slug],
- name: "No Sets",
- type: "Missing",
- severity: "Medium",
- description: "The Content has no Sets.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- );
+ );
+ } else {
+ report.lines.push({
+ subitems: [content.attributes.slug],
+ name: "No Translations",
+ type: "Missing",
+ severity: Severity.High,
+ description: "The Content has no Translations.",
+ recommandation: "",
+ backendUrl: backendUrl,
+ frontendUrl: frontendUrl,
+ });
+ }
}
}
);
diff --git a/src/pages/dev/checkup/libraryitems.tsx b/src/pages/dev/checkup/libraryitems.tsx
index e747cfe..d88d689 100644
--- a/src/pages/dev/checkup/libraryitems.tsx
+++ b/src/pages/dev/checkup/libraryitems.tsx
@@ -14,6 +14,7 @@ import {
} from "graphql/generated";
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
+import { Report, Severity } from "helpers/types/Report";
/*
* ╭────────╮
@@ -45,44 +46,47 @@ const CheckupLibraryItems = ({
Description
- {testReport.lines.map((line, index) => (
-
-
-
-
{line.subitems.join(" -> ")}
-
{line.name}
-
-
-
- {line.description}
-
-
- ))}
+ >
+
+
+ {line.subitems.join(" -> ")}
+ {line.name}
+
+
+
+ {line.description}
+
+
+ ))}
),
[testReport.lines, testReport.title]
@@ -120,22 +124,6 @@ export const getStaticProps: GetStaticProps = async (context) => {
* ─────────────────────────────────────╯ PRIVATE METHODS ╰───────────────────────────────────────
*/
-type Report = {
- title: string;
- lines: ReportLine[];
-};
-
-type ReportLine = {
- subitems: string[];
- name: string;
- type: "Error" | "Improvement" | "Missing";
- severity: "High" | "Low" | "Medium" | "Very High" | "Very Low";
- description: string;
- recommandation: string;
- backendUrl: string;
- frontendUrl: string;
-};
-
const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
const report: Report = {
title: "Contents",
@@ -152,7 +140,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug],
name: "No Category",
type: "Missing",
- severity: "Medium",
+ severity: Severity.High,
description: "The Item has no Category.",
recommandation: "Select a Category in relation with the Item",
backendUrl: backendUrl,
@@ -168,7 +156,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug],
name: "Disconnected Item",
type: "Error",
- severity: "Very High",
+ severity: Severity.VeryHigh,
description:
"The Item is neither a Root Item, nor is it a subitem of another item.",
recommandation: "",
@@ -182,7 +170,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug],
name: "No Contents",
type: "Missing",
- severity: "Low",
+ severity: Severity.Low,
description: "The Item has no Contents.",
recommandation: "",
backendUrl: backendUrl,
@@ -195,7 +183,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug],
name: "No Thumbnail",
type: "Missing",
- severity: "High",
+ severity: Severity.High,
description: "The Item has no Thumbnail.",
recommandation: "",
backendUrl: backendUrl,
@@ -208,7 +196,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug],
name: "No Images",
type: "Missing",
- severity: "Low",
+ severity: Severity.Low,
description: "The Item has no Images.",
recommandation: "",
backendUrl: backendUrl,
@@ -228,7 +216,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "Duplicate Language",
type: "Error",
- severity: "High",
+ severity: Severity.High,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -245,7 +233,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Language",
type: "Error",
- severity: "Very High",
+ severity: Severity.VeryHigh,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -261,7 +249,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Source Language",
type: "Error",
- severity: "Very High",
+ severity: Severity.VeryHigh,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -280,7 +268,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "Not Done Status",
type: "Improvement",
- severity: "Low",
+ severity: Severity.Low,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -297,7 +285,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Scanners",
type: "Missing",
- severity: "High",
+ severity: Severity.High,
description:
"The Item is a Scan but doesn't credit any Scanners.",
recommandation: "Add the appropriate Scanners.",
@@ -313,7 +301,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Cleaners",
type: "Missing",
- severity: "High",
+ severity: Severity.High,
description:
"The Item is a Scan but doesn't credit any Cleaners.",
recommandation: "Add the appropriate Cleaners.",
@@ -332,7 +320,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "Credited Typesetters",
type: "Error",
- severity: "High",
+ severity: Severity.High,
description:
"The Item is a Scan but credits one or more Typesetters.",
recommandation:
@@ -350,7 +338,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Typesetters",
type: "Missing",
- severity: "High",
+ severity: Severity.High,
description:
"The Item is a Scanlation but doesn't credit any Typesetters.",
recommandation: "Add the appropriate Typesetters.",
@@ -366,7 +354,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "Credited Scanners",
type: "Error",
- severity: "High",
+ severity: Severity.High,
description:
"The Item is a Scanlation but credits one or more Scanners.",
recommandation:
@@ -387,7 +375,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Front",
type: "Missing",
- severity: "Very High",
+ severity: Severity.VeryHigh,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -403,7 +391,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No spine",
type: "Missing",
- severity: "Low",
+ severity: Severity.Low,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -419,7 +407,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Back",
type: "Missing",
- severity: "High",
+ severity: Severity.High,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -435,7 +423,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Full",
type: "Missing",
- severity: "Low",
+ severity: Severity.Low,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -450,7 +438,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Cover",
type: "Missing",
- severity: "Medium",
+ severity: Severity.Medium,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -468,7 +456,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Front",
type: "Missing",
- severity: "Very High",
+ severity: Severity.VeryHigh,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -484,7 +472,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No spine",
type: "Missing",
- severity: "Low",
+ severity: Severity.Low,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -500,7 +488,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Back",
type: "Missing",
- severity: "High",
+ severity: Severity.High,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -516,7 +504,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Full",
type: "Missing",
- severity: "Low",
+ severity: Severity.Low,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -532,7 +520,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Flap Front",
type: "Missing",
- severity: "Medium",
+ severity: Severity.Medium,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -548,7 +536,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Flap Back",
type: "Missing",
- severity: "Medium",
+ severity: Severity.Medium,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -563,7 +551,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Dust Jacket",
type: "Missing",
- severity: "Very Low",
+ severity: Severity.VeryLow,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -581,7 +569,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Front",
type: "Missing",
- severity: "Very High",
+ severity: Severity.VeryHigh,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -597,7 +585,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No spine",
type: "Missing",
- severity: "Low",
+ severity: Severity.Low,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -613,7 +601,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Back",
type: "Missing",
- severity: "High",
+ severity: Severity.High,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -629,7 +617,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Full",
type: "Missing",
- severity: "Low",
+ severity: Severity.Low,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -645,7 +633,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Flap Front",
type: "Missing",
- severity: "Medium",
+ severity: Severity.Medium,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -661,7 +649,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Flap Back",
type: "Missing",
- severity: "Medium",
+ severity: Severity.Medium,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -676,7 +664,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Obi Belt",
type: "Missing",
- severity: "Very Low",
+ severity: Severity.VeryLow,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -703,7 +691,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Text",
type: "Missing",
- severity: "Very High",
+ severity: Severity.VeryHigh,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -720,7 +708,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "Duplicate Language",
type: "Error",
- severity: "High",
+ severity: Severity.High,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -737,7 +725,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
],
name: "No Language",
type: "Error",
- severity: "Very High",
+ severity: Severity.VeryHigh,
description: "",
recommandation: "",
backendUrl: backendUrl,
@@ -751,7 +739,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug],
name: "No Description",
type: "Missing",
- severity: "Medium",
+ severity: Severity.Medium,
description: "The Item has no Description.",
recommandation: "",
backendUrl: backendUrl,
@@ -764,7 +752,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug],
name: "No URLs",
type: "Missing",
- severity: "Very Low",
+ severity: Severity.VeryLow,
description: "The Item has no URLs.",
recommandation: "",
backendUrl: backendUrl,
diff --git a/src/pages/dev/editor.tsx b/src/pages/dev/editor.tsx
index 4ae0c4f..7988ffe 100644
--- a/src/pages/dev/editor.tsx
+++ b/src/pages/dev/editor.tsx
@@ -407,7 +407,7 @@ const Editor = ({ langui, ...otherProps }: Props): JSX.Element => {
Player’s name placeholder
}
>
-