Fix case repo sync + auto-create Gitea repos + add sync indicator
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m30s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m30s
- auto-sync-cases.sh: fix broken directory scan (was looking for
status subdirs that don't exist), fix env var word-splitting bug,
add safe.directory handling and error logging
- cases.py: auto-create Gitea repo on case_create, fix
documents/original → documents/originals naming mismatch
- app.py: add GET /api/cases/{case_number}/git-status endpoint
- web-ui: add SyncIndicator component in case header showing
sync status (synced/pending/no remote) with last commit time
- pyproject.toml: add httpx dependency
- CLAUDE.md: update Paperclip wakeup API docs
- settings page: switch tag input from Select to free-text with datalist
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,8 @@ import {
|
||||
import { APPEAL_SUBTYPES } from "@/lib/practice-area";
|
||||
import { toast } from "sonner";
|
||||
|
||||
const TAG_SUGGESTIONS = APPEAL_SUBTYPES.filter((s) => s.value !== "unknown");
|
||||
|
||||
export default function SettingsPage() {
|
||||
const { data: mappings, isPending: loadingMappings } = useTagMappings();
|
||||
const { data: companies, isPending: loadingCompanies } = usePaperclipCompanies();
|
||||
@@ -35,9 +37,9 @@ export default function SettingsPage() {
|
||||
const [tagLabel, setTagLabel] = useState("");
|
||||
const [companyId, setCompanyId] = useState("");
|
||||
|
||||
function handleTagChange(value: string) {
|
||||
function handleTagInput(value: string) {
|
||||
setTag(value);
|
||||
const match = APPEAL_SUBTYPES.find((s) => s.value === value);
|
||||
const match = TAG_SUGGESTIONS.find((s) => s.value === value);
|
||||
if (match) setTagLabel(match.label);
|
||||
}
|
||||
|
||||
@@ -137,22 +139,22 @@ export default function SettingsPage() {
|
||||
<div className="flex flex-wrap items-end gap-3 mb-5 p-4 rounded-md bg-rule-soft/40 border border-rule">
|
||||
<div className="flex flex-col gap-1.5 min-w-[180px]">
|
||||
<label className="text-[0.72rem] text-ink-muted">
|
||||
תגית (appeal subtype)
|
||||
תגית
|
||||
</label>
|
||||
<Select value={tag} onValueChange={handleTagChange}>
|
||||
<SelectTrigger className="w-[200px]">
|
||||
<SelectValue placeholder="בחר סוג ערר" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{APPEAL_SUBTYPES.filter((s) => s.value !== "unknown").map(
|
||||
(s) => (
|
||||
<SelectItem key={s.value} value={s.value}>
|
||||
{s.label}
|
||||
</SelectItem>
|
||||
),
|
||||
)}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Input
|
||||
list="tag-suggestions"
|
||||
value={tag}
|
||||
onChange={(e) => handleTagInput(e.target.value)}
|
||||
placeholder="סוג ערר או תגית חופשית"
|
||||
className="w-[220px]"
|
||||
/>
|
||||
<datalist id="tag-suggestions">
|
||||
{TAG_SUGGESTIONS.map((s) => (
|
||||
<option key={s.value} value={s.value}>
|
||||
{s.label}
|
||||
</option>
|
||||
))}
|
||||
</datalist>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col gap-1.5 min-w-[140px]">
|
||||
|
||||
Reference in New Issue
Block a user