diff --git a/src/pages/Report.jsx b/src/pages/Report.jsx index f3b30c0..2b18cfa 100644 --- a/src/pages/Report.jsx +++ b/src/pages/Report.jsx @@ -26,11 +26,20 @@ let reportDatesRange = { to: moment("9999-12-31T23:59:59.9999999") } -const timePeriodNames = { - 600: '1 минута', - 86400:'1 день', - 604800:'1 неделя' -} +const timePeriodNames = [ + {label: '1 секунда', value: 1}, + {label: '10 секунд', value: 10}, + {label: '1 минута', value: 60}, + {label: '5 минут', value: 300}, + {label: '30 минут', value: 1800}, + {label: '1 час', value: 3600}, + {label: '6 часов', value: 21600}, + {label: '12 часов', value: 43200}, + {label: '1 день', value: 86400}, + {label: '1 неделя', value: 604800} +] + +const firstStep = timePeriodNames[2]["value"] const imgPaths = { '.pdf': '/images/pdf.png', @@ -42,7 +51,7 @@ const imgPaths = { export default function Report(props) { const [rangeDate, setRangeDate] = useState([moment().subtract(1,'days'), moment()]) - const [step, setStep] = useState(600) + const [step, setStep] = useState(firstStep) const [format, setFormat] = useState(0) const [approxPages, setPagesCount] = useState(0) const [suitableReports, setSuitableReports] = useState([]) @@ -51,6 +60,8 @@ export default function Report(props) { let wellId = useParams().id; + const periods = timePeriodNames.map((line) => ) + const columns = [ { title: '', @@ -244,15 +255,12 @@ export default function Report(props) { - - - - + {periods}