Fix hardware-pricing reveal so it respects the Tailwind grid layout
The wizard's EK / Kundenverkaufspreis fields live inside a <div class="grid grid-cols-2 gap-md"> wrapper. Toggling its inline display:block as the previous code did replaced the grid layout and stacked the two inputs full-width. Switch the wrapper to start with the Tailwind `hidden` utility and toggle `hidden`/`grid` on the classList, so when hardware is filled in the two pricing fields appear side by side. Functionality and the existing commission formula (Provision + Aktionscodes − EK + VK, already covered by the provisionService tests) are unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ff0d7398db
commit
395fadc83b
2 files changed
+6
-6
No files matched your search
+5
-5
@@ -3661,16 +3661,16 @@ function toggleHardwarePricing() {
|
||||
const kundenverkaufspreisInput = document.getElementById('kundenverkaufspreis');
|
||||
|
||||
if (hardwareInput.value.trim() !== '') {
|
||||
// Show pricing fields and make them required
|
||||
hardwarePricingFields.style.display = 'block';
|
||||
// Reveal the grid wrapper (Tailwind `grid` + `grid-cols-2`).
|
||||
hardwarePricingFields.classList.remove('hidden');
|
||||
hardwarePricingFields.classList.add('grid');
|
||||
hardwareEkInput.required = true;
|
||||
kundenverkaufspreisInput.required = true;
|
||||
} else {
|
||||
// Hide pricing fields and remove required attribute
|
||||
hardwarePricingFields.style.display = 'none';
|
||||
hardwarePricingFields.classList.add('hidden');
|
||||
hardwarePricingFields.classList.remove('grid');
|
||||
hardwareEkInput.required = false;
|
||||
kundenverkaufspreisInput.required = false;
|
||||
// Clear values
|
||||
hardwareEkInput.value = '';
|
||||
kundenverkaufspreisInput.value = '';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user