feat: Add A-Z filter for clients/suppliers in Telegram bot

- Add A-Z alphabetical filter keyboard for clients and suppliers lists
  (same pattern as company selection, without emoji)
- Increase clients/suppliers list pagination from 10 to 20 items per page
- Remove emoji from company A-Z filter button for consistency
- Add 6 new callback handlers: clients_alpha_menu, clients_alpha:LETTER,
  clients_alpha_page:PAGE:LETTER, and supplier equivalents
- Dashboard service and models updates
- Telegram bot: email handlers, auth, DB operations, internal API improvements
- Frontend: dashboard cards updates (CashFlow, Clienti, Furnizori, Treasury)
- Frontend: SolduriCompactCard and CollapsibleCard improvements
- DashboardView enhancements
- start.sh and run-with-restart.sh script updates
- IIS web.config and service worker updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-02-21 14:34:15 +00:00
parent 1366dbc11c
commit 30f55cf18b
28 changed files with 1671 additions and 520 deletions

View File

@@ -288,7 +288,8 @@ async def create_auth_code(
code: str,
telegram_user_id: int,
oracle_username: str,
expires_in_minutes: int = 5
expires_in_minutes: int = 5,
server_id: Optional[str] = None
) -> bool:
"""
Create a new authentication code for linking.
@@ -298,6 +299,7 @@ async def create_auth_code(
telegram_user_id: Telegram user ID
oracle_username: Oracle username to link
expires_in_minutes: Code expiration time in minutes (default: 5)
server_id: Oracle server ID (for multi-server mode)
Returns:
bool: True if successful
@@ -310,13 +312,13 @@ async def create_auth_code(
db.row_factory = aiosqlite.Row
await db.execute("""
INSERT INTO telegram_auth_codes (
code, telegram_user_id, oracle_username, expires_at
code, telegram_user_id, oracle_username, expires_at, server_id
)
VALUES (?, ?, ?, ?)
""", (code, telegram_user_id, oracle_username, expires_at))
VALUES (?, ?, ?, ?, ?)
""", (code, telegram_user_id, oracle_username, expires_at, server_id))
await db.commit()
logger.info(f"Auth code created for user {telegram_user_id}")
logger.info(f"Auth code created for user {telegram_user_id} (server_id={server_id})")
return True
except Exception as e: