Report year selectors: offer the business's years (initialAccounterYear → current year), disable unsupported ones
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- react, typescript
Research direction
Start with packages/client/src/components/screens/reports/form-1214-report/years.ts, packages/client/src/components/screens/reports/shaam-6111-report/years.ts, and common/inputs/year-picker-input.tsx. Look for a shared helper that builds year options from initialAccounterYear or dateEstablished, plus unit tests, then update each report wrapper and its URL-year fallback. Done means the business-year range is displayed, unsupported years are disabled with a reason where known, used URL years remain selected, and the latest enabled year is the default.
Written by the indexing model from the issue text.
Description
Problem
Report year selectors don't reflect the years the active business actually has in Accounter:
- Form 1214 (
packages/client/src/components/screens/reports/form-1214-report/years.ts, coming in #5190): the select lists onlyreport1214SupportedYears(the years@accounter/opcn1214-generatorhas a layout for — currently 2024, 2025). Any other year of the business is missing, and a?year=outside that list silently falls back to the latest supported year. - SHAAM 6111 (
packages/client/src/components/screens/reports/shaam-6111-report/years.ts):getShaam6111AvailableYearshard-codesFIRST_REPORT_YEAR = 2020for every tenant, regardless of when the business started. - Tax report, profit & loss, corporate-tax-ruling compliance, yearly ledger, annual revenue: use the free
YearPickerInput(common/inputs/year-picker-input.tsx), with no lower/upper bound at all.
Desired behaviour
- Range = the business's years. Every report's year selector lists every year from the admin business's
initialAccounterYear(the year it was onboarded to Accounter, already exposed onadminContext) through the current year. - Unsupported years are shown but disabled. A year in that range that the specific report cannot produce stays in the list, disabled (ideally with a short reason, e.g. "No 1214 layout for 2023 yet" / "Year not closed").
- Report-specific adjustments decide which years in the range are enabled, e.g.:
- 1214: enabled ⇔ year ∈
report1214SupportedYears. - 6111: closed years only (≤ last year), as today; the current year is listed but disabled. Drop the hard-coded
2020. - Tax report / others: decide per report (e.g. a tax-rate table or layout that only exists from some year on; current year may be allowed as an in-progress report).
- 1214: enabled ⇔ year ∈
- Fallbacks: if
initialAccounterYearis not set, fall back todateEstablished's year, then to the current behaviour (today's lower bound). Years already in use through the URL (?year=, reference/comparison year) stay listed so selects never render blank, asgetShaam6111AvailableYearsdoes today. The default selection is the latest enabled year.
Suggested approach
- A shared client helper, e.g.
getReportYearOptions({ firstYear, currentYear, isSupported, keepYears }) → { year, disabled, reason? }[](latest first), with unit tests. It replaces the per-reportyears.tslogic (keep thin per-report wrappers for theisSupportedrule). - A small hook/query that reads
adminContext { initialAccounterYear dateEstablished }once (shared by all reports). - A year
Select(orYearPickerInputbounds/disabledoption) that renders disabled items, used by 1214, 6111 and theYearPickerInput-based reports.
Scope / checklist
- Shared year-options helper + tests
- Form 1214 report (after #5190 lands)
- SHAAM 6111 report
- Tax report
- Other annual reports using
YearPickerInput(P&L, corporate-tax-ruling compliance, yearly ledger, annual revenue): apply the business-years range and any report-specific limits - Annual audit links that pass
?year=: an unsupported year shows as disabled + notice instead of silently switching
- Dominant language
- TypeScript
- Stars
- 30
- Forks
- 10
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 276
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 Urigo/accounter-fullstack
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Urigo/accounter-fullstack#5302 ·
Maintainers usually reply within 2 days
-
1214 annual-audit-workflow
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Urigo/accounter-fullstack#5257 ·
Maintainers usually reply within 2 days
-
1214 annual-audit-workflow
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Urigo/accounter-fullstack#5256 ·
Maintainers usually reply within 2 days
-
annual-audit-workflow
Difficulty 1/5 1-3 hours Newbie friendliness 87/100
Urigo/accounter-fullstack#5252 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Urigo/accounter-fullstack#4919 ·
Maintainers usually reply within 2 days
All issues in Urigo/accounter-fullstack
Similar issues
-
area: integrations documentation priority: P2 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eddiejaoude/StackDash#798 ·
Maintainers usually reply within 1 day
-
bot:ai-assisted component:midnight-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
midnightntwrk/midnight-js#1790 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area:vscode bug has repro platform:macos platform:vscode regression
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day