mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 14:39:06 +00:00
refactor: prevent ids from being overriden
This commit is contained in:
committed by
Carlos Valente
parent
b75b69c3b1
commit
5dce1a40bc
@@ -184,8 +184,8 @@ export const parseExcel = (
|
|||||||
// from excel, we can only get groups, milestones and events
|
// from excel, we can only get groups, milestones and events
|
||||||
if (isOntimeGroup(entry as OntimeEntry)) {
|
if (isOntimeGroup(entry as OntimeEntry)) {
|
||||||
const group = {
|
const group = {
|
||||||
id, // will be replaced by a potentially user given ID
|
|
||||||
...entry,
|
...entry,
|
||||||
|
id,
|
||||||
targetDuration: entry.duration ? entry.duration : null,
|
targetDuration: entry.duration ? entry.duration : null,
|
||||||
custom: { ...entryCustomFields },
|
custom: { ...entryCustomFields },
|
||||||
} as OntimeGroup;
|
} as OntimeGroup;
|
||||||
@@ -202,8 +202,8 @@ export const parseExcel = (
|
|||||||
|
|
||||||
if (isOntimeMilestone(entry as OntimeEntry)) {
|
if (isOntimeMilestone(entry as OntimeEntry)) {
|
||||||
const milestone = {
|
const milestone = {
|
||||||
id, // will be replaced by a potentially user given ID
|
|
||||||
...entry,
|
...entry,
|
||||||
|
id,
|
||||||
custom: { ...entryCustomFields },
|
custom: { ...entryCustomFields },
|
||||||
} as OntimeMilestone;
|
} as OntimeMilestone;
|
||||||
if (currentGroupId) {
|
if (currentGroupId) {
|
||||||
@@ -219,8 +219,8 @@ export const parseExcel = (
|
|||||||
|
|
||||||
// after group and milestones we only have events remaining
|
// after group and milestones we only have events remaining
|
||||||
const event = {
|
const event = {
|
||||||
id, // will be replaced by a potentially user given ID
|
|
||||||
...entry,
|
...entry,
|
||||||
|
id,
|
||||||
custom: { ...entryCustomFields },
|
custom: { ...entryCustomFields },
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
} as OntimeEvent;
|
} as OntimeEvent;
|
||||||
|
|||||||
Reference in New Issue
Block a user