feat(uat-batch-11): picker polish + BulkAddBerthsWizard currency + DocumentsHub root cleanup

- BulkAddBerthsWizard `priceCurrency` row + apply-to-all swapped from
  freetext Input to the shared CurrencySelect. Same idiom as
  berth-form + expense-form-dialog.
- /api/v1/yachts/autocomplete no longer short-circuits to `[]` when
  the search query is empty — the service returns the top 20
  most-recently-updated yachts so the picker has a useful default
  view the moment it opens. Saves the rep from a dead-end empty
  state.
- YachtPicker gains a fallback useQuery against `/api/v1/yachts/{id}`
  when the selected yacht isn't present in the current autocomplete
  window. Trigger label now shows the real name (was falling back to
  "Yacht <uuid-prefix>" when a parent pre-selected a value from a URL
  param).
- DocumentsHub: breadcrumb row only renders when a folder is
  selected. The "Home / All documents" placeholder was wasted
  vertical space above the PageHeader on the root view.

tsc clean. 1419/1419 vitest pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-21 18:06:41 +02:00
parent c18dbbd61b
commit 2bcf544cbc
5 changed files with 40 additions and 22 deletions

View File

@@ -36,6 +36,7 @@ import {
import { apiFetch } from '@/lib/api/client';
import { toastError } from '@/lib/api/toast-error';
import { useVocabulary } from '@/hooks/use-vocabulary';
import { CurrencySelect } from '@/components/shared/currency-select';
const DOCK_LETTERS = ['A', 'B', 'C', 'D', 'E'] as const;
type DockLetter = (typeof DOCK_LETTERS)[number];
@@ -283,12 +284,10 @@ export function BulkAddBerthsWizard() {
/>
</td>
<td className="py-1 pr-2">
<Input
<CurrencySelect
value={undefined}
onValueChange={(v) => applyToAll('priceCurrency', v)}
className="h-7 text-xs"
onBlur={(e) => {
if (e.target.value) applyToAll('priceCurrency', e.target.value.toUpperCase());
}}
placeholder="all"
/>
</td>
<td />
@@ -351,12 +350,10 @@ export function BulkAddBerthsWizard() {
/>
</td>
<td className="py-1 pr-2">
<Input
className="h-7 w-20 text-xs"
value={row.priceCurrency}
onChange={(e) =>
setRowField(idx, 'priceCurrency', e.target.value.toUpperCase())
}
<CurrencySelect
value={row.priceCurrency || undefined}
onValueChange={(v) => setRowField(idx, 'priceCurrency', v)}
className="h-7 w-24 text-xs"
/>
</td>
<td className="py-1 pr-2">