mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 11:23:50 +00:00
db0eee3b9c
* chore: upgrade dependencies * feat/mac: draft pipeline * feat/mac: use public folder for transient files * feat/mac: set app fullscreen * feat/mac: cmd + , toggles menu * feat/mac: update readme * refact: easier login process * refact prevent style issues with safari * refact reduce css download * style: cleanup paginator design * style: studio clock is responsive * style: fix spacing style issues with safari
50 lines
1.3 KiB
React
50 lines
1.3 KiB
React
import React from 'react';
|
|
import EditableTimer from '../../input/EditableTimer';
|
|
import PropTypes from 'prop-types';
|
|
import style from './Times.module.scss'
|
|
|
|
export default function Times(props) {
|
|
const { handleValidate, actionHandler, timeStart, timeEnd, duration, previousEnd } = props;
|
|
|
|
return (
|
|
<>
|
|
<span className={style.label}>Start</span>
|
|
<EditableTimer
|
|
name='timeStart'
|
|
validate={handleValidate}
|
|
actionHandler={actionHandler}
|
|
time={timeStart}
|
|
delay={0}
|
|
previousEnd={previousEnd}
|
|
/>
|
|
<span className={style.label}>End</span>
|
|
<EditableTimer
|
|
name='timeEnd'
|
|
validate={handleValidate}
|
|
actionHandler={actionHandler}
|
|
time={timeEnd}
|
|
delay={0}
|
|
previousEnd={previousEnd}
|
|
/>
|
|
<span className={style.label}>Duration</span>
|
|
<EditableTimer
|
|
name='durationOverride'
|
|
validate={handleValidate}
|
|
actionHandler={actionHandler}
|
|
time={duration}
|
|
delay={0}
|
|
previousEnd={previousEnd}
|
|
/>
|
|
</>
|
|
);
|
|
};
|
|
|
|
Times.propTypes = {
|
|
handleValidate: PropTypes.func.isRequired,
|
|
actionHandler: PropTypes.func.isRequired,
|
|
timeStart: PropTypes.number,
|
|
timeEnd: PropTypes.number,
|
|
duration: PropTypes.number,
|
|
previousEnd: PropTypes.number,
|
|
};
|