Perbaikan Project PPOB
This commit is contained in:
@@ -175,7 +175,7 @@ export const Payback = observer(() => {
|
||||
modalLoader.setLoading(true);
|
||||
try {
|
||||
const response = await store.payback.confirmPayback(id, type);
|
||||
console.log(response)
|
||||
console.log(response);
|
||||
response.body.statusCode !== 201 && response.body.statusCode !== 200
|
||||
? message.error(
|
||||
response?.body?.message || `Failed ${capitalize(type)} Payback`
|
||||
@@ -288,7 +288,79 @@ export const Payback = observer(() => {
|
||||
title={item.name}
|
||||
description={
|
||||
<div style={{}}>
|
||||
<Image src={item.picture} preview={false} />
|
||||
<p>
|
||||
<span>{item.userData_name}</span>
|
||||
<br />
|
||||
<small>Amount: {item.amount}</small>
|
||||
<br />
|
||||
{PAYBACK_STATUS[item.status] ===
|
||||
PAYBACK_STATUS[0] ? (
|
||||
<Space size="middle">
|
||||
<Button
|
||||
onClick={async () => {
|
||||
Modal.confirm({
|
||||
title: `Are you sure Accept this submission?`,
|
||||
icon: <CheckOutlined />,
|
||||
okText: "Accept",
|
||||
cancelText: "Cancel",
|
||||
okType: "primary",
|
||||
onOk() {
|
||||
handleAction(item.id, "accept");
|
||||
},
|
||||
onCancel() {
|
||||
console.log("Cancel");
|
||||
},
|
||||
});
|
||||
}}
|
||||
icon={<CheckCircleOutlined />}
|
||||
style={{
|
||||
backgroundColor: "#1bb91d",
|
||||
color: "#fff",
|
||||
borderColor: "#1bb91d",
|
||||
}}
|
||||
>
|
||||
Accept
|
||||
</Button>
|
||||
<Button
|
||||
onClick={async () => {
|
||||
Modal.confirm({
|
||||
title: `Are you sure Reject this submission?`,
|
||||
icon: <StopOutlined />,
|
||||
okText: "Reject",
|
||||
cancelText: "Cancel",
|
||||
okType: "primary",
|
||||
onOk() {
|
||||
handleAction(item.id, "reject");
|
||||
},
|
||||
onCancel() {
|
||||
console.log("Cancel");
|
||||
},
|
||||
});
|
||||
}}
|
||||
icon={<CloseOutlined />}
|
||||
style={{
|
||||
backgroundColor: "#ff1c1c",
|
||||
color: "#fff",
|
||||
borderColor: "#ff1c1c",
|
||||
}}
|
||||
>
|
||||
Reject
|
||||
</Button>
|
||||
</Space>
|
||||
) : (
|
||||
<Tag
|
||||
color={
|
||||
PAYBACK_STATUS[item.status] ===
|
||||
PAYBACK_STATUS[3]
|
||||
? "cyan"
|
||||
: "red"
|
||||
}
|
||||
style={{ color: "#4F566B" }}
|
||||
>
|
||||
{PAYBACK_STATUS[item.status]}
|
||||
</Tag>
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
@@ -299,7 +371,10 @@ export const Payback = observer(() => {
|
||||
margin: 0,
|
||||
}}
|
||||
>
|
||||
{item.amount}
|
||||
<Image
|
||||
src={`${appConfig.apiUrl}/config/image/${item.image_prove}`}
|
||||
style={{ width: "10vw" }}
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
</List.Item>
|
||||
|
||||
Reference in New Issue
Block a user