Perbaikan Project PPOB
This commit is contained in:
parent
a9d0d199d1
commit
64b33c2d6b
|
@ -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,11 +474,11 @@ export const DetailUser = observer(() => {
|
|||
/>
|
||||
</Text>
|
||||
</Col>
|
||||
|
||||
<Col span={12}>
|
||||
|
||||
<Col span={24}>
|
||||
<Text strong>Foto Toko</Text>
|
||||
<Text>
|
||||
{data.map((item)=>{
|
||||
<Row>
|
||||
{data.map((item) => (
|
||||
<Image
|
||||
src={
|
||||
store.authentication.dataProfit.userDetail
|
||||
|
@ -437,48 +486,15 @@ 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" }}
|
||||
style={{ width: "10vw",marginRight:15 }}
|
||||
/>
|
||||
})}
|
||||
</Text>
|
||||
|
||||
</Col>
|
||||
|
||||
))}
|
||||
</Row>
|
||||
)}
|
||||
{store.authentication.userData.role === "Admin" && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Text strong>Foto Identitas</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<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" }}
|
||||
/>
|
||||
</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" }}
|
||||
|
|
|
@ -359,7 +359,6 @@ export const Membership = observer(() => {
|
|||
? store.membership.dataMember
|
||||
: store.membership.data
|
||||
}
|
||||
bordered
|
||||
pagination={{
|
||||
pageSize: store.membership.pageSize,
|
||||
total:
|
||||
|
|
|
@ -256,7 +256,7 @@ export const Profile = observer(() => {
|
|||
{store.authentication.profileData.superior?.username}
|
||||
</Text>
|
||||
</Col>
|
||||
{store.authentication.userData.role === "Retail" && (
|
||||
{/* {store.authentication.userData.role === "Retail" && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Text strong>Foto Identitas</Text>
|
||||
|
@ -291,6 +291,48 @@ export const Profile = observer(() => {
|
|||
</Text>
|
||||
</Col>
|
||||
</Row>
|
||||
)} */}
|
||||
{store.authentication.userData.role === "Retail" && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Text strong>Foto Identitas</Text>
|
||||
</Col>
|
||||
<Col span={12}></Col>
|
||||
<Col span={12}>
|
||||
<Text>
|
||||
<Image
|
||||
src={
|
||||
store.authentication.profileData.userDetail
|
||||
?.image_identity
|
||||
? `${appConfig.apiUrl}/config/image/${store.authentication.profileData.userDetail?.image_identity}`
|
||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||
}
|
||||
style={{ width: "10vw" }}
|
||||
/>
|
||||
</Text>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Text strong>Foto Toko</Text>
|
||||
<Text>
|
||||
<Row>
|
||||
{JSON.parse(
|
||||
store.authentication.profileData.userDetail
|
||||
?.image_store
|
||||
).map((item) => (
|
||||
<Image
|
||||
src={
|
||||
store.authentication.profileData.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>
|
||||
|
@ -402,8 +444,8 @@ export const Profile = observer(() => {
|
|||
dataSource={store.transaction.dataHistoryTransaction}
|
||||
pagination={{
|
||||
onChange: async (page, pageSize) => {
|
||||
console.log(page,'Page')
|
||||
console.log(pageSize,'Page size')
|
||||
console.log(page, "Page");
|
||||
console.log(pageSize, "Page size");
|
||||
store.transaction.pageSizeHistoryTransaction = pageSize;
|
||||
store.transaction.pageHistoryTransaction = page - 1;
|
||||
modalLoader.setLoading(true);
|
||||
|
|
|
@ -8,7 +8,8 @@ export class Authentication {
|
|||
isLoginLoading = false;
|
||||
ctx;
|
||||
profileData = {};
|
||||
dataProfit=[]
|
||||
dataProfit=[];
|
||||
listImage=[];
|
||||
|
||||
constructor(ctx) {
|
||||
this.ctx = ctx;
|
||||
|
@ -57,6 +58,7 @@ export class Authentication {
|
|||
const response = await http.get(`/auth/profile/${id}`);
|
||||
console.log(response)
|
||||
this.dataProfit = response.body ?? [];
|
||||
this.listImage = this.dataProfit.userDetail ? JSON.parse(this.dataProfit.userDetail?.image_store) : [];
|
||||
this.total_data = response?.body?.count ?? 0;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
|
Loading…
Reference in New Issue
Block a user