feat(web): listings page — ticker-style DataTable với toggle card view

Tạo mới trang /listings dạng bảng ticker-style theo spec TEC-3034.

- DataTable compact (row 36px, sticky header, alternating rows)
- Cột: #, Mã (GG-xxx), Quận, Loại, Giá, Δ30d, DT m², KL/Views
- Sortable theo Giá, Δ30d, DT m², KL/Views
- Filter inline: Loại giao dịch, Loại BĐS, Quận, Khoảng giá
- Toggle view: Table (default) ↔ Card grid (legacy component cũ)
- Pagination restyle compact, giữ nguyên API params
- Click row → navigate to detail page
- Dùng DataTable + PriceDelta từ @/components/design-system

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-21 01:31:22 +07:00
parent 310ff7bb3e
commit 9bb4c42f84
21 changed files with 1623 additions and 223 deletions

View File

@@ -70,6 +70,81 @@ jobs:
- name: Build
run: pnpm build
ai-services:
name: AI Services (Python) — Smoke
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: libs/ai-services
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: libs/ai-services/pyproject.toml
- name: Install dependencies (runtime + dev, no underthesea)
run: |
python -m pip install --upgrade pip
pip install \
"fastapi==0.115.0" \
"uvicorn[standard]==0.32.0" \
"xgboost==2.1.0" \
"numpy==1.26.4" \
"pydantic==2.9.0" \
"pydantic-settings==2.5.0" \
"httpx==0.27.0" \
"slowapi==0.1.9" \
"scikit-learn>=1.5.0" \
"pytest>=8.3.0" \
"pytest-asyncio>=0.24.0"
- name: Pytest (unit + health smoke)
env:
AI_CORS_ORIGINS: http://localhost:3000
run: pytest -q --ignore=tests/test_nlp.py
- name: Boot FastAPI + /health smoke
env:
AI_CORS_ORIGINS: http://localhost:3000
run: |
uvicorn app.main:app --host 127.0.0.1 --port 8000 &
PID=$!
for i in 1 2 3 4 5 6 7 8 9 10; do
if curl -sf http://127.0.0.1:8000/health; then
echo "health ok"
kill $PID
exit 0
fi
sleep 2
done
echo "health failed"
kill $PID || true
exit 1
- name: OpenAPI schema export (verifies /predict routes)
env:
AI_CORS_ORIGINS: http://localhost:3000
run: |
python - <<'PY'
import json, sys
from app.main import app
schema = app.openapi()
paths = schema.get("paths", {})
required = ["/avm/predict", "/avm/v2/predict", "/avm/industrial/predict", "/moderation/check", "/neighborhood/score"]
missing = [p for p in required if p not in paths]
if missing:
print("MISSING OpenAPI paths:", missing)
sys.exit(1)
print("OpenAPI paths OK:", sorted(paths.keys()))
PY
e2e:
name: E2E Tests
needs: ci