From af65fca7094f2b1bb2838aa830a9602390eb97c0 Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 28 Apr 2026 04:35:22 -0500 Subject: [PATCH] Show portal link for existing accounts even if never logged in Previously required both has_account && returning (logged in before). Now shows portal link whenever has_account is true. Co-Authored-By: Claude Opus 4.6 (1M context) --- site/public/order/success/index.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/site/public/order/success/index.html b/site/public/order/success/index.html index d11417d..28a50dc 100644 --- a/site/public/order/success/index.html +++ b/site/public/order/success/index.html @@ -87,8 +87,8 @@ Send reset link fetch(API + "/api/v1/auth/portal-status?email=" + encodeURIComponent(email)) .then(function(r) { return r.json(); }) .then(function(data) { - if (data.has_account && data.returning) { - // Returning customer — hide password form, show welcome back + if (data.has_account) { + // Existing account — hide password form, show portal link var form = document.getElementById("portal-password-form"); var already = document.getElementById("portal-already-set"); if (form) form.classList.add("hidden"); @@ -97,8 +97,10 @@ Send reset link already.innerHTML = '
' + '' + - 'Welcome back' + (data.name ? ', ' + data.name.split(' ')[0] : '') + '! This order has been added to your portal. ' + - 'Log in to your portal →' + + (data.returning + ? 'Welcome back' + (data.name ? ', ' + data.name.split(' ')[0] : '') + '! This order has been added to your portal. ' + : 'Your portal account is ready. ') + + 'Go to your portal →' + '
'; } }