fix(hosting): site detail null guard + cleaner preview URLs

- Site detail template: x-show → x-if to prevent Alpine evaluating
  expressions when site is null during async loading
- Slugify: prefer domain_name over business_name for subdomain
  generation (batirenovation-strasbourg vs bati-rnovation-strasbourg-
  peinture-ravalement-dans). Cap at 30 chars. Strip protocol/TLD.
- POC builder passes domain_name for clean slugs
- Remove .lu/.fr/.com TLD from slugs automatically

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 22:49:32 +02:00
parent cff0af31be
commit d380437594
3 changed files with 17 additions and 4 deletions

View File

@@ -60,6 +60,7 @@ class PocBuilderService:
# 4. Create HostedSite + Store
site_data = {
"business_name": context["business_name"],
"domain_name": prospect.domain_name, # used for clean subdomain slug
"prospect_id": prospect_id,
"contact_email": context.get("email"),
"contact_phone": context.get("phone"),