Merge branch 'develop' into 'devops-staging'
Bug Fixing PPOB See merge request empatnusabangsa/ppob/ppob-frontend!75
This commit is contained in:
commit
2f6e1418c9
|
@ -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);
|
||||
|
|
|
@ -80,3 +80,6 @@ code {
|
|||
.ant-menu-item-divider{
|
||||
border-style: transparent !important;
|
||||
}
|
||||
.ant-table-tbody > tr.ant-table-row-level-0:hover > td {
|
||||
background: #f0faf8 !important;
|
||||
}
|
|
@ -256,7 +256,7 @@ export const Membership = observer(() => {
|
|||
const dataRoute = [
|
||||
{
|
||||
route: LINKS.MEMBERSHIP,
|
||||
name: "Keanggotaan"
|
||||
name: "Keanggotaan",
|
||||
},
|
||||
];
|
||||
const onSubmit = async (data, image, imageStore) => {
|
||||
|
@ -329,6 +329,11 @@ export const Membership = observer(() => {
|
|||
form.resetFields();
|
||||
}
|
||||
};
|
||||
const handleClickRow = (record, index) => ({
|
||||
onClick: (event) => {
|
||||
history.push(LINKS.USER_DETAIL.replace(":id", record.id));
|
||||
},
|
||||
});
|
||||
return (
|
||||
<div className={["ppob-container"].join(" ")}>
|
||||
<BreadcumbComponent
|
||||
|
@ -374,7 +379,9 @@ export const Membership = observer(() => {
|
|||
<Table
|
||||
key="1"
|
||||
hasEmpty
|
||||
onRow={handleClickRow}
|
||||
columns={columns}
|
||||
style={{ cursor: "pointer" }}
|
||||
dataSource={
|
||||
store.authentication.userData.role === "Admin"
|
||||
? store.membership.dataMember
|
||||
|
|
Loading…
Reference in New Issue
Block a user