Merge branch 'develop' into 'devops-staging'
Develop See merge request empatnusabangsa/ppob/ppob-frontend!61
This commit is contained in:
commit
ac037c2afd
|
@ -487,6 +487,7 @@ export const ProductComponent = observer((props) => {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Row>
|
<Row>
|
||||||
|
{store.authentication.userData.role === "Admin" && (
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Title level={5} type={"secondary"} strong>
|
<Title level={5} type={"secondary"} strong>
|
||||||
Filter Supplier
|
Filter Supplier
|
||||||
|
@ -507,6 +508,7 @@ export const ProductComponent = observer((props) => {
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</Col>
|
</Col>
|
||||||
|
)}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Title level={5} type={"secondary"} strong>
|
<Title level={5} type={"secondary"} strong>
|
||||||
Filter Sub-Categories
|
Filter Sub-Categories
|
||||||
|
|
|
@ -126,15 +126,22 @@ export const DesktopLayout = observer(() => {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Menu>
|
<Menu>
|
||||||
{store.authentication.userData.role === "Admin" ||
|
{store.authentication.userData.role === "Admin" && (
|
||||||
(store.authentication.userData.role === "Admin Partner" && (
|
|
||||||
<Menu.Item key="home">
|
<Menu.Item key="home">
|
||||||
<Link to={LINKS.HOME}>
|
<Link to={LINKS.HOME}>
|
||||||
<HomeOutlined />
|
<HomeOutlined />
|
||||||
<span>Beranda</span>
|
<span>Beranda</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
))}
|
)}
|
||||||
|
{store.authentication.userData.role === "Admin Partner" && (
|
||||||
|
<Menu.Item key="home">
|
||||||
|
<Link to={LINKS.HOME}>
|
||||||
|
<HomeOutlined />
|
||||||
|
<span>Beranda</span>
|
||||||
|
</Link>
|
||||||
|
</Menu.Item>
|
||||||
|
)}
|
||||||
{store.authentication.userData.role === "Admin" && (
|
{store.authentication.userData.role === "Admin" && (
|
||||||
<Menu.Item key="membership">
|
<Menu.Item key="membership">
|
||||||
<Link to={LINKS.MEMBERSHIP}>
|
<Link to={LINKS.MEMBERSHIP}>
|
||||||
|
|
|
@ -304,11 +304,19 @@ 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,
|
||||||
|
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(store.membership.dataDetail.userDetail.id)
|
||||||
|
console.log(store.membership.dataDetail.userDetail.image_identity)
|
||||||
|
console.log(store.membership.dataDetail.username)
|
||||||
setVisibleModal(true);
|
setVisibleModal(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -392,6 +400,8 @@ export const DetailUser = observer(() => {
|
||||||
: "Inaktif"}
|
: "Inaktif"}
|
||||||
</Text>
|
</Text>
|
||||||
</Col>
|
</Col>
|
||||||
|
{store.authentication.userData.role === "Sales" && (
|
||||||
|
<Row>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text strong>Foto Identitas</Text>
|
<Text strong>Foto Identitas</Text>
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -402,7 +412,8 @@ export const DetailUser = observer(() => {
|
||||||
<Text>
|
<Text>
|
||||||
<Image
|
<Image
|
||||||
src={
|
src={
|
||||||
store.authentication.dataProfit.userDetail?.image_identity
|
store.authentication.dataProfit.profileData
|
||||||
|
?.image_identity
|
||||||
? `${appConfig.apiUrl}/config/image/${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"
|
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||||
}
|
}
|
||||||
|
@ -414,7 +425,8 @@ export const DetailUser = observer(() => {
|
||||||
<Text>
|
<Text>
|
||||||
<Image
|
<Image
|
||||||
src={
|
src={
|
||||||
store.authentication.dataProfit.userDetail?.image_store
|
store.authentication.dataProfit.profileData
|
||||||
|
?.image_store
|
||||||
? `${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_store}`
|
? `${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_store}`
|
||||||
: "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"
|
||||||
}
|
}
|
||||||
|
@ -423,6 +435,62 @@ export const DetailUser = observer(() => {
|
||||||
</Text>
|
</Text>
|
||||||
</Col>
|
</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.profileData?.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.profileData
|
||||||
|
?.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}>
|
||||||
|
<Text strong>Foto Identitas</Text>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}></Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Text>
|
||||||
|
<Image
|
||||||
|
src={
|
||||||
|
store.authentication.dataProfit.profileData
|
||||||
|
?.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>
|
||||||
|
</Row>
|
||||||
|
)}
|
||||||
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
<Col lg={12} xs={24}>
|
<Col lg={12} xs={24}>
|
||||||
<Row>
|
<Row>
|
||||||
|
|
|
@ -259,7 +259,13 @@ export const Membership = observer(() => {
|
||||||
setConfirmLoading(true);
|
setConfirmLoading(true);
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
try {
|
try {
|
||||||
await store.membership.update(initialData.id, data);
|
console.log(data, "edit data");
|
||||||
|
const request = {
|
||||||
|
...data,
|
||||||
|
image_identity: image,
|
||||||
|
image_store: imageStore,
|
||||||
|
};
|
||||||
|
await store.membership.update(initialData.id, request);
|
||||||
message.success(
|
message.success(
|
||||||
initialData.isChangePassword
|
initialData.isChangePassword
|
||||||
? "Success Change Member Password"
|
? "Success Change Member Password"
|
||||||
|
|
|
@ -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 === "Sales" && (
|
{store.authentication.userData.role === "Retail" && (
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text strong>Foto Identitas</Text>
|
<Text strong>Foto Identitas</Text>
|
||||||
|
@ -292,14 +292,12 @@ export const Profile = observer(() => {
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
{store.authentication.userData.role === "Supervisor" && (
|
{/* {store.authentication.userData.role === "Supervisor" && (
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text strong>Foto Identitas</Text>
|
<Text strong>Foto Identitas</Text>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}></Col>
|
||||||
<Text strong>Foto Toko</Text>
|
|
||||||
</Col>
|
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text>
|
<Text>
|
||||||
<Image
|
<Image
|
||||||
|
@ -313,21 +311,8 @@ export const Profile = observer(() => {
|
||||||
/>
|
/>
|
||||||
</Text>
|
</Text>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
|
||||||
<Text>
|
|
||||||
<Image
|
|
||||||
src={
|
|
||||||
store.authentication.dataProfit.profileData
|
|
||||||
?.image_store
|
|
||||||
? `${appConfig.apiUrl}/config/image/${store.authentication.profileData.userDetail?.image_store}`
|
|
||||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
|
||||||
}
|
|
||||||
style={{ width: "10vw" }}
|
|
||||||
/>
|
|
||||||
</Text>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)} */}
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={store.ui.mediaQuery.isMobile ? 24 : 5}>
|
<Col span={store.ui.mediaQuery.isMobile ? 24 : 5}>
|
||||||
|
|
|
@ -86,6 +86,7 @@ export class Membership {
|
||||||
async update(id, data) {
|
async update(id, data) {
|
||||||
try {
|
try {
|
||||||
const response = await http.put('/users/' + id).send(data);
|
const response = await http.put('/users/' + id).send(data);
|
||||||
|
console.log(data,"data dari store")
|
||||||
return response;
|
return response;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user