mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-07 07:19:16 +00:00
refactor: style tweaks and bug fixes
- italic and bold for rundown metadata entries - allow deleting groups - make groups in order - correct style for milestones - open playing groups - style tweaks
This commit is contained in:
@@ -306,3 +306,17 @@ export function moveDown(
|
||||
// default - swap positions with next entry
|
||||
return { destinationId: nextEntryId, order: 'after' };
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorders unorderedArray to match the flatOrder entries
|
||||
* Useful for operations that convert selections (out of order) to rundown
|
||||
*/
|
||||
export function orderEntries(unorderedArray: EntryId[], flatOrder: EntryId[]): EntryId[] {
|
||||
const orderedArray: EntryId[] = [];
|
||||
for (const id of flatOrder) {
|
||||
if (unorderedArray.includes(id)) {
|
||||
orderedArray.push(id);
|
||||
}
|
||||
}
|
||||
return orderedArray;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user