tender card

This commit is contained in:
ariari04 2024-09-17 21:36:59 +06:00
parent 9c3657190a
commit 3fecbcd880
6 changed files with 42 additions and 9 deletions

11
package-lock.json generated
View File

@ -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",

View File

@ -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",

View File

@ -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<Props> = ({
id,
@ -24,12 +27,12 @@ const TenderCard: React.FC<Props> = ({
date_of_publication_datetime,
date_of_offer_datetime,
current_timestamp,
plan_summ,
plan_summ_decimal,
address_of_organization,
}: Props) => {
console.log(plan_summ);
return (
<div className="w-full min-h-[213px] bg-white shadow-sm rounded-sm flex gap-[82px] items-center p-6">
<div className="w-[840px] flex flex-col">
<div className="w-[830px] flex flex-col">
<Title
text={`${id_of_card}`}
className="font-bold text-[24px] mb-[48px]"
@ -45,9 +48,25 @@ const TenderCard: React.FC<Props> = ({
{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>
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

View File

@ -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 {

View File

@ -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