refactor: update component props and styles across multiple modals and cards for consistency and improved readability
This commit is contained in:
@@ -40,13 +40,13 @@ function CurrentSessionModal({ session }: { session: Session }) {
|
||||
if (!session) return null;
|
||||
|
||||
return (
|
||||
<div className="w-[25vw] bg-[#FFFFFF] rounded-4xl px-[1.389vw] pb-[1.389vw]">
|
||||
<div className="w-[25vw] bg-[#FFFFFF] rounded-[2.222vw] px-[1.389vw] pb-[1.389vw]">
|
||||
<h2 className="title-s font-medium text-center py-[1.806vw]">
|
||||
Текущий сеанс
|
||||
</h2>
|
||||
<div className="flex flex-col gap-[1.667vw]">
|
||||
<div className="py-[1.389vw] flex gap-[0.833vw] border border-b-[#F6F6F6] border-t-0 border-r-0 border-l-0">
|
||||
<div className='size-[4.444vw] bg-[#F6F6F6] rounded-xl bg-[url("/images/super-table.png")] bg-no-repeat bg-[length:2.222vw] bg-center'></div>
|
||||
<div className='size-[4.444vw] bg-[#F6F6F6] rounded-[0.833vw] bg-[url("/images/super-table.png")] bg-no-repeat bg-[length:2.222vw] bg-center'></div>
|
||||
<div className="flex flex-col gap-[0.278vw] self-center ">
|
||||
<div className="flex gap-[0.278vw]">
|
||||
<p className="title-s font-medium">{session.server.name}</p>
|
||||
@@ -86,7 +86,7 @@ function CurrentSessionModal({ session }: { session: Session }) {
|
||||
<NewButton variant="secondary" className="w-full">
|
||||
<div className="flex flex-col gap-[0.278vw] w-full text-left h-[2.222vw]">
|
||||
<p className="caption-s font-medium text-[#BDBDBD]">Клиент</p>
|
||||
<p className="text-s font-medium">{session.client.fullname}</p>
|
||||
<p className="text-s font-medium">{session.client.name}</p>
|
||||
</div>
|
||||
<div className="flex gap-[0.556vw] items-center">
|
||||
{!session.client.email && (
|
||||
|
||||
@@ -29,10 +29,10 @@ function EditTable({ table }: { table: Server }) {
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="bg-[#F0F0F0] rounded-4xl w-[25vw] flex flex-col justify-center items-center">
|
||||
<div className="bg-[#F0F0F0] rounded-[2.222vw] w-[25vw] flex flex-col justify-center items-center">
|
||||
<h3 className="title-s font-medium py-[1.806vw]">Редактирование стола</h3>
|
||||
<div className="bg-[url(/images/Table.png)] bg-no-repeat bg-contain bg-center w-full h-[6.944vw]"></div>
|
||||
<div className="bg-[#FFFFFF] w-full rounded-4xl p-[1.389vw] flex flex-col gap-[0.833vw]">
|
||||
<div className="bg-[#FFFFFF] w-full rounded-[2.222vw] p-[1.389vw] flex flex-col gap-[0.833vw]">
|
||||
<div className="space-y-[0.556vw]">
|
||||
<NewInput
|
||||
placeholder="Название стола*"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import useModalStore from "../../stores/useModalStore";
|
||||
import { ISession } from "../../types/ISession";
|
||||
import { Session } from "../../types/ISession";
|
||||
import NewButton from "../NewButton";
|
||||
import CurrentSessionModal from "./CurrentSessionModal";
|
||||
import api from "../../utils/api";
|
||||
import SpinIcon from "../icons/SpinIcon";
|
||||
|
||||
function EndSessionModal({ session }: { session: ISession }) {
|
||||
function EndSessionModal({ session }: { session: Session }) {
|
||||
const queryClient = useQueryClient();
|
||||
const { setModal } = useModalStore();
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@ import SessionComments from "../SessionComments";
|
||||
|
||||
function SessionModal({ session }: { session: Session }) {
|
||||
return (
|
||||
<div className="bg-[#FFFFFF] w-[49.722vw] rounded-4xl">
|
||||
<div className="bg-[#FFFFFF] w-[49.722vw] rounded-[2.222vw]">
|
||||
<div className="w-full flex justify-center items-center h-[4.861vw]">
|
||||
<div className="title-s flex font-medium">
|
||||
<p>{format(session.createdAt, "dd MMMM yyyy", { locale: ru })}</p>
|
||||
<p>, {format(session.createdAt, "HH:mm")}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-[#F0F0F0] flex h-[calc(100vh-8.861vw)] overflow-hidden rounded-b-4xl">
|
||||
<div className="bg-[#F0F0F0] flex h-[calc(100vh-8.861vw)] overflow-hidden rounded-b-[2.222vw]">
|
||||
<div className="flex-1 flex flex-col gap-[0.833vw] px-[1.111vw] overflow-y-auto pr-[0.556vw] pb-[1.111vw] [scrollbar-width:thin]">
|
||||
<div className="flex flex-col gap-[0.556vw] justify-center items-center pt-[1.111vw]">
|
||||
<div className="size-[3.333vw] rounded-full bg-white"></div>
|
||||
@@ -32,7 +32,7 @@ function SessionModal({ session }: { session: Session }) {
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col gap-[1.111vw] bg-white rounded-3xl p-[1.111vw]">
|
||||
<div className="flex flex-col gap-[1.111vw] bg-white rounded-[1.667vw] p-[1.111vw]">
|
||||
<h3 className="title-s font-medium">Информация о сеансе</h3>
|
||||
<div className="flex flex-col gap-[0.556vw]">
|
||||
<p className="flex gap-[0.556vw]">
|
||||
@@ -68,7 +68,7 @@ function SessionModal({ session }: { session: Session }) {
|
||||
</div>
|
||||
<ClientCard client={session.client} />
|
||||
</div>
|
||||
<div className="flex flex-col gap-[1.111vw] bg-white rounded-3xl p-[1.111vw]">
|
||||
<div className="flex flex-col gap-[1.111vw] bg-white rounded-[1.667vw] p-[1.111vw]">
|
||||
<h3 className="title-s flex font-medium">
|
||||
Речевая
|
||||
<span className="text-[#7B60F3] flex">
|
||||
@@ -94,7 +94,7 @@ function SessionModal({ session }: { session: Session }) {
|
||||
<span className="caption-s font-medium">8 500 000 ₽</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="bg-[#F6F6F6] rounded-xl px-[1.111vw] py-[0.833vw] text-xs tracking-[-0.02em] leading-[110%]">
|
||||
<div className="bg-[#F6F6F6] rounded-[0.833vw] px-[1.111vw] py-[0.833vw] text-xs tracking-[-0.02em] leading-[110%]">
|
||||
Клиент проявил высокий интерес к объекту, особенно к варианту с
|
||||
улучшенной отделкой. Основной вопрос для принятия решения —
|
||||
согласование с семьей и выбор этажа. Необходимо подготовить
|
||||
@@ -107,7 +107,7 @@ function SessionModal({ session }: { session: Session }) {
|
||||
</span>
|
||||
</NewButton>
|
||||
</div>
|
||||
<div className="flex flex-col gap-[1.111vw] bg-white rounded-3xl p-[1.111vw]">
|
||||
<div className="flex flex-col gap-[1.111vw] bg-white rounded-[1.667vw] p-[1.111vw]">
|
||||
<h3 className="title-s flex items-center font-medium gap-[0.556vw]">
|
||||
<span>Документы по сеансу</span> <Badge count={4} />
|
||||
</h3>
|
||||
|
||||
Reference in New Issue
Block a user