diff --git a/mcp-server/src/legal_mcp/services/db.py b/mcp-server/src/legal_mcp/services/db.py index 896372d..43816e8 100644 --- a/mcp-server/src/legal_mcp/services/db.py +++ b/mcp-server/src/legal_mcp/services/db.py @@ -3800,11 +3800,13 @@ async def list_digests( concept_tag: str = "", linked: bool | None = None, search: str = "", + publication: str = "", limit: int = 100, offset: int = 0, ) -> list[dict]: """List digests with simple filters. linked=True/False filters on whether - the underlying ruling is in the library yet (INV-DIG3 gap surfacing).""" + the underlying ruling is in the library yet (INV-DIG3 gap surfacing). + publication filters the source ('כל יום' daily vs 'עו"ד על נדל"ן' monthly).""" pool = await get_pool() conditions: list[str] = [] params: list = [] @@ -3813,6 +3815,10 @@ async def list_digests( conditions.append(f"practice_area = ${idx}") params.append(practice_area) idx += 1 + if publication: + conditions.append(f"publication = ${idx}") + params.append(publication) + idx += 1 if concept_tag: conditions.append(f"concept_tag ILIKE ${idx}") params.append(f"%{concept_tag}%") diff --git a/mcp-server/src/legal_mcp/services/digest_library.py b/mcp-server/src/legal_mcp/services/digest_library.py index 6371139..af9bfa5 100644 --- a/mcp-server/src/legal_mcp/services/digest_library.py +++ b/mcp-server/src/legal_mcp/services/digest_library.py @@ -404,12 +404,13 @@ async def list_digests( concept_tag: str = "", linked: bool | None = None, search: str = "", + publication: str = "", limit: int = 100, offset: int = 0, ) -> list[dict]: return await db.list_digests( practice_area=practice_area, concept_tag=concept_tag, linked=linked, - search=search, limit=limit, offset=offset, + search=search, publication=publication, limit=limit, offset=offset, ) diff --git a/web-ui/src/components/digests/digest-card.tsx b/web-ui/src/components/digests/digest-card.tsx index 434eeb6..f94beeb 100644 --- a/web-ui/src/components/digests/digest-card.tsx +++ b/web-ui/src/components/digests/digest-card.tsx @@ -44,6 +44,11 @@ export function DigestCard({ יומון {digest.yomon_number} )} + {digest.publication && digest.publication !== "כל יום" && ( + + {digest.publication} + + )} {digest.digest_date && · {formatDate(digest.digest_date)}} {digest.practice_area && ( · {practiceAreaLabel(digest.practice_area)} @@ -53,6 +58,11 @@ export function DigestCard({ עדכון )} + {digest.digest_kind === "article" && ( + + מאמר + + )} {digest.extraction_status !== "completed" && ( {digest.extraction_status === "pending" ? "ממתין לעיבוד" : digest.extraction_status} diff --git a/web-ui/src/components/digests/digest-list-panel.tsx b/web-ui/src/components/digests/digest-list-panel.tsx index af32d2f..baca1a7 100644 --- a/web-ui/src/components/digests/digest-list-panel.tsx +++ b/web-ui/src/components/digests/digest-list-panel.tsx @@ -18,13 +18,21 @@ import { DigestUploadDialog } from "./digest-upload-dialog"; type LinkedFilter = "all" | "linked" | "unlinked"; +const PUBLICATIONS = [ + { value: "_all", label: "כל המקורות" }, + { value: "כל יום", label: "כל יום (יומי)" }, + { value: 'עו"ד על נדל"ן', label: 'עו"ד על נדל"ן (חודשי)' }, +]; + export function DigestListPanel() { const [practiceArea, setPracticeArea] = useState(""); const [linked, setLinked] = useState("all"); + const [publication, setPublication] = useState("_all"); const filters: DigestListFilters = { practiceArea: practiceArea || undefined, linked: linked === "all" ? undefined : linked === "linked", + publication: publication === "_all" ? undefined : publication, limit: 200, }; const { data, isLoading, error } = useDigests(filters); @@ -66,6 +74,17 @@ export function DigestListPanel() { +
+ + +