mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 15:09:10 +00:00
style: cuesheet block (#355)
* style: cuesheet show block title * style: cuesheet show full delay string
This commit is contained in:
@@ -6,7 +6,7 @@ export default function BlockRow(props) {
|
|||||||
const { row } = props;
|
const { row } = props;
|
||||||
return (
|
return (
|
||||||
<tr {...row.getRowProps()}>
|
<tr {...row.getRowProps()}>
|
||||||
<td className={style.blockCell}>Delay Block</td>
|
<td className={style.blockCell}>{row.original?.title || 'Block'}</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
import { millisToMinutes } from '../../../common/utils/dateConfig';
|
import { millisToDelayString } from '../../../common/utils/dateConfig';
|
||||||
|
|
||||||
import style from '../Table.module.scss';
|
import style from '../Table.module.scss';
|
||||||
|
|
||||||
export default function DelayRow(props) {
|
export default function DelayRow(props) {
|
||||||
const { row } = props;
|
const { row } = props;
|
||||||
const delayVal = row.original.duration;
|
const delayVal = row.original.duration;
|
||||||
const minutesDelayed = Math.abs(millisToMinutes(delayVal));
|
const delayTime = delayVal !== 0 ? millisToDelayString(delayVal) : null;
|
||||||
const labelText = `${minutesDelayed} minutes ${delayVal >= 0 ? 'delayed' : 'ahead'}`;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr {...row.getRowProps()}>
|
<tr {...row.getRowProps()}>
|
||||||
<td className={style.delayCell}>{labelText}</td>
|
<td className={style.delayCell}>{delayTime}</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -20,4 +19,3 @@ export default function DelayRow(props) {
|
|||||||
DelayRow.propTypes = {
|
DelayRow.propTypes = {
|
||||||
row: PropTypes.object.isRequired,
|
row: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user