Season Check: series card, study guide, next-season handover and unseasoned-script checks; v2.20.1
Publish Container / build (push) Has been cancelled
Publish Container / build (push) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
50b0e83c2b
commit
35d3c9ca33
6 files changed
+66
-7
No files matched your search
+15
-1
@@ -2148,7 +2148,7 @@ interface SeasonCheckLane {
|
||||
}
|
||||
|
||||
function SeasonCheckAdmin({ onNavigate }: { onNavigate: (view: AdminView) => void }) {
|
||||
const [report, setReport] = useState<{ lanes: SeasonCheckLane[]; total: number } | null>(null)
|
||||
const [report, setReport] = useState<{ lanes: SeasonCheckLane[]; general: SeasonCheckProblem[]; total: number } | null>(null)
|
||||
const [error, setError] = useState('')
|
||||
const [loading, setLoading] = useState(true)
|
||||
|
||||
@@ -2173,6 +2173,20 @@ function SeasonCheckAdmin({ onNavigate }: { onNavigate: (view: AdminView) => voi
|
||||
<button type="button" className="btn-admin-ghost" onClick={() => { setLoading(true); fetchReport() }} disabled={loading}>{loading ? 'Checking…' : 'Check again'}</button>
|
||||
{error && <p style={{ color: '#c0392b' }}>{error}</p>}
|
||||
{report && report.lanes.length === 0 && <p className="admin-stats-note">No lanes are set up yet.</p>}
|
||||
{report && report.general.length > 0 && (
|
||||
<div style={{ marginTop: 20 }}>
|
||||
<h3 style={{ marginBottom: 4 }}>All lanes</h3>
|
||||
<ul style={{ listStyle: 'none', padding: 0, margin: '8px 0 12px' }}>
|
||||
{report.general.map((p, i) => (
|
||||
<li key={i} style={{ display: 'flex', gap: 10, alignItems: 'flex-start', padding: '5px 0' }}>
|
||||
<span style={{ color: p.severity === 'error' ? '#c0392b' : '#b8860b' }}>{p.severity === 'error' ? '●' : '▲'}</span>
|
||||
<span style={{ flex: 1 }}>{p.message}</span>
|
||||
<button type="button" className="btn-admin-ghost" onClick={() => onNavigate(p.view as AdminView)}>Fix →</button>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
{report?.lanes.map(l => (
|
||||
<div key={l.lane} style={{ marginTop: 20 }}>
|
||||
<h3 style={{ marginBottom: 4 }}>
|
||||
|
||||
@@ -4,7 +4,7 @@ interface Trend { thisWeek: number; lastWeek: number; series: number[] }
|
||||
interface ResendStatus { available: boolean; reason?: string; broadcast?: { id: string; name: string; subject: string; sentAt: string | null; dashboardUrl: string } | null }
|
||||
|
||||
export interface DashboardData {
|
||||
seasonCheck: { total: number; errors: number; warnings: number; lanes: { lane: string; title: string; season: string; errors: number; warnings: number }[] } | null
|
||||
seasonCheck: { total: number; errors: number; warnings: number; general: number; lanes: { lane: string; title: string; season: string; errors: number; warnings: number }[] } | null
|
||||
trends: { visits: Trend; subscribers: Trend; studySignups: Trend }
|
||||
traffic: { topPages: { path: string; hits: number }[]; topReferrers: { referrer: string; count: number }[] }
|
||||
reengagement: { t1: number; t2: number; t3: number; recentlySent: number; remindersEnabled: number }
|
||||
@@ -157,6 +157,9 @@ export function AdminDashboardExtras({ publishedAt, draftUpdatedAt, isDirty, onN
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
{data.seasonCheck.general > 0 && (
|
||||
<p className="admin-stats-note">Plus {data.seasonCheck.general} thing{data.seasonCheck.general === 1 ? '' : 's'} that apply to every lane (such as scripts with no season number).</p>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in new issue
Block a user