|
|
|
@ -26,6 +26,7 @@ import { |
|
|
|
|
useExpanded, |
|
|
|
|
} from "react-table"; |
|
|
|
|
import ButtonNewDesign from "../ButtonNewDesign"; |
|
|
|
|
import Button from "../Button"; |
|
|
|
|
|
|
|
|
|
export const SelectColumnFilter = ({ |
|
|
|
|
column: { filterValue, setFilter, preFilteredRows, id, render }, |
|
|
|
@ -168,14 +169,8 @@ const BasicTable = ({ addTab, activeTab }) => { |
|
|
|
|
) : null |
|
|
|
|
) |
|
|
|
|
)} |
|
|
|
|
<ButtonNewDesign |
|
|
|
|
bgColor={"bg-blue-500"} |
|
|
|
|
icon={null} |
|
|
|
|
border={"border-0"} |
|
|
|
|
borderRadius={"rounded"} |
|
|
|
|
fontSize={"text-xs"} |
|
|
|
|
paddingX={"p-3"} |
|
|
|
|
paddingY={"p-3"} |
|
|
|
|
<Button |
|
|
|
|
className={"bg-blue-500 rounded text-xs p-3 text-white"} |
|
|
|
|
text={ |
|
|
|
|
chekedItems.length < page.length ? "انتخاب همه" : "حذف انتخاب" |
|
|
|
|
} |
|
|
|
@ -188,7 +183,7 @@ const BasicTable = ({ addTab, activeTab }) => { |
|
|
|
|
}} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
<div className="w-4/12 "> |
|
|
|
|
<div className=""> |
|
|
|
|
<GlobalFilter |
|
|
|
|
filter={globalFilter} |
|
|
|
|
setFilter={setGlobalFilter} |
|
|
|
@ -271,14 +266,14 @@ const BasicTable = ({ addTab, activeTab }) => { |
|
|
|
|
{activeList === true && ( |
|
|
|
|
<div |
|
|
|
|
{...getTableBodyProps()} |
|
|
|
|
className="flex flex-row flex-wrap gap-4 items-center justify-center" |
|
|
|
|
className="flex flex-wrap gap-5 items-center justify-between " |
|
|
|
|
> |
|
|
|
|
{page.map((row, idx) => { |
|
|
|
|
prepareRow(row); |
|
|
|
|
return ( |
|
|
|
|
<div |
|
|
|
|
{...row.getRowProps()} |
|
|
|
|
className={`flex flex-col items-stretch px-3 py-2 rounded-md w-52 relative ${ |
|
|
|
|
className={`flex flex-col min-w-[250px] items-stretch p-4 rounded-md relative ${ |
|
|
|
|
chekedItems.includes(row.original.id) |
|
|
|
|
? "bg-[#ddd]" |
|
|
|
|
: "bg-[#F3F3F3]" |
|
|
|
@ -297,9 +292,12 @@ const BasicTable = ({ addTab, activeTab }) => { |
|
|
|
|
alt={row.original.filePic} |
|
|
|
|
className="w-16 mx-auto" |
|
|
|
|
/> |
|
|
|
|
<p className="text-xs my-3">{row.original.fileName}</p> |
|
|
|
|
<p className="text-xs mb-3 mt-5">{row.original.fileName}</p> |
|
|
|
|
<span className="text-xs text-left text-gray-500"> |
|
|
|
|
{row.original.fileSize} |
|
|
|
|
{console.log("mahdi")} |
|
|
|
|
{console.log(row.original)} |
|
|
|
|
{console.log("mahdi")} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|