Farbnamen nicht mehr an die Anhänger-Bezeichnung hängen
Anhänger heißen im Interface nur noch "Nr. 5" bzw. "Truhe 2"; die Farbe zeigt der farbige Punkt/Chip. Betroffen: Auswahlliste im Buchungs- formular, Vorschau-Chip im Formular, Buchungsdetail und Buchungs-Panel. Cache-Buster auf Version 15.
This commit is contained in:
parent
c61a31b0a8
commit
4a4041e817
5 changed files with 8 additions and 9 deletions
|
|
@ -89,7 +89,7 @@ function url(string $path = '/'): string
|
|||
}
|
||||
|
||||
/** Cache-Buster: bei Änderungen an app.css/app.js erhöhen. */
|
||||
const DIC_ASSET_VERSION = '14';
|
||||
const DIC_ASSET_VERSION = '15';
|
||||
|
||||
function asset(string $path): string
|
||||
{
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ $returnTo = '/bookings/' . (int) $booking['id'];
|
|||
<dd>
|
||||
<span class="trailer-chip" style="--trailer: <?= e($booking['trailer_color']) ?>; --trailer-text: <?= e(contrast_color($booking['trailer_color'])) ?>">
|
||||
<span class="trailer-dot" style="--trailer: <?= e($booking['trailer_color']) ?>"></span>
|
||||
<?= e($booking['trailer_label']) ?> · <?= e($booking['trailer_color_name']) ?>
|
||||
<?= e($booking['trailer_label']) ?>
|
||||
</span>
|
||||
</dd>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ $backUrl = $isEdit ? '/bookings/' . (int) $booking['id'] : '/calendar';
|
|||
<div class="field-with-aside">
|
||||
<select name="trailer_id" required data-trailer-select>
|
||||
<?php foreach ($trailers as $trailer): ?>
|
||||
<option value="<?= (int) $trailer['id'] ?>" data-color="<?= e($trailer['color_hex']) ?>" data-color-name="<?= e($trailer['color_name']) ?>"<?= (int) $values['trailer_id'] === (int) $trailer['id'] ? ' selected' : '' ?>>
|
||||
<?= e($trailer['label'] . ' · ' . $trailer['color_name']) ?>
|
||||
<option value="<?= (int) $trailer['id'] ?>" data-color="<?= e($trailer['color_hex']) ?>"<?= (int) $values['trailer_id'] === (int) $trailer['id'] ? ' selected' : '' ?>>
|
||||
<?= e($trailer['label']) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ foreach ($reminders as $reminder) {
|
|||
<div class="panel-head__main">
|
||||
<div class="panel-head__trailer">
|
||||
<span class="trailer-dot" style="--trailer: <?= e($booking['trailer_color']) ?>"></span>
|
||||
<?= e($booking['trailer_label']) ?> · <?= e($booking['trailer_color_name']) ?>
|
||||
<?= e($booking['trailer_label']) ?>
|
||||
</div>
|
||||
<h2><?= e($booking['customer_name']) ?></h2>
|
||||
<p>
|
||||
|
|
@ -56,7 +56,7 @@ foreach ($reminders as $reminder) {
|
|||
|
||||
<section class="panel-meta">
|
||||
<dl class="meta-list meta-list--compact">
|
||||
<div><dt>Anhänger</dt><dd><?= e($booking['trailer_label'] . ' · ' . $booking['trailer_color_name']) ?></dd></div>
|
||||
<div><dt>Anhänger</dt><dd><?= e($booking['trailer_label']) ?></dd></div>
|
||||
<div><dt>Mitarbeiter</dt><dd><?= e($booking['employee_name']) ?></dd></div>
|
||||
<div><dt>Art</dt><dd><?= e(booking_kind_label((string) $booking['kind'])) ?></dd></div>
|
||||
<div><dt>Rechnung</dt><dd><?= e(booking_invoice_display($booking)) ?></dd></div>
|
||||
|
|
|
|||
|
|
@ -246,8 +246,7 @@
|
|||
const option = trailerSelect.selectedOptions[0];
|
||||
if (!option) return;
|
||||
const color = option.dataset.color || '#196abc';
|
||||
const name = option.dataset.colorName || '';
|
||||
const label = option.textContent.split('·')[0].trim();
|
||||
const label = option.textContent.trim();
|
||||
const preview = bookingForm.querySelector('[data-trailer-preview]');
|
||||
if (preview) {
|
||||
preview.style.setProperty('--trailer', color);
|
||||
|
|
@ -255,7 +254,7 @@
|
|||
const dot = preview.querySelector('.trailer-dot');
|
||||
if (dot) dot.style.setProperty('--trailer', color);
|
||||
const text = preview.querySelector('[data-trailer-preview-label]');
|
||||
if (text) text.textContent = `${label} · ${name}`;
|
||||
if (text) text.textContent = label;
|
||||
}
|
||||
const summary = bookingForm.querySelector('[data-summary-trailer]');
|
||||
if (summary) summary.textContent = label;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue