Bug Fixing
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
List,
|
||||
Tag,
|
||||
Divider,
|
||||
Image,
|
||||
} from "antd";
|
||||
import { BreadcumbComponent } from "../../component/BreadcumbComponent";
|
||||
import { LINKS } from "../../routes/app";
|
||||
@@ -20,6 +21,7 @@ import { observer } from "mobx-react-lite";
|
||||
import { format, parseISO } from "date-fns";
|
||||
import { ModalLoaderContext } from "../../utils/modal";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { appConfig } from "../../config/app";
|
||||
import { MembershipModal } from "./MembershipModal";
|
||||
|
||||
const { Title, Text } = Typography;
|
||||
@@ -83,8 +85,8 @@ export const DetailUser = observer(() => {
|
||||
modalLoader.setLoading(false);
|
||||
|
||||
response?.body?.statusCode === 201 || response?.body?.statusCode === 200
|
||||
? message.success(`Success Withdraw Profit`)
|
||||
: message.error(`Failed Withdraw Profit`);
|
||||
? message.success(`Success Withdraw Profit`)
|
||||
: message.error(`Failed Withdraw Profit`);
|
||||
await getData();
|
||||
} catch (err) {
|
||||
modalLoader.setLoading(false);
|
||||
@@ -327,11 +329,7 @@ export const DetailUser = observer(() => {
|
||||
? "danger"
|
||||
: "primary"
|
||||
}
|
||||
onClick={() =>
|
||||
withdrawProfit(
|
||||
store.membership.dataDetail.id,
|
||||
)
|
||||
}
|
||||
onClick={() => withdrawProfit(store.membership.dataDetail.id)}
|
||||
>
|
||||
Withdraw Profit
|
||||
</Button>
|
||||
@@ -343,42 +341,70 @@ export const DetailUser = observer(() => {
|
||||
<Row style={{ marginBottom: 20 }}>
|
||||
<Col lg={12} xs={24}>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text strong>Name</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text>{store.authentication.dataProfit.userDetail?.name}</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text strong>Username</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text>{store.authentication.dataProfit.username}</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text strong>Role</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text>{store.authentication.dataProfit.roles?.name}</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text strong>Phone Number</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text>
|
||||
{store.authentication.dataProfit.userDetail?.phone_number}
|
||||
</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text strong>Id Number</Text>
|
||||
</Col>
|
||||
<Col span={10}>
|
||||
<Text>
|
||||
{store.authentication.dataProfit.userDetail?.identity_number}
|
||||
</Text>
|
||||
</Col>
|
||||
<Col span={10}>
|
||||
<Text strong>Status</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={10}>
|
||||
<Text>
|
||||
{store.authentication.dataProfit.isActive === true
|
||||
? "Aktif"
|
||||
: "Inaktif"}
|
||||
</Text>
|
||||
</Col>
|
||||
<Col span={10}>
|
||||
<Text strong>Image identity</Text>
|
||||
</Col>
|
||||
<Col span={10}>
|
||||
<Text strong>Image Store</Text>
|
||||
</Col>
|
||||
<Col span={10}>
|
||||
<Image
|
||||
src={`${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_identity}`}
|
||||
style={{ width: "5vw" }}
|
||||
alt={store.authentication.dataProfit.userDetail?.name}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={10}>
|
||||
<Image
|
||||
src={`${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_store}`}
|
||||
style={{ width: "5vw" }}
|
||||
alt={store.authentication.dataProfit.userDetail?.name}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
<Col lg={12} xs={24}>
|
||||
@@ -418,7 +444,7 @@ export const DetailUser = observer(() => {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.authentication.dataProfit?.profit || 0
|
||||
store.authentication.dataProfit?.profit || 0
|
||||
)}
|
||||
</Text>
|
||||
</Col>
|
||||
|
||||
Reference in New Issue
Block a user