chore(env): update application version to 2.2.6 in production environment

feat(tenders): enhance TendersTable with improved title truncation and tooltip support

- Updated TendersTable to include a tooltip for tender titles exceeding 40 characters, improving user experience by providing additional context.
- Refactored imports in TendersTable for better organization and clarity.
This commit is contained in:
AmirReza Jamali
2026-06-01 19:07:47 +03:30
parent 9424758af5
commit bb3695ee74
2 changed files with 126 additions and 98 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
NEXT_PUBLIC_APP_VERSION=2.2.5 NEXT_PUBLIC_APP_VERSION=2.2.6
NEXT_PUBLIC_TOAST_AUTO_CLOSE_DURATION=2500 NEXT_PUBLIC_TOAST_AUTO_CLOSE_DURATION=2500
NEXT_PUBLIC_FIREBASE_API_KEY=AIzaSyCTjdsk2jE34IfnvSKP1JMTIf_Abd7tbt0 NEXT_PUBLIC_FIREBASE_API_KEY=AIzaSyCTjdsk2jE34IfnvSKP1JMTIf_Abd7tbt0
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=opplens-270d1.firebaseapp.com NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=opplens-270d1.firebaseapp.com
+35 -7
View File
@@ -2,6 +2,10 @@
import { ExclamationIcon, EyeIcon } from "@/assets/icons"; import { ExclamationIcon, EyeIcon } from "@/assets/icons";
import EmptyListWrapper from "@/components/HOC/EmptyListWrapper"; import EmptyListWrapper from "@/components/HOC/EmptyListWrapper";
import IsVisible from "@/components/ui/IsVisible";
import ListHeader from "@/components/ui/ListHeader";
import ListWrapper from "@/components/ui/ListWrapper";
import Pagination from "@/components/ui/pagination";
import Status from "@/components/ui/Status"; import Status from "@/components/ui/Status";
import { import {
Table, Table,
@@ -12,13 +16,10 @@ import {
TableRow, TableRow,
TableSortProvider, TableSortProvider,
} from "@/components/ui/table"; } from "@/components/ui/table";
import IsVisible from "@/components/ui/IsVisible";
import ListHeader from "@/components/ui/ListHeader";
import ListWrapper from "@/components/ui/ListWrapper";
import Pagination from "@/components/ui/pagination";
import TableSkeleton from "@/components/ui/TableSkeleton"; import TableSkeleton from "@/components/ui/TableSkeleton";
import { _TooltipDefaultParams } from "@/constants/tooltip"; import { _TooltipDefaultParams } from "@/constants/tooltip";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { truncateString } from "@/utils/shared";
import { Tooltip } from "react-tooltip"; import { Tooltip } from "react-tooltip";
import TenderListFilters from "./TenderListFilters"; import TenderListFilters from "./TenderListFilters";
import useTenderListPresenter from "./useTenderListPresenter"; import useTenderListPresenter from "./useTenderListPresenter";
@@ -117,7 +118,18 @@ const TendersTable = () => {
{getRowNumber(index)} {getRowNumber(index)}
</TableCell> </TableCell>
<TableCell className="text-start" colSpan={100}> <TableCell className="text-start" colSpan={100}>
{item.title} {item.title.length > 40 ? (
<span
data-tooltip-id="tender-title"
data-tooltip-content={item.title}
data-tooltip-place="top"
className="cursor-help underline decoration-dotted decoration-1 underline-offset-4"
>
{truncateString(item.title, 20, 20)}
</span>
) : (
item.title
)}
</TableCell> </TableCell>
<TableCell className="text-start" colSpan={100}> <TableCell className="text-start" colSpan={100}>
{item.country_code} {item.country_code}
@@ -135,7 +147,10 @@ const TendersTable = () => {
{formatDateTimeCell(item?.created_at ?? 0)} {formatDateTimeCell(item?.created_at ?? 0)}
</TableCell> </TableCell>
<TableCell className={cn(`text capitalize`)} colSpan={100}> <TableCell
className={cn(`text capitalize`)}
colSpan={100}
>
<Status status={item.status}>{item.status}</Status> <Status status={item.status}>{item.status}</Status>
</TableCell> </TableCell>
<TableCell className="capitalize" colSpan={100}> <TableCell className="capitalize" colSpan={100}>
@@ -162,7 +177,9 @@ const TendersTable = () => {
className="text-gray-40 rounded-full bg-gray-dark bg-opacity-5 hover:text-green-dark dark:bg-gray dark:bg-opacity-5" className="text-gray-40 rounded-full bg-gray-dark bg-opacity-5 hover:text-green-dark dark:bg-gray dark:bg-opacity-5"
onClick={() => navigateToTenderFeedback(item.id)} onClick={() => navigateToTenderFeedback(item.id)}
> >
<Tooltip {..._TooltipDefaultParams({ id: "feedback" })} /> <Tooltip
{..._TooltipDefaultParams({ id: "feedback" })}
/>
<ExclamationIcon /> <ExclamationIcon />
</button> </button>
</div> </div>
@@ -174,6 +191,17 @@ const TendersTable = () => {
)} )}
</Table> </Table>
</TableSortProvider> </TableSortProvider>
<Tooltip
{..._TooltipDefaultParams({
id: "tender-title",
styles: {
maxWidth: "320px",
whiteSpace: "normal",
lineHeight: "1.5",
textAlign: "start",
},
})}
/>
</div> </div>
<IsVisible condition={shouldShowPagination}> <IsVisible condition={shouldShowPagination}>
<Pagination <Pagination