refactor: restructure model to contain an object of rundowns

This commit is contained in:
Carlos Valente
2025-03-15 09:04:33 +01:00
committed by arc-alex
parent 0a80d6db31
commit abd9b127db
111 changed files with 4357 additions and 4515 deletions
@@ -1,4 +1,4 @@
import { isOntimeBlock, isOntimeEvent, OntimeEvent, OntimeRundownEntry } from 'ontime-types';
import { isOntimeBlock, isOntimeEvent, OntimeEvent, OntimeEntry } from 'ontime-types';
import { millisToString } from 'ontime-utils';
import type { sheets_v4 } from '@googleapis/sheets';
@@ -74,14 +74,14 @@ export function getA1Notation(row: number, column: number): string {
/**
* @description - creates updateCells request from ontime event
* @param {OntimeRundownEntry} event
* @param {OntimeEntry} event
* @param {number} index - index of the event
* @param {number} worksheetId
* @param {object} metadata - object with all the cell positions of the title of each attribute
* @returns {sheets_v4.Schema} - list of update requests
*/
export function cellRequestFromEvent(
event: OntimeRundownEntry,
event: OntimeEntry,
index: number,
worksheetId: number,
metadata: object,
@@ -125,7 +125,7 @@ export function cellRequestFromEvent(
};
}
function getCellData(key: keyof OntimeEvent | 'blank', event: OntimeRundownEntry) {
function getCellData(key: keyof OntimeEvent | 'blank', event: OntimeEntry) {
if (isOntimeEvent(event)) {
if (key === 'blank') {
return {};