This commit is contained in:
2023-10-17 18:58:51 +05:00
parent 4c83933741
commit c5aa7bd524
15 changed files with 589 additions and 41 deletions
+25 -2
View File
@@ -20,6 +20,9 @@ import Button from "../components/Button";
import { ru } from "date-fns/locale";
import { Transition } from "react-transition-group";
import SpinnerIcon from "../components/icons/SpinnerIcon";
import useModalStore from "../stores/useModalStore";
import ModalContainer from "../components/ModalContainer";
import CreateSchedule from "../components/modals/CreateSchedule";
function DashboardPage() {
const [user, setAccessToken] = useAuthStore((state) => [
@@ -49,6 +52,7 @@ function DashboardPage() {
const [isLoadingScheduledSessions, setIsLoadingScheduledSessions] =
useState(true);
const scheduledSessionsRef = useRef<HTMLDivElement>(null);
const setModal = useModalStore((state) => state.setModal);
// const [selectedDate, setSelectedDate] = useState(
// format(new Date(), "d MMMM, yyyy", { locale: ru })
@@ -288,11 +292,13 @@ function DashboardPage() {
handleClick={selectPrevDay}
icon={<ChevronLeftIcon />}
color="secondary"
onlyIcon
/>
<Button
handleClick={selectNextDay}
icon={<ChevronRightIcon />}
color="secondary"
onlyIcon
/>
</div>
@@ -375,7 +381,6 @@ function DashboardPage() {
}}
manager={selectedManager}
managers={managers}
// managers={managers}
handleSelect={(scheduledSessionId, managerId) =>
updateScheduledSessionManager(
scheduledSessionId,
@@ -417,9 +422,27 @@ function DashboardPage() {
</button>
</div>
<div className="overflow-y-auto overflow-x-hidden">
<p className="p-4">...</p>
<div className="p-4">
<p className="text-sm font-semibold opacity-50">Календарь</p>
</div>
<div className="p-4 flex flex-col gap-4">
<p className="text-sm font-semibold">Расписание</p>
<div className=""></div>
<Button
color="secondary"
className="w-full"
handleClick={() => setModal(<CreateSchedule />)}
>
Добавить
</Button>
</div>
</div>
</div>
<ModalContainer />
</div>
);
}
+2 -2
View File
@@ -10,12 +10,12 @@ function RegistrationPage() {
<div className="flex flex-col gap-4">
<Link to="company">
<button className="h-[56px] px-6 py-4 rounded-lg border border-[#DAE0E5] text-[#77828C] text-left w-full">
<button className="h-[56px] px-6 py-4 rounded-lg border border-[#DAE0E5] hover:border-[#49A1F5] text-[#77828C] hover:text-[#111C26] text-left w-full transition-colors">
Я представитель компании
</button>
</Link>
<Link to="manager">
<button className="h-[56px] px-6 py-4 rounded-lg border border-[#DAE0E5] text-[#77828C] text-left w-full">
<button className="h-[56px] px-6 py-4 rounded-lg border border-[#DAE0E5] hover:border-[#49A1F5] text-[#77828C] hover:text-[#111C26] text-left w-full transition-colors">
Я менеджер отдела продаж
</button>
</Link>