Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 742 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 378 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 461 B After Width: | Height: | Size: 461 B |
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 463 B |
@ -0,0 +1,25 @@ |
|||||||
|
import React, { useState } from "react"; |
||||||
|
|
||||||
|
import FormInput from "./FormInput"; |
||||||
|
|
||||||
|
function FormFields() { |
||||||
|
const list = { |
||||||
|
1: <FormInput />, |
||||||
|
}; |
||||||
|
const [type, setType] = useState(1); |
||||||
|
return ( |
||||||
|
<div className="w-full flex flex-col items-center"> |
||||||
|
<select |
||||||
|
className="mb-10 w-20 bg-gray-200" |
||||||
|
onChange={(e) => setType(e.target.value)} |
||||||
|
> |
||||||
|
{Object.keys(list).map((option, index) => ( |
||||||
|
<option key={index}>{option}</option> |
||||||
|
))} |
||||||
|
</select> |
||||||
|
{list[type]} |
||||||
|
</div> |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
export default FormFields; |
@ -0,0 +1,20 @@ |
|||||||
|
import React from "react"; |
||||||
|
import FolderTree from "../../MiniComponents/FolderTree"; |
||||||
|
import ReactTable5 from "../ReactTable5"; |
||||||
|
|
||||||
|
const GridListTable = () => { |
||||||
|
return ( |
||||||
|
<section className="flex flex-row"> |
||||||
|
{/* right */} |
||||||
|
<div className="w-[265px] " style={{ backgroundColor: "#FBFBFB" }}> |
||||||
|
<FolderTree /> |
||||||
|
</div> |
||||||
|
{/* left */} |
||||||
|
<div className="flex-1"> |
||||||
|
<ReactTable5 /> |
||||||
|
</div> |
||||||
|
</section> |
||||||
|
); |
||||||
|
}; |
||||||
|
|
||||||
|
export default GridListTable; |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 472 B |
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 472 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 622 B |
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 378 KiB |
Before Width: | Height: | Size: 749 B After Width: | Height: | Size: 749 B |
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
@ -1,6 +1,5 @@ |
|||||||
import React, { useState } from "react"; |
import React, { useState } from "react"; |
||||||
import Button from "../Button"; |
import Button from "../../ButtonDesign/Button"; |
||||||
import ButtonNewDesign from "../ButtonNewDesign"; |
|
||||||
import EditRow from "./EditRow"; |
import EditRow from "./EditRow"; |
||||||
|
|
||||||
const ViewEdit = ({ row }) => { |
const ViewEdit = ({ row }) => { |
@ -0,0 +1,165 @@ |
|||||||
|
import React, { useState } from "react"; |
||||||
|
|
||||||
|
const TableDesign1 = ({ tableItems, tableSubItems }) => { |
||||||
|
const [sortedField, setSortedField] = useState(null); |
||||||
|
|
||||||
|
if (sortedField !== null) { |
||||||
|
tableSubItems.sort((a, b) => { |
||||||
|
if (a.payedPrice > b.payedPrice) { |
||||||
|
return -1; |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
return ( |
||||||
|
<div className="flex flex-col"> |
||||||
|
<div className="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"> |
||||||
|
<div className="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"> |
||||||
|
<div className="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"> |
||||||
|
<table className="min-w-full divide-y divide-gray-200"> |
||||||
|
<thead className="bg-gray-50"> |
||||||
|
{tableItems.map((tableItem, index) => ( |
||||||
|
<tr className="" key={index}> |
||||||
|
<th |
||||||
|
scope="col" |
||||||
|
className="text-blue-400 font-light text-right text-sm p-4" |
||||||
|
> |
||||||
|
{tableItem.title} |
||||||
|
</th> |
||||||
|
<th |
||||||
|
scope="" |
||||||
|
className="text-blue-400 font-light text-right text-sm p-4 " |
||||||
|
> |
||||||
|
<div className="flex flex-row items-center"> |
||||||
|
{tableItem.status} |
||||||
|
<div className="mr-3 flex flex-col"> |
||||||
|
<img |
||||||
|
src="images/Tablearrow-up.svg" |
||||||
|
alt="" |
||||||
|
className="w-4 cursor-pointer" |
||||||
|
/> |
||||||
|
<img |
||||||
|
src="images/Tablearrow-up.svg" |
||||||
|
alt="" |
||||||
|
className="w-4 cursor-pointer rotate-180" |
||||||
|
/> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</th> |
||||||
|
<th |
||||||
|
scope="col" |
||||||
|
className="text-blue-400 font-light text-right text-sm p-4" |
||||||
|
> |
||||||
|
<div className="flex flex-row items-center"> |
||||||
|
{tableItem.date} |
||||||
|
<div className="mr-3 flex flex-col"> |
||||||
|
<img |
||||||
|
src="images/Tablearrow-up.svg" |
||||||
|
alt="" |
||||||
|
className="w-4 cursor-pointer" |
||||||
|
// onClick={() => setSortedField}
|
||||||
|
/> |
||||||
|
<img |
||||||
|
src="images/Tablearrow-up.svg" |
||||||
|
alt="" |
||||||
|
className="w-4 cursor-pointer rotate-180" |
||||||
|
/> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</th> |
||||||
|
<th |
||||||
|
scope="col" |
||||||
|
className="text-blue-400 font-light text-right text-sm p-4" |
||||||
|
> |
||||||
|
<div className="flex flex-row items-center"> |
||||||
|
{tableItem.payedPrice} |
||||||
|
<div className="mr-3 flex flex-col"> |
||||||
|
<img |
||||||
|
src="images/Tablearrow-up.svg" |
||||||
|
alt="" |
||||||
|
className="w-4 cursor-pointer" |
||||||
|
onClick={() => setSortedField()} |
||||||
|
/> |
||||||
|
<img |
||||||
|
src="images/Tablearrow-up.svg" |
||||||
|
alt="" |
||||||
|
className="w-4 cursor-pointer rotate-180" |
||||||
|
// onClick={() => setSortedField()}
|
||||||
|
/> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</th> |
||||||
|
</tr> |
||||||
|
))} |
||||||
|
</thead> |
||||||
|
<tbody className="bg-white divide-y divide-gray-200"> |
||||||
|
{tableSubItems.map((tableSubItem, i) => ( |
||||||
|
<tr key={i}> |
||||||
|
<td className="p-4 whitespace-nowrap text-base font-light"> |
||||||
|
{tableSubItem.title} |
||||||
|
</td> |
||||||
|
<td |
||||||
|
className={`p-4 whitespace-nowrap text-base font-light
|
||||||
|
${ |
||||||
|
tableSubItem.status |
||||||
|
? "text-green-400" |
||||||
|
: "text-red-400" |
||||||
|
}`}
|
||||||
|
> |
||||||
|
{tableSubItem.status ? "فعال" : "غیر فعال"} |
||||||
|
</td> |
||||||
|
<td className="p-4 whitespace-nowrap text-base font-light"> |
||||||
|
{tableSubItem.date} |
||||||
|
</td> |
||||||
|
<td className="p-4 whitespace-nowrap text-base font-light"> |
||||||
|
{tableSubItem.payedPrice} ریال |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
))} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
); |
||||||
|
}; |
||||||
|
|
||||||
|
export default TableDesign1; |
||||||
|
|
||||||
|
TableDesign1.defaultProps = { |
||||||
|
tableItems: [ |
||||||
|
{ |
||||||
|
title: "عنوان", |
||||||
|
status: "وضعیت", |
||||||
|
date: "تاریخ", |
||||||
|
payedPrice: "مبلغ پرداختی", |
||||||
|
}, |
||||||
|
], |
||||||
|
tableSubItems: [ |
||||||
|
{ |
||||||
|
title: "مایکروویر سامسونگ مدل", |
||||||
|
status: true, |
||||||
|
date: "1400/09/21", |
||||||
|
payedPrice: 73, |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: "آزمون آنلاین درس علوم تجربی", |
||||||
|
status: false, |
||||||
|
date: "1400/09/21", |
||||||
|
payedPrice: 75, |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: "مایکروویر سامسونگ مدل", |
||||||
|
status: true, |
||||||
|
date: "1400/09/21", |
||||||
|
payedPrice: 25, |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: "آزمون آنلاین درس علوم تجربی", |
||||||
|
status: false, |
||||||
|
date: "1400/09/21", |
||||||
|
payedPrice: 27, |
||||||
|
}, |
||||||
|
], |
||||||
|
}; |