Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eventitemsview (sidebar overlay) links to eventitems #149

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions components/EventItemView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const EventItemView: React.FC<EventItemProps> = ({ material, item, problems }) =
let name = `Error: ${item.section}`
let key = item.id
let indent = 0

let itemProblems: string[] = []
if (split.length === 4) {
const [repo, theme, course, section] = split
Expand All @@ -44,7 +43,6 @@ const EventItemView: React.FC<EventItemProps> = ({ material, item, problems }) =
}
let isCompleted = false
let completedLabel = ""

const uniqueUsers = new Set()
let uniqueUsersCount = 0
if (problems !== undefined && itemProblems.length > 0) {
Expand Down
12 changes: 6 additions & 6 deletions pages/event/[eventId]/[eventGroupId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,25 @@ const EventGroupPage: NextPage<EventGroupProps> = ({ material, event, eventGroup
const sectionsOptions = material.themes.flatMap((theme) => {
return [
{
value: `${theme.id}`,
label: `${theme.name}`,
value: `${theme.repo}.${theme.id}`,
label: `${theme.repo} - ${theme.name}`,
},
].concat(
theme.courses.flatMap((course) => {
return [
{
value: `${theme.id}.${course.id}`,
label: `${theme.name} - ${course.name}`,
value: `${theme.repo}.${theme.id}.${course.id}`,
label: `${theme.repo} - ${theme.name} - ${course.name}`,
},
].concat(
course.sections.map((section) => {
const tags = section.tags.join(", ")
let label = `${theme.name} - ${course.name} - ${section.name}`
let label = `${theme.repo} - ${theme.name} - ${course.name} - ${section.name}`
if (tags.length > 0) {
label = `${label} [${tags}]`
}
return {
value: `${theme.id}.${course.id}.${section.id}`,
value: `${theme.repo}.${theme.id}.${course.id}.${section.id}`,
label,
}
})
Expand Down
Loading