diff --git a/src/app/[locale]/profile/layout.tsx b/src/app/[locale]/profile/layout.tsx index f2517f6..1c8ba27 100644 --- a/src/app/[locale]/profile/layout.tsx +++ b/src/app/[locale]/profile/layout.tsx @@ -2,7 +2,7 @@ import { AxiosError } from "axios"; import { apiInstance } from "@/shared/config/apiConfig"; import { getServerSession } from "next-auth"; import { authConfig } from "@/shared/config/authConfig"; -import { Title } from "@/shared/ui"; +import { Container, Title } from "@/shared/ui"; import ProfileNav from "@/widgets/ProfileNav/ProfileNav"; const Profile = async ({ @@ -33,11 +33,11 @@ const Profile = async ({ const data = await getProfile(); return ( -
- - <ProfileNav report_count={data?.report_count as number} /> - - {children} + <div className="bg-[#FAFCFF]"> + <Container className="flex flex-col"> + <ProfileNav report_count={data?.report_count as number} /> + {children} + </Container> </div> ); }; diff --git a/src/app/[locale]/tenders/[id]/page.tsx b/src/app/[locale]/tenders/[id]/page.tsx index ccab891..53269de 100644 --- a/src/app/[locale]/tenders/[id]/page.tsx +++ b/src/app/[locale]/tenders/[id]/page.tsx @@ -1,6 +1,7 @@ import { apiInstance } from "@/shared/config/apiConfig"; import { ITenders } from "@/shared/types/tenders-type"; import { Container, Title } from "@/shared/ui"; +import Link from "next/link"; const TenderDetails = async ({ params, @@ -11,7 +12,7 @@ const TenderDetails = async ({ const response = await apiInstance.get<ITenders>( `/procurements/${params.id}/` ); - console.log(response.data); + console.log(response.data.saved_files); return response.data; }; @@ -129,7 +130,12 @@ const TenderDetails = async ({ text="Больше информации в PDF" className="text-[18px] text-gray-500 w-[242px]" /> - <Title text={data.more_info_pdf} className="text-[20px] leading-8" /> + <Link href={data.more_info_pdf} target="blank"> + <Title + text={data.more_info_pdf} + className="text-[20px] leading-8" + /> + </Link> </div> </div> diff --git a/src/features/ProfileAvatar/ProfileAvatar.tsx b/src/features/ProfileAvatar/ProfileAvatar.tsx index b17b5d3..a5ce434 100644 --- a/src/features/ProfileAvatar/ProfileAvatar.tsx +++ b/src/features/ProfileAvatar/ProfileAvatar.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @next/next/no-img-element */ "use client"; import Image from "next/image"; @@ -10,6 +11,7 @@ import { useSession } from "next-auth/react"; import { useState } from "react"; import { AxiosError } from "axios"; import Loader from "@/shared/ui/Loader/Loader"; +import profile from "./icons/profile.png"; interface IProfileAvatarProps { img: string; @@ -29,7 +31,7 @@ const ProfileAvatar: React.FC<IProfileAvatarProps> = ({ const session = useSession(); const router = useRouter(); - const def = "lflvl"; + const def = profile; const handleChange: React.ChangeEventHandler<HTMLInputElement> = (e) => { if (e.target.files) { setDisplayImage(e.target.files[0]); diff --git a/src/features/ProfileAvatar/icons/profile.png b/src/features/ProfileAvatar/icons/profile.png new file mode 100644 index 0000000..0f35550 Binary files /dev/null and b/src/features/ProfileAvatar/icons/profile.png differ diff --git a/src/shared/types/tenders-type.ts b/src/shared/types/tenders-type.ts index dd53572..2245a7d 100644 --- a/src/shared/types/tenders-type.ts +++ b/src/shared/types/tenders-type.ts @@ -8,6 +8,14 @@ export interface Lot { address_of_lots: string; procurement: number; } + +export interface SavedFile { + id: number; + file_url: string; + name: string; + file_path: string; + procurement: number; +} export interface ITenders { id: number; id_of_card: string; @@ -23,6 +31,7 @@ export interface ITenders { more_info_url: string; more_info_pdf: string; lots: Lot[]; + saved_files: SavedFile[]; } export interface ITendersList extends IList { diff --git a/src/widgets/ProfileNav/ProfileNav.tsx b/src/widgets/ProfileNav/ProfileNav.tsx index ba8db16..d875668 100644 --- a/src/widgets/ProfileNav/ProfileNav.tsx +++ b/src/widgets/ProfileNav/ProfileNav.tsx @@ -21,16 +21,16 @@ const ProfileNav: React.FC<IProfileNavProps> = ({ > Личные данные </Link> - <Link + {/* <Link id={pathname === "/profile/my-reports" ? "profile-nav__link" : ""} href="/profile/my-reports" className="text-[20px] font-semibold leading-6 text-gray-500" > Мои обращения - </Link> - <span className="ml-4 py-[2px] px-[10px] rounded-md bg-white text-[14px] font-semibold leading-6 text-light-blue cursor-auto "> + </Link> */} + {/* <span className="ml-4 py-[2px] px-[10px] rounded-md bg-white text-[14px] font-semibold leading-6 text-light-blue cursor-auto "> {report_count} - </span> + </span> */} </div> {pathname === "/profile/personal" ? (