Fix various components
This commit is contained in:
parent
0a68358aac
commit
1c1b5c71af
@ -127,7 +127,9 @@ export default function (props: AppealCardProps & { port?: MessagePort }) {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
<CardFooter pb="4px">
|
<CardFooter pb="4px">
|
||||||
<Box display={props.open ? undefined : "none"}>
|
<Box
|
||||||
|
display={typeof props.approved === "number" ? "none" : "undefined"}
|
||||||
|
>
|
||||||
<Button colorScheme="red" onClick={() => showModal("Deny")}>
|
<Button colorScheme="red" onClick={() => showModal("Deny")}>
|
||||||
Deny
|
Deny
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -94,11 +94,13 @@ export default function (
|
|||||||
</Text>
|
</Text>
|
||||||
</Box>
|
</Box>
|
||||||
) : null}
|
) : null}
|
||||||
{props.decisions ? (
|
{Object.keys(props.decisions as { [k: string]: boolean }).length ? (
|
||||||
<Box>
|
<Box>
|
||||||
<Heading size="xs">Decisions</Heading>
|
<Heading size="xs">Decisions</Heading>
|
||||||
<UnorderedList>
|
<UnorderedList>
|
||||||
{Object.entries(props.decisions).map(([dept, accepted]) => (
|
{Object.entries(
|
||||||
|
props.decisions as { [k: string]: boolean },
|
||||||
|
).map(([dept, accepted]) => (
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<Stack alignItems="center" direction="row">
|
<Stack alignItems="center" direction="row">
|
||||||
<Text>{dept}: </Text>
|
<Text>{dept}: </Text>
|
||||||
@ -111,7 +113,19 @@ export default function (
|
|||||||
) : null}
|
) : null}
|
||||||
</Stack>
|
</Stack>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
<CardFooter display={props.open ? undefined : "none"} pb="4px">
|
<CardFooter
|
||||||
|
display={
|
||||||
|
props.departments.length !==
|
||||||
|
Object.values(
|
||||||
|
props.decisions as {
|
||||||
|
[k: string]: boolean;
|
||||||
|
},
|
||||||
|
).length
|
||||||
|
? undefined
|
||||||
|
: "none"
|
||||||
|
}
|
||||||
|
pb="4px"
|
||||||
|
>
|
||||||
<Box>
|
<Box>
|
||||||
<Button
|
<Button
|
||||||
colorScheme="red"
|
colorScheme="red"
|
||||||
|
1
index.d.ts
vendored
1
index.d.ts
vendored
@ -20,6 +20,7 @@ declare global {
|
|||||||
type RequestContext = EventContext<Env, string, { [k: string]: any }>;
|
type RequestContext = EventContext<Env, string, { [k: string]: any }>;
|
||||||
|
|
||||||
interface AppealCardProps {
|
interface AppealCardProps {
|
||||||
|
approved: number | null;
|
||||||
ban_reason: string;
|
ban_reason: string;
|
||||||
created_at: number;
|
created_at: number;
|
||||||
id: string;
|
id: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user