Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TNO- 3033 transcript png in reports #2329

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<center><div style="margin-bottom: 25px; color:#FFFFF6;"><img src="@($"{SubscriberAppUrl}assets/reports/MMI_logo_white.png")" width="600"></div></center>

@* This is the Do Not Forward disclaimer *@
<div><p style="background-color: #FFF7E1; color: #876503; text-align: center; font-size: 1em; font-weight: 700; line-height: 1.1em; letter-spacing: 0.08px; padding: 10px 0px; margin: 6px 0px 20px 0px;">Please take two minutes to answer a few questions about how you use MMI. <a href="https://forms.office.com/Pages/ResponsePage.aspx?id=AFLbbw09ikqwNtNoXjWa3LO6CqyU1bRHn43hYw6kY1VUN05QREFTSFdIV1I5RE9ZQ1ZHMlEzUEhZNC4u">Click here to begin the survey.</a></p></div>
<div><p style="background-color: #FFF7E1; color: #876503; text-align: center; font-size: 1em; font-weight: 700; line-height: 1.1em; letter-spacing: 0.08px; padding: 10px 0px; margin: 6px 0px 20px 0px;">DO NOT FORWARD THIS REPORT IN FULL &mdash; OR IN PART &mdash; TO ANYONE</p></div>

<a id="top" name="top">
<h1 style="color: #971D29; font-size: 30px; line-height: 34px; margin: 0px; border-bottom: #971D29 1px solid;">@Settings.Subject.Text</h1>
Expand Down Expand Up @@ -171,7 +171,6 @@
{
var content = sectionContent[i];
if (Settings.Content.HighlightKeywords) ReportExtensions.MarkKeywords(section.Value, content);
var isTranscript = ReportExtensions.IsTranscriptAvailable(content);
var sentiment = ReportExtensions.GetSentiment(content, Model, true);
var headline = ReportExtensions.GetHeadline(content, Model);
var body = ReportExtensions.GetBody(content, Model);
Expand Down Expand Up @@ -246,13 +245,6 @@
}
</div>
</div>
@if (isTranscript)
{
<div style="display: inline-block; margin-top: 5px;">
<img src="@($"{SubscriberAppUrl}asset/reports/transcript_icon.png")">
<span style="font-size: 14px;">Transcript</span>
</div>
}
@if (!String.IsNullOrEmpty(body))
{
<div style="font-size:1em; margin-bottom: 10px;text-align:left;">@body</div>
Expand Down
Binary file added app/subscriber/public/assets/transcript_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ export const ReportContentInlineText: React.FC<IReportContentInlineTextProps> =

if (row.content.contentType === ContentTypeName.AudioVideo) {
// AV Content format
contentDetails =
`${row.content.source?.name ? `${row.content.source.name} | ` : ''}` +
`${row.content.series ? `(${row.content.series.name}) | ` : ''}` +
`${row.content.contentType ? `${row.content.contentType} | ` : ''}` +
`${row.content.publishedOn ? moment(row.content.publishedOn).format('DD-MMM-YYYY') : ''}`;
contentDetails = `
${
row.content.isApproved
? `<img src="${process.env.PUBLIC_URL}/assets/transcript_icon.png" alt="Transcript" />`
: ''
}
${row.content.source?.name ? `${row.content.source.name} | ` : ''}
${row.content.series ? `(${row.content.series.name}) | ` : ''}
${row.content.contentType ? `${row.content.contentType} | ` : ''}
${row.content.publishedOn ? moment(row.content.publishedOn).format('DD-MMM-YYYY') : ''}
`;
} else {
// General Content format
contentDetails =
Expand All @@ -38,5 +44,12 @@ export const ReportContentInlineText: React.FC<IReportContentInlineTextProps> =
`${row.content.publishedOn ? moment(row.content.publishedOn).format('DD-MMM-YYYY') : ''}`;
}

return <div className="report-content-inline-text">{contentDetails}</div>;
return (
<div
className="report-content-inline-text"
dangerouslySetInnerHTML={{ __html: contentDetails }}
/>
// {contentDetails}
// </div>
);
};
Loading
Loading