????
Current Path : C:/inetpub/vhost/donthu.nextform.vn/wwwroot/assets/ |
Current File : C:/inetpub/vhost/donthu.nextform.vn/wwwroot/assets/AppTable-BSff52WW.js |
var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});import{s as styled,r as reactExports,k as jsxRuntimeExports,B as Box,x as IconButton,I as Icon,aj as Breadcrumb,ak as SimpleCard}from"./index-y1X-EiI1.js";import{T as Table,a as TableHead,b as TableRow,c as TableCell,d as TableBody}from"./TableRow-BfZy-RM-.js";import{T as TablePagination}from"./TablePagination-Dnie0nHQ.js";import"./Toolbar-BZCdaOvb.js";const StyledTable$1=styled(Table)(()=>({whiteSpace:"pre","& thead":{"& tr":{"& th":{paddingLeft:0,paddingRight:0}}},"& tbody":{"& tr":{"& td":{paddingLeft:0,textTransform:"capitalize"}}}})),subscribarList$1=[{name:"john doe",date:"18 january, 2019",amount:1e3,status:"close",company:"ABC Fintech LTD."},{name:"kessy bryan",date:"10 january, 2019",amount:9e3,status:"open",company:"My Fintech LTD."},{name:"kessy bryan",date:"10 january, 2019",amount:9e3,status:"open",company:"My Fintech LTD."},{name:"james cassegne",date:"8 january, 2019",amount:5e3,status:"close",company:"Collboy Tech LTD."},{name:"lucy brown",date:"1 january, 2019",amount:89e3,status:"open",company:"ABC Fintech LTD."},{name:"lucy brown",date:"1 january, 2019",amount:89e3,status:"open",company:"ABC Fintech LTD."},{name:"lucy brown",date:"1 january, 2019",amount:89e3,status:"open",company:"ABC Fintech LTD."},{name:"lucy brown",date:"1 january, 2019",amount:89e3,status:"open",company:"ABC Fintech LTD."},{name:"lucy brown",date:"1 january, 2019",amount:89e3,status:"open",company:"ABC Fintech LTD."}],PaginationTable=__name(()=>{const[page,setPage]=reactExports.useState(0),[rowsPerPage,setRowsPerPage]=reactExports.useState(5),handleChangePage=__name((_,newPage)=>{setPage(newPage)},"handleChangePage"),handleChangeRowsPerPage=__name(event=>{setRowsPerPage(+event.target.value),setPage(0)},"handleChangeRowsPerPage");return jsxRuntimeExports.jsxs(Box,{width:"100%",overflow:"auto",children:[jsxRuntimeExports.jsxs(StyledTable$1,{children:[jsxRuntimeExports.jsx(TableHead,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{align:"left",children:"Name"}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Company"}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Start Date"}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Status"}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Amount"}),jsxRuntimeExports.jsx(TableCell,{align:"right",children:"Action"})]})}),jsxRuntimeExports.jsx(TableBody,{children:subscribarList$1.slice(page*rowsPerPage,page*rowsPerPage+rowsPerPage).map((subscriber,index)=>jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{align:"left",children:subscriber.name}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:subscriber.company}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:subscriber.date}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:subscriber.status}),jsxRuntimeExports.jsxs(TableCell,{align:"center",children:["$",subscriber.amount]}),jsxRuntimeExports.jsx(TableCell,{align:"right",children:jsxRuntimeExports.jsx(IconButton,{children:jsxRuntimeExports.jsx(Icon,{color:"error",children:"close"})})})]},index))})]}),jsxRuntimeExports.jsx(TablePagination,{sx:{px:2},page,component:"div",rowsPerPage,count:subscribarList$1.length,onPageChange:handleChangePage,rowsPerPageOptions:[5,10,25],onRowsPerPageChange:handleChangeRowsPerPage,nextIconButtonProps:{"aria-label":"Next Page"},backIconButtonProps:{"aria-label":"Previous Page"}})]})},"PaginationTable"),StyledTable=styled(Table)(({theme})=>({whiteSpace:"pre","& thead":{"& tr":{"& th":{paddingLeft:0,paddingRight:0}}},"& tbody":{"& tr":{"& td":{paddingLeft:0,textTransform:"capitalize"}}}})),subscribarList=[{name:"john doe",date:"18 january, 2019",amount:1e3,status:"close",company:"ABC Fintech LTD."},{name:"kessy bryan",date:"10 january, 2019",amount:9e3,status:"open",company:"My Fintech LTD."},{name:"james cassegne",date:"8 january, 2019",amount:5e3,status:"close",company:"Collboy Tech LTD."},{name:"lucy brown",date:"1 january, 2019",amount:89e3,status:"open",company:"ABC Fintech LTD."},{name:"lucy brown",date:"1 january, 2019",amount:89e3,status:"open",company:"ABC Fintech LTD."},{name:"lucy brown",date:"1 january, 2019",amount:89e3,status:"open",company:"ABC Fintech LTD."}],SimpleTable=__name(()=>jsxRuntimeExports.jsx(Box,{width:"100%",overflow:"auto",children:jsxRuntimeExports.jsxs(StyledTable,{children:[jsxRuntimeExports.jsx(TableHead,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{align:"left",children:"Name"}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Company"}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Start Date"}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Status"}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Amount"}),jsxRuntimeExports.jsx(TableCell,{align:"right",children:"Action"})]})}),jsxRuntimeExports.jsx(TableBody,{children:subscribarList.map((subscriber,index)=>jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{align:"left",children:subscriber.name}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:subscriber.company}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:subscriber.date}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:subscriber.status}),jsxRuntimeExports.jsxs(TableCell,{align:"center",children:["$",subscriber.amount]}),jsxRuntimeExports.jsx(TableCell,{align:"right",children:jsxRuntimeExports.jsx(IconButton,{children:jsxRuntimeExports.jsx(Icon,{color:"error",children:"close"})})})]},index))})]})}),"SimpleTable"),Container=styled("div")(({theme})=>({margin:"30px",[theme.breakpoints.down("sm")]:{margin:"16px"},"& .breadcrumb":{marginBottom:"30px",[theme.breakpoints.down("sm")]:{marginBottom:"16px"}}})),AppTable=__name(()=>jsxRuntimeExports.jsxs(Container,{children:[jsxRuntimeExports.jsx(Box,{className:"breadcrumb",children:jsxRuntimeExports.jsx(Breadcrumb,{routeSegments:[{name:"Material",path:"/material"},{name:"Table"}]})}),jsxRuntimeExports.jsx(SimpleCard,{title:"Simple Table",children:jsxRuntimeExports.jsx(SimpleTable,{})}),jsxRuntimeExports.jsx(SimpleCard,{title:"Pagination Table",children:jsxRuntimeExports.jsx(PaginationTable,{})})]}),"AppTable");export{AppTable as default};