master
mahdi andalib 3 years ago
parent 029a21f316
commit 2d8ee5994b
  1. 2
      src/App.js
  2. 19
      src/components/ReactTable5/BasicTable.js
  3. 10
      src/components/ReactTable5/index.js

@ -101,7 +101,7 @@ function App() {
{/* <TableDesign1 /> */} {/* <TableDesign1 /> */}
{/* <ReactTable2 /> */} {/* <ReactTable2 /> */}
{/* <ReactTable3 /> */} {/* <ReactTable3 /> */}
<ReactTable4 /> {/* <ReactTable4 /> */}
<ReactTable5 /> <ReactTable5 />
{/* <Digikala /> */} {/* <Digikala /> */}
{/* <HeaderDesign1 /> {/* <HeaderDesign1 />

@ -36,7 +36,8 @@ import {
const BasicTable = ({ const BasicTable = ({
settingsIcon, settingsIcon,
thead, thead,
listView, goToPage,
showMore,
addTab, addTab,
tabs, tabs,
delTab, delTab,
@ -356,7 +357,6 @@ const BasicTable = ({
</tbody> </tbody>
</table> </table>
)} )}
{/* GRID LIST */} {/* GRID LIST */}
{activeList === true && ( {activeList === true && (
<div className="flex flex-row gap-4"> <div className="flex flex-row gap-4">
@ -376,12 +376,16 @@ const BasicTable = ({
</div> </div>
)} )}
{/* bottom table */} {/* bottom table */}
{goToPage && (
<GoToPage <GoToPage
pageIndex={pageIndex} pageIndex={pageIndex}
gotoPage={gotoPage} gotoPage={gotoPage}
pageOptions={pageOptions} pageOptions={pageOptions}
/> />
)}
{showMore && (
<ShowMoreRows pageSize={pageSize} setPageSize={setPageSize} /> <ShowMoreRows pageSize={pageSize} setPageSize={setPageSize} />
)}
</> </>
) : ( ) : (
<EditRow <EditRow
@ -402,13 +406,6 @@ BasicTable.defaultProps = {
settingsIcon: true, settingsIcon: true,
thead: false, thead: false,
goToPage: false,
listView: [ showMore: false,
{
icon: list,
},
{
icon: grid,
},
],
}; };

@ -8,7 +8,7 @@ import MultiRangeInput from "./MultiRangeInput";
import grayLeftArrow from "./gray-arrow-left.svg"; import grayLeftArrow from "./gray-arrow-left.svg";
import { BreadCrumb } from "../BreadCrumb"; import { BreadCrumb } from "../BreadCrumb";
const ReactTable5 = ({ breadCrumbs, subTitle, title }) => { const ReactTable5 = ({ breadCrumbs, breadCrumb }) => {
const [tabs, setTabs] = useState([ const [tabs, setTabs] = useState([
{ name: "جدول " + breadCrumbs[breadCrumbs.length - 1].name, id: 0 }, { name: "جدول " + breadCrumbs[breadCrumbs.length - 1].name, id: 0 },
]); ]);
@ -35,7 +35,8 @@ const ReactTable5 = ({ breadCrumbs, subTitle, title }) => {
<div className="my-10 w-11/12 mx-auto"> <div className="my-10 w-11/12 mx-auto">
{/* breadCrumb */} {/* breadCrumb */}
<div className="flex flex-row items-center"> <div className="flex flex-row items-center">
{breadCrumbs.map((breadCrumb, index) => ( {breadCrumb &&
breadCrumbs.map((breadCrumb, index) => (
<div className="flex flex-row items-center" key={index}> <div className="flex flex-row items-center" key={index}>
<span <span
className={`cursor-pointer text-xs hover:text-blue-900 ${ className={`cursor-pointer text-xs hover:text-blue-900 ${
@ -57,7 +58,7 @@ const ReactTable5 = ({ breadCrumbs, subTitle, title }) => {
))} ))}
</div> </div>
<div className="my-7"> <div className="my-7">
<TitleSubtitle /> <TitleSubtitle titleShow={false} subTitleShow={false} />
</div> </div>
<BasicTable <BasicTable
addTab={addTab} addTab={addTab}
@ -92,6 +93,5 @@ ReactTable5.defaultProps = {
}, },
], ],
title: "میزان فروش محصولات", breadCrumb: false,
subTitle: "اطلاعات جداول مشخصاتی کارکنان مجموعه ایران تایر",
}; };

Loading…
Cancel
Save