Add penis length and circumcision stats to performers. (#3627)

* Add penis length stat to performers.
* Modified the UI to display and edit the stat.
* Added the ability to filter floats to allow filtering by penis length.
* Add circumcision stat to performer.
* Refactor enum filtering
* Change boolean filter to radio buttons
* Return null for empty enum values
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
departure18
2023-05-24 04:19:35 +01:00
committed by GitHub
parent 58a6c22072
commit 776c7e6c35
52 changed files with 1051 additions and 184 deletions

View File

@@ -6,6 +6,7 @@ import {
getOperationName,
} from "@apollo/client/utilities";
import { stringToGender } from "src/utils/gender";
import { stringToCircumcised } from "src/utils/circumcised";
import { filterData } from "../utils/data";
import { ListFilterModel } from "../models/list-filter/filter";
import * as GQL from "./generated-graphql";
@@ -1314,6 +1315,10 @@ export const makePerformerCreateInput = (toCreate: GQL.ScrapedPerformer) => {
death_date: toCreate.death_date,
hair_color: toCreate.hair_color,
weight: toCreate.weight ? Number(toCreate.weight) : undefined,
penis_length: toCreate.penis_length
? Number(toCreate.penis_length)
: undefined,
circumcised: stringToCircumcised(toCreate.circumcised),
};
return input;
};