Merge branch 'develop' into 'devops-staging'
Perbaikan Project PPOB See merge request empatnusabangsa/ppob/ppob-frontend!63
This commit is contained in:
commit
7339d0e842
|
@ -43,7 +43,6 @@ export const DetailUser = observer(() => {
|
||||||
modalLoader.setLoading(false);
|
modalLoader.setLoading(false);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
store.membership.dataDetail = {};
|
store.membership.dataDetail = {};
|
||||||
store.transaction.dataHistoryTopUp = [];
|
store.transaction.dataHistoryTopUp = [];
|
||||||
|
@ -266,9 +265,16 @@ export const DetailUser = observer(() => {
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
}
|
}
|
||||||
: null;
|
: null;
|
||||||
console.log(JSON.parse(store.authentication.dataProfit.userDetail?.image_store)," ini dia")
|
// console.log(
|
||||||
const data = JSON.parse(store.authentication.dataProfit.userDetail?.image_store)
|
// JSON.parse(store.authentication.dataProfit.userDetail?.image_store),
|
||||||
console.log(data,"ini data")
|
// " ini dia"
|
||||||
|
// );
|
||||||
|
const data = store.authentication.listImage;
|
||||||
|
console.log(data, "ini data");
|
||||||
|
console.log(
|
||||||
|
store.authentication.dataProfit.userDetail?.image_identity,
|
||||||
|
"detail"
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<div className={["ppob-container"].join(" ")}>
|
<div className={["ppob-container"].join(" ")}>
|
||||||
<BreadcumbComponent data={routeData} />
|
<BreadcumbComponent data={routeData} />
|
||||||
|
@ -308,19 +314,25 @@ export const DetailUser = observer(() => {
|
||||||
id: store.membership.dataDetail.id,
|
id: store.membership.dataDetail.id,
|
||||||
name: store.membership.dataDetail.userDetail.name,
|
name: store.membership.dataDetail.userDetail.name,
|
||||||
username: store.membership.dataDetail.username,
|
username: store.membership.dataDetail.username,
|
||||||
identity_number: store.membership.dataDetail.userDetail.identity_number,
|
identity_number:
|
||||||
image_identity: store.membership.dataDetail?.userDetail.image_identity,
|
store.membership.dataDetail.userDetail.identity_number,
|
||||||
image_store: store.membership.dataDetail?.userDetail.image_store,
|
image_identity:
|
||||||
|
store.membership.dataDetail?.userDetail.image_identity,
|
||||||
|
image_store:
|
||||||
|
store.membership.dataDetail?.userDetail.image_store,
|
||||||
phone_number:
|
phone_number:
|
||||||
store.membership.dataDetail.userDetail.phone_number,
|
store.membership.dataDetail.userDetail.phone_number,
|
||||||
roleId: store.membership.dataDetail.roles.id,
|
roleId: store.membership.dataDetail.roles.id,
|
||||||
isChangePassword: false,
|
isChangePassword: false,
|
||||||
|
|
||||||
});
|
});
|
||||||
console.log(store.membership.dataDetail.userDetail.identity_number)
|
console.log(
|
||||||
console.log(store.membership.dataDetail.userDetail.id)
|
store.membership.dataDetail.userDetail.identity_number
|
||||||
console.log(store.membership.dataDetail.userDetail.image_identity)
|
);
|
||||||
console.log(store.membership.dataDetail.username)
|
console.log(store.membership.dataDetail.userDetail.id);
|
||||||
|
console.log(
|
||||||
|
store.membership.dataDetail.userDetail.image_identity
|
||||||
|
);
|
||||||
|
console.log(store.membership.dataDetail.username);
|
||||||
setVisibleModal(true);
|
setVisibleModal(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -409,9 +421,46 @@ export const DetailUser = observer(() => {
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text strong>Foto Identitas</Text>
|
<Text strong>Foto Identitas</Text>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={12}></Col>
|
||||||
<Col span={12}>
|
<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>
|
||||||
|
<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}>
|
<Col span={12}>
|
||||||
<Text>
|
<Text>
|
||||||
<Image
|
<Image
|
||||||
|
@ -425,11 +474,11 @@ export const DetailUser = observer(() => {
|
||||||
/>
|
/>
|
||||||
</Text>
|
</Text>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
<Col span={12}>
|
<Text strong>Foto Toko</Text>
|
||||||
|
|
||||||
<Text>
|
<Text>
|
||||||
{data.map((item)=>{
|
<Row>
|
||||||
|
{data.map((item) => (
|
||||||
<Image
|
<Image
|
||||||
src={
|
src={
|
||||||
store.authentication.dataProfit.userDetail
|
store.authentication.dataProfit.userDetail
|
||||||
|
@ -437,48 +486,15 @@ export const DetailUser = observer(() => {
|
||||||
? `${appConfig.apiUrl}/config/image/${item}`
|
? `${appConfig.apiUrl}/config/image/${item}`
|
||||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
: "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>
|
</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>
|
</Text>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{store.authentication.userData.role === "Supervisor" && (
|
{store.authentication.userData.role === "Supervisor" && (
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
@ -491,7 +507,7 @@ export const DetailUser = observer(() => {
|
||||||
src={
|
src={
|
||||||
store.authentication.dataProfit.userDetail
|
store.authentication.dataProfit.userDetail
|
||||||
?.image_identity
|
?.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"
|
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||||
}
|
}
|
||||||
style={{ width: "10vw" }}
|
style={{ width: "10vw" }}
|
||||||
|
|
|
@ -359,7 +359,6 @@ export const Membership = observer(() => {
|
||||||
? store.membership.dataMember
|
? store.membership.dataMember
|
||||||
: store.membership.data
|
: store.membership.data
|
||||||
}
|
}
|
||||||
bordered
|
|
||||||
pagination={{
|
pagination={{
|
||||||
pageSize: store.membership.pageSize,
|
pageSize: store.membership.pageSize,
|
||||||
total:
|
total:
|
||||||
|
|
|
@ -256,7 +256,7 @@ export const Profile = observer(() => {
|
||||||
{store.authentication.profileData.superior?.username}
|
{store.authentication.profileData.superior?.username}
|
||||||
</Text>
|
</Text>
|
||||||
</Col>
|
</Col>
|
||||||
{store.authentication.userData.role === "Retail" && (
|
{/* {store.authentication.userData.role === "Retail" && (
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text strong>Foto Identitas</Text>
|
<Text strong>Foto Identitas</Text>
|
||||||
|
@ -291,6 +291,48 @@ export const Profile = observer(() => {
|
||||||
</Text>
|
</Text>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</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" && (
|
{/* {store.authentication.userData.role === "Supervisor" && (
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -402,8 +444,8 @@ export const Profile = observer(() => {
|
||||||
dataSource={store.transaction.dataHistoryTransaction}
|
dataSource={store.transaction.dataHistoryTransaction}
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: async (page, pageSize) => {
|
onChange: async (page, pageSize) => {
|
||||||
console.log(page,'Page')
|
console.log(page, "Page");
|
||||||
console.log(pageSize,'Page size')
|
console.log(pageSize, "Page size");
|
||||||
store.transaction.pageSizeHistoryTransaction = pageSize;
|
store.transaction.pageSizeHistoryTransaction = pageSize;
|
||||||
store.transaction.pageHistoryTransaction = page - 1;
|
store.transaction.pageHistoryTransaction = page - 1;
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
|
|
|
@ -8,7 +8,8 @@ export class Authentication {
|
||||||
isLoginLoading = false;
|
isLoginLoading = false;
|
||||||
ctx;
|
ctx;
|
||||||
profileData = {};
|
profileData = {};
|
||||||
dataProfit=[]
|
dataProfit=[];
|
||||||
|
listImage=[];
|
||||||
|
|
||||||
constructor(ctx) {
|
constructor(ctx) {
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
|
@ -57,6 +58,7 @@ export class Authentication {
|
||||||
const response = await http.get(`/auth/profile/${id}`);
|
const response = await http.get(`/auth/profile/${id}`);
|
||||||
console.log(response)
|
console.log(response)
|
||||||
this.dataProfit = response.body ?? [];
|
this.dataProfit = response.body ?? [];
|
||||||
|
this.listImage = this.dataProfit.userDetail ? JSON.parse(this.dataProfit.userDetail?.image_store) : [];
|
||||||
this.total_data = response?.body?.count ?? 0;
|
this.total_data = response?.body?.count ?? 0;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user