Merge branch 'develop' into 'devops-staging'
Develop See merge request empatnusabangsa/ppob/ppob-frontend!18
This commit is contained in:
commit
30cb348e10
|
@ -1,5 +1,5 @@
|
||||||
import React, {useContext, useEffect, useState} from "react";
|
import React, {useContext, useEffect, useState} from "react";
|
||||||
import {Button, Card, Col, message, Row, Space, Table, Tag, Typography,} from "antd";
|
import {Button, Card, Col, message, Row, Space, Table, Typography,} from "antd";
|
||||||
import {BreadcumbComponent} from "../../component/BreadcumbComponent";
|
import {BreadcumbComponent} from "../../component/BreadcumbComponent";
|
||||||
import {LINKS} from "../../routes/app";
|
import {LINKS} from "../../routes/app";
|
||||||
import {useStore} from "../../utils/useStore";
|
import {useStore} from "../../utils/useStore";
|
||||||
|
@ -104,6 +104,11 @@ export const DetailUser = observer(() => {
|
||||||
title: "Amount",
|
title: "Amount",
|
||||||
dataIndex: "amount",
|
dataIndex: "amount",
|
||||||
key: "amount",
|
key: "amount",
|
||||||
|
render: (text) =>
|
||||||
|
new Intl.NumberFormat("id-ID", {
|
||||||
|
style: "currency",
|
||||||
|
currency: "IDR",
|
||||||
|
}).format(text),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Transaction Date",
|
title: "Transaction Date",
|
||||||
|
@ -117,19 +122,6 @@ export const DetailUser = observer(() => {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "Status",
|
|
||||||
dataIndex: "isActive",
|
|
||||||
key: "isActive",
|
|
||||||
render: (text, record) => (
|
|
||||||
<Tag
|
|
||||||
color={store.membership.dataDetail.isActive === true ? "processing" : "#E3E8EE"}
|
|
||||||
style={{color: "#4F566B"}}
|
|
||||||
>
|
|
||||||
{store.membership.dataDetail.isActive === true ? " ACTIVE" : "INACTIVE"}
|
|
||||||
</Tag>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const routeData = [
|
const routeData = [
|
||||||
|
@ -142,8 +134,8 @@ export const DetailUser = observer(() => {
|
||||||
name: <span style={{ fontWeight: "bold" }}>Keanggotaan</span>,
|
name: <span style={{ fontWeight: "bold" }}>Keanggotaan</span>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: LINKS.USER_DETAIL,
|
route: LINKS.USER_DETAIL.replace(":id", id),
|
||||||
name: <span style={{ fontWeight: "bold" }}>Detail Anggota</span>,
|
name: <span style={{fontWeight: "bold"}}>Detail User</span>,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -194,22 +186,19 @@ export const DetailUser = observer(() => {
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
<Col lg={12} xs={24}>
|
<Col lg={12} xs={24}>
|
||||||
<Title strong level={3}>Action User Detail</Title>
|
{store.authentication.userData.role === "Admin" && <Title strong level={3}>Action User Detail</Title>}
|
||||||
<Space
|
{store.authentication.userData.role === "Admin" && <Space
|
||||||
size="middle"
|
size="middle"
|
||||||
align={"center"}
|
align={"center"}
|
||||||
wrap={true}
|
wrap={true}
|
||||||
style={{textAlign: 'center'}}
|
style={{textAlign: 'center'}}
|
||||||
>
|
>
|
||||||
{store.authentication.userData.role === "Admin" &&
|
|
||||||
<Button
|
<Button
|
||||||
type={store.membership.dataDetail.isActive === true ? "danger" : "primary"}
|
type={store.membership.dataDetail.isActive === true ? "danger" : "primary"}
|
||||||
onClick={() => changeStatus(store.membership.dataDetail.id, store.membership.dataDetail.isActive)}
|
onClick={() => changeStatus(store.membership.dataDetail.id, store.membership.dataDetail.isActive)}
|
||||||
>
|
>
|
||||||
{store.membership.dataDetail.isActive === true ? "Inactive" : "Active"}
|
{store.membership.dataDetail.isActive === true ? "Inactive" : "Active"}
|
||||||
</Button>
|
</Button>
|
||||||
}
|
|
||||||
{store.authentication.userData.role === "Admin" &&
|
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setInitialData({
|
setInitialData({
|
||||||
|
@ -225,8 +214,6 @@ export const DetailUser = observer(() => {
|
||||||
>
|
>
|
||||||
Edit
|
Edit
|
||||||
</Button>
|
</Button>
|
||||||
}
|
|
||||||
{store.authentication.userData.role === "Admin" &&
|
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setInitialData({
|
setInitialData({
|
||||||
|
@ -242,8 +229,7 @@ export const DetailUser = observer(() => {
|
||||||
>
|
>
|
||||||
Ganti Password
|
Ganti Password
|
||||||
</Button>
|
</Button>
|
||||||
}
|
</Space>}
|
||||||
</Space>
|
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
|
|
|
@ -25,7 +25,7 @@ export const ProductDetail = observer(() => {
|
||||||
name: <span style={{ fontWeight: "bold" }}>Produk</span>,
|
name: <span style={{ fontWeight: "bold" }}>Produk</span>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: LINKS.PRODUCT_DETAIL,
|
route: LINKS.PRODUCT_DETAIL.replace(':id', `${id}`),
|
||||||
name: <span style={{fontWeight: "bold"}}>Detail Produk</span>,
|
name: <span style={{fontWeight: "bold"}}>Detail Produk</span>,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user