confimration mail at end of launch process

This commit is contained in:
2025-06-20 13:36:45 +02:00
parent c9d1d7416b
commit f825bab894
5 changed files with 192 additions and 28 deletions

View File

@@ -672,10 +672,6 @@ async function startLaunch(data) {
<td>Email Address</td>
<td>${credentialsResult.data.email || 'Not set'}</td>
</tr>
<tr>
<td>Password</td>
<td><code class="text-primary">${credentialsResult.data.password || 'Not set'}</code></td>
</tr>
<tr>
<td>Username</td>
<td>${credentialsResult.data.username || 'administrator'}</td>
@@ -684,6 +680,10 @@ async function startLaunch(data) {
<td>Role</td>
<td><span class="badge bg-primary">Administrator</span></td>
</tr>
<tr>
<td>Password Setup</td>
<td><span class="badge bg-warning">Reset Link Pending</span></td>
</tr>
<tr>
<td>Status</td>
<td><span class="badge bg-${credentialsResult.data.already_updated ? 'info' : 'success'}">${credentialsResult.data.already_updated ? 'Already Updated' : 'Updated'}</span></td>
@@ -693,10 +693,10 @@ async function startLaunch(data) {
</div>
<div class="alert alert-${credentialsResult.data.already_updated ? 'info' : 'warning'} mt-3">
<i class="fas fa-${credentialsResult.data.already_updated ? 'info-circle' : 'exclamation-triangle'} me-2"></i>
<strong>${credentialsResult.data.already_updated ? 'Note:' : 'Important:'}</strong>
<strong>${credentialsResult.data.already_updated ? 'Note:' : 'Security Setup Required:'}</strong>
${credentialsResult.data.already_updated ?
'Admin credentials were already updated from the default settings.' :
'Please save these credentials securely. The password will not be shown again.'}
'A secure password reset link will be sent to the admin email address in the completion email.'}
</div>
<div class="alert alert-info mt-2">
<i class="fas fa-info-circle me-2"></i>
@@ -753,13 +753,146 @@ async function startLaunch(data) {
<td>Instance URL</td>
<td><a href="https://${data.webAddresses[0]}" target="_blank">https://${data.webAddresses[0]}</a></td>
</tr>
<tr>
<td>Password Reset</td>
<td><span class="badge bg-success">Link Included</span></td>
</tr>
</tbody>
</table>
</div>
<!-- Email Content Dropdown -->
<div class="accordion mt-3" id="emailContentAccordion">
<div class="accordion-item">
<h2 class="accordion-header" id="emailContentHeader">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#emailContentCollapse" aria-expanded="false" aria-controls="emailContentCollapse">
<i class="fas fa-envelope me-2"></i>View Sent Email Content
</button>
</h2>
<div id="emailContentCollapse" class="accordion-collapse collapse" aria-labelledby="emailContentHeader" data-bs-parent="#emailContentAccordion">
<div class="accordion-body">
<div class="row">
<div class="col-md-6">
<h6 class="text-primary">HTML Version</h6>
<div class="border rounded p-3 bg-light" style="max-height: 400px; overflow-y: auto; font-size: 0.9em;">
<div class="email-preview">
<div style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
<div style="background-color: #16767b; color: white; padding: 20px; text-align: center; border-radius: 5px 5px 0 0;">
<h1>🎉 Your DocuPulse Instance is Ready!</h1>
</div>
<div style="background-color: #f9f9f9; padding: 20px; border-radius: 0 0 5px 5px;">
<p>Dear ${data.company.name || 'Valued Customer'},</p>
<p>Great news! Your DocuPulse instance has been successfully deployed and configured.</p>
<div style="background-color: #e3f2fd; padding: 15px; border-radius: 5px; margin: 15px 0;">
<h3>📋 Instance Details</h3>
<p><strong>Instance URL:</strong> <a href="https://${data.webAddresses[0]}">https://${data.webAddresses[0]}</a></p>
<p><strong>Company Name:</strong> ${data.company.name || 'Not set'}</p>
<p><strong>Industry:</strong> ${data.company.industry || 'Not set'}</p>
<p><strong>Deployment Date:</strong> ${new Date().toLocaleString()}</p>
</div>
<div style="background-color: #e8f5e9; padding: 15px; border-radius: 5px; margin: 15px 0;">
<h3>🔐 Account Access</h3>
<p><strong>Email Address:</strong> ${data.company.email || 'Not set'}</p>
<p><strong>Username:</strong> administrator</p>
<div style="background-color: #fff3cd; border: 1px solid #ffeaa7; padding: 15px; border-radius: 5px; margin: 15px 0;">
<h4>🔒 Security Setup Required</h4>
<p>For your security, you need to set up your password. Click the button below to create your secure password.</p>
<p><strong>Password Reset Link Expires:</strong> 24 hours</p>
</div>
</div>
<div style="text-align: center; margin: 30px 0;">
<a href="#" class="btn btn-primary" style="background-color: #16767b; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; margin: 10px 0;">🔐 Set Up Your Password</a>
<br><br>
<a href="https://${data.webAddresses[0]}" class="btn btn-primary" style="background-color: #16767b; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; margin: 10px 0;">🚀 Access Your Instance</a>
</div>
<h3>✅ What's Been Configured</h3>
<ul>
<li>✅ Secure SSL certificate for HTTPS access</li>
<li>✅ Company information and branding</li>
<li>✅ Custom color scheme</li>
<li>✅ Admin account created</li>
<li>✅ Document management system ready</li>
</ul>
<h3>🎯 Next Steps</h3>
<ol>
<li>Click the "Set Up Your Password" button above</li>
<li>Create your secure password</li>
<li>Return to your instance and log in</li>
<li>Explore your new DocuPulse platform</li>
<li>Start uploading and organizing your documents</li>
<li>Invite team members to collaborate</li>
</ol>
<div style="margin-top: 20px; padding-top: 20px; border-top: 1px solid #ddd; font-size: 12px; color: #666;">
<p>If you have any questions or need assistance, please don't hesitate to contact our support team.</p>
<p>Thank you for choosing DocuPulse!</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<h6 class="text-primary">Plain Text Version</h6>
<div class="border rounded p-3 bg-light" style="max-height: 400px; overflow-y: auto; font-family: monospace; font-size: 0.85em; white-space: pre-wrap;">
Your DocuPulse Instance is Ready!
Dear ${data.company.name || 'Valued Customer'},
Great news! Your DocuPulse instance has been successfully deployed and configured.
INSTANCE DETAILS:
- Instance URL: https://${data.webAddresses[0]}
- Company Name: ${data.company.name || 'Not set'}
- Industry: ${data.company.industry || 'Not set'}
- Deployment Date: ${new Date().toLocaleString()}
ACCOUNT ACCESS:
- Email Address: ${data.company.email || 'Not set'}
- Username: administrator
SECURITY SETUP REQUIRED:
For your security, you need to set up your password.
Password Reset Link: [Secure reset link included]
Password Reset Link Expires: 24 hours
WHAT'S BEEN CONFIGURED:
✓ Secure SSL certificate for HTTPS access
✓ Company information and branding
✓ Custom color scheme
✓ Admin account created
✓ Document management system ready
NEXT STEPS:
1. Click the password reset link above
2. Create your secure password
3. Return to your instance and log in
4. Explore your new DocuPulse platform
5. Start uploading and organizing your documents
6. Invite team members to collaborate
If you have any questions or need assistance, please don't hesitate to contact our support team.
Thank you for choosing DocuPulse!
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="alert alert-success mt-3">
<i class="fas fa-check-circle me-2"></i>
<strong>Launch Complete!</strong> Your DocuPulse instance has been successfully deployed and configured.
The client has been notified via email with all necessary login information.
The client has been notified via email with all necessary login information and a secure password reset link.
</div>
</div>
</div>