ui
This commit is contained in:
@@ -68,11 +68,11 @@ const Main = () => {
|
||||
<CardContent className="p-0 mt-4">
|
||||
<p>{event.description}</p>
|
||||
</CardContent>
|
||||
<Dialog>
|
||||
<Dialog style={{ height: "fixed" }}>
|
||||
<DialogTrigger className="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2">
|
||||
{t("respondRequest")}
|
||||
</DialogTrigger>
|
||||
<DialogContent className={less["model-content"]}>
|
||||
<DialogContent className={"lg:max-w-screen-lg overflow-y-scroll max-h-screen"}>
|
||||
<DialogHeader>
|
||||
<DialogTitle>
|
||||
<h1 className={less["title-form"]}>{t("entrance")}</h1>
|
||||
|
||||
@@ -49,13 +49,14 @@ const SkillTree = () => {
|
||||
<div className={less["left"]}>
|
||||
<h2 className={less["h2"]}>Create event</h2>
|
||||
<form className={less["input-form"]} onSubmit={(event) => addEvent(event)}>
|
||||
<Input type="text" name="title" placeholder="Event name" />
|
||||
<Input type="text" name="description" placeholder="Last name" />
|
||||
<Input type="text" name="title" placeholder="Title" />
|
||||
<Input type="date" name="start_date" placeholder="Start date" />
|
||||
<Input type="date" name="end_date" placeholder="End date" />
|
||||
<Textarea name="description" placeholder="Description" />
|
||||
<Switch name="is_online"/>
|
||||
<Button>{t("buttonLoginInSystem")}</Button>
|
||||
<Textarea name="tree" placeholder="Graph" />
|
||||
<Switch name="is_online" id="is_online" />
|
||||
<Label htmlFor="is_online">Is online</Label>
|
||||
<Button>Create</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className={less["right"]}>
|
||||
|
||||
@@ -8,7 +8,7 @@ const Successful = () => {
|
||||
<svg className={less["icon"]} xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="100" height="100" viewBox="0 0 48 48">
|
||||
<linearGradient id="I9GV0SozQFknxHSR6DCx5a_70yRC8npwT3d_gr1" x1="9.858" x2="38.142" y1="9.858" y2="38.142" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#21ad64"></stop><stop offset="1" stop-color="#088242"></stop></linearGradient><path fill="url(#I9GV0SozQFknxHSR6DCx5a_70yRC8npwT3d_gr1)" d="M44,24c0,11.045-8.955,20-20,20S4,35.045,4,24S12.955,4,24,4S44,12.955,44,24z"></path><path d="M32.172,16.172L22,26.344l-5.172-5.172c-0.781-0.781-2.047-0.781-2.828,0l-1.414,1.414 c-0.781,0.781-0.781,2.047,0,2.828l8,8c0.781,0.781,2.047,0.781,2.828,0l13-13c0.781-0.781,0.781-2.047,0-2.828L35,16.172 C34.219,15.391,32.953,15.391,32.172,16.172z" opacity=".05"></path><path d="M20.939,33.061l-8-8c-0.586-0.586-0.586-1.536,0-2.121l1.414-1.414c0.586-0.586,1.536-0.586,2.121,0 L22,27.051l10.525-10.525c0.586-0.586,1.536-0.586,2.121,0l1.414,1.414c0.586,0.586,0.586,1.536,0,2.121l-13,13 C22.475,33.646,21.525,33.646,20.939,33.061z" opacity=".07"></path><path fill="#fff" d="M21.293,32.707l-8-8c-0.391-0.391-0.391-1.024,0-1.414l1.414-1.414c0.391-0.391,1.024-0.391,1.414,0 L22,27.758l10.879-10.879c0.391-0.391,1.024-0.391,1.414,0l1.414,1.414c0.391,0.391,0.391,1.024,0,1.414l-13,13 C22.317,33.098,21.683,33.098,21.293,32.707z"></path>
|
||||
</svg>
|
||||
<h2>Успешно, ожидайте ответа!</h2>
|
||||
<h2>Form successfully submitted!</h2>
|
||||
</article>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ export const addEvent = (e: FormEvent<HTMLFormElement>) => {
|
||||
const formData = new FormData(e.currentTarget);
|
||||
const formProps = Object.fromEntries(formData);
|
||||
console.log(formProps);
|
||||
formProps.tree = JSON.parse('{"name":"John", "age":30, "city":"New York"}');
|
||||
formProps.tree = JSON.parse(formProps.tree);
|
||||
|
||||
fetch(`${API_BASE}${API_EVENT}`, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user