Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trithuc-mvc-react

Package Overview
Dependencies
Maintainers
2
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trithuc-mvc-react - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

34

components/DataManagement/DataTable.jsx

@@ -7,3 +7,8 @@ import { Table, TableBody, TableContainer } from "@mui/material";

import { useMutation, useQuery, useQueryClient } from "react-query";
import { changeStatusDataToTable, deleteDataFromTable, deleteMultipleDataFromTable, getDatasFromTable } from "../../api";
import {
changeStatusDataToTable,
deleteDataFromTable,
deleteMultipleDataFromTable,
getDatasFromTable,
} from "../../api";
import TableRowsLoader from "../table/TableRowsLoader";

@@ -14,3 +19,3 @@ import { toast } from "react-toastify";

import { TableRowRender } from "./TableRowRender";
import { TableToolbar } from "./TableToolbar";
import TableToolbar from "./TableToolbar";
import { useDataTable, usePermission } from "./hooks";

@@ -33,3 +38,3 @@

pageSize: rowsPerPage,
data: dataSearch
data: dataSearch,
}),

@@ -41,3 +46,3 @@ keepPreviousData: true,

}
}
},
});

@@ -51,3 +56,3 @@ const changeStatusMutation = useMutation(changeStatusDataToTable, {

toast.error(" Có lỗi xảy ra !");
}
},
});

@@ -66,3 +71,3 @@ const deleteMutation = useMutation(deleteDataFromTable, {

toast.error(" Có lỗi xảy ra !");
}
},
});

@@ -77,3 +82,3 @@ const deleteMultipleMutation = useMutation(deleteMultipleDataFromTable, {

toast.error(" Có lỗi xảy ra !");
}
},
});

@@ -86,3 +91,3 @@

id,
tableName
tableName,
});

@@ -95,3 +100,3 @@ })

tableName,
id: Id
id: Id,
});

@@ -108,3 +113,3 @@ };

rows: rows,
total
total,
};

@@ -150,3 +155,3 @@ }, [data]);

tableName,
ids: selected
ids: selected,
});

@@ -166,3 +171,8 @@ })

<Table className="border">
<TableHead headLabel={columns} onSelectAllClick={handleSelectAllClick} numSelected={selected?.length} rowCount={rows.length} />
<TableHead
headLabel={columns}
onSelectAllClick={handleSelectAllClick}
numSelected={selected?.length}
rowCount={rows.length}
/>
{isLoading ? (

@@ -169,0 +179,0 @@ <TableRowsLoader rowsNum={5} colsNum={columns.length + 4} />

@@ -9,9 +9,3 @@ import { Checkbox, IconButton, Tooltip, Typography, Box } from "@mui/material";

// ----------------------------------------------------------------------
TableToolbar.propTypes = {
numSelected: PropTypes.number,
filterName: PropTypes.string,
onFilterName: PropTypes.func
};
export const TableToolbar = ({ numSelected, onSelectAllClick, rowCount, onDeleteMultiple }) => {
const TableToolbar = ({ numSelected, onSelectAllClick, rowCount, onDeleteMultiple }) => {
const theme = useTheme();

@@ -33,6 +27,5 @@ const isLight = theme.palette.mode === "light";

color: isLight ? "primary.main" : "text.primary",
bgcolor: isLight ? "primary.lighter" : "primary.dark"
})
}}
>
bgcolor: isLight ? "primary.lighter" : "primary.dark",
}),
}}>
<Box padding="checkbox" sx={{ display: "flex", alignItems: "center" }}>

@@ -60,1 +53,8 @@ <Checkbox

};
TableToolbar.propTypes = {
numSelected: PropTypes.number,
filterName: PropTypes.string,
onFilterName: PropTypes.func
};
export default TableToolbar;
{
"name": "trithuc-mvc-react",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc