PDF Download crashes silently when page is refreshed
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start with src/lib/exportToPDF.ts and src/components/cards/ViewTimeTable.tsx, then trace how the active timetable is represented by selectedData and how exportToPDF() receives its data. Make the PDF reflect the timetable being viewed and handle export errors with an alert. Done when refreshing /slots still allows downloading the viewed timetable, and failures show an alert.
Written by the indexing model from the issue text.
Description
When a user refreshes the /slots page and clicks the green "Download" button, nothing happens. It throws an unhandled error in the console (No course data available to export) because selected courses are only kept in temporary RAM (globalCourses), which resets on reload. Also, the download currently exports all loaded subjects rather than the specific timetable the student is viewing.
What needs to be done:
- Derive the PDF export from the active timetable (
selectedData) or keep course data inlocalStorage. - Wrap
exportToPDF()in atry/catchinsideViewTimeTable.tsxand show an alert if it fails.
Files: src/lib/exportToPDF.tssrc/components/cards/ViewTimeTable.tsx
- Dominant language
- TypeScript
- Stars
- 6
- Forks
- 37
- Avg merge
- 14h 30m
- Merged PRs (30d)
- 38
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CodeChefVIT/ffcs
-
Service worker cache limiter evicts offline fallback pagePossibly taken @Rithish-2914 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
CodeChefVIT/ffcs#273 ·
Maintainers usually reply within 1 day
-
Shared timetable pages use router.push during render to nonexistent /404 routePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
CodeChefVIT/ffcs#272 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CodeChefVIT/ffcs#261 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
CodeChefVIT/ffcs#295 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 48/100
CodeChefVIT/ffcs#292 ·
Maintainers usually reply within 1 day
All issues in CodeChefVIT/ffcs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gnosis/gnosis_vpn#661 ·
Maintainers usually reply within 1 day
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)Opentriage:bug-verified
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
fix: reject sourceStorage/packagedStorage bucket that differs from the stack default (fail loud)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Eyevinn/open-videocore#1300 ·
Maintainers usually reply within 1 day
-
nextjs-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
cloudflare/vinext#4390 ·
Maintainers usually reply within 1 day
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
kubernetes-sigs/headlamp#8175 ·
Maintainers usually reply within 2 days