fix: remove 'untracked' anomaly direction — incomplete purchase history is normal, not an anomaly

This commit is contained in:
dadaloop82
2026-05-12 05:52:09 +00:00
parent 9e2722f7a4
commit 2c34387592
2 changed files with 6 additions and 10 deletions
+1 -6
View File
@@ -3897,14 +3897,9 @@ function renderBannerItem() {
} else if (entry.type === 'anomaly') {
const an = entry.data;
const isPhantom = an.direction === 'phantom';
const isUntracked = an.direction === 'untracked';
banner.className = 'alert-banner banner-anomaly';
iconEl.textContent = '🔍';
if (isUntracked) {
// More consumption recorded than entries — initial stock was never registered
titleEl.textContent = `${an.name}${t('dashboard.banner_anomaly_untracked_title')}`;
detailEl.innerHTML = t('dashboard.banner_anomaly_untracked_detail', { inv_qty: an.inv_qty, unit: an.unit });
} else if (isPhantom) {
if (isPhantom) {
titleEl.textContent = `${an.name}${t('dashboard.banner_anomaly_phantom_title')}`;
detailEl.innerHTML = t('dashboard.banner_anomaly_phantom_detail', { inv_qty: an.inv_qty, unit: an.unit, expected_qty: an.expected_qty });
} else {