-
+
+ return (
+
+
+
+
+
+
+
+
+
-
-
{events.map((event) => (
-
- Название: {event.title}
- Дата: {event.updated_at}
- {/* Добавьте другие свойства вашего объекта, если они есть */}
-
- ))}
-
-
-
-
+
+
+ ))}
- )
+
+ )
}
export default AdminEventPage
diff --git a/frontend/src/components/pages/Main/Main.module.less b/frontend/src/components/pages/Main/Main.module.less
index 0d4107f..751f44a 100644
--- a/frontend/src/components/pages/Main/Main.module.less
+++ b/frontend/src/components/pages/Main/Main.module.less
@@ -1,21 +1,24 @@
.divv{
margin: 0;
}
+.novis{
+ opacity: 0;
+ visibility: hidden;
+}
.general-content{
margin-left: 20px;
display: flex;
- height: 90vh;
}
.general-left{
width: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
+ padding: 10px;
+ padding-top: 80px;
border-right-width: 1px;
}
.general-right{
+ padding-top: 80px;
margin-left: 20px;
+ width: 30%;
}
.input-form{
@@ -32,9 +35,24 @@
.title-form{
font-size: 30px;
}
+.card{
+ max-width: 800px;
+ padding: 20px;
+ margin-bottom: 10px;
+
+}
+.up{
+ display: flex;
+ flex-direction: column;
+}
+.header{
+ display: flex;
+ flex-direction: row;
+ justify-content:space-between;
+ padding: 0;
+}
@media (max-width: 820px) {
.general-left{
width: 100%;
}
}
-
diff --git a/frontend/src/components/pages/Main/Main.tsx b/frontend/src/components/pages/Main/Main.tsx
index 14e104c..cce580e 100644
--- a/frontend/src/components/pages/Main/Main.tsx
+++ b/frontend/src/components/pages/Main/Main.tsx
@@ -5,6 +5,13 @@ import { submitRegister } from "../../widgets/Header/AuthAPI";
import { Button } from "../../shared/ui/button";
import { Textarea } from "../../shared/ui/textarea";
import { Link, useNavigate } from "react-router-dom";
+import { useEffect, useState } from "react";
+import { deleteEvent, eventList } from "../AdminEventPage/AdminEventAPI";
+import VacancyCard from "../../entities/VacancyCard/VacancyCard";
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../../ui/card";
+import { TrashIcon } from "lucide-react";
+import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "../../shared/ui/dialog";
+import { t } from "i18next";
@@ -12,27 +19,66 @@ const Main = () => {
const { t } = useTranslation();
const navigate = useNavigate();
- return (
-
-
-
-
+ useEffect(() => {
+ eventList().then((data) => {
+ setEvents(data)
+ }).catch(error => {
+ console.error('Возникла ошибка с получением:', error)
+ })
+ }, []);
-
-
-
+return (
+
+
+ {events.map((event) => (
+
+
+
+ ))}
+
- )
+
+
+
+
+
+)
}
export default Main;
\ No newline at end of file
diff --git a/frontend/src/components/shared/ui/checkbox.tsx b/frontend/src/components/shared/ui/checkbox.tsx
new file mode 100644
index 0000000..48f2615
--- /dev/null
+++ b/frontend/src/components/shared/ui/checkbox.tsx
@@ -0,0 +1,30 @@
+"use client"
+
+import * as React from "react"
+import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
+import { CheckIcon } from "@radix-ui/react-icons"
+
+import { cn } from "../../../lib/utils"
+
+const Checkbox = React.forwardRef<
+ React.ElementRef
,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+
+
+
+
+))
+Checkbox.displayName = CheckboxPrimitive.Root.displayName
+
+export { Checkbox }
diff --git a/frontend/src/components/shared/ui/command.tsx b/frontend/src/components/shared/ui/command.tsx
new file mode 100644
index 0000000..3fb7292
--- /dev/null
+++ b/frontend/src/components/shared/ui/command.tsx
@@ -0,0 +1,155 @@
+"use client"
+
+import * as React from "react"
+import { type DialogProps } from "@radix-ui/react-dialog"
+import { MagnifyingGlassIcon } from "@radix-ui/react-icons"
+import { Command as CommandPrimitive } from "cmdk"
+
+import { cn } from "../../../lib/utils"
+import { Dialog, DialogContent } from "src/components/shared/ui/dialog"
+
+const Command = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+Command.displayName = CommandPrimitive.displayName
+
+interface CommandDialogProps extends DialogProps {}
+
+const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
+ return (
+
+ )
+}
+
+const CommandInput = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+
+
+
+))
+
+CommandInput.displayName = CommandPrimitive.Input.displayName
+
+const CommandList = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+
+CommandList.displayName = CommandPrimitive.List.displayName
+
+const CommandEmpty = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>((props, ref) => (
+
+))
+
+CommandEmpty.displayName = CommandPrimitive.Empty.displayName
+
+const CommandGroup = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+
+CommandGroup.displayName = CommandPrimitive.Group.displayName
+
+const CommandSeparator = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+CommandSeparator.displayName = CommandPrimitive.Separator.displayName
+
+const CommandItem = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+
+CommandItem.displayName = CommandPrimitive.Item.displayName
+
+const CommandShortcut = ({
+ className,
+ ...props
+}: React.HTMLAttributes) => {
+ return (
+
+ )
+}
+CommandShortcut.displayName = "CommandShortcut"
+
+export {
+ Command,
+ CommandDialog,
+ CommandInput,
+ CommandList,
+ CommandEmpty,
+ CommandGroup,
+ CommandItem,
+ CommandShortcut,
+ CommandSeparator,
+}
diff --git a/frontend/src/components/shared/ui/popover.tsx b/frontend/src/components/shared/ui/popover.tsx
new file mode 100644
index 0000000..d16230f
--- /dev/null
+++ b/frontend/src/components/shared/ui/popover.tsx
@@ -0,0 +1,33 @@
+"use client"
+
+import * as React from "react"
+import * as PopoverPrimitive from "@radix-ui/react-popover"
+
+import { cn } from "../../../lib/utils"
+
+const Popover = PopoverPrimitive.Root
+
+const PopoverTrigger = PopoverPrimitive.Trigger
+
+const PopoverAnchor = PopoverPrimitive.Anchor
+
+const PopoverContent = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
+
+
+
+))
+PopoverContent.displayName = PopoverPrimitive.Content.displayName
+
+export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }
diff --git a/frontend/src/components/widgets/Header/AuthAPI.ts b/frontend/src/components/widgets/Header/AuthAPI.ts
index 9508342..5a45ff8 100644
--- a/frontend/src/components/widgets/Header/AuthAPI.ts
+++ b/frontend/src/components/widgets/Header/AuthAPI.ts
@@ -1,6 +1,5 @@
import { FormEvent } from "react";
-import { API_BASE, API_CREATE_TOKEN, API_REG } from "../../app/APIurl";
-import { useNavigate } from 'react-router-dom';
+import { API_BASE, API_CREATE_TOKEN, API_USERS } from "../../app/APIurl";
//логин
export const submitLogin = (e: FormEvent) => {
@@ -42,8 +41,10 @@ export const submitRegister = (e: FormEvent, navigate: Function
e.preventDefault();
const formData = new FormData(e.currentTarget);
const formProps = Object.fromEntries(formData);
+ console.log(formProps)
- fetch(`${API_BASE}${API_REG}`, {
+
+ fetch(`${API_BASE}${API_USERS}`, {
method: "POST",
headers: {
"Content-Type": "application/json"
diff --git a/frontend/src/components/widgets/Header/Header.module.less b/frontend/src/components/widgets/Header/Header.module.less
index 896ff6e..2808aaa 100644
--- a/frontend/src/components/widgets/Header/Header.module.less
+++ b/frontend/src/components/widgets/Header/Header.module.less
@@ -6,6 +6,11 @@
align-items: center;
padding: 0px 32px;
width: 100%;
+ z-index: 999;
+ position: fixed;
+ width: 100%;
+ top: 0;
+ background-color: hsl(var(--background));
}