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