feat: install order, dependency blocking, batch install

- Sort extensions by install order (HebrewLanguage first, then deps)
- Grey out extensions with missing dependencies (show lock icon + "נדרש: X")
- Checkbox selection for batch install with progress indicator
- "בחר הכל" button to select all installable extensions
- Server returns dependencies + install_order in customer API

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 18:44:56 +00:00
parent eea011d68a
commit 22b05617d4
2 changed files with 146 additions and 13 deletions
+35
View File
@@ -53,6 +53,39 @@ MODULES = {
"SmsIntegration": "sms-integration", "WhatsAppIntegration": "whatsapp-integration",
}
# Extension dependency tree and install order
DEPENDENCIES = {
'HebrewLanguage': [],
'KlearBranding': ['HebrewLanguage'],
'PhoneIsraelFormat': ['HebrewLanguage'],
'EmailDefaults': ['HebrewLanguage'],
'MpdfEngine': ['HebrewLanguage'],
'LicenseManager': ['HebrewLanguage'],
'LocalDocuments': ['HebrewLanguage'],
'GoogleIntegration': ['HebrewLanguage'],
'NextCloudIntegration': ['HebrewLanguage'],
'NetworkStorageIntegration': ['HebrewLanguage'],
'SmsIntegration': ['HebrewLanguage'],
'WhatsAppIntegration': ['HebrewLanguage'],
'GreenInvoiceBilling': ['HebrewLanguage'],
'CrmAssistant': ['HebrewLanguage'],
'OfficeAssistant': ['HebrewLanguage'],
'LegalCrm': ['HebrewLanguage'],
'NetHamishpat': ['HebrewLanguage', 'LegalCrm'],
'DigitalSignature': ['HebrewLanguage', 'LegalCrm'],
'SmartAssistant': ['HebrewLanguage', 'LegalCrm'],
}
INSTALL_ORDER = [
'HebrewLanguage',
'KlearBranding', 'PhoneIsraelFormat', 'EmailDefaults', 'MpdfEngine',
'LicenseManager', 'LocalDocuments', 'GoogleIntegration',
'NextCloudIntegration', 'NetworkStorageIntegration',
'SmsIntegration', 'WhatsAppIntegration', 'GreenInvoiceBilling',
'CrmAssistant', 'OfficeAssistant', 'LegalCrm',
'NetHamishpat', 'DigitalSignature', 'SmartAssistant',
]
SSL_CTX = ssl.create_default_context()
SSL_CTX.check_hostname = False
SSL_CTX.verify_mode = ssl.CERT_NONE
@@ -406,6 +439,8 @@ class APIHandler(BaseHTTPRequestHandler):
customer['extensions'] = query("""
SELECT e.id, e.name, e.composer_name, e.latest_version, ce.installed_version, ce.license_status, ce.auto_update, ce.installed_at
FROM customer_extensions ce JOIN extensions e ON ce.extension_id = e.id WHERE ce.customer_id = %s ORDER BY e.name""", (cid,))
customer['dependencies'] = DEPENDENCIES
customer['install_order'] = INSTALL_ORDER
self._respond(200, customer)
def _create_customer(self, body):