fix: cancel button on form, edit customer, show installed/total count

This commit is contained in:
2026-03-26 08:20:51 +00:00
parent 72c3087dd0
commit eea011d68a
2 changed files with 49 additions and 24 deletions
+1
View File
@@ -394,6 +394,7 @@ class APIHandler(BaseHTTPRequestHandler):
rows = query("""SELECT c.id, c.name, c.email, c.espocrm_url, c.is_active, c.notes, c.created_at, c.updated_at,
c.coolify_url, c.coolify_app_uuid,
(SELECT COUNT(*) FROM customer_extensions ce WHERE ce.customer_id = c.id AND ce.license_status = 'active') as extension_count,
(SELECT COUNT(*) FROM customer_extensions ce WHERE ce.customer_id = c.id AND ce.license_status = 'active' AND ce.installed_version IS NOT NULL) as installed_count,
(SELECT MAX(dl.started_at) FROM deployment_log dl WHERE dl.customer_id = c.id) as last_deploy
FROM customers c ORDER BY c.name""")
self._respond(200, rows)