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

@@ -38,6 +38,7 @@ LOG_DIR=""
BACKEND_LOG=""
FRONTEND_LOG=""
NEEDS_SSH_TUNNEL=false
BACKEND_RESTART_PID=""
configure_environment() {
case "$1" in
@@ -121,20 +122,23 @@ check_port() {
cleanup() {
print_message "Stopping all services..."
# Stop run-with-restart.sh wrapper FIRST (prevents auto-restart)
print_message "Stopping backend restart wrapper..."
pkill -f "run-with-restart.sh" 2>/dev/null || true
sleep 1
# Stop Unified Backend (8000)
if check_port 8000; then
print_message "Stopping Unified Backend..."
pkill -f "uvicorn main:app" 2>/dev/null || true
# Stop run-with-restart.sh wrapper FIRST by saved PID (prevents auto-restart race)
if [ -n "$BACKEND_RESTART_PID" ] && kill -0 "$BACKEND_RESTART_PID" 2>/dev/null; then
print_message "Stopping backend restart wrapper (PID $BACKEND_RESTART_PID)..."
kill "$BACKEND_RESTART_PID" 2>/dev/null || true
sleep 2
pkill -9 -f "uvicorn main:app" 2>/dev/null || true
lsof -ti:8000 | xargs kill -KILL 2>/dev/null || true
fi
# Kill ALL uvicorn instances unconditionally (regardless of port status)
# This handles cases where uvicorn is still starting up or has crashed
print_message "Stopping Unified Backend..."
pkill -f "uvicorn main:app" 2>/dev/null || true
pkill -f "run-with-restart.sh" 2>/dev/null || true
sleep 2
pkill -9 -f "uvicorn main:app" 2>/dev/null || true
pkill -9 -f "run-with-restart.sh" 2>/dev/null || true
lsof -ti:8000 | xargs kill -KILL 2>/dev/null || true
# Stop Unified Frontend (3000)
if check_port 3000; then
print_message "Stopping Unified Frontend..."
@@ -240,6 +244,7 @@ start_services() {
# Start backend with auto-restart on crash (OOM protection)
print_message "Starting unified backend with auto-restart..."
nohup ./run-with-restart.sh 8000 "$BACKEND_LOG" > /dev/null 2>&1 &
BACKEND_RESTART_PID=$!
cd "$SCRIPT_DIR"