refactor(ui): remove redundant price badge from order detail modal
Header diff badges already show price mismatches, making the Status-line badge duplicative. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -513,8 +513,6 @@ async function renderOrderDetailModal(orderNumber, opts) {
|
||||
if (invInfo) invInfo.style.display = 'none';
|
||||
const mobileContainer = document.getElementById('detailItemsMobile');
|
||||
if (mobileContainer) mobileContainer.innerHTML = '';
|
||||
const priceCheckEl = document.getElementById('detailPriceCheck');
|
||||
if (priceCheckEl) priceCheckEl.innerHTML = '';
|
||||
const reconEl = document.getElementById('detailInvoiceRecon');
|
||||
if (reconEl) { reconEl.innerHTML = ''; reconEl.style.display = 'none'; }
|
||||
// Remove diff badge from previous render
|
||||
@@ -557,19 +555,6 @@ async function renderOrderDetailModal(orderNumber, opts) {
|
||||
document.getElementById('detailDate').textContent = fmtDate(order.order_date);
|
||||
document.getElementById('detailStatus').innerHTML = orderStatusBadge(order.status);
|
||||
|
||||
// Price check badge
|
||||
const priceCheckEl = document.getElementById('detailPriceCheck');
|
||||
if (priceCheckEl) {
|
||||
const pc = order.price_check;
|
||||
if (!pc || pc.oracle_available === false) {
|
||||
priceCheckEl.innerHTML = '<span class="badge" style="background:var(--cancelled-light);color:var(--text-muted)">Preturi ROA indisponibile</span>';
|
||||
} else if (pc.mismatches === 0) {
|
||||
priceCheckEl.innerHTML = '<span class="badge" style="background:var(--success-light);color:var(--success-text)">✓ Preturi OK</span>';
|
||||
} else {
|
||||
priceCheckEl.innerHTML = `<span class="badge" style="background:var(--error-light);color:var(--error-text)">${pc.mismatches} diferente de pret</span>`;
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('detailIdComanda').textContent = order.id_comanda || '-';
|
||||
document.getElementById('detailIdPartener').textContent = order.id_partener || '-';
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<small class="text-muted">CUI:</small> <span class="font-data" id="detailCuiGomagVal"></span>
|
||||
</div>
|
||||
<div><small class="text-muted">Data:</small> <span id="detailDate"></span></div>
|
||||
<div><small class="text-muted">Status:</small> <span id="detailStatus"></span><span id="detailPriceCheck" class="ms-2"></span></div>
|
||||
<div><small class="text-muted">Status:</small> <span id="detailStatus"></span></div>
|
||||
</div>
|
||||
<!-- ROA Column -->
|
||||
<div class="col-md-6">
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
<script>window.ROOT_PATH = "{{ rp }}";</script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="{{ rp }}/static/js/shared.js?v=29"></script>
|
||||
<script src="{{ rp }}/static/js/shared.js?v=30"></script>
|
||||
<script>
|
||||
// Dark mode toggle
|
||||
function toggleDarkMode() {
|
||||
|
||||
Reference in New Issue
Block a user