feat(digests-ui): publication filter + 'מאמר'/source badges for bulletins
משלים את #154 בצד-לקוח: - פילטר "מקור" בדף /digests (כל המקורות / כל יום / עו"ד על נדל"ן) — backend: list_digests + /api/digests מקבלים publication. - DigestCard: תג "מאמר" ל-digest_kind='article', ו-chip מקור לפרסום שאינו 'כל יום'. build (webpack) עובר, lint נקי. digests = hand-written types (אין api:types). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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}%")
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user