diff --git a/PORTAL_FIXES_SUMMARY.md b/PORTAL_FIXES_SUMMARY.md index 4ae396a..a3a1412 100644 --- a/PORTAL_FIXES_SUMMARY.md +++ b/PORTAL_FIXES_SUMMARY.md @@ -120,9 +120,23 @@ All fixes include comprehensive logging: --- -**All three critical issues have been resolved!** The MonacoUSA Portal should now have: +**All critical issues have been resolved!** The MonacoUSA Portal now has: - ✅ Working email functionality in production - ✅ Accurate portal account status display - ✅ Complete member deletion with proper cleanup +- ✅ Correct membership fee amount (€150/year) +- ✅ Fixed email verification links pointing to correct domain + +## 🔧 **Additional Fixes Applied (Phase 4)** + +### **Issue 4: Incorrect Membership Fee Amount** +**Problem:** Welcome email showed €50/year instead of €150/year +**Fix:** Updated `server/templates/welcome.hbs` +**Status:** ✅ FIXED + +### **Issue 5: 404 Error on Email Verification** +**Problem:** Verification links pointed to `monacousa.org` instead of `portal.monacousa.org` +**Fix:** Updated `nuxt.config.ts` domain configuration +**Status:** ✅ FIXED The fixes are production-ready and include proper error handling and logging. diff --git a/nuxt.config.ts b/nuxt.config.ts index 246bef7..fd18780 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -131,7 +131,7 @@ export default defineNuxtConfig({ public: { // Client-side configuration appName: "MonacoUSA Portal", - domain: process.env.NUXT_PUBLIC_DOMAIN || "monacousa.org", + domain: process.env.NUXT_PUBLIC_DOMAIN || "https://portal.monacousa.org", }, }, vuetify: { diff --git a/pages/auth/verify-success.vue b/pages/auth/verify-success.vue index 6eea738..66ee474 100644 --- a/pages/auth/verify-success.vue +++ b/pages/auth/verify-success.vue @@ -49,6 +49,19 @@ size="large" variant="elevated" block + :href="setupPasswordUrl" + target="_blank" + class="text-none" + > + mdi-lock + Set Your Password + + + @@ -57,9 +70,9 @@ route.query.email as string || ''); const partialWarning = computed(() => route.query.warning === 'partial'); +// Setup password URL for Keycloak +const setupPasswordUrl = computed(() => { + const runtimeConfig = useRuntimeConfig(); + const keycloakIssuer = runtimeConfig.public.keycloakIssuer || 'https://auth.monacousa.org/realms/monacousa-portal'; + return `${keycloakIssuer}/account/#/security/signingin`; +}); + // Set page title useHead({ title: 'Email Verified - MonacoUSA Portal', diff --git a/server/api/members/[id]/create-portal-account.post.ts b/server/api/members/[id]/create-portal-account.post.ts index 24d5c67..70a8cf5 100644 --- a/server/api/members/[id]/create-portal-account.post.ts +++ b/server/api/members/[id]/create-portal-account.post.ts @@ -134,7 +134,12 @@ export default defineEventHandler(async (event) => { firstName: member.first_name, lastName: member.last_name, verificationLink, - memberId: memberId + memberId: memberId, + registrationDate: new Date().toLocaleDateString('en-US', { + year: 'numeric', + month: 'long', + day: 'numeric' + }) }); emailSent = true; diff --git a/server/templates/welcome.hbs b/server/templates/welcome.hbs index a7c6c7a..8cd26c9 100644 --- a/server/templates/welcome.hbs +++ b/server/templates/welcome.hbs @@ -180,7 +180,7 @@

Once your email is verified, you'll be able to log in to the portal. To activate your membership, please transfer your annual membership dues:

diff --git a/server/utils/email.ts b/server/utils/email.ts index fe0c9aa..9c3de31 100644 --- a/server/utils/email.ts +++ b/server/utils/email.ts @@ -21,6 +21,7 @@ export interface WelcomeEmailData { lastName: string; verificationLink: string; memberId: string; + registrationDate?: string; logoUrl?: string; }