116 lines
3.1 KiB
PHP
116 lines
3.1 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>Stock Sync Logs</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
padding: 20px;
|
|
background: #f9fafb;
|
|
}
|
|
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 8px 12px;
|
|
background: #2563eb;
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: 6px;
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
background: white;
|
|
font-size: 13px;
|
|
}
|
|
|
|
th,
|
|
td {
|
|
border: 1px solid #e5e7eb;
|
|
padding: 8px;
|
|
vertical-align: top;
|
|
}
|
|
|
|
th {
|
|
background: #f3f4f6;
|
|
text-align: left;
|
|
}
|
|
|
|
.success {
|
|
color: #166534;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.failed {
|
|
color: #991b1b;
|
|
font-weight: bold;
|
|
}
|
|
|
|
pre {
|
|
white-space: pre-wrap;
|
|
max-width: 360px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h2>Stock Sync Logs</h2>
|
|
|
|
<a class="btn" href="<?= site_url('marketplace/stock_queues') ?>">Kembali ke Queue</a>
|
|
<a class="btn" href="<?= site_url('marketplace/products') ?>">Produk Marketplace</a>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Marketplace</th>
|
|
<th>Kode Barang</th>
|
|
<th>SKU</th>
|
|
<th>Nama Produk</th>
|
|
<th>Stock MP Lama</th>
|
|
<th>Stock MP Baru</th>
|
|
<th>Status</th>
|
|
<th>Error</th>
|
|
<th>Waktu</th>
|
|
<th>Response</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php $logs = $logs ?? []; ?>
|
|
<?php if (empty($logs)): ?>
|
|
<tr>
|
|
<td colspan="11">Belum ada log.</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
|
|
<?php foreach ($logs as $row): ?>
|
|
<tr>
|
|
<td><?= html_escape($row->id) ?></td>
|
|
<td><?= html_escape($row->marketplace) ?></td>
|
|
<td><?= html_escape($row->kode_barang) ?></td>
|
|
<td><?= html_escape($row->sku) ?></td>
|
|
<td><?= html_escape($row->product_name) ?></td>
|
|
<td><?= html_escape($row->old_marketplace_stock) ?></td>
|
|
<td><?= html_escape($row->new_marketplace_stock) ?></td>
|
|
<td>
|
|
<span class="<?= $row->status == 'success' ? 'success' : 'failed' ?>">
|
|
<?= html_escape($row->status) ?>
|
|
</span>
|
|
</td>
|
|
<td><?= html_escape($row->error_message) ?></td>
|
|
<td><?= html_escape($row->created_at) ?></td>
|
|
<td>
|
|
<pre><?= html_escape($row->response_payload) ?></pre>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>
|