update
This commit is contained in:
@ -683,11 +683,11 @@ const DetailApprovalTransaction = () => {
|
||||
<table className="min-w-full table-auto">
|
||||
<thead>
|
||||
<tr className="bg-gray-100">
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Transaction Status</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Status</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Date</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Date</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Body</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Body</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Code</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Endpoint</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -861,14 +861,14 @@ const DetailApprovalTransaction = () => {
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Status</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Date</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Date</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Body</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Body</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Code</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Endpoint</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{transactionDetails?.p24 && transactionDetails?.p24.length > 0 ? (
|
||||
transactionDetails.p24.map((log: { status: string,request_endpoint: string, type: string; request_date: string; response_date: string; request_body: string; response_body: string; response_code: number }, index: number) => (
|
||||
transactionDetails.p24.map((log: { status: string, request_endpoint: string, type: string; request_date: string; response_date: string; request_body: string; response_body: string; response_code: number }, index: number) => (
|
||||
<tr key={index} className="border-t">
|
||||
<td className="px-4 py-2 text-sm text-gray-500">
|
||||
{(() => {
|
||||
@ -912,6 +912,22 @@ const DetailApprovalTransaction = () => {
|
||||
hour12: false
|
||||
})
|
||||
: ''}</td>
|
||||
<td className="px-4 py-2 text-sm text-gray-500">
|
||||
<pre style={{ fontFamily: 'monospace', whiteSpace: 'pre-wrap' }}>
|
||||
{(() => {
|
||||
try {
|
||||
if (log.request_body === null) {
|
||||
return '';
|
||||
}
|
||||
const parsed = JSON.parse(log.request_body);
|
||||
return JSON.stringify(parsed, null, 2) ?? '';
|
||||
} catch (e) {
|
||||
return log.request_body ?? ''; // fallback: tampilkan as-is jika gagal parse
|
||||
}
|
||||
})()}
|
||||
</pre>
|
||||
|
||||
</td>
|
||||
<td className="px-4 py-2 text-sm text-gray-500">
|
||||
<pre style={{ fontFamily: 'monospace', whiteSpace: 'pre-wrap' }}>
|
||||
{(() => {
|
||||
@ -927,22 +943,7 @@ const DetailApprovalTransaction = () => {
|
||||
})()}
|
||||
</pre>
|
||||
</td>
|
||||
<td className="px-4 py-2 text-sm text-gray-500">
|
||||
<pre style={{ fontFamily: 'monospace', whiteSpace: 'pre-wrap' }}>
|
||||
{(() => {
|
||||
try {
|
||||
if (log.request_body === null) {
|
||||
return '';
|
||||
}
|
||||
const parsed = JSON.parse(log.request_body);
|
||||
return JSON.stringify(parsed, null, 2) ?? '';
|
||||
} catch (e) {
|
||||
return log.response_body ?? ''; // fallback: tampilkan as-is jika gagal parse
|
||||
}
|
||||
})()}
|
||||
</pre>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td className="px-4 py-2 text-sm text-gray-500">{log.request_endpoint ?? ''}</td>
|
||||
|
||||
@ -748,8 +748,8 @@ const DetailTransaction = () => {
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Status</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Date</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Date</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Body</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Body</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Code</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Endpoint</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -922,14 +922,14 @@ const DetailTransaction = () => {
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Status</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Date</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Date</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Body</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Body</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Response Code</th>
|
||||
<th className="px-4 py-2 text-left text-sm text-gray-500">Request Endpoint</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{transactionDetails?.p24 && transactionDetails?.p24.length > 0 ? (
|
||||
transactionDetails.p24.map((log: { status: string,request_endpoint: string, type: string; request_date: string; response_date: string; request_body: string; response_body: string; response_code: number }, index: number) => (
|
||||
transactionDetails.p24.map((log: { status: string, request_endpoint: string, type: string; request_date: string; response_date: string; request_body: string; response_body: string; response_code: number }, index: number) => (
|
||||
<tr key={index} className="border-t">
|
||||
<td className="px-4 py-2 text-sm text-gray-500">
|
||||
{(() => {
|
||||
@ -992,10 +992,10 @@ const DetailTransaction = () => {
|
||||
<pre style={{ fontFamily: 'monospace', whiteSpace: 'pre-wrap' }}>
|
||||
{(() => {
|
||||
try {
|
||||
if (log.request_body === null) {
|
||||
if (log.response_body === null) {
|
||||
return '';
|
||||
}
|
||||
const parsed = JSON.parse(log.request_body);
|
||||
const parsed = JSON.parse(log.response_body);
|
||||
return JSON.stringify(parsed, null, 2) ?? '';
|
||||
} catch (e) {
|
||||
return log.response_body ?? ''; // fallback: tampilkan as-is jika gagal parse
|
||||
|
||||
Reference in New Issue
Block a user