Skip to content

Make the time-entry dialog contract field a customer-scoped dropdown - #238

Merged
ramonski merged 1 commit into
masterfrom
fix/time-entry-dialog-contract-select
Jul 8, 2026
Merged

Make the time-entry dialog contract field a customer-scoped dropdown#238
ramonski merged 1 commit into
masterfrom
fix/time-entry-dialog-contract-select

Conversation

@ramonski

@ramonski ramonski commented Jul 8, 2026

Copy link
Copy Markdown
Member

Context

The shared TimeEntryDialog (used to edit every clock/task time entry after #236) rendered the contract (Vertrag) field as a free-text <input>. It accepted arbitrary strings instead of the customer's actual contracts, and since all entries now edit through this dialog, the problem is visible everywhere.

Fix

Swap the input for the shared ContractSelect, fed by useContracts(customer). It lists the selected customer's contracts (hiding invoiced ones, but keeping the currently-selected value so editing an existing entry never blanks it). Changing the customer clears the contract so a stale value from another customer can't linger.

Acceptance

  • The contract field is a dropdown scoped to the selected customer's contracts.
  • Editing an entry that already points at an (even invoiced) contract keeps that value selected.
  • Switching customer resets the contract.
  • tsc + pnpm build clean.

The shared TimeEntryDialog rendered the contract (Vertrag) field as a
free-text input, so it accepted arbitrary strings instead of the
customer's actual contracts. Now that every time entry is edited
through this dialog, the regression is visible everywhere. Swap the
input for the shared ContractSelect, fed by useContracts(customer),
which lists the customer's contracts (hiding invoiced ones but keeping
the currently-selected value). Changing the customer clears the
contract so a stale value from another customer can't linger.
@ramonski ramonski added the Bug 🐞 Something is broken label Jul 8, 2026
@ramonski ramonski self-assigned this Jul 8, 2026
@ramonski
ramonski merged commit 264077a into master Jul 8, 2026
2 checks passed
@ramonski
ramonski deleted the fix/time-entry-dialog-contract-select branch July 8, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug 🐞 Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant