feat(G-08): chapter field uses live datalist from resource.chapters
All chapter text inputs now show autocomplete suggestions from the database (distinct chapter values from active resources) via HTML <datalist> wired to trpc.resource.chapters: - ResourceModal: chapter input - RateCardsClient: rate card line chapter input - EffortRulesClient: effort rule chapter input - ExperienceMultipliersClient: replaces hardcoded CHAPTER_PRESETS with live data, falls back to presets when no data available Also revert blueprintRolePresetsInputSchema to z.array(z.unknown()) to restore compatibility with StaffingRequirement[] call sites. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,7 @@ export function RateCardsClient() {
|
||||
|
||||
const { data: roles } = trpc.role.list.useQuery({});
|
||||
const { data: clientsData } = trpc.clientEntity.list.useQuery({});
|
||||
const { data: chapters } = trpc.resource.chapters.useQuery(undefined, { staleTime: 60_000 });
|
||||
|
||||
// ─── Mutations ──────────────────────────────────────────────────────────
|
||||
|
||||
@@ -682,7 +683,11 @@ export function RateCardsClient() {
|
||||
onChange={(e) => setEditingLine({ ...editingLine, chapter: e.target.value })}
|
||||
placeholder="e.g. Animation"
|
||||
className="border border-gray-300 dark:border-gray-600 rounded-lg px-3 py-2 text-sm w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-brand-400"
|
||||
list="rc-chapter-list"
|
||||
/>
|
||||
<datalist id="rc-chapter-list">
|
||||
{chapters?.map((c) => <option key={c} value={c} />)}
|
||||
</datalist>
|
||||
</div>
|
||||
<div>
|
||||
<label className="flex items-center text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Location <InfoTooltip content="Geographic location for region-specific rate pricing." /></label>
|
||||
|
||||
Reference in New Issue
Block a user