Fix email template preview UX and add comprehensive shortcodes
1. Remove duplicate close button in preview modal
- Removed extra X button in DialogHeader since Dialog already has close functionality
2. Fix test email to include master layout
- Process shortcodes and render with master template before sending
- Import EmailTemplateRenderer and ShortcodeProcessor in sendTestEmail
- Send complete HTML email with header, footer, and styling applied
3. Add comprehensive table shortcodes for all notification types
- User info: {nama}, {email}
- Order info: {order_id}, {tanggal_pesanan}, {total}, {metode_pembayaran}, {status_pesanan}, {invoice_url}
- Product info: {produk}, {kategori_produk}, {harga_produk}, {deskripsi_produk}
- Access info: {link_akses}, {username_akses}, {password_akses}, {kadaluarsa_akses}
- Consulting: {tanggal_konsultasi}, {jam_konsultasi}, {durasi_konsultasi}, {jenis_konsultasi}, {topik_konsultasi}
- Event: {judul_event}, {tanggal_event}, {jam_event}, {link_event}, {lokasi_event}, {kapasitas_event}
- Bootcamp: {judul_bootcamp}, {progres_bootcamp}, {modul_selesai}, {modul_selanjutnya}, {link_progress}
- Company: {nama_perusahaan}, {website_perusahaan}, {email_support}, {telepon_support}
- Payment: {bank_tujuan}, {nomor_rekening}, {atas_nama}, {jumlah_pembayaran}, {batas_pembayaran}
4. Improve shortcode UI display
- Scrollable shortcode list with better organization
- Show available shortcodes summary
- Categorize shortcodes by type (User, Orders, Products, etc.)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -347,21 +347,65 @@ export const EmailComponents = {
|
||||
// Shortcode processor
|
||||
export class ShortcodeProcessor {
|
||||
private static readonly DEFAULT_DATA = {
|
||||
// User information
|
||||
nama: 'John Doe',
|
||||
email: 'john@example.com',
|
||||
|
||||
// Order information
|
||||
order_id: 'ORD-123456',
|
||||
tanggal_pesanan: '22 Desember 2025',
|
||||
total: 'Rp 1.500.000',
|
||||
metode_pembayaran: 'Transfer Bank',
|
||||
produk: 'Product Name',
|
||||
status_pesanan: 'Diproses',
|
||||
invoice_url: 'https://example.com/invoice/ORD-123456',
|
||||
|
||||
// Product information
|
||||
produk: 'Digital Marketing Masterclass',
|
||||
kategori_produk: 'Digital Marketing',
|
||||
harga_produk: 'Rp 1.500.000',
|
||||
deskripsi_produk: 'Kelas lengkap digital marketing dari pemula hingga mahir',
|
||||
|
||||
// Access information
|
||||
link_akses: 'https://example.com/access',
|
||||
username_akses: 'john.doe',
|
||||
password_akses: 'Temp123!',
|
||||
kadaluarsa_akses: '22 Desember 2026',
|
||||
|
||||
// Consulting information
|
||||
tanggal_konsultasi: '22 Desember 2025',
|
||||
jam_konsultasi: '14:00',
|
||||
durasi_konsultasi: '60 menit',
|
||||
link_meet: 'https://meet.google.com/example',
|
||||
jenis_konsultasi: 'Digital Marketing Strategy',
|
||||
topik_konsultasi: 'Social Media Marketing for Beginners',
|
||||
|
||||
// Event information
|
||||
judul_event: 'Workshop Digital Marketing',
|
||||
tanggal_event: '25 Desember 2025',
|
||||
jam_event: '19:00',
|
||||
link_event: 'https://event.example.com'
|
||||
link_event: 'https://event.example.com',
|
||||
lokasi_event: 'Zoom Online',
|
||||
kapasitas_event: '100 peserta',
|
||||
|
||||
// Bootcamp/Course information
|
||||
judul_bootcamp: 'Digital Marketing Bootcamp',
|
||||
progres_bootcamp: '75%',
|
||||
modul_selesai: '15 dari 20 modul',
|
||||
modul_selanjutnya: 'Final Assessment',
|
||||
link_progress: 'https://example.com/progress',
|
||||
|
||||
// Company information
|
||||
nama_perusahaan: 'ACCESS HUB',
|
||||
website_perusahaan: 'https://accesshub.example.com',
|
||||
email_support: 'support@accesshub.example.com',
|
||||
telepon_support: '+62 812-3456-7890',
|
||||
|
||||
// Payment information
|
||||
bank_tujuan: 'BCA',
|
||||
nomor_rekening: '123-456-7890',
|
||||
atas_nama: 'PT Access Hub Indonesia',
|
||||
jumlah_pembayaran: 'Rp 1.500.000',
|
||||
batas_pembayaran: '22 Desember 2025 23:59'
|
||||
};
|
||||
|
||||
static process(content: string, customData: Record<string, string> = {}): string {
|
||||
|
||||
Reference in New Issue
Block a user