Remove Gesamt-Provision card from the Provisionen view
User doesn't need the third KPI tile. Drop it from the markup, drop the matching #totalGesamtProvision write in updateProvisionenTable and let the grid breathe with two columns instead of three. Revert the backend total_gesamt_provision field to its original meaning (shop + employee) since no consumer in the UI depends on it now. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
65395c0cae
commit
9850a5b097
3 files changed
+2
-18
No files matched your search
+1
-12
@@ -1038,7 +1038,7 @@
|
||||
</div>
|
||||
|
||||
<!-- KPI cards -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-md">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-md">
|
||||
<!-- Shop -->
|
||||
<div class="bg-surface-container-lowest border border-outline-variant rounded-lg p-md shadow-[0_2px_4px_rgba(0,0,0,0.04)] flex flex-col gap-sm relative overflow-hidden">
|
||||
<div class="absolute right-0 top-0 w-16 h-16 bg-surface-container-low rounded-bl-full opacity-50 pointer-events-none"></div>
|
||||
@@ -1061,17 +1061,6 @@
|
||||
<span id="totalMitarbeiterProvision" class="font-label-numeric text-display-lg text-on-surface leading-none">0,00 €</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Gesamt highlighted -->
|
||||
<div class="bg-surface-bright border-2 border-primary/20 rounded-lg p-md shadow-[0_4px_12px_rgba(37,99,235,0.08)] flex flex-col gap-sm relative overflow-hidden">
|
||||
<div class="absolute right-0 top-0 w-24 h-24 bg-primary/5 rounded-bl-full pointer-events-none"></div>
|
||||
<h3 class="text-label-caps text-primary uppercase tracking-widest flex items-center gap-xs">
|
||||
<span class="material-symbols-outlined text-primary text-[14px]">account_balance_wallet</span>
|
||||
Gesamt-Provision
|
||||
</h3>
|
||||
<div class="flex justify-end items-baseline gap-xs">
|
||||
<span id="totalGesamtProvision" class="font-label-numeric text-display-lg text-primary leading-none font-bold">0,00 €</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Data table -->
|
||||
|
||||
@@ -2296,7 +2296,6 @@ function updateProvisionenTable(schaltungen, totalShopProvision, totalMitarbeite
|
||||
const tbody = document.querySelector('#provisionenTable tbody');
|
||||
const totalShopSpan = document.getElementById('totalShopProvision');
|
||||
const totalMitarbeiterSpan = document.getElementById('totalMitarbeiterProvision');
|
||||
const totalGesamtSpan = document.getElementById('totalGesamtProvision');
|
||||
|
||||
if (!tbody) return;
|
||||
|
||||
@@ -2308,7 +2307,6 @@ function updateProvisionenTable(schaltungen, totalShopProvision, totalMitarbeite
|
||||
tbody.appendChild(tr);
|
||||
if (totalShopSpan) totalShopSpan.textContent = formatEuro(0);
|
||||
if (totalMitarbeiterSpan) totalMitarbeiterSpan.textContent = formatEuro(0);
|
||||
if (totalGesamtSpan) totalGesamtSpan.textContent = formatEuro(0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2338,11 +2336,8 @@ function updateProvisionenTable(schaltungen, totalShopProvision, totalMitarbeite
|
||||
tbody.appendChild(tr);
|
||||
});
|
||||
|
||||
// Gesamt-Provision = what the shop keeps after paying out the employee share.
|
||||
const totalGesamt = (totalShopProvision || 0) - (totalMitarbeiterProvision || 0);
|
||||
if (totalShopSpan) totalShopSpan.textContent = formatEuro(totalShopProvision);
|
||||
if (totalMitarbeiterSpan) totalMitarbeiterSpan.textContent = formatEuro(totalMitarbeiterProvision);
|
||||
if (totalGesamtSpan) totalGesamtSpan.textContent = formatEuro(totalGesamt);
|
||||
}
|
||||
|
||||
// Clear filters functions
|
||||
|
||||
@@ -138,7 +138,7 @@ router.get('/provisionen', asyncHandler(async (req, res) => {
|
||||
total_provision: totalShop.toFixed(2),
|
||||
total_shop_provision: totalShop.toFixed(2),
|
||||
total_mitarbeiter_provision: totalMitarbeiter.toFixed(2),
|
||||
total_gesamt_provision: (totalShop - totalMitarbeiter).toFixed(2),
|
||||
total_gesamt_provision: (totalShop + totalMitarbeiter).toFixed(2),
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
Reference in new issue
Block a user