fix: menus
This commit is contained in:
@@ -45,7 +45,8 @@ export const Membership = observer(() => {
|
||||
setIsLoading(true);
|
||||
await getData();
|
||||
store.role.getData();
|
||||
await store.supplier.getData();
|
||||
if (store.authentication.userData.role === "Admin")
|
||||
await store.supplier.getData();
|
||||
setIsLoading(false);
|
||||
} catch (e) {
|
||||
setIsLoading(false);
|
||||
@@ -85,10 +86,11 @@ export const Membership = observer(() => {
|
||||
const handleSubmitTransaction = async (data) => {
|
||||
setConfirmLoading(true);
|
||||
try {
|
||||
let input = data;
|
||||
data.destination = destination;
|
||||
|
||||
await store.transaction.distributeAdmin(data);
|
||||
(await store.authentication.userData.role) === "Admin"
|
||||
? store.transaction.distributeAdmin(data)
|
||||
: store.transaction.distribute(data);
|
||||
message.success("Success Top Up");
|
||||
//await store.supplier.getData()
|
||||
} catch (e) {
|
||||
@@ -266,11 +268,6 @@ export const Membership = observer(() => {
|
||||
};
|
||||
return (
|
||||
<div className={["ppob-container"].join(" ")}>
|
||||
{/* <Modal title="Basic Modal" visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
|
||||
<p>Some contents...</p>
|
||||
<p>Some contents...</p>
|
||||
<p>Some contents...</p>
|
||||
</Modal> */}
|
||||
<BreadcumbComponent data={routeData} />
|
||||
<Card>
|
||||
<div>
|
||||
@@ -410,19 +407,21 @@ export const Membership = observer(() => {
|
||||
}}
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
<Form.Item
|
||||
name="supplier"
|
||||
label="Supplier"
|
||||
rules={[{ required: true, message: "Please input supplier!" }]}
|
||||
>
|
||||
<Select placeholder="Select Code Supplier" allowClear>
|
||||
{store.supplier.data.map((item) => (
|
||||
<Option value={item.code} key={item.code}>
|
||||
{item.code}
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
{store.authentication.userData.role === "Admin" && (
|
||||
<Form.Item
|
||||
name="supplier"
|
||||
label="Supplier"
|
||||
rules={[{ required: true, message: "Please input supplier!" }]}
|
||||
>
|
||||
<Select placeholder="Select Code Supplier" allowClear>
|
||||
{store.supplier.data.map((item) => (
|
||||
<Option value={item.code} key={item.code}>
|
||||
{item.code}
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
)}
|
||||
<Form.Item
|
||||
name="amount"
|
||||
label="Amount"
|
||||
|
||||
Reference in New Issue
Block a user