fix(projects): scope 'book to project' to the current customer
A project has at most one customer, so the hours picker shouldn't offer other customers' projects. HoursSection now passes customerAccountId to ProjectSelect (shows this customer's projects + still-unassigned ones). Backend createEntry rejects a projectId owned by a different customer (422 PROJECT_CUSTOMER_MISMATCH) as defence-in-depth behind the picker.
This commit is contained in:
@@ -358,6 +358,7 @@ export const HoursSection: React.FC<HoursSectionProps> = ({
|
||||
className="mt-3"
|
||||
label={t('customers.hours.form.bookToProject', 'Book to project') as string}
|
||||
value={projectId}
|
||||
customerAccountId={customerId}
|
||||
onChange={setProjectId}
|
||||
/>
|
||||
<div className="mt-3 flex items-center justify-end gap-3">
|
||||
|
||||
Reference in New Issue
Block a user