mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
chore: rename blocks to groups
This commit is contained in:
committed by
Carlos Valente
parent
486d89ecf4
commit
e5d2457717
@@ -5,7 +5,7 @@ import {
|
||||
EndAction,
|
||||
EntryCustomFields,
|
||||
NormalisedAutomation,
|
||||
OntimeBlock,
|
||||
OntimeGroup,
|
||||
OntimeEntry,
|
||||
ProjectData,
|
||||
ProjectRundowns,
|
||||
@@ -317,7 +317,8 @@ export function migrateAutomations(jsonData: object): AutomationSettings | undef
|
||||
* - add parent
|
||||
*
|
||||
* - block:
|
||||
* - add all the new blocks of the block that is now a group
|
||||
* - rename to group
|
||||
* - create group data
|
||||
*/
|
||||
export function migrateRundown(
|
||||
jsonData: object,
|
||||
@@ -392,13 +393,13 @@ export function migrateRundown(
|
||||
});
|
||||
} else if (entry.type === 'block') {
|
||||
if (parent) {
|
||||
(newRundown.entries[parent] as OntimeBlock).entries = [...children];
|
||||
(newRundown.entries[parent] as OntimeGroup).entries = [...children];
|
||||
children = [];
|
||||
}
|
||||
parent = entry.id;
|
||||
append({
|
||||
id: entry.id,
|
||||
type: SupportedEntry.Block,
|
||||
type: SupportedEntry.Group,
|
||||
title: entry.title,
|
||||
note: '', // leave blank
|
||||
entries: [], // leave empty
|
||||
@@ -418,7 +419,7 @@ export function migrateRundown(
|
||||
}
|
||||
|
||||
if (parent) {
|
||||
(newRundown.entries[parent] as OntimeBlock).entries = [...children];
|
||||
(newRundown.entries[parent] as OntimeGroup).entries = [...children];
|
||||
children = [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user