mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
Custom fields views (#789)
* style: show field colour in editor * feat: custom fields in cuesheet * feat: custom fields in operator * refactor: update CSV export
This commit is contained in:
@@ -150,6 +150,13 @@ export const useEventAction = () => {
|
||||
[_updateEventMutation],
|
||||
);
|
||||
|
||||
const updateCustomField = useCallback(
|
||||
async (eventId: string, field: string, value: string) => {
|
||||
updateEvent({ id: eventId, custom: { [field]: { value } } });
|
||||
},
|
||||
[updateEvent],
|
||||
);
|
||||
|
||||
type TimeField = 'timeStart' | 'timeEnd' | 'duration';
|
||||
/**
|
||||
* Updates time of existing event
|
||||
@@ -553,5 +560,6 @@ export const useEventAction = () => {
|
||||
swapEvents,
|
||||
updateEvent,
|
||||
updateTimer,
|
||||
updateCustomField,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user