diff --git a/src/app/(admin)/admin/rounds/pipeline/[id]/edit/page.tsx b/src/app/(admin)/admin/rounds/pipeline/[id]/edit/page.tsx index fccb79d..9bd33e4 100644 --- a/src/app/(admin)/admin/rounds/pipeline/[id]/edit/page.tsx +++ b/src/app/(admin)/admin/rounds/pipeline/[id]/edit/page.tsx @@ -309,6 +309,7 @@ export default function EditPipelinePage() { onChange={(c) => updateStageConfig('INTAKE', c as unknown as Record) } + isActive={isActive} /> @@ -323,6 +324,7 @@ export default function EditPipelinePage() { @@ -339,6 +341,7 @@ export default function EditPipelinePage() { onChange={(c) => updateStageConfig('FILTER', c as unknown as Record) } + isActive={isActive} /> @@ -355,6 +358,7 @@ export default function EditPipelinePage() { onChange={(c) => updateStageConfig('EVALUATION', c as unknown as Record) } + isActive={isActive} /> @@ -369,6 +373,7 @@ export default function EditPipelinePage() { updateState({ tracks })} + isActive={isActive} /> @@ -385,6 +390,7 @@ export default function EditPipelinePage() { onChange={(c) => updateStageConfig('LIVE_FINAL', c as unknown as Record) } + isActive={isActive} /> @@ -403,6 +409,7 @@ export default function EditPipelinePage() { onOverridePolicyChange={(overridePolicy) => updateState({ overridePolicy }) } + isActive={isActive} /> diff --git a/src/app/(admin)/admin/rounds/pipelines/page.tsx b/src/app/(admin)/admin/rounds/pipelines/page.tsx index 00bb97d..9bc7cf5 100644 --- a/src/app/(admin)/admin/rounds/pipelines/page.tsx +++ b/src/app/(admin)/admin/rounds/pipelines/page.tsx @@ -133,71 +133,78 @@ export default function PipelineListPage() { {pipelines && pipelines.length > 0 && (
{pipelines.map((pipeline) => ( - - -
-
- - {pipeline.name} - - - {pipeline.slug} - + + + +
+
+ + {pipeline.name} + + + {pipeline.slug} + +
+
+ + {pipeline.status} + + + + + + + + + + View + + + + + + Edit + + + + +
-
- - {pipeline.status} - - - - - - - - - - View - - - - - - Edit - - - - + + +
+
+ + {pipeline._count.tracks} tracks +
+
+ + {pipeline._count.routingRules} rules +
-
-
- -
-
- - {pipeline._count.tracks} tracks -
-
- - {pipeline._count.routingRules} rules -
-
-

- Created {format(new Date(pipeline.createdAt), 'MMM d, yyyy')} -

-
-
+

+ Created {format(new Date(pipeline.createdAt), 'MMM d, yyyy')} +

+ + + ))}
)} diff --git a/src/app/(applicant)/applicant/pipeline/page.tsx b/src/app/(applicant)/applicant/pipeline/page.tsx index 0a49495..184f123 100644 --- a/src/app/(applicant)/applicant/pipeline/page.tsx +++ b/src/app/(applicant)/applicant/pipeline/page.tsx @@ -250,7 +250,7 @@ export default function ApplicantPipelinePage() {
diff --git a/src/app/(mentor)/mentor/page.tsx b/src/app/(mentor)/mentor/page.tsx index b6e06fb..f4b0929 100644 --- a/src/app/(mentor)/mentor/page.tsx +++ b/src/app/(mentor)/mentor/page.tsx @@ -189,7 +189,7 @@ export default function MentorDashboard() { {/* Quick Actions */}
+ {config.minLoadPerJuror > config.maxLoadPerJuror && ( +

+ Min load per juror cannot exceed max load per juror. +

+ )} +
@@ -86,6 +96,7 @@ export function AssignmentSection({ config, onChange }: AssignmentSectionProps) onCheckedChange={(checked) => updateConfig({ availabilityWeighting: checked }) } + disabled={isActive} />
@@ -98,6 +109,7 @@ export function AssignmentSection({ config, onChange }: AssignmentSectionProps) overflowPolicy: value as EvaluationConfig['overflowPolicy'], }) } + disabled={isActive} > diff --git a/src/components/admin/pipeline/sections/awards-section.tsx b/src/components/admin/pipeline/sections/awards-section.tsx index 70c2baa..ab3d802 100644 --- a/src/components/admin/pipeline/sections/awards-section.tsx +++ b/src/components/admin/pipeline/sections/awards-section.tsx @@ -31,6 +31,7 @@ import type { RoutingMode, DecisionMode, AwardScoringMode } from '@prisma/client type AwardsSectionProps = { tracks: WizardTrackConfig[] onChange: (tracks: WizardTrackConfig[]) => void + isActive?: boolean } function slugify(name: string): string { @@ -40,7 +41,7 @@ function slugify(name: string): string { .replace(/^-|-$/g, '') } -export function AwardsSection({ tracks, onChange }: AwardsSectionProps) { +export function AwardsSection({ tracks, onChange, isActive }: AwardsSectionProps) { const awardTracks = tracks.filter((t) => t.kind === 'AWARD') const nonAwardTracks = tracks.filter((t) => t.kind !== 'AWARD') @@ -72,7 +73,7 @@ export function AwardsSection({ tracks, onChange }: AwardsSectionProps) {

Configure special award tracks that run alongside the main competition.

- @@ -100,6 +101,7 @@ export function AwardsSection({ tracks, onChange }: AwardsSectionProps) { variant="ghost" size="icon" className="h-7 w-7 text-muted-foreground hover:text-destructive" + disabled={isActive} > @@ -129,6 +131,7 @@ export function AwardsSection({ tracks, onChange }: AwardsSectionProps) { { const name = e.target.value updateAward(index, { @@ -151,6 +154,7 @@ export function AwardsSection({ tracks, onChange }: AwardsSectionProps) { routingModeDefault: value as RoutingMode, }) } + disabled={isActive} > @@ -178,6 +182,7 @@ export function AwardsSection({ tracks, onChange }: AwardsSectionProps) { onValueChange={(value) => updateAward(index, { decisionMode: value as DecisionMode }) } + disabled={isActive} > @@ -203,6 +208,7 @@ export function AwardsSection({ tracks, onChange }: AwardsSectionProps) { }, }) } + disabled={isActive} > diff --git a/src/components/admin/pipeline/sections/filtering-section.tsx b/src/components/admin/pipeline/sections/filtering-section.tsx index e50ea67..b9cc124 100644 --- a/src/components/admin/pipeline/sections/filtering-section.tsx +++ b/src/components/admin/pipeline/sections/filtering-section.tsx @@ -19,9 +19,10 @@ import type { FilterConfig, FilterRuleConfig } from '@/types/pipeline-wizard' type FilteringSectionProps = { config: FilterConfig onChange: (config: FilterConfig) => void + isActive?: boolean } -export function FilteringSection({ config, onChange }: FilteringSectionProps) { +export function FilteringSection({ config, onChange, isActive }: FilteringSectionProps) { const updateConfig = (updates: Partial) => { onChange({ ...config, ...updates }) } @@ -57,7 +58,7 @@ export function FilteringSection({ config, onChange }: FilteringSectionProps) { Deterministic rules that projects must pass. Applied in order.

- @@ -72,11 +73,13 @@ export function FilteringSection({ config, onChange }: FilteringSectionProps) { placeholder="Field name" value={rule.field} className="h-8 text-sm" + disabled={isActive} onChange={(e) => updateRule(index, { field: e.target.value })} /> { const name = e.target.value updateStage(index, { name, slug: slugify(name) }) }} /> + {hasDuplicateSlug && ( +

Duplicate name

+ )}
{/* Stage type */} @@ -158,6 +170,7 @@ export function MainTrackSection({ stages, onChange }: MainTrackSectionProps) { onValueChange={(value) => updateStage(index, { stageType: value as StageType }) } + disabled={isActive} > @@ -186,7 +199,7 @@ export function MainTrackSection({ stages, onChange }: MainTrackSectionProps) { variant="ghost" size="icon" className="shrink-0 h-7 w-7 text-muted-foreground hover:text-destructive" - disabled={stages.length <= 2} + disabled={isActive || stages.length <= 2} onClick={() => removeStage(index)} > diff --git a/src/components/admin/pipeline/sections/notifications-section.tsx b/src/components/admin/pipeline/sections/notifications-section.tsx index 522558e..2551115 100644 --- a/src/components/admin/pipeline/sections/notifications-section.tsx +++ b/src/components/admin/pipeline/sections/notifications-section.tsx @@ -10,6 +10,7 @@ type NotificationsSectionProps = { onChange: (config: Record) => void overridePolicy: Record onOverridePolicyChange: (policy: Record) => void + isActive?: boolean } const NOTIFICATION_EVENTS = [ @@ -60,6 +61,7 @@ export function NotificationsSection({ onChange, overridePolicy, onOverridePolicyChange, + isActive, }: NotificationsSectionProps) { const toggleEvent = (key: string, enabled: boolean) => { onChange({ ...config, [key]: enabled }) @@ -88,6 +90,7 @@ export function NotificationsSection({ toggleEvent(event.key, checked)} + disabled={isActive} />