- Оценить волонтера
+ Оценить Заявителя
{[1, 2, 3, 4, 5].map((star) => (
diff --git a/app/context/AuthContext.jsx b/app/context/AuthContext.jsx
index ae31e91..10862aa 100644
--- a/app/context/AuthContext.jsx
+++ b/app/context/AuthContext.jsx
@@ -66,7 +66,7 @@ export const AuthProvider = ({ children }) => {
// после логина перенаправляем на стартовую страницу по роли
if (found.role === "user") router.push("/home");
if (found.role === "volunteer") router.push("/mainValounter");
- if (found.role === "moderator") router.push("/mainModerator");
+ if (found.role === "moderator") router.push("/moderatorMain");
};
const logout = () => {
diff --git a/app/moderatorHistoryRequest/page.jsx b/app/moderatorHistoryRequest/page.jsx
new file mode 100644
index 0000000..943f621
--- /dev/null
+++ b/app/moderatorHistoryRequest/page.jsx
@@ -0,0 +1,158 @@
+"use client";
+
+import React, { useState } from "react";
+import { FaBell, FaUser } from "react-icons/fa";
+import TabBar from "../components/TabBar";
+import ModeratorRequestModal from "../components/ModeratorRequestDetailsModal";
+
+// история для модератора: только Принята / Отклонена
+const requests = [
+ {
+ id: 1,
+ title: "Приобрести продукты пенсионерке",
+ status: "Принята",
+ statusColor: "#94E067",
+ date: "28.11.2025",
+ time: "13:00",
+ createdAt: "28.11.2025",
+ fullName: "Клавдия Березова",
+ address: "г. Пермь, ул. Ленина 50",
+ description: "Купить продукты и принести по указанному адресу.",
+ },
+ {
+ id: 2,
+ title: "Приобрести медикаменты",
+ status: "Отклонена",
+ statusColor: "#E06767",
+ date: "27.11.2025",
+ time: "15:30",
+ createdAt: "27.11.2025",
+ fullName: "Иванова Анна Петровна",
+ address: "г. Пермь, ул. Пушкина 24",
+ description: "Приобрести необходимые лекарства в ближайшей аптеке.",
+ },
+ {
+ id: 3,
+ title: "Сопроводить до поликлиники",
+ status: "Принята",
+ statusColor: "#94E067",
+ date: "26.11.2025",
+ time: "10:00",
+ createdAt: "26.11.2025",
+ fullName: "Сидоров Николай",
+ address: "г. Пермь, ул. Куйбышева 95",
+ description: "Помочь добраться до поликлиники и обратно.",
+ },
+];
+
+const HistoryRequestModeratorPage = () => {
+ const [selectedRequest, setSelectedRequest] = useState(null);
+
+ const handleOpen = (req) => {
+ setSelectedRequest(req);
+ };
+
+ const handleClose = () => {
+ setSelectedRequest(null);
+ };
+
+ const handleApprove = (req) => {
+ console.log("Подтверждение принятой заявки (история):", req.id);
+ };
+
+ const handleReject = ({ request, reason }) => {
+ console.log("Просмотр отклонённой заявки (история):", request.id, reason);
+ };
+
+ return (
+
+
+ {/* Header */}
+
+
+
+ История заявок
+
+
+ {/* Список заявок */}
+
+ {requests.map((req) => (
+ handleOpen(req)}
+ className="w-full text-left bg-white rounded-xl px-3 py-2 flex flex-col gap-1"
+ >
+ {/* верхняя строка: статус + дата/время */}
+
+
+ {req.status}
+
+
+
+ {req.date}
+
+
+ {req.time}
+
+
+
+
+ {/* Заголовок заявки */}
+
+ {req.title}
+
+
+ {/* Краткое ФИО/адрес */}
+
+ {req.fullName}
+
+
+ {req.address}
+
+
+ {/* Кнопка "Развернуть" */}
+
+
+ Развернуть
+
+
+
+ ))}
+
+
+ {/* Попап модератора */}
+ {selectedRequest && (
+
+ )}
+
+
+
+
+ );
+};
+
+export default HistoryRequestModeratorPage;
diff --git a/app/moderatorMain/page.jsx b/app/moderatorMain/page.jsx
new file mode 100644
index 0000000..bd73e72
--- /dev/null
+++ b/app/moderatorMain/page.jsx
@@ -0,0 +1,238 @@
+"use client";
+
+import React, { useState } from "react";
+import { FaBell, FaUser, FaStar } from "react-icons/fa";
+import TabBar from "../components/TabBar";
+import RequestDetailsModal from "../components/ModeratorRequestDetailsModal";
+
+const requests = [
+ {
+ id: 1,
+ title: "Приобрести продукты пенсионерке",
+ status: "На модерации",
+ statusColor: "#E9D171",
+ date: "До 28.11.2025",
+ time: "13:00",
+ createdAt: "28.11.2025",
+ description: "Купить продукты и принести по адресу.",
+ },
+ {
+ id: 2,
+ title: "Приобрести продукты пенсионерке",
+ status: "На модерации",
+ statusColor: "#E9D171",
+ date: "До 28.11.2025",
+ time: "13:00",
+ createdAt: "28.11.2025",
+ description: "Купить продукты и принести по адресу.",
+ },
+ {
+ id: 3,
+ title: "Приобрести продукты пенсионерке",
+ status: "На модерации",
+ statusColor: "#E9D171",
+ date: "До 28.11.2025",
+ time: "13:00",
+ createdAt: "28.11.2025",
+ description: "Купить продукты и принести по адресу.",
+ },
+ {
+ id: 4,
+ title: "Приобрести продукты пенсионерке",
+ status: "На модерации",
+ statusColor: "#E9D171",
+ date: "До 28.11.2025",
+ time: "13:00",
+ createdAt: "28.11.2025",
+ description: "Купить продукты и принести по адресу.",
+ },
+ {
+ id: 5,
+ title: "Приобрести продукты пенсионерке",
+ status: "На модерации",
+ statusColor: "#E9D171",
+ date: "До 28.11.2025",
+ time: "13:00",
+ createdAt: "28.11.2025",
+ description: "Купить продукты и принести по адресу.",
+ }
+];
+
+const HistoryRequestPage = () => {
+ const [selectedRequest, setSelectedRequest] = useState(null);
+
+ const handleOpen = (req) => {
+ setSelectedRequest(req);
+ };
+
+ const handleClose = () => {
+ setSelectedRequest(null);
+ };
+
+ return (
+
+
+ {/* Header */}
+
+
+
+ История заявок
+
+
+ {/* Список заявок */}
+
+ {requests.map((req) => (
+ handleOpen(req)}
+ className="w-full text-left bg-white rounded-xl px-3 py-2 flex flex-col gap-1"
+ >
+ {/* верхняя строка: статус + дата/время */}
+
+
+ {req.status}
+
+
+
+ {req.date}
+
+
+ {req.time}
+
+
+
+
+ {/* Заголовок заявки */}
+
+ {req.title}
+
+
+ {/* Кнопка "Развернуть" */}
+
+
+ Развернуть
+
+
+
+ ))}
+
+
+ {/* Попап */}
+ {selectedRequest && (
+
+ )}
+
+
+
+
+ );
+};
+
+export default HistoryRequestPage;
+
+// const RequestDetailsModal = ({ request, onClose }) => {
+// const isDone = request.status === "Выполнена";
+
+// return (
+//
+//
+// {/* Белая карточка */}
+//
+// {/* Шапка попапа */}
+//
+//
+// ←
+//
+//
+// Заявка от {request.createdAt}
+//
+//
+//
+
+// {/* Статус + срок */}
+//
+//
+// Выполнена
+//
+//
+//
+// До {request.date.replace("До ", "")}
+//
+//
+// {request.time}
+//
+//
+//
+
+// {/* Название задачи */}
+//
+// {request.title}
+//
+
+// {/* Блок отзыва */}
+// {isDone && (
+//
+//
+// Отзыв
+//
+//
+// Здесь будет текст отзыва с бэка.
+//
+//
+// )}
+
+// {/* Оценка волонтера */}
+//
+//
+// Оценить волонтера
+//
+//
+// {[1, 2, 3, 4, 5].map((star) => (
+//
+// ))}
+//
+//
+
+// {/* Кнопка оставить отзыв */}
+// {isDone && (
+//
+//
+// Оставить отзыв
+//
+//
+// )}
+//
+//
+//
+// );
+// };
+
diff --git a/app/moderatorProfilePage/page.jsx b/app/moderatorProfilePage/page.jsx
new file mode 100644
index 0000000..a97482d
--- /dev/null
+++ b/app/moderatorProfilePage/page.jsx
@@ -0,0 +1,109 @@
+"use client";
+
+import React from "react";
+import { useRouter } from "next/navigation";
+import { FaUserCircle, FaStar } from "react-icons/fa";
+import TabBar from "../components/TabBar";
+
+const ModeratorProfilePage = () => {
+ const router = useRouter();
+
+ const fullName = "Иванов Александр Сергеевич";
+ const birthDate = "12.03.1990";
+ const rating = 4.8;
+
+ return (
+
+
+ {/* Header с кнопкой назад и заголовком по центру */}
+
+ router.back()}
+ className="text-white w-8 h-8 rounded-full flex items-center justify-center text-lg"
+ >
+ ←
+
+
+ Профиль
+
+
+
+
+ {/* Карточка профиля */}
+
+ {/* Аватар */}
+
+
+ {/* ФИО и рейтинг */}
+
+ {/*
+ ФИО
+
*/}
+
+ {fullName}
+
+
+ {/* Рейтинг + звезды */}
+
+
+ Рейтинг: {rating.toFixed(1)}
+
+
+ {[1, 2, 3, 4, 5].map((star) => (
+
+ ))}
+
+
+
+
+ {/* Контакты и день рождения */}
+
+
+ Дата рождения: {birthDate}
+
+
+ Почта: example@mail.com
+
+
+ Телефон: +7 (900) 000-00-00
+
+
+
+ {/* Кнопки */}
+
+ router.push("/valounterProfileSettings")}
+ className="w-full bg-[#E0B267] rounded-full py-2 flex items-center justify-center"
+ >
+
+ Редактировать профиль
+
+
+
+
+ Выйти из аккаунта
+
+
+
+
+
+
+
+
+ );
+};
+
+export default ModeratorProfilePage;
diff --git a/app/moderatorProfileSettings/page.jsx b/app/moderatorProfileSettings/page.jsx
new file mode 100644
index 0000000..e2f4e58
--- /dev/null
+++ b/app/moderatorProfileSettings/page.jsx
@@ -0,0 +1,153 @@
+"use client";
+
+import React, { useState } from "react";
+import { useRouter } from "next/navigation";
+import { FaUserCircle } from "react-icons/fa";
+import TabBar from "../components/TabBar";
+
+const ValounterProfileSettingsPage = () => {
+ const router = useRouter();
+
+ const [avatarUrl, setAvatarUrl] = useState("");
+ const [fullName, setFullName] = useState("Иванов Александр Сергеевич");
+ const [birthDate, setBirthDate] = useState("1990-03-12");
+ const [email, setEmail] = useState("example@mail.com");
+ const [phone, setPhone] = useState("+7 (900) 000-00-00");
+
+ const handleSave = (e) => {
+ e.preventDefault();
+ console.log("Сохранить профиль:", {
+ avatarUrl,
+ fullName,
+ birthDate,
+ email,
+ phone,
+ });
+ // здесь будет запрос на бэк
+ };
+
+ return (
+
+
+ {/* Header */}
+
+ router.back()}
+ className="text-white w-8 h-8 rounded-full flex items-center justify-center text-lg"
+ >
+ ←
+
+
+ Настройки профиля
+
+
+
+
+ {/* Карточка настроек */}
+
+ {/* Аватар */}
+
+
+ {avatarUrl ? (
+ // eslint-disable-next-line @next/next/no-img-element
+
+ ) : (
+
+ )}
+
+
+ Загрузить аватар
+ {
+ const file = e.target.files?.[0];
+ if (!file) return;
+ const url = URL.createObjectURL(file);
+ setAvatarUrl(url);
+ }}
+ />
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default ValounterProfileSettingsPage;
diff --git a/app/valounterProfilePage/page.jsx b/app/valounterProfilePage/page.jsx
new file mode 100644
index 0000000..0791322
--- /dev/null
+++ b/app/valounterProfilePage/page.jsx
@@ -0,0 +1,109 @@
+"use client";
+
+import React from "react";
+import { useRouter } from "next/navigation";
+import { FaUserCircle, FaStar } from "react-icons/fa";
+import TabBar from "../components/TabBar";
+
+const ValounterProfilePage = () => {
+ const router = useRouter();
+
+ const fullName = "Иванов Александр Сергеевич";
+ const birthDate = "12.03.1990";
+ const rating = 4.8;
+
+ return (
+
+
+ {/* Header с кнопкой назад и заголовком по центру */}
+
+ router.back()}
+ className="text-white w-8 h-8 rounded-full flex items-center justify-center text-lg"
+ >
+ ←
+
+
+ Профиль
+
+
+
+
+ {/* Карточка профиля */}
+
+ {/* Аватар */}
+
+
+ {/* ФИО и рейтинг */}
+
+ {/*
+ ФИО
+
*/}
+
+ {fullName}
+
+
+ {/* Рейтинг + звезды */}
+
+
+ Рейтинг: {rating.toFixed(1)}
+
+
+ {[1, 2, 3, 4, 5].map((star) => (
+
+ ))}
+
+
+
+
+ {/* Контакты и день рождения */}
+
+
+ Дата рождения: {birthDate}
+
+
+ Почта: example@mail.com
+
+
+ Телефон: +7 (900) 000-00-00
+
+
+
+ {/* Кнопки */}
+
+ router.push("/valounterProfileSettings")}
+ className="w-full bg-[#E0B267] rounded-full py-2 flex items-center justify-center"
+ >
+
+ Редактировать профиль
+
+
+
+
+ Выйти из аккаунта
+
+
+
+
+
+
+
+
+ );
+};
+
+export default ValounterProfilePage;
diff --git a/app/valounterProfileSettings/page.jsx b/app/valounterProfileSettings/page.jsx
new file mode 100644
index 0000000..e2f4e58
--- /dev/null
+++ b/app/valounterProfileSettings/page.jsx
@@ -0,0 +1,153 @@
+"use client";
+
+import React, { useState } from "react";
+import { useRouter } from "next/navigation";
+import { FaUserCircle } from "react-icons/fa";
+import TabBar from "../components/TabBar";
+
+const ValounterProfileSettingsPage = () => {
+ const router = useRouter();
+
+ const [avatarUrl, setAvatarUrl] = useState("");
+ const [fullName, setFullName] = useState("Иванов Александр Сергеевич");
+ const [birthDate, setBirthDate] = useState("1990-03-12");
+ const [email, setEmail] = useState("example@mail.com");
+ const [phone, setPhone] = useState("+7 (900) 000-00-00");
+
+ const handleSave = (e) => {
+ e.preventDefault();
+ console.log("Сохранить профиль:", {
+ avatarUrl,
+ fullName,
+ birthDate,
+ email,
+ phone,
+ });
+ // здесь будет запрос на бэк
+ };
+
+ return (
+
+
+ {/* Header */}
+
+ router.back()}
+ className="text-white w-8 h-8 rounded-full flex items-center justify-center text-lg"
+ >
+ ←
+
+
+ Настройки профиля
+
+
+
+
+ {/* Карточка настроек */}
+
+ {/* Аватар */}
+
+
+ {avatarUrl ? (
+ // eslint-disable-next-line @next/next/no-img-element
+
+ ) : (
+
+ )}
+
+
+ Загрузить аватар
+ {
+ const file = e.target.files?.[0];
+ if (!file) return;
+ const url = URL.createObjectURL(file);
+ setAvatarUrl(url);
+ }}
+ />
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default ValounterProfileSettingsPage;