feat: route ready-title issues through guided workflow
This commit is contained in:
@@ -4,7 +4,6 @@ import PageHeading from '../../ui/PageHeading'
|
||||
import RequestLanguage from './RequestLanguage'
|
||||
import { lockBodyScroll } from '../../lib/scrollLock'
|
||||
import LatestActivity from './LatestActivity'
|
||||
import RequestIssueDialog from './RequestIssueDialog'
|
||||
|
||||
import Image from 'next/image'
|
||||
import { useParams, useRouter } from 'next/navigation'
|
||||
@@ -542,6 +541,13 @@ export default function RequestTimelinePage() {
|
||||
? availableStage.link
|
||||
: null
|
||||
const requestComplete = ['COMPLETED', 'AVAILABLE'].includes(snapshot.state) || availableStage?.state === 'complete'
|
||||
const issueReportParams = new URLSearchParams({
|
||||
reportRequest: snapshot.request_id,
|
||||
title: snapshot.title,
|
||||
type: snapshot.request_type === 'tv' ? 'tv' : 'movie',
|
||||
})
|
||||
if (snapshot.year) issueReportParams.set('year', String(snapshot.year))
|
||||
const issueReportLink = `/portal/issues?${issueReportParams.toString()}`
|
||||
const statusLabel = presentation.status?.label ?? fallbackStatusLabel(snapshot.state)
|
||||
const statusMeaning = presentation.status?.meaning ?? snapshot.state_reason ?? 'Magent is checking this request.'
|
||||
const download = presentation.download
|
||||
@@ -833,7 +839,7 @@ export default function RequestTimelinePage() {
|
||||
<span className="request-overview-label">Need help?</span>
|
||||
<strong>Is there a problem with this?</strong>
|
||||
<p>Let us know what is wrong and we'll attach the title and request details automatically.</p>
|
||||
{canReportIssues ? <RequestIssueDialog requestId={snapshot.request_id} title={snapshot.title} year={snapshot.year} requestType={snapshot.request_type} /> : <span className="request-ready-unavailable">Issue reporting is not enabled for your account.</span>}
|
||||
{canReportIssues ? <a className="request-problem-button" href={issueReportLink}>Start issue report <span aria-hidden="true">→</span></a> : <span className="request-ready-unavailable">Issue reporting is not enabled for your account.</span>}
|
||||
</section>
|
||||
</div>
|
||||
) : <>
|
||||
|
||||
Reference in New Issue
Block a user