diff --git a/package-lock.json b/package-lock.json index 428dc0a..b328c70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "react": "^18", "react-dom": "^18", "react-hook-form": "^7.52.2", + "react-number-format": "^5.4.2", "react-toastify": "^10.0.5", "sass": "^1.77.8", "tailwind-merge": "^2.5.2", @@ -4225,6 +4226,16 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true }, + "node_modules/react-number-format": { + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/react-number-format/-/react-number-format-5.4.2.tgz", + "integrity": "sha512-cg//jVdS49PYDgmcYoBnMMHl4XNTMuV723ZnHD2aXYtWWWqbVF3hjQ8iB+UZEuXapLbeA8P8H+1o6ZB1lcw3vg==", + "license": "MIT", + "peerDependencies": { + "react": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-toastify": { "version": "10.0.5", "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.5.tgz", diff --git a/package.json b/package.json index 1969e2e..28fc178 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "react": "^18", "react-dom": "^18", "react-hook-form": "^7.52.2", + "react-number-format": "^5.4.2", "react-toastify": "^10.0.5", "sass": "^1.77.8", "tailwind-merge": "^2.5.2", diff --git a/src/entities/TenderCard.tsx b/src/entities/TenderCard.tsx index 45ab684..b56042c 100644 --- a/src/entities/TenderCard.tsx +++ b/src/entities/TenderCard.tsx @@ -1,6 +1,8 @@ import { Link } from "@/shared/config/navigation"; import { Title } from "@/shared/ui"; import React from "react"; +import mapPin from "./icons/map-pin.png"; +import Image from "next/image"; interface Props { id: number; @@ -12,7 +14,8 @@ interface Props { date_of_publication_datetime: string; date_of_offer_datetime: string; current_timestamp: string; - plan_summ: string; + plan_summ_decimal: string; + address_of_organization: string; } const TenderCard: React.FC = ({ id, @@ -24,12 +27,12 @@ const TenderCard: React.FC = ({ date_of_publication_datetime, date_of_offer_datetime, current_timestamp, - plan_summ, + plan_summ_decimal, + address_of_organization, }: Props) => { - console.log(plan_summ); return (
-
+
= ({ {name_of_organization} </h2> </div> - <div className="w-[285px]"> - <p className="text-[14px] leading-6">Планируемая сумма</p> - <Title text={plan_summ} /> + <div className="w-[290px]"> + <p className="text-[14px] leading-6 mb-[6px]">Планируемая сумма</p> + <Title + text={`${parseInt(plan_summ_decimal)} сом`} + className="font-extrabold text-[24px] leading-[38px] mb-4" + /> + <p className="text-[14px] leading-6 mb-4"> + Окончание приема заявок: {date_of_offer_datetime.slice(0, 10)} + </p> + <div className="text-[14px] leading-6 flex gap-2 items-baseline"> + <Image + src={mapPin} + alt="map" + width={20} + height={20} + className="object-cover" + /> + <p>{address_of_organization}</p> + </div> </div> </div> ); diff --git a/src/entities/icons/map-pin.png b/src/entities/icons/map-pin.png new file mode 100644 index 0000000..b12530d Binary files /dev/null and b/src/entities/icons/map-pin.png differ diff --git a/src/shared/types/tenders-type.ts b/src/shared/types/tenders-type.ts index 2245a7d..1ab46ca 100644 --- a/src/shared/types/tenders-type.ts +++ b/src/shared/types/tenders-type.ts @@ -26,12 +26,13 @@ export interface ITenders { date_of_publication_datetime: string; date_of_offer_datetime: string; current_timestamp: string; - plan_summ: string; + plan_summ_decimal: string; tel_number: string; more_info_url: string; more_info_pdf: string; lots: Lot[]; saved_files: SavedFile[]; + address_of_organization: string; } export interface ITendersList extends IList { diff --git a/src/widgets/TendersList/TendersList.tsx b/src/widgets/TendersList/TendersList.tsx index b57ba13..cfd96f3 100644 --- a/src/widgets/TendersList/TendersList.tsx +++ b/src/widgets/TendersList/TendersList.tsx @@ -41,7 +41,8 @@ const TendersList: React.FC<Props> = ({ searchParams }) => { date_of_publication_datetime={tender.date_of_publication_datetime} date_of_offer_datetime={tender.date_of_offer_datetime} current_timestamp={tender.current_timestamp} - plan_summ={tender.plan_summ} + plan_summ_decimal={tender.plan_summ_decimal} + address_of_organization={tender.address_of_organization} /> ))} <Pagination