Polish email template system with UX improvements

- Consolidated multiple preview canvases into single shared preview with "Simpan & Preview" button
- Fixed double scrollbar issue in preview box by using fixed height container and scrolling=no
- Added modular email components to Tiptap editor:
  * EmailButton with URL, text, and full-width options
  * OTPBox with monospace font and dashed border styling
  * EmailTable with brutalist styling and proper header support
- Generated contextual initial email content for all template types:
  * Payment success with professional details table
  * Access granted with celebration styling and prominent CTA
  * Order created with clear next steps and status information
  * Payment reminder with urgent styling and warning alerts
  * Consulting scheduled with session details and preparation tips
  * Event reminder with high-energy countdown and call-to-action
  * Bootcamp progress with motivational progress tracking
- Enhanced RichTextEditor toolbar with email component buttons and visual separators
- Improved NotifikasiTab with streamlined preview workflow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
dwindown
2025-12-22 20:35:50 +07:00
parent efc085e231
commit 37680bd25b
3 changed files with 697 additions and 41 deletions

View File

@@ -134,12 +134,16 @@ export function EmailTemplatePreview({ template, onTest, isTestSending = false }
{previewMode === 'master' ? 'Full Email Preview' : 'Content Preview'}
</span>
</div>
<div className="max-h-96 overflow-auto bg-white">
<div className="bg-white" style={{ height: '600px', overflow: 'hidden' }}>
<iframe
srcDoc={previewHtml}
className="w-full border-0"
style={{ height: '500px' }}
className="w-full h-full border-0"
style={{
height: '100%',
overflow: 'hidden'
}}
sandbox="allow-same-origin"
scrolling="no"
/>
</div>
</div>