chore: rename blocks to groups

This commit is contained in:
Carlos Valente
2025-08-09 06:47:13 +02:00
committed by Carlos Valente
parent 486d89ecf4
commit e5d2457717
83 changed files with 987 additions and 981 deletions
@@ -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 = [];
}