2024-08-06 19:07:20 +00:00
|
|
|
import * as Yup from "yup";
|
|
|
|
|
|
2024-08-06 20:23:35 +00:00
|
|
|
type InputNames = "username" | "email" | "question" | "discord" | "pc_requirements" | "age" | "pronoun" | "join_date" |
|
|
|
|
|
"avg_time" | "available_days" | "available_time" | "staff_experience" | "plugin_experience" | "why_staff" |
|
|
|
|
|
"expectations_mod" | "other";
|
2024-08-06 19:07:20 +00:00
|
|
|
|
|
|
|
|
export interface Step {
|
|
|
|
|
label: string;
|
|
|
|
|
name: InputNames;
|
2024-08-06 20:23:35 +00:00
|
|
|
type: "text" | "email" | "textarea" | "date";
|
2024-08-06 19:07:20 +00:00
|
|
|
min_length: number;
|
|
|
|
|
max_length: number;
|
|
|
|
|
required: boolean;
|
2024-08-08 18:33:15 +00:00
|
|
|
additional_info?: string;
|
|
|
|
|
drop_down?: string[]
|
2024-08-06 19:07:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface UserInput {
|
|
|
|
|
[key: string]: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type FormData = {
|
|
|
|
|
steps: Step[];
|
|
|
|
|
backend: string;
|
|
|
|
|
userInput: UserInput;
|
2024-08-08 18:33:15 +00:00
|
|
|
spec: Yup.Schema<any>;
|
2024-08-06 22:41:11 +00:00
|
|
|
title: string;
|
2024-08-06 19:07:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface FormProperties {
|
|
|
|
|
path: string
|
|
|
|
|
formData: FormData;
|
|
|
|
|
}
|