Tax category select: allow creating a new tax category from the input
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 58/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start with the creditor and debtor components and their SelectWithSearch empty slots, then inspect InsertTaxCategory and each listed single-select ComboBox call site. Trace how useGetTaxCategories refreshes after insertion and how the selected ID is returned to the opening field. Done when every listed select offers creation for unmatched text, selects the new category, and refreshes the shared list.
Written by the indexing model from the issue text.
Description
Summary
Tax category selection inputs only let you pick an existing tax category. If the one you need doesn't exist, you have to leave the form, go to the Tax Categories page, create it there, then come back and pick it.
Business inputs already handle this case: when a search has no matches, they offer to create a new business from the search text. Tax category inputs should work the same way.
Current behavior
- Business selects (e.g.
packages/client/src/components/documents-table/cells/creditor.tsxanddebtor.tsx) useSelectWithSearchwith anemptyslot. When the search has no match, it renders<InsertBusiness description={search} onAdd={...} />, prefilled with the search text. Once the business is created, it is selected. - Tax category selects use a plain
ComboBoxfed byuseGetTaxCategories().selectableTaxCategories, with no option to create a new one. For example:components/business/configurations-section.tsx(business default tax category)components/common/modals/insert-business.tsx(new business form)components/financial-accounts/modify-financial-account-dialog.tsxcomponents/common/forms/edit-charge.tsx(charge default tax category)components/businesses/batch-update-dialog.tsx
- An
InsertTaxCategorydialog already exists (components/common/modals/insert-tax-category.tsx, usinguseInsertTaxCategory) and has anonAdd(taxCategoryId)callback, but it is only reachable from the Tax Categories page header. components/charges/securities-tax-category-dialog.tsxalready has an ad-hoc "existing / create new" tab flow, which shows there is demand for this.
Expected behavior
- When the search in a tax category select has no matches, offer "Create tax category '<search>'" (same UX as business inputs).
- This opens the insert tax category form with the name prefilled from the search text.
- When it is created:
- the new tax category is selected in the input that opened it,
- the tax categories list (
useGetTaxCategories) is refreshed, so the new entry shows up in every select.
Implementation notes
- Build a reusable tax category select component (or extend the existing one) on top of
SelectWithSearchwith anemptyslot, following the creditor/debtor pattern. Avoid repeating the logic at each call site. - Let
InsertTaxCategoryaccept an initial name / description prop, and optionally a custom trigger, likeInsertBusinessdoes. - Swap the single-select
ComboBoxusages listed above to the new component. Multi-select filters, such as the businesses filter form, are out of scope. - Consider having
securities-tax-category-dialog.tsxuse the shared flow as well.
Acceptance criteria
- Typing a name that matches no tax category shows a create option in the tax category select.
- Creating it from there selects the new tax category in the field that opened it.
- The new tax category is available in other tax category selects without a page reload.
- Applied to all the single-select tax category inputs listed above.
- 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