Perbaikan Project PPOB
This commit is contained in:
@@ -252,6 +252,17 @@ export const DetailUser = observer(() => {
|
||||
},
|
||||
];
|
||||
|
||||
const dataRoute = [
|
||||
{
|
||||
route: LINKS.MEMBERSHIP,
|
||||
name: "Keanggotaan"
|
||||
},
|
||||
{
|
||||
route: LINKS.USER_DETAIL.replace(":id", id),
|
||||
name: <span style={{ fontWeight: "bold" }}>Detail User</span>,
|
||||
},
|
||||
];
|
||||
|
||||
const styleSaldoTitle = store.ui.mediaQuery.isDesktop
|
||||
? {
|
||||
display: "flex",
|
||||
@@ -275,21 +286,22 @@ export const DetailUser = observer(() => {
|
||||
store.authentication.dataProfit.userDetail?.image_identity,
|
||||
"detail"
|
||||
);
|
||||
console.log(
|
||||
store.authentication.listImage,
|
||||
"detail gambar"
|
||||
);
|
||||
console.log(store.authentication.listImage, "detail gambar");
|
||||
return (
|
||||
<div className={[""].join(" ")}>
|
||||
<BreadcumbComponent data={routeData} />
|
||||
<BreadcumbComponent
|
||||
data={
|
||||
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
||||
}
|
||||
/>
|
||||
<Card>
|
||||
<Row style={{ marginBottom: 10 }}>
|
||||
<Title strong level={2}>
|
||||
Detail User
|
||||
</Title>
|
||||
|
||||
{store.authentication.userData.role === "Admin" && (
|
||||
<Col lg={18} xs={18} style={{ textAlign: "right" }}>
|
||||
|
||||
{store.authentication.userData.role === "Admin" && (
|
||||
<Col lg={18} xs={18} style={{ textAlign: "right" }}>
|
||||
<Space
|
||||
size="middle"
|
||||
align={"center"}
|
||||
@@ -338,7 +350,8 @@ export const DetailUser = observer(() => {
|
||||
store.membership.dataDetail.userDetail.image_identity
|
||||
);
|
||||
console.log(
|
||||
store.membership.dataDetail.userDetail.image_store,"ini store"
|
||||
store.membership.dataDetail.userDetail.image_store,
|
||||
"ini store"
|
||||
);
|
||||
console.log(store.membership.dataDetail.username);
|
||||
setVisibleModal(true);
|
||||
@@ -373,10 +386,10 @@ export const DetailUser = observer(() => {
|
||||
Withdraw Profit
|
||||
</Button>
|
||||
</Space>
|
||||
</Col>
|
||||
)}
|
||||
{store.authentication.userData.role === "Supervisor" && (
|
||||
<Col lg={16} xs={16} style={{ textAlign: "right" }}>
|
||||
</Col>
|
||||
)}
|
||||
{store.authentication.userData.role === "Supervisor" && (
|
||||
<Col lg={16} xs={16} style={{ textAlign: "right" }}>
|
||||
<Space
|
||||
size="middle"
|
||||
align={"center"}
|
||||
@@ -447,10 +460,10 @@ export const DetailUser = observer(() => {
|
||||
Ganti Password
|
||||
</Button>
|
||||
</Space>
|
||||
</Col>
|
||||
)}
|
||||
{store.authentication.userData.role === "Sales" && (
|
||||
<Col lg={16} xs={16} style={{ textAlign: "right" }}>
|
||||
</Col>
|
||||
)}
|
||||
{store.authentication.userData.role === "Sales" && (
|
||||
<Col lg={16} xs={16} style={{ textAlign: "right" }}>
|
||||
<Space
|
||||
size="middle"
|
||||
align={"center"}
|
||||
@@ -521,9 +534,8 @@ export const DetailUser = observer(() => {
|
||||
Ganti Password
|
||||
</Button>
|
||||
</Space>
|
||||
</Col>
|
||||
)}
|
||||
|
||||
</Col>
|
||||
)}
|
||||
</Row>
|
||||
|
||||
<Row style={{ marginBottom: 20 }}>
|
||||
@@ -641,7 +653,7 @@ export const DetailUser = observer(() => {
|
||||
? `${appConfig.apiUrl}/config/image/${item}`
|
||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||
}
|
||||
style={{ width: "10vw",marginRight:15 }}
|
||||
style={{ width: "10vw", marginRight: 15 }}
|
||||
/>
|
||||
))}
|
||||
</Row>
|
||||
@@ -679,7 +691,7 @@ export const DetailUser = observer(() => {
|
||||
? `${appConfig.apiUrl}/config/image/${item}`
|
||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||
}
|
||||
style={{ width: "10vw",marginRight:15 }}
|
||||
style={{ width: "10vw", marginRight: 15 }}
|
||||
/>
|
||||
))}
|
||||
</Row>
|
||||
@@ -687,7 +699,7 @@ export const DetailUser = observer(() => {
|
||||
</Col>
|
||||
</Row>
|
||||
)}
|
||||
|
||||
|
||||
{store.authentication.userData.role === "Supervisor" && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
|
||||
@@ -30,7 +30,6 @@ import { LINKS } from "../../routes/app";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { ModalLoaderContext } from "../../utils/modal";
|
||||
|
||||
|
||||
export const Membership = observer(() => {
|
||||
const history = useHistory();
|
||||
const { Option } = Select;
|
||||
@@ -253,12 +252,19 @@ export const Membership = observer(() => {
|
||||
name: <span style={{ fontWeight: "bold" }}>Keanggotaan</span>,
|
||||
},
|
||||
];
|
||||
|
||||
const dataRoute = [
|
||||
{
|
||||
route: LINKS.MEMBERSHIP,
|
||||
name: "Keanggotaan"
|
||||
},
|
||||
];
|
||||
const onSubmit = async (data, image, imageStore) => {
|
||||
data.superior = true;
|
||||
console.log(imageStore, "Apa imageStore")
|
||||
console.log(imageStore, "Apa imageStore");
|
||||
|
||||
if(!imageStore){
|
||||
imageStore = []
|
||||
if (!imageStore) {
|
||||
imageStore = [];
|
||||
}
|
||||
|
||||
if (initialData.id) {
|
||||
@@ -325,7 +331,11 @@ export const Membership = observer(() => {
|
||||
};
|
||||
return (
|
||||
<div className={["ppob-container"].join(" ")}>
|
||||
<BreadcumbComponent data={routeData} />
|
||||
<BreadcumbComponent
|
||||
data={
|
||||
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
||||
}
|
||||
/>
|
||||
<Card>
|
||||
<div>
|
||||
<Row style={{ marginBottom: 20 }}>
|
||||
@@ -399,7 +409,7 @@ export const Membership = observer(() => {
|
||||
pagination={{
|
||||
onChange: async (page, pageSize) => {
|
||||
store.membership.pageSize = pageSize;
|
||||
store.membership.page = page -1;
|
||||
store.membership.page = page - 1;
|
||||
modalLoader.setLoading(true);
|
||||
await getData();
|
||||
modalLoader.setLoading(false);
|
||||
@@ -442,7 +452,7 @@ export const Membership = observer(() => {
|
||||
<small>Role : {item.roles?.name}</small> <br />
|
||||
<small>Saldo : {item.coa?.amount}</small> <br />
|
||||
<Button
|
||||
style={{ marginRight: 10,marginTop:7 }}
|
||||
style={{ marginRight: 10, marginTop: 7 }}
|
||||
onClick={() => {
|
||||
setDestination(item?.id);
|
||||
console.log(item?.id);
|
||||
|
||||
Reference in New Issue
Block a user