refactor(js): migrate JavaScript files to module directories

Move 47 JS files from static/{admin,vendor,shared}/js/ to their
respective module directories app/modules/*/static/*/js/:

- Orders: orders.js, order-detail.js
- Catalog: products.js (renamed from vendor-products.js), product-*.js
- Inventory: inventory.js (admin & vendor)
- Customers: customers.js, users.js, user-*.js
- Billing: billing-history.js, subscriptions.js, subscription-tiers.js,
  billing.js, invoices.js, feature-store.js, upgrade-prompts.js
- Messaging: messages.js, notifications.js, email-templates.js
- Marketplace: marketplace*.js, letzshop*.js, onboarding.js
- Monitoring: monitoring.js, background-tasks.js, imports.js, logs.js
- Dev Tools: testing-*.js, code-quality-*.js

Update 39 templates to reference new module static paths using
url_for('{module}_static', path='...') pattern.

Files staying in static/ (platform core):
- admin: dashboard, login, platforms, vendors, companies, admin-users,
  settings, components, init-alpine, module-config
- vendor: dashboard, login, profile, settings, team, media, init-alpine
- shared: api-client, utils, money, icons, log-config, vendor-selector,
  media-picker

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 22:08:20 +01:00
parent 434db1560a
commit 0b4291d893
86 changed files with 63 additions and 63 deletions

View File

@@ -72,10 +72,10 @@
<script src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<!-- 6. SIXTH: Feature Store (depends on API Client, registers with Alpine) -->
<script src="{{ url_for('static', path='shared/js/feature-store.js') }}"></script>
<script src="{{ url_for('billing_static', path='shared/js/feature-store.js') }}"></script>
<!-- 7. SEVENTH: Upgrade Prompts (depends on API Client, registers with Alpine) -->
<script src="{{ url_for('static', path='shared/js/upgrade-prompts.js') }}"></script>
<script src="{{ url_for('billing_static', path='shared/js/upgrade-prompts.js') }}"></script>
<!-- 8. EIGHTH: Alpine.js v3 with CDN fallback (with defer) -->
<script>

View File

@@ -424,5 +424,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="/static/vendor/js/billing.js"></script>
<script src="/static/modules/billing/vendor/js/billing.js"></script>
{% endblock %}

View File

@@ -264,5 +264,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='vendor/js/customers.js') }}"></script>
<script src="{{ url_for('customers_static', path='vendor/js/customers.js') }}"></script>
{% endblock %}

View File

@@ -326,5 +326,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='vendor/js/email-templates.js') }}"></script>
<script src="{{ url_for('messaging_static', path='vendor/js/email-templates.js') }}"></script>
{% endblock %}

View File

@@ -370,5 +370,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='vendor/js/inventory.js') }}"></script>
<script src="{{ url_for('inventory_static', path='vendor/js/inventory.js') }}"></script>
{% endblock %}

View File

@@ -10,7 +10,7 @@
{% block alpine_data %}vendorInvoices(){% endblock %}
{% block extra_scripts %}
<script src="/static/vendor/js/invoices.js"></script>
<script src="/static/modules/billing/vendor/js/invoices.js"></script>
{% endblock %}
{% block content %}

View File

@@ -9,7 +9,7 @@
{% block alpine_data %}vendorLetzshop(){% endblock %}
{% block extra_scripts %}
<script src="/static/vendor/js/letzshop.js"></script>
<script src="/static/modules/marketplace/vendor/js/letzshop.js"></script>
{% endblock %}
{% block content %}

View File

@@ -11,7 +11,7 @@
{% block alpine_data %}vendorMarketplace(){% endblock %}
{% block extra_scripts %}
<script src="/static/vendor/js/marketplace.js"></script>
<script src="/static/modules/marketplace/vendor/js/marketplace.js"></script>
{% endblock %}
{% block content %}

View File

@@ -275,5 +275,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='vendor/js/messages.js') }}"></script>
<script src="{{ url_for('messaging_static', path='vendor/js/messages.js') }}"></script>
{% endblock %}

View File

@@ -226,5 +226,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='vendor/js/notifications.js') }}"></script>
<script src="{{ url_for('messaging_static', path='vendor/js/notifications.js') }}"></script>
{% endblock %}

View File

@@ -378,6 +378,6 @@
<script src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<script src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.0/dist/cdn.min.js"></script>
<script src="{{ url_for('static', path='vendor/js/onboarding.js') }}"></script>
<script src="{{ url_for('marketplace_static', path='vendor/js/onboarding.js') }}"></script>
</body>
</html>

View File

@@ -451,5 +451,5 @@
orderId: {{ order_id }}
};
</script>
<script src="{{ url_for('static', path='vendor/js/order-detail.js') }}"></script>
<script src="{{ url_for('orders_static', path='vendor/js/order-detail.js') }}"></script>
{% endblock %}

View File

@@ -330,5 +330,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='vendor/js/orders.js') }}"></script>
<script src="{{ url_for('orders_static', path='vendor/js/orders.js') }}"></script>
{% endblock %}

View File

@@ -170,5 +170,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='vendor/js/product-create.js') }}"></script>
<script src="{{ url_for('catalog_static', path='vendor/js/product-create.js') }}"></script>
{% endblock %}

View File

@@ -364,5 +364,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='vendor/js/products.js') }}"></script>
<script src="{{ url_for('catalog_static', path='vendor/js/products.js') }}"></script>
{% endblock %}