add payment gateway audit tab in sales transactions

This commit is contained in:
Dev Team
2025-06-18 16:43:39 +06:30
parent 5bb7fa807d
commit 1c8fb52d87
2 changed files with 42 additions and 0 deletions

View File

@@ -26,6 +26,9 @@
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#sale_audit" role="tab"><%= t :sale_audits %></a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#payment_gateway" role="tab">Payment Gateway Audits</a>
</li>
</ul>
<!-- Nav tabs - End -->
@@ -258,6 +261,44 @@
</table>
</div>
</div>
<div class="tab-pane" id="payment_gateway" role="tabpanel">
<br>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Gateway Name</th>
<th>Request Method</th>
<th>Event Type</th>
<th>Endpoint</th>
<th>Request Body</th>
<th>Response Body</th>
</tr>
</thead>
<tbody>
<% if @payment_gateway_audits.present? %>
<% @payment_gateway_audits.each do |audit| %>
<tr>
<td><%= audit.payment_gateway_name %></td>
<td><%= audit.request_method %></td>
<td><%= audit.event_type %></td>
<td><%= audit.endpoint_url %></td>
<td colspan="3">
<%= audit.request_body %>
</td>
<td><%= audit.response_body %></td>
</tr>
<% end %>
<% else %>
<tr>
<td colspan="4">No payment gateway audits found.</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>