new features, bookstack
This commit is contained in:
@@ -36,6 +36,7 @@ import {
|
||||
import { format, parseISO } from 'date-fns';
|
||||
import { de } from 'date-fns/locale';
|
||||
import DashboardLayout from '../components/dashboard/DashboardLayout';
|
||||
import { fromGermanDate } from '../utils/dateInput';
|
||||
import IncidentStatsChart from '../components/incidents/IncidentStatsChart';
|
||||
import {
|
||||
incidentsApi,
|
||||
@@ -206,12 +207,18 @@ function Einsaetze() {
|
||||
limit: rowsPerPage,
|
||||
offset: page * rowsPerPage,
|
||||
};
|
||||
if (dateFrom) filters.dateFrom = new Date(dateFrom).toISOString();
|
||||
if (dateFrom) {
|
||||
const iso = fromGermanDate(dateFrom);
|
||||
if (iso) filters.dateFrom = new Date(iso).toISOString();
|
||||
}
|
||||
if (dateTo) {
|
||||
// Set to end of day for dateTo
|
||||
const end = new Date(dateTo);
|
||||
end.setHours(23, 59, 59, 999);
|
||||
filters.dateTo = end.toISOString();
|
||||
const iso = fromGermanDate(dateTo);
|
||||
if (iso) {
|
||||
const end = new Date(iso);
|
||||
end.setHours(23, 59, 59, 999);
|
||||
filters.dateTo = end.toISOString();
|
||||
}
|
||||
}
|
||||
if (selectedArts.length === 1) filters.einsatzArt = selectedArts[0];
|
||||
|
||||
@@ -336,7 +343,7 @@ function Einsaetze() {
|
||||
<Grid item xs={12} sm={4} md={3}>
|
||||
<TextField
|
||||
label="Von (Alarmzeit)"
|
||||
type="date"
|
||||
placeholder="TT.MM.JJJJ"
|
||||
value={dateFrom}
|
||||
onChange={(e) => { setDateFrom(e.target.value); setPage(0); }}
|
||||
InputLabelProps={{ shrink: true }}
|
||||
@@ -348,7 +355,7 @@ function Einsaetze() {
|
||||
<Grid item xs={12} sm={4} md={3}>
|
||||
<TextField
|
||||
label="Bis (Alarmzeit)"
|
||||
type="date"
|
||||
placeholder="TT.MM.JJJJ"
|
||||
value={dateTo}
|
||||
onChange={(e) => { setDateTo(e.target.value); setPage(0); }}
|
||||
InputLabelProps={{ shrink: true }}
|
||||
|
||||
Reference in New Issue
Block a user