File tree Expand file tree Collapse file tree
src/octockup.client/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,9 +24,12 @@ import { BackupStatus } from "../types/api";
2424import { confirm } from "material-ui-confirm" ;
2525import { useTranslation } from "react-i18next" ;
2626import type { ScheduleItem , ScheduleReport } from "../types/api" ;
27- import { parseUtcDate } from "../utils/dateUtils" ;
2827import { formatSpeed , formatElapsed } from "../utils/formatUtils" ;
29- import { formatNextRun , formatInterval } from "../utils/scheduleUtils" ;
28+ import {
29+ calculateNextRunTime ,
30+ formatNextRun ,
31+ formatInterval ,
32+ } from "../utils/scheduleUtils" ;
3033import { getSourceIcon } from "../constants/sourceIcons" ;
3134
3235function getStatusIcon ( status : BackupStatus ) {
@@ -202,6 +205,7 @@ function ScheduleInfo({
202205 progress : number ;
203206} ) {
204207 const { t } = useTranslation ( ) ;
208+ const nextRun = calculateNextRunTime ( item ) ;
205209
206210 const renderIntervalInfo = ( ) => {
207211 if ( ! item . interval ) {
@@ -251,12 +255,18 @@ function ScheduleInfo({
251255 </ Typography >
252256 </ Box >
253257 ) }
254- < Typography
255- variant = "caption"
256- sx = { { color : "text.secondary" , display : "block" , fontSize : "0.7rem" } }
257- >
258- { parseUtcDate ( item . startAt ) ! . toLocaleString ( ) }
259- </ Typography >
258+ { nextRun && (
259+ < Typography
260+ variant = "caption"
261+ sx = { {
262+ color : "text.secondary" ,
263+ display : "block" ,
264+ fontSize : "0.7rem" ,
265+ } }
266+ >
267+ { nextRun . toLocaleString ( ) }
268+ </ Typography >
269+ ) }
260270 </ Box >
261271 </ Box >
262272 ) ;
You can’t perform that action at this time.
0 commit comments