Merge branch 'develop' into 'devops-production'

Develop

See merge request empatnusabangsa/ppob/ppob-frontend!136
This commit is contained in:
ajat sudrajat 2022-02-04 13:21:19 +00:00
commit 56c8873ae4
6 changed files with 60 additions and 50 deletions

View File

@ -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([]);

View File

@ -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

View File

@ -201,6 +201,7 @@ export const Membership = observer(() => {
key: "action",
render: (text, record) => (
<Space size="middle">
{store.authentication.userData.role === "Admin" && (
<Button
onClick={() => {
setDestination(record?.id);
@ -210,6 +211,7 @@ export const Membership = observer(() => {
>
<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,

View File

@ -195,6 +195,7 @@ export const Product = observer(() => {
<Button
onClick={() => {
store.product.visibleModalFilterProduct = true;
store.product.page=0
}}
>
<FilterOutlined />

View File

@ -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">

View File

@ -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">