mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-26 01:19:11 +00:00
feat: events have note field
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.titleUnderlined {
|
.titleUnderlined {
|
||||||
border-bottom: 1px solid rgba(255, 255, 255, 0.35);
|
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.block {
|
.block {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const areEqual = (prevProps, nextProps) => {
|
|||||||
const EventBlock = (props) => {
|
const EventBlock = (props) => {
|
||||||
const { data, selected, next, delay, index, eventsHandler } = props;
|
const { data, selected, next, delay, index, eventsHandler } = props;
|
||||||
|
|
||||||
const [more, setMore] = useState(false);
|
const [more, setMore] = useState(true);
|
||||||
const [visible, setVisible] = useState(data.isPublic || false);
|
const [visible, setVisible] = useState(data.isPublic || false);
|
||||||
|
|
||||||
// Set visibility indicator
|
// Set visibility indicator
|
||||||
@@ -69,6 +69,10 @@ const EventBlock = (props) => {
|
|||||||
updateValues('presenter', v);
|
updateValues('presenter', v);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleNoteSubmit = (v) => {
|
||||||
|
updateValues('note', v);
|
||||||
|
};
|
||||||
|
|
||||||
const handleVisibleToggle = () => {
|
const handleVisibleToggle = () => {
|
||||||
let viz = !data.isPublic || !visible;
|
let viz = !data.isPublic || !visible;
|
||||||
updateValues('isPublic', viz);
|
updateValues('isPublic', viz);
|
||||||
@@ -119,6 +123,13 @@ const EventBlock = (props) => {
|
|||||||
submitHandler={handleSubtitleSubmit}
|
submitHandler={handleSubtitleSubmit}
|
||||||
underlined
|
underlined
|
||||||
/>
|
/>
|
||||||
|
<EditableText
|
||||||
|
label='note'
|
||||||
|
defaultValue={data.note}
|
||||||
|
placeholder='Add note'
|
||||||
|
submitHandler={handleNoteSubmit}
|
||||||
|
underlined
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className={style.titleContainer}>
|
<div className={style.titleContainer}>
|
||||||
|
|||||||
Reference in New Issue
Block a user