Skip to content

Batch Tag Assignment from Invoice List View #518

Description

@Kingsman-99

Description

Assigning tags to invoices one at a time from the detail page is impractical when a user wants to tag a batch of invoices with the same label after a project completes. A tag assignment action in the multi-select toolbar (Issue 47) should allow applying one or more tags to all selected invoices in a single operation.

Technical Context

src/components/invoice/BulkActionToolbar.tsx (from Issue 47) adds a "Tag" dropdown that opens src/components/invoice/BulkTagModal.tsx (new). The modal renders a TagInput component (from Issue 11) and a "Apply to N invoices" confirm button. On confirm, a single PATCH /api/invoices/bulk request with { ids: string[], addTags: string[] } body is sent via src/lib/api.ts. The list updates optimistically using mutate from swr.

Acceptance Criteria

  • Selecting invoices in multi-select mode and clicking "Tag" opens a tag selection modal
  • The tag modal shows existing tags via autocomplete and allows creating new tags inline
  • Confirming applies the selected tags to all selected invoices in a single API request
  • The invoice list updates optimistically before the API response returns
  • If the bulk request fails, the optimistic update rolls back and an error toast is shown
  • All CI checks (npm test, npm run build, ESLint/TypeScript) pass and the branch has no merge conflicts

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highuiUI styling and visual changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions