Merge branch 'develop' into 'devops-production'
Develop See merge request empatnusabangsa/ppob/ppob-frontend!136
This commit is contained in:
commit
e4a857d5ab
|
@ -128,7 +128,7 @@ export const ProductComponent = observer((props) => {
|
|||
),
|
||||
},
|
||||
];
|
||||
if (store.authentication.userData.role !== "Admin") columns.pop();
|
||||
//if (store.authentication.userData.role !== "Admin") columns.pop();
|
||||
//if (store.authentication.userData.role === "Admin Partner") delete columns[2];
|
||||
if (store.authentication.userData.role === "Admin Partner") delete columns[3];
|
||||
if (store.authentication.userData.role != "Admin Partner") delete columns[4];
|
||||
|
@ -136,7 +136,7 @@ export const ProductComponent = observer((props) => {
|
|||
if (store.authentication.userData.role !== "Admin") delete columns[2];
|
||||
if (store.authentication.userData.role !== "Admin") delete columns[5];
|
||||
if (store.authentication.userData.role === "Admin Partner") delete columns[7];
|
||||
if (store.authentication.userData.role !== "Admin") delete columns[8];
|
||||
//if (store.authentication.userData.role !== "Admin") delete columns[8];
|
||||
//if (store.authentication.userData.role === "Admin Partner") delete columns[5];
|
||||
|
||||
const deleteData = async (id) => {
|
||||
|
@ -227,9 +227,13 @@ export const ProductComponent = observer((props) => {
|
|||
store.product.filterSupplier = filterSupplier;
|
||||
store.product.filterSubCategory = filterSubCategories;
|
||||
modalLoader.setLoading(true);
|
||||
// store.authentication.userData.role === "Admin Partner"
|
||||
// ? await store.product.getData()
|
||||
// : await store.product.getData()
|
||||
await store.product.getData();
|
||||
modalLoader.setLoading(false);
|
||||
store.product.visibleModalFilterProduct = false;
|
||||
//store.product.page=1
|
||||
};
|
||||
|
||||
const footerLayoutFilter = [
|
||||
|
@ -477,6 +481,7 @@ export const ProductComponent = observer((props) => {
|
|||
visible={store.product.visibleModalFilterProduct}
|
||||
title={"Filter"}
|
||||
footer={footerLayoutFilter}
|
||||
|
||||
onCancel={async () => {
|
||||
// setFilterSupplier([]);
|
||||
// setFilterSubCategories([]);
|
||||
|
|
|
@ -412,8 +412,8 @@ export const DetailUser = observer(() => {
|
|||
Detail User
|
||||
</Title>
|
||||
<Col
|
||||
lg={store.authentication.userData.role === "Admin" ? 18 : 13}
|
||||
xs={store.authentication.userData.role === "Admin" ? 18 : 13}
|
||||
lg={store.authentication.userData.role === "Admin" ? 18 : 17}
|
||||
xs={store.authentication.userData.role === "Admin" ? 18 : 17}
|
||||
style={{ textAlign: "right" }}
|
||||
>
|
||||
<Space
|
||||
|
|
|
@ -201,15 +201,17 @@ export const Membership = observer(() => {
|
|||
key: "action",
|
||||
render: (text, record) => (
|
||||
<Space size="middle">
|
||||
<Button
|
||||
onClick={() => {
|
||||
setDestination(record?.id);
|
||||
console.log(record?.id);
|
||||
setIsVisibleTopUpModal(true);
|
||||
}}
|
||||
>
|
||||
<DownloadOutlined /> Top Up Saldo
|
||||
</Button>
|
||||
{store.authentication.userData.role === "Admin" && (
|
||||
<Button
|
||||
onClick={() => {
|
||||
setDestination(record?.id);
|
||||
console.log(record?.id);
|
||||
setIsVisibleTopUpModal(true);
|
||||
}}
|
||||
>
|
||||
<DownloadOutlined /> Top Up Saldo
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
onClick={async () => {
|
||||
await store.transaction.getDataHistoryTopUp(record.id);
|
||||
|
@ -226,7 +228,7 @@ export const Membership = observer(() => {
|
|||
},
|
||||
];
|
||||
|
||||
if (store.authentication.userData.role === "Customer Service") columns.pop();
|
||||
//if (store.authentication.userData.role === "Customer Service") columns.pop();
|
||||
const routeData = [
|
||||
{
|
||||
route: LINKS.HOME,
|
||||
|
|
|
@ -195,6 +195,7 @@ export const Product = observer(() => {
|
|||
<Button
|
||||
onClick={() => {
|
||||
store.product.visibleModalFilterProduct = true;
|
||||
store.product.page=0
|
||||
}}
|
||||
>
|
||||
<FilterOutlined />
|
||||
|
|
|
@ -215,6 +215,7 @@ export const Product = observer(() => {
|
|||
style={{
|
||||
backgroundColor: "#4e79e7",
|
||||
color: "#fff",
|
||||
marginRight:10
|
||||
}}
|
||||
onClick={() => {
|
||||
form
|
||||
|
@ -231,24 +232,24 @@ export const Product = observer(() => {
|
|||
>
|
||||
Beli
|
||||
</Button>,
|
||||
<Button
|
||||
key="Beli Stag"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
form
|
||||
.validateFields()
|
||||
.then((values) => {
|
||||
console.log(values, "isi form");
|
||||
handleBuyStag(values, barang.product_code);
|
||||
form.resetFields();
|
||||
})
|
||||
.catch((info) => {
|
||||
console.error("Validate Failed:", info);
|
||||
});
|
||||
}}
|
||||
>
|
||||
Beli Staging
|
||||
</Button>,
|
||||
// <Button
|
||||
// key="Beli Stag"
|
||||
// type="primary"
|
||||
// onClick={() => {
|
||||
// form
|
||||
// .validateFields()
|
||||
// .then((values) => {
|
||||
// console.log(values, "isi form");
|
||||
// handleBuyStag(values, barang.product_code);
|
||||
// form.resetFields();
|
||||
// })
|
||||
// .catch((info) => {
|
||||
// console.error("Validate Failed:", info);
|
||||
// });
|
||||
// }}
|
||||
// >
|
||||
// Beli Staging
|
||||
// </Button>,
|
||||
]}
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
|
|
|
@ -294,6 +294,7 @@ export const Transaction = observer(() => {
|
|||
style={{
|
||||
backgroundColor: "#4e79e7",
|
||||
color: "#fff",
|
||||
marginRight:10
|
||||
}}
|
||||
onClick={() => {
|
||||
form
|
||||
|
@ -310,24 +311,24 @@ export const Transaction = observer(() => {
|
|||
>
|
||||
Beli
|
||||
</Button>,
|
||||
<Button
|
||||
key="Beli Stag"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
form
|
||||
.validateFields()
|
||||
.then((values) => {
|
||||
console.log(values, "isi form");
|
||||
handleBuyStag(values, barang.product_code);
|
||||
form.resetFields();
|
||||
})
|
||||
.catch((info) => {
|
||||
console.error("Validate Failed:", info);
|
||||
});
|
||||
}}
|
||||
>
|
||||
Beli Staging
|
||||
</Button>,
|
||||
// <Button
|
||||
// key="Beli Stag"
|
||||
// type="primary"
|
||||
// onClick={() => {
|
||||
// form
|
||||
// .validateFields()
|
||||
// .then((values) => {
|
||||
// console.log(values, "isi form");
|
||||
// handleBuyStag(values, barang.product_code);
|
||||
// form.resetFields();
|
||||
// })
|
||||
// .catch((info) => {
|
||||
// console.error("Validate Failed:", info);
|
||||
// });
|
||||
// }}
|
||||
// >
|
||||
// Beli Staging
|
||||
// </Button>,
|
||||
]}
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
|
|
Loading…
Reference in New Issue
Block a user