feat(crm): wire customer and pool list filters to column params.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3bb905bc20
commit
fbf830172f
4 files changed
+201
-104
No files matched your search
+9
-12
@@ -1403,15 +1403,15 @@ def pool_customer_list(
|
||||
):
|
||||
try:
|
||||
tenant_no = get_tenant_no(db, _user)
|
||||
page = body.page if body else 1
|
||||
page_size = body.pageSize if body else 10
|
||||
list_body = body or PoolCustomerListBody()
|
||||
page = list_body.page
|
||||
page_size = list_body.pageSize
|
||||
rows, total = list_pool_customers(
|
||||
db, tenant_no,
|
||||
page=page, page_size=page_size,
|
||||
keyword=body.keyword if body else None,
|
||||
level=body.level if body else None,
|
||||
industry=body.industry if body else None,
|
||||
park_area=body.parkArea if body else None,
|
||||
db,
|
||||
tenant_no,
|
||||
page=page,
|
||||
page_size=page_size,
|
||||
**list_body.to_list_kwargs(),
|
||||
)
|
||||
return success_response({
|
||||
"list": rows,
|
||||
@@ -1445,10 +1445,7 @@ def pool_customer_export(
|
||||
page=1,
|
||||
page_size=EXPORT_MAX_ROWS,
|
||||
max_page_size=EXPORT_MAX_ROWS,
|
||||
keyword=list_body.keyword,
|
||||
level=list_body.level,
|
||||
industry=list_body.industry,
|
||||
park_area=list_body.parkArea,
|
||||
**list_body.to_list_kwargs(),
|
||||
)
|
||||
rows = _filter_export_rows_by_ids(rows, list_body.ids)
|
||||
# map telephone -> phone for shared column if needed
|
||||
|
||||
Reference in new issue
Block a user