fix: allow decimals for mmdx imports (HACK)

This commit is contained in:
zkldi
2022-12-26 16:07:01 +00:00
parent 8ca291e149
commit fecb3440a9
2 changed files with 19 additions and 13 deletions
@@ -88,7 +88,11 @@ function InnerShowRecentImports({ user }: { user: UserDocument }) {
return <Loading />;
}
if (data.length === 0) {
const filteredData = data.filter(
(e) => e.importType.startsWith("file/") || e.importType.startsWith("api/")
);
if (filteredData.length === 0) {
return null;
}
@@ -97,16 +101,12 @@ function InnerShowRecentImports({ user }: { user: UserDocument }) {
<h4>Recently Used Import Methods</h4>
<Divider />
<Row>
{data
.filter(
(e) => e.importType.startsWith("file/") || e.importType.startsWith("api/")
)
.map((e) => (
<ImportTypeInfoCard
key={e.importType}
importType={e.importType as FileUploadImportTypes | APIImportTypes}
/>
))}
{filteredData.map((e) => (
<ImportTypeInfoCard
key={e.importType}
importType={e.importType as FileUploadImportTypes | APIImportTypes}
/>
))}
</Row>
</>
);
+8 -2
View File
@@ -1296,8 +1296,14 @@ const PR_HIT_META = (game: Game): PrudenceSchema => {
const PR_BATCH_MANUAL_SCORE = (game: Game, playtype: Playtype): PrudenceSchema => {
const gptConfig = GetGamePTConfig(game, playtype);
const scoreChecker =
game === "itg" || game === "gitadora" ? p.isBetween(0, 100) : p.isPositiveInteger;
let scoreChecker: ValidSchemaValue = p.isPositiveInteger;
// DISGUSTING TEMPORARY HACK. NEEDS REFACTOR
if (game === "itg" || game === "gitadora") {
scoreChecker = p.isBetween(0, 100);
} else if (game === "maimaidx") {
scoreChecker = p.isBetween(0, 101);
}
return {
score: scoreChecker,