Perbaikan Project PPOB
This commit is contained in:
@@ -43,7 +43,6 @@ export const DetailUser = observer(() => {
|
||||
modalLoader.setLoading(false);
|
||||
})();
|
||||
|
||||
|
||||
return () => {
|
||||
store.membership.dataDetail = {};
|
||||
store.transaction.dataHistoryTopUp = [];
|
||||
@@ -266,9 +265,16 @@ export const DetailUser = observer(() => {
|
||||
justifyContent: "center",
|
||||
}
|
||||
: null;
|
||||
console.log(JSON.parse(store.authentication.dataProfit.userDetail?.image_store)," ini dia")
|
||||
const data = JSON.parse(store.authentication.dataProfit.userDetail?.image_store)
|
||||
console.log(data,"ini data")
|
||||
// console.log(
|
||||
// JSON.parse(store.authentication.dataProfit.userDetail?.image_store),
|
||||
// " ini dia"
|
||||
// );
|
||||
const data = store.authentication.listImage;
|
||||
console.log(data, "ini data");
|
||||
console.log(
|
||||
store.authentication.dataProfit.userDetail?.image_identity,
|
||||
"detail"
|
||||
);
|
||||
return (
|
||||
<div className={["ppob-container"].join(" ")}>
|
||||
<BreadcumbComponent data={routeData} />
|
||||
@@ -308,19 +314,25 @@ export const DetailUser = observer(() => {
|
||||
id: store.membership.dataDetail.id,
|
||||
name: store.membership.dataDetail.userDetail.name,
|
||||
username: store.membership.dataDetail.username,
|
||||
identity_number: store.membership.dataDetail.userDetail.identity_number,
|
||||
image_identity: store.membership.dataDetail?.userDetail.image_identity,
|
||||
image_store: store.membership.dataDetail?.userDetail.image_store,
|
||||
identity_number:
|
||||
store.membership.dataDetail.userDetail.identity_number,
|
||||
image_identity:
|
||||
store.membership.dataDetail?.userDetail.image_identity,
|
||||
image_store:
|
||||
store.membership.dataDetail?.userDetail.image_store,
|
||||
phone_number:
|
||||
store.membership.dataDetail.userDetail.phone_number,
|
||||
roleId: store.membership.dataDetail.roles.id,
|
||||
isChangePassword: false,
|
||||
|
||||
});
|
||||
console.log(store.membership.dataDetail.userDetail.identity_number)
|
||||
console.log(store.membership.dataDetail.userDetail.id)
|
||||
console.log(store.membership.dataDetail.userDetail.image_identity)
|
||||
console.log(store.membership.dataDetail.username)
|
||||
console.log(
|
||||
store.membership.dataDetail.userDetail.identity_number
|
||||
);
|
||||
console.log(store.membership.dataDetail.userDetail.id);
|
||||
console.log(
|
||||
store.membership.dataDetail.userDetail.image_identity
|
||||
);
|
||||
console.log(store.membership.dataDetail.username);
|
||||
setVisibleModal(true);
|
||||
}}
|
||||
>
|
||||
@@ -409,9 +421,46 @@ export const DetailUser = observer(() => {
|
||||
<Col span={12}>
|
||||
<Text strong>Foto Identitas</Text>
|
||||
</Col>
|
||||
<Col span={12}></Col>
|
||||
<Col span={12}>
|
||||
<Text strong>Foto Toko</Text>
|
||||
<Text>
|
||||
<Image
|
||||
src={
|
||||
store.authentication.dataProfit.userDetail
|
||||
?.image_identity
|
||||
? `${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_identity}`
|
||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||
}
|
||||
style={{ width: "10vw",marginLeft:10 }}
|
||||
/>
|
||||
</Text>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Text strong>Foto Toko</Text>
|
||||
<Text>
|
||||
<Row>
|
||||
{data.map((item) => (
|
||||
<Image
|
||||
src={
|
||||
store.authentication.dataProfit.userDetail
|
||||
?.image_store
|
||||
? `${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 }}
|
||||
/>
|
||||
))}
|
||||
</Row>
|
||||
</Text>
|
||||
</Col>
|
||||
</Row>
|
||||
)}
|
||||
{store.authentication.userData.role === "Admin" && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Text strong>Foto Identitas</Text>
|
||||
</Col>
|
||||
<Col span={12}></Col>
|
||||
<Col span={12}>
|
||||
<Text>
|
||||
<Image
|
||||
@@ -425,60 +474,27 @@ export const DetailUser = observer(() => {
|
||||
/>
|
||||
</Text>
|
||||
</Col>
|
||||
|
||||
<Col span={12}>
|
||||
|
||||
<Text>
|
||||
{data.map((item)=>{
|
||||
<Image
|
||||
src={
|
||||
store.authentication.dataProfit.userDetail
|
||||
?.image_store
|
||||
? `${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" }}
|
||||
/>
|
||||
})}
|
||||
</Text>
|
||||
|
||||
</Col>
|
||||
|
||||
</Row>
|
||||
)}
|
||||
{store.authentication.userData.role === "Admin" && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Text strong>Foto Identitas</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={24}>
|
||||
<Text strong>Foto Toko</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text>
|
||||
<Image
|
||||
src={
|
||||
store.authentication.dataProfit.userDetail?.image_identity
|
||||
? "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||
: `${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_identity}`}
|
||||
style={{ width: "10vw" }}
|
||||
/>
|
||||
</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text>
|
||||
<Image
|
||||
src={
|
||||
store.authentication.dataProfit.userDetail
|
||||
?.image_store
|
||||
?"https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||
: `${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_store}` }
|
||||
style={{ width: "10vw" }}
|
||||
/>
|
||||
<Row>
|
||||
{data.map((item) => (
|
||||
<Image
|
||||
src={
|
||||
store.authentication.dataProfit.userDetail
|
||||
?.image_store
|
||||
? `${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 }}
|
||||
/>
|
||||
))}
|
||||
</Row>
|
||||
</Text>
|
||||
</Col>
|
||||
</Row>
|
||||
)}
|
||||
|
||||
{store.authentication.userData.role === "Supervisor" && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
@@ -491,7 +507,7 @@ export const DetailUser = observer(() => {
|
||||
src={
|
||||
store.authentication.dataProfit.userDetail
|
||||
?.image_identity
|
||||
? `${appConfig.apiUrl}/config/image/${store.authentication.profileData.userDetail?.image_identity}`
|
||||
? `${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_identity}`
|
||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||
}
|
||||
style={{ width: "10vw" }}
|
||||
@@ -639,7 +655,7 @@ export const DetailUser = observer(() => {
|
||||
itemLayout="horizontal"
|
||||
position={"top"}
|
||||
pagination={{
|
||||
onChange: async (page,pageSize) => {
|
||||
onChange: async (page, pageSize) => {
|
||||
store.transaction.pageSize = pageSize;
|
||||
store.transaction.page = page - 1;
|
||||
modalLoader.setLoading(true);
|
||||
|
||||
Reference in New Issue
Block a user