in public/video-ui/src/services/WorkflowApi.js [90:140]
static _getTrackInWorkflowPayload({
video,
status,
section,
note,
prodOffice,
priority
}) {
const { contentChangeDetails } = video;
const publishedDate = contentChangeDetails.published
? moment(contentChangeDetails.published.date)
: null;
const lastModifiedDate = contentChangeDetails.lastModified
? moment(contentChangeDetails.lastModified.date)
: null;
const scheduledLaunch = VideoUtils.getScheduledLaunchAsDate(video);
const embargoDate = VideoUtils.getEmbargoAsDate(video);
const [embargo, indefiniteEmbargo] =
(embargoDate && embargoDate >= impossiblyDistantDate) ? [null, true] : [embargoDate, false];
return {
contentType: 'media',
editorId: video.id,
title: video.title,
priority: priority,
needsLegal: 'NA',
section,
status,
prodOffice,
commentable: video.commentsEnabled,
commissioningDesks: video.commissioningDesks.join(),
lastModified: lastModifiedDate,
published: !!contentChangeDetails.published,
timePublished: publishedDate,
headline: video.title,
sensitive: video.sensitive,
legallySensitive: video.legallySensitive,
optimisedForWeb: video.optimisedForWeb,
path: 'atom/media/' + video.id,
scheduledLaunchDate: scheduledLaunch,
embargoedUntil: embargo,
embargoedIndefinitely: indefiniteEmbargo,
note
};
}