update
This commit is contained in:
@@ -590,14 +590,17 @@ export default function BestellungDetail() {
|
||||
doc.setFont('helvetica', 'normal');
|
||||
doc.setTextColor(0, 0, 0);
|
||||
|
||||
// Ort/Datum line (left)
|
||||
doc.line(10, curY, 90, curY);
|
||||
// Place and date (right-aligned, above signature line)
|
||||
const today = new Date();
|
||||
const dd = String(today.getDate()).padStart(2, '0');
|
||||
const mm = String(today.getMonth() + 1).padStart(2, '0');
|
||||
const yyyy = today.getFullYear();
|
||||
doc.text(`St. Valentin, am ${dd}.${mm}.${yyyy}`, 200, curY - 6, { align: 'right' });
|
||||
|
||||
// Signature line (right)
|
||||
doc.line(120, curY, 200, curY);
|
||||
|
||||
curY += 4;
|
||||
doc.text('Ort, Datum', 10, curY);
|
||||
const sigName = bestellung.besteller_dienstgrad
|
||||
? `${kurzDienstgrad(bestellung.besteller_dienstgrad)} ${bestellung.besteller_name || ''}`
|
||||
: (bestellung.besteller_name || '');
|
||||
|
||||
@@ -1234,6 +1234,10 @@ function VeranstaltungFormDialog({
|
||||
notification.showError('Datum Bis muss nach Datum Von liegen');
|
||||
return;
|
||||
}
|
||||
if (wiederholungAktiv && !wiederholungBis) {
|
||||
notification.showError('Bitte Enddatum für Wiederholung angeben');
|
||||
return;
|
||||
}
|
||||
if (wiederholungAktiv && wiederholungBis && isNaN(new Date(wiederholungBis).getTime())) {
|
||||
notification.showError('Ungültiges Datum für Wiederholung Bis');
|
||||
return;
|
||||
@@ -1326,32 +1330,64 @@ function VeranstaltungFormDialog({
|
||||
}
|
||||
label="Ganztägig"
|
||||
/>
|
||||
<Box sx={{ display: 'flex', gap: 1.5, alignItems: 'flex-start' }}>
|
||||
<GermanDateField
|
||||
label="Von"
|
||||
mode={form.ganztaegig ? 'date' : 'datetime'}
|
||||
mode="date"
|
||||
value={form.datum_von}
|
||||
onChange={(iso) => {
|
||||
const d = form.ganztaegig
|
||||
? new Date(iso + 'T00:00:00')
|
||||
: new Date(iso);
|
||||
onChange={(isoDate) => {
|
||||
const timeStr = form.datum_von?.substring(11, 16) || '00:00';
|
||||
const d = new Date(`${isoDate}T${timeStr}:00`);
|
||||
if (isNaN(d.getTime())) return;
|
||||
handleChange('datum_von', d.toISOString());
|
||||
}}
|
||||
fullWidth
|
||||
sx={{ flex: 1 }}
|
||||
/>
|
||||
{!form.ganztaegig && (
|
||||
<TextField
|
||||
label="Uhrzeit"
|
||||
type="time"
|
||||
value={form.datum_von?.substring(11, 16) || ''}
|
||||
onChange={(e) => {
|
||||
const dateStr = form.datum_von?.substring(0, 10) || new Date().toISOString().substring(0, 10);
|
||||
const d = new Date(`${dateStr}T${e.target.value}:00`);
|
||||
if (!isNaN(d.getTime())) handleChange('datum_von', d.toISOString());
|
||||
}}
|
||||
InputLabelProps={{ shrink: true }}
|
||||
inputProps={{ step: 300 }}
|
||||
sx={{ width: 130 }}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
<Box sx={{ display: 'flex', gap: 1.5, alignItems: 'flex-start' }}>
|
||||
<GermanDateField
|
||||
label="Bis"
|
||||
mode={form.ganztaegig ? 'date' : 'datetime'}
|
||||
mode="date"
|
||||
value={form.datum_bis}
|
||||
onChange={(iso) => {
|
||||
const d = form.ganztaegig
|
||||
? new Date(iso + 'T23:59:00')
|
||||
: new Date(iso);
|
||||
onChange={(isoDate) => {
|
||||
const timeStr = form.datum_bis?.substring(11, 16) || '23:59';
|
||||
const d = new Date(`${isoDate}T${timeStr}:00`);
|
||||
if (isNaN(d.getTime())) return;
|
||||
handleChange('datum_bis', d.toISOString());
|
||||
}}
|
||||
fullWidth
|
||||
sx={{ flex: 1 }}
|
||||
/>
|
||||
{!form.ganztaegig && (
|
||||
<TextField
|
||||
label="Uhrzeit"
|
||||
type="time"
|
||||
value={form.datum_bis?.substring(11, 16) || ''}
|
||||
onChange={(e) => {
|
||||
const dateStr = form.datum_bis?.substring(0, 10) || new Date().toISOString().substring(0, 10);
|
||||
const d = new Date(`${dateStr}T${e.target.value}:00`);
|
||||
if (!isNaN(d.getTime())) handleChange('datum_bis', d.toISOString());
|
||||
}}
|
||||
InputLabelProps={{ shrink: true }}
|
||||
inputProps={{ step: 300 }}
|
||||
sx={{ width: 130 }}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
<TextField
|
||||
label="Ort"
|
||||
value={form.ort ?? ''}
|
||||
|
||||
Reference in New Issue
Block a user