Merge branch 'develop' into 'devops-staging'
Perbaikan Project PPOB See merge request empatnusabangsa/ppob/ppob-frontend!35
This commit is contained in:
commit
93b466ad7a
|
@ -76,3 +76,7 @@ code {
|
|||
.profile-container .ant-popover-inner-content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.ant-menu-item-divider{
|
||||
border-style: transparent !important;
|
||||
}
|
|
@ -8,6 +8,7 @@ import {
|
|||
BarChartOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { ModalLoaderContext } from "../../utils/modal";
|
||||
import Title from "antd/lib/skeleton/Title";
|
||||
|
||||
export const Home = observer(() => {
|
||||
const modalLoader = useContext(ModalLoaderContext);
|
||||
|
@ -20,7 +21,7 @@ export const Home = observer(() => {
|
|||
await getData();
|
||||
await store.membership.getDataBySuperior();
|
||||
await store.partner.getData();
|
||||
if(isAdmin){
|
||||
if (isAdmin) {
|
||||
await store.transaction.getDataTransaction();
|
||||
await store.transaction.getDataTransactionB2B();
|
||||
} else {
|
||||
|
@ -99,7 +100,178 @@ export const Home = observer(() => {
|
|||
];
|
||||
return (
|
||||
<div>
|
||||
{store.ui.mediaQuery.isDesktop && store.authentication.userData.role === "Admin" && (
|
||||
{store.ui.mediaQuery.isDesktop &&
|
||||
store.authentication.userData.role === "Admin" && (
|
||||
<Row
|
||||
style={{
|
||||
marginTop: 30,
|
||||
marginLeft: 30,
|
||||
}}
|
||||
>
|
||||
<Card
|
||||
className={"shadow"}
|
||||
hoverable
|
||||
title={
|
||||
<span
|
||||
style={{
|
||||
fontSize: 20,
|
||||
fontStyle: "bold",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
{store.transaction.dataTransaction.total_transaction}{" "}
|
||||
Transaksi B2C
|
||||
</span>
|
||||
}
|
||||
style={{
|
||||
marginLeft: 20,
|
||||
height: 200,
|
||||
marginBottom: 10,
|
||||
borderColor: "salmon",
|
||||
width: "45%",
|
||||
}}
|
||||
>
|
||||
<Row>
|
||||
<Row style={{ marginTop: 20 }}>
|
||||
<Col style={{ marginRight: 40 }}>
|
||||
<p>
|
||||
<h4>
|
||||
Total Penjualan :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransaction.total_amount
|
||||
)}
|
||||
</h4>
|
||||
|
||||
<h4>
|
||||
Total Modal :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransaction.total_modal
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</Col>
|
||||
<Col>
|
||||
<p>
|
||||
<h4>
|
||||
Total Profit :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransaction.total_profit
|
||||
)}
|
||||
</h4>
|
||||
|
||||
<h4>
|
||||
Total Komisi :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransaction.total_commission
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</Col>
|
||||
</Row>
|
||||
</Row>
|
||||
</Card>
|
||||
<Card
|
||||
className={"shadow"}
|
||||
hoverable
|
||||
title={
|
||||
<span
|
||||
style={{
|
||||
fontSize: 20,
|
||||
fontStyle: "bold",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
{store.transaction.dataTransactionB2B.total_transaction}{" "}
|
||||
Transaksi B2B
|
||||
</span>
|
||||
}
|
||||
style={{
|
||||
marginLeft: 20,
|
||||
height: 200,
|
||||
marginBottom: 10,
|
||||
borderColor: "salmon",
|
||||
width: "45%",
|
||||
}}
|
||||
>
|
||||
<Row>
|
||||
<Row style={{ marginTop: 20 }}>
|
||||
<Col style={{ marginRight: 40 }}>
|
||||
<p>
|
||||
<h4>
|
||||
Total Penjualan :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransactionB2B.total_amount
|
||||
)}
|
||||
</h4>
|
||||
|
||||
<h4>
|
||||
Total Modal :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransactionB2B.total_modal
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</Col>
|
||||
<Col>
|
||||
<p>
|
||||
<h4>
|
||||
Total Profit :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransactionB2B.total_profit
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</Col>
|
||||
</Row>
|
||||
</Row>
|
||||
</Card>
|
||||
{/*<Card*/}
|
||||
{/* className={"shadow"}*/}
|
||||
{/* hoverable*/}
|
||||
{/* style={{*/}
|
||||
{/* marginLeft: 20,*/}
|
||||
{/* height: 200,*/}
|
||||
{/* marginBottom: 10,*/}
|
||||
{/* borderColor: "salmon",*/}
|
||||
{/* width: "30%",*/}
|
||||
{/* }}*/}
|
||||
{/*>*/}
|
||||
{/* <Row>*/}
|
||||
{/* <PageHeader title={<span>Total Keuntungan B2C</span>}>*/}
|
||||
{/* <span>*/}
|
||||
{/* {new Intl.NumberFormat("id-ID", {*/}
|
||||
{/* style: "currency",*/}
|
||||
{/* currency: "IDR",*/}
|
||||
{/* }).format(store.authentication.profileData?.wallet || 0)}*/}
|
||||
{/* </span>*/}
|
||||
{/* </PageHeader>*/}
|
||||
{/* </Row>*/}
|
||||
{/*</Card>*/}
|
||||
</Row>
|
||||
)}
|
||||
{store.ui.mediaQuery.isDesktop &&
|
||||
store.authentication.userData.role === "Admin Partner" && (
|
||||
<Row
|
||||
style={{
|
||||
marginTop: 30,
|
||||
|
@ -118,29 +290,14 @@ export const Home = observer(() => {
|
|||
}}
|
||||
>
|
||||
<Row>
|
||||
{/*<BarChartOutlined style={{ fontSize: 25 ,marginRight:80}} />*/}
|
||||
|
||||
<PageHeader title={<span>{store.transaction.dataTransaction.total_transaction} Transaksi B2C</span>}>
|
||||
<PageHeader title={<span>Total Transaksi</span>}>
|
||||
<p>
|
||||
<h4>Total Penjualan : { new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.transaction.dataTransaction.total_amount)}</h4>
|
||||
|
||||
<h4>Total Modal : { new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.transaction.dataTransaction.total_modal)}</h4>
|
||||
|
||||
<h4>Total Profit : { new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.transaction.dataTransaction.total_profit)}</h4>
|
||||
|
||||
<h4>Total Komisi : { new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.transaction.dataTransaction.total_commission)}</h4>
|
||||
<h4>
|
||||
{
|
||||
store.transaction.dataTransactionPartner
|
||||
.total_transaction
|
||||
}
|
||||
</h4>
|
||||
</p>
|
||||
</PageHeader>
|
||||
</Row>
|
||||
|
@ -157,22 +314,16 @@ export const Home = observer(() => {
|
|||
}}
|
||||
>
|
||||
<Row>
|
||||
<PageHeader title={<span>{store.transaction.dataTransactionB2B.total_transaction} Transaksi B2B</span>}>
|
||||
<PageHeader title={<span>Total Penjualan</span>}>
|
||||
<p>
|
||||
<h4>Total Penjualan : { new Intl.NumberFormat("id-ID", {
|
||||
<h4>
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.transaction.dataTransactionB2B.total_amount)}</h4>
|
||||
|
||||
<h4>Total Modal : { new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.transaction.dataTransactionB2B.total_modal)}</h4>
|
||||
|
||||
<h4>Total Profit : { new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.transaction.dataTransactionB2B.total_profit)}</h4>
|
||||
}).format(
|
||||
store.transaction.dataTransactionPartner.total_amount
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</PageHeader>
|
||||
</Row>
|
||||
|
@ -201,28 +352,203 @@ export const Home = observer(() => {
|
|||
{/*</Card>*/}
|
||||
</Row>
|
||||
)}
|
||||
{store.ui.mediaQuery.isDesktop && store.authentication.userData.role === "Admin Partner" && (
|
||||
{store.ui.mediaQuery.isMobile &&
|
||||
store.authentication.userData.role === "Admin" && (
|
||||
<Row
|
||||
style={{
|
||||
marginTop: 30,
|
||||
marginLeft: 30,
|
||||
marginTop: 20,
|
||||
marginLeft: 10,
|
||||
}}
|
||||
>
|
||||
<Card
|
||||
className={"shadow"}
|
||||
hoverable
|
||||
title={
|
||||
<span
|
||||
style={{
|
||||
fontSize: 20,
|
||||
fontStyle: "bold",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
{store.transaction.dataTransaction.total_transaction}{" "}
|
||||
Transaksi B2C
|
||||
</span>
|
||||
}
|
||||
style={{
|
||||
marginLeft: 10,
|
||||
height: 220,
|
||||
marginBottom: 10,
|
||||
borderColor: "salmon",
|
||||
width: "90%",
|
||||
}}
|
||||
>
|
||||
<Row>
|
||||
<Row>
|
||||
<Col style={{ marginRight: 40 }}>
|
||||
<p>
|
||||
<h4>
|
||||
Total Penjualan :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransaction.total_amount
|
||||
)}
|
||||
</h4>
|
||||
|
||||
<h4>
|
||||
Total Modal :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransaction.total_modal
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</Col>
|
||||
<Col>
|
||||
<p>
|
||||
<h4>
|
||||
Total Profit :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransaction.total_profit
|
||||
)}
|
||||
</h4>
|
||||
|
||||
<h4>
|
||||
Total Komisi :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransaction.total_commission
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</Col>
|
||||
</Row>
|
||||
</Row>
|
||||
</Card>
|
||||
<Card
|
||||
className={"shadow"}
|
||||
hoverable
|
||||
title={
|
||||
<span
|
||||
style={{
|
||||
fontSize: 20,
|
||||
fontStyle: "bold",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
{store.transaction.dataTransactionB2B.total_transaction}{" "}
|
||||
Transaksi B2B
|
||||
</span>
|
||||
}
|
||||
style={{
|
||||
marginLeft: 10,
|
||||
height: 200,
|
||||
borderColor: "salmon",
|
||||
width: "90%",
|
||||
}}
|
||||
>
|
||||
<Row>
|
||||
<Row>
|
||||
<Col style={{ marginRight: 40 }}>
|
||||
<p>
|
||||
<h4>
|
||||
Total Penjualan :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransactionB2B.total_amount
|
||||
)}
|
||||
</h4>
|
||||
|
||||
<h4>
|
||||
Total Modal :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransactionB2B.total_modal
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</Col>
|
||||
<Col>
|
||||
<p>
|
||||
<h4>
|
||||
Total Profit :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.transaction.dataTransactionB2B.total_profit
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</Col>
|
||||
</Row>
|
||||
</Row>
|
||||
</Card>
|
||||
{/*<Card*/}
|
||||
{/* className={"shadow"}*/}
|
||||
{/* hoverable*/}
|
||||
{/* style={{*/}
|
||||
{/* marginLeft: 20,*/}
|
||||
{/* height: 200,*/}
|
||||
{/* marginBottom: 10,*/}
|
||||
{/* borderColor: "salmon",*/}
|
||||
{/* width: "30%",*/}
|
||||
{/* }}*/}
|
||||
{/*>*/}
|
||||
{/* <Row>*/}
|
||||
{/* <PageHeader title={<span>Total Keuntungan B2C</span>}>*/}
|
||||
{/* <span>*/}
|
||||
{/* {new Intl.NumberFormat("id-ID", {*/}
|
||||
{/* style: "currency",*/}
|
||||
{/* currency: "IDR",*/}
|
||||
{/* }).format(store.authentication.profileData?.wallet || 0)}*/}
|
||||
{/* </span>*/}
|
||||
{/* </PageHeader>*/}
|
||||
{/* </Row>*/}
|
||||
{/*</Card>*/}
|
||||
</Row>
|
||||
)}
|
||||
{store.ui.mediaQuery.isMobile &&
|
||||
store.authentication.userData.role === "Admin Partner" && (
|
||||
<Row
|
||||
style={{
|
||||
marginTop: 20,
|
||||
marginLeft: 10,
|
||||
}}
|
||||
>
|
||||
<Card
|
||||
className={"shadow"}
|
||||
hoverable
|
||||
style={{
|
||||
marginLeft: 20,
|
||||
marginLeft: 10,
|
||||
height: 200,
|
||||
marginBottom: 10,
|
||||
borderColor: "salmon",
|
||||
width: "45%",
|
||||
width: "90%",
|
||||
}}
|
||||
>
|
||||
<Row>
|
||||
<PageHeader title={<span>Total Transaksi</span>}>
|
||||
<p>
|
||||
<h4>{store.transaction.dataTransactionPartner.total_transaction}</h4>
|
||||
<h4>
|
||||
{
|
||||
store.transaction.dataTransactionPartner
|
||||
.total_transaction
|
||||
}
|
||||
</h4>
|
||||
</p>
|
||||
</PageHeader>
|
||||
</Row>
|
||||
|
@ -231,20 +557,24 @@ export const Home = observer(() => {
|
|||
className={"shadow"}
|
||||
hoverable
|
||||
style={{
|
||||
marginLeft: 20,
|
||||
marginLeft: 10,
|
||||
height: 200,
|
||||
marginBottom: 10,
|
||||
borderColor: "salmon",
|
||||
width: "45%",
|
||||
width: "90%",
|
||||
}}
|
||||
>
|
||||
<Row>
|
||||
<PageHeader title={<span>Total Penjualan</span>}>
|
||||
<p>
|
||||
<h4>{ new Intl.NumberFormat("id-ID", {
|
||||
<h4>
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.transaction.dataTransactionPartner.total_amount)}</h4>
|
||||
}).format(
|
||||
store.transaction.dataTransactionPartner.total_amount
|
||||
)}
|
||||
</h4>
|
||||
</p>
|
||||
</PageHeader>
|
||||
</Row>
|
||||
|
|
|
@ -224,7 +224,7 @@ export const DetailUser = observer(() => {
|
|||
<Card>
|
||||
<Row style={{marginBottom:10}}>
|
||||
<Title strong level={2} >Detail User</Title>
|
||||
<Col lg={20} xs={20} style={{ textAlign: "right" }}>
|
||||
<Col lg={20} xs={20} style={{textAlign: "right" }}>
|
||||
{store.authentication.userData.role === "Admin" && (
|
||||
<Space
|
||||
size="middle"
|
||||
|
|
|
@ -377,7 +377,11 @@ export const Membership = observer(() => {
|
|||
current: store.membership.page + 1,
|
||||
style: { marginBottom: "1rem", marginRight: "1rem" },
|
||||
}}
|
||||
dataSource={store.membership.data}
|
||||
dataSource={
|
||||
store.authentication.userData.role === "Admin"
|
||||
? store.membership.dataMember
|
||||
: store.membership.data
|
||||
}
|
||||
style={{ padding: 0 }}
|
||||
renderItem={(item) => {
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue
Block a user