Bug Fixing PPOB
This commit is contained in:
@@ -273,21 +273,36 @@ export const ProductComponent = observer((props) => {
|
||||
</Button>,
|
||||
];
|
||||
|
||||
const handleClickRow = (record, index) => ({
|
||||
onClick: (event) => {
|
||||
history.push(LINKS.PRODUCT_DETAIL.replace(":id", record.product_id));
|
||||
},
|
||||
});
|
||||
return (
|
||||
<div>
|
||||
{store.ui.mediaQuery.isDesktop && (
|
||||
<Table
|
||||
style={{
|
||||
textAlign: "center",
|
||||
width: store.ui.mediaQuery.isMobile ? 250 : "",
|
||||
}}
|
||||
style={
|
||||
store.authentication.userData.role === "Admin"
|
||||
? {
|
||||
cursor: "pointer",
|
||||
textAlign: "center",
|
||||
width: store.ui.mediaQuery.isMobile ? 250 : "",
|
||||
}
|
||||
: {
|
||||
textAlign: "center",
|
||||
width: store.ui.mediaQuery.isMobile ? 250 : "",
|
||||
}
|
||||
}
|
||||
columns={columns}
|
||||
dataSource={
|
||||
store.authentication.userData.role === "Admin Partner"
|
||||
? store.product.dataProductPartner
|
||||
: store.product.data
|
||||
}
|
||||
bordered
|
||||
onRow={
|
||||
store.authentication.userData.role === "Admin" ? handleClickRow : ""
|
||||
}
|
||||
pagination={{
|
||||
pageSize: store.product.pageSize,
|
||||
total:
|
||||
@@ -313,7 +328,7 @@ export const ProductComponent = observer((props) => {
|
||||
itemLayout="horizontal"
|
||||
position={"top"}
|
||||
pagination={{
|
||||
onChange: async (page,pageSize) => {
|
||||
onChange: async (page, pageSize) => {
|
||||
store.product.pageSize = pageSize;
|
||||
store.product.page = page - 1;
|
||||
modalLoader.setLoading(true);
|
||||
|
||||
Reference in New Issue
Block a user