From f1b7a17dbb314335dce2cf35260e69f341dac1e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 05:37:41 +0000 Subject: [PATCH 1/3] Initial plan From 6c637bec1bb4f29f76e7e501451a6a273a86c08c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 05:43:05 +0000 Subject: [PATCH 2/3] #41 disable editing of past cycles Co-authored-by: b-at-neu <144247685+b-at-neu@users.noreply.github.com> --- app/admin/cycles/[id]/cycle-dashboard.tsx | 2 + components/AdminDashboard.tsx | 35 ++++---- components/NominationsManager.tsx | 101 ++++++++++++---------- package-lock.json | 4 +- 4 files changed, 78 insertions(+), 64 deletions(-) diff --git a/app/admin/cycles/[id]/cycle-dashboard.tsx b/app/admin/cycles/[id]/cycle-dashboard.tsx index e0c4782..72170c9 100644 --- a/app/admin/cycles/[id]/cycle-dashboard.tsx +++ b/app/admin/cycles/[id]/cycle-dashboard.tsx @@ -103,6 +103,7 @@ export function CycleDashboard({ applications={applications} getApplicationDetails={getApplicationDetails} settings={defaultSettings} + readOnly={!cycle.isActive} /> @@ -110,6 +111,7 @@ export function CycleDashboard({ diff --git a/components/AdminDashboard.tsx b/components/AdminDashboard.tsx index d20789e..c123bd8 100644 --- a/components/AdminDashboard.tsx +++ b/components/AdminDashboard.tsx @@ -43,6 +43,7 @@ interface AdminDashboardProps { applications: ApplicationWithCount[]; getApplicationDetails: (id: string) => Promise; settings: Settings; + readOnly?: boolean; } function getNominationBadgeColor(count: number, requiredNominations: number): "success" | "warning" | "info" | "default" { @@ -52,7 +53,7 @@ function getNominationBadgeColor(count: number, requiredNominations: number): "s return "default"; // Gray for 0-1 } -export default function AdminDashboard({ applications, getApplicationDetails, settings }: AdminDashboardProps) { +export default function AdminDashboard({ applications, getApplicationDetails, settings, readOnly = false }: AdminDashboardProps) { const [searchTerm, setSearchTerm] = useState(''); const [selectedApplicant, setSelectedApplicant] = useState(null); const [applicantDetails, setApplicantDetails] = useState(null); @@ -417,25 +418,29 @@ export default function AdminDashboard({ applications, getApplicationDetails, se View PDF - + {!readOnly && ( + + )} -
-

- To reject this paper nomination, click "Remove PDF" above. The nominee will then be able to collect online nominations or upload a new paper form. -

-
+ {!readOnly && ( +
+

+ To reject this paper nomination, click "Remove PDF" above. The nominee will then be able to collect online nominations or upload a new paper form. +

+
+ )} diff --git a/components/NominationsManager.tsx b/components/NominationsManager.tsx index cc57274..f97b198 100644 --- a/components/NominationsManager.tsx +++ b/components/NominationsManager.tsx @@ -36,6 +36,7 @@ type NominationWithCommunity = Nomination & { interface NominationsManagerProps { nominations: NominationWithCommunity[]; settings: Settings; + readOnly?: boolean; } function getStatusBadge(status: string) { @@ -61,7 +62,7 @@ function getConstituencyBadge(nom: NominationWithCommunity) { return {nom.college}; } -export default function NominationsManager({ nominations: initialNominations, settings }: NominationsManagerProps) { +export default function NominationsManager({ nominations: initialNominations, settings, readOnly = false }: NominationsManagerProps) { const searchParams = useSearchParams(); const pathname = usePathname(); const isInitialMount = useRef(false); @@ -405,7 +406,7 @@ export default function NominationsManager({ nominations: initialNominations, se - {selectedIds.size > 0 && ( + {!readOnly && selectedIds.size > 0 && (
- )} - {nom.status !== 'REJECTED' && ( - - )} -
- + {!readOnly && ( + +
+ {nom.status !== 'APPROVED' && ( + + )} + {nom.status !== 'REJECTED' && ( + + )} +
+
+ )} )) )} diff --git a/package-lock.json b/package-lock.json index 154c275..5360b1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nomination-system/source", - "version": "1.4.1", + "version": "1.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nomination-system/source", - "version": "1.4.1", + "version": "1.5.0", "hasInstallScript": true, "license": "MIT", "dependencies": { From 6dd7b3b6b0d59b0722cba5169ece6fbf3e839915 Mon Sep 17 00:00:00 2001 From: Benedikt Winkler <144247685+b-at-neu@users.noreply.github.com> Date: Tue, 24 Feb 2026 01:25:07 -0500 Subject: [PATCH 3/3] Bump version from 1.5.0 to 1.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8575de6..6dbf4b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nomination-system/source", - "version": "1.5.0", + "version": "1.5.1", "license": "MIT", "scripts": { "dev": "next dev",