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