feat(PBI-jobs): voeg isDemo-prop door aan JobsBoard en JobDetailPane
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
71319e629d
commit
39e035b0b0
3 changed files with 6 additions and 4 deletions
|
|
@ -18,7 +18,7 @@ export default async function JobsPage() {
|
|||
<h1 className="text-lg font-semibold">Jobs</h1>
|
||||
</div>
|
||||
<div className="flex-1 overflow-hidden">
|
||||
<JobsBoard initialActiveJobs={data.activeJobs} initialDoneJobs={data.doneJobs} />
|
||||
<JobsBoard initialActiveJobs={data.activeJobs} initialDoneJobs={data.doneJobs} isDemo={session.isDemo ?? false} />
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -42,9 +42,10 @@ function subjectLabel(job: JobWithRelations): { label: string; value: string } |
|
|||
|
||||
interface JobDetailPaneProps {
|
||||
job: JobWithRelations | null
|
||||
isDemo: boolean
|
||||
}
|
||||
|
||||
export default function JobDetailPane({ job }: JobDetailPaneProps) {
|
||||
export default function JobDetailPane({ job, isDemo: _isDemo }: JobDetailPaneProps) {
|
||||
if (!job) {
|
||||
return (
|
||||
<div className="flex items-center justify-center h-full text-sm text-muted-foreground">
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import type { JobWithRelations } from '@/actions/jobs-page'
|
|||
interface JobsBoardProps {
|
||||
initialActiveJobs: JobWithRelations[]
|
||||
initialDoneJobs: JobWithRelations[]
|
||||
isDemo: boolean
|
||||
}
|
||||
|
||||
type View = 'detail' | 'usage'
|
||||
|
|
@ -32,7 +33,7 @@ const DONE_STATUS_OPTIONS: Array<{ value: ClaudeJobStatusApi; label: string }> =
|
|||
{ value: 'skipped', label: 'Overgeslagen' },
|
||||
]
|
||||
|
||||
export default function JobsBoard({ initialActiveJobs, initialDoneJobs }: JobsBoardProps) {
|
||||
export default function JobsBoard({ initialActiveJobs, initialDoneJobs, isDemo }: JobsBoardProps) {
|
||||
const { activeJobs, doneJobs, selectedJobId, initJobs, setSelectedJobId } = useJobsStore()
|
||||
const [view, setView] = useState<View>('detail')
|
||||
useJobsRealtime()
|
||||
|
|
@ -77,7 +78,7 @@ export default function JobsBoard({ initialActiveJobs, initialDoneJobs }: JobsBo
|
|||
</Button>
|
||||
</div>
|
||||
<div className="flex-1 overflow-y-auto">
|
||||
{view === 'detail' ? <JobDetailPane job={selectedJob} /> : <JobUsagePane job={selectedJob} />}
|
||||
{view === 'detail' ? <JobDetailPane job={selectedJob} isDemo={isDemo} /> : <JobUsagePane job={selectedJob} />}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue