feat(bot): overhaul quote review card template with Jalali dates and DB-aligned validations
This commit is contained in:
@@ -91,7 +91,19 @@ class Resolver:
|
||||
|
||||
async def suppliers(self, q: str | None = None) -> list[Candidate]:
|
||||
rows = await self._api.list_suppliers(q=q, page_size=20)
|
||||
items = [Candidate(id=str(s["id"]), name=s.get("name") or str(s["id"])) for s in rows]
|
||||
items = [
|
||||
Candidate(
|
||||
id=str(s["id"]),
|
||||
name=s.get("name") or str(s["id"]),
|
||||
extra={
|
||||
"location": s.get("location"),
|
||||
"phone": s.get("phone"),
|
||||
"contact_person": s.get("contact_person"),
|
||||
"category_name": (s.get("category") or {}).get("name") if isinstance(s.get("category"), dict) else None,
|
||||
},
|
||||
)
|
||||
for s in rows
|
||||
]
|
||||
return _rank(q, items) if q else items
|
||||
|
||||
async def materials(self, q: str | None = None) -> list[Candidate]:
|
||||
|
||||
Reference in New Issue
Block a user