diff --git a/internal/services/member/member_registration.go b/internal/services/member/member_registration.go
index 73f4054..ddea994 100644
--- a/internal/services/member/member_registration.go
+++ b/internal/services/member/member_registration.go
@@ -235,7 +235,7 @@ func (s *memberSvc) sendWelcomeEmail(
welcomeData := map[string]interface{}{
"UserName": customer.Name,
"MemberID": customer.CustomerID,
- "PointsName": "PoinLo",
+ "PointsName": "ELP",
"PointsBalance": customer.Points,
"RedeemLink": "https://enaklo.co.id/redeem",
"CurrentDate": time.Now().Format("01-20006"),
diff --git a/internal/services/v2/order/execute_order.go b/internal/services/v2/order/execute_order.go
index d1804f7..ea9240b 100644
--- a/internal/services/v2/order/execute_order.go
+++ b/internal/services/v2/order/execute_order.go
@@ -51,7 +51,7 @@ func (s *orderSvc) processPostOrderActions(
}
if order.CustomerID != nil && *order.CustomerID > 0 {
- err = s.addCustomerPoints(ctx, *order.CustomerID, int(order.Total))
+ err = s.addCustomerPoints(ctx, *order.CustomerID, int(order.Total/1000))
if err != nil {
logger.ContextLogger(ctx).Error("error when adding points", zap.Error(err))
}
@@ -136,8 +136,9 @@ func (s *orderSvc) sendTransactionReceipt(ctx mycontext.Context, order *entity.O
emailData := map[string]interface{}{
"UserName": customer.Name,
- "PointsName": "PoinLo",
- "PointsBalance": "20",
+ "PointsName": "ELP",
+ "PointsBalance": int(order.Total / 1000),
+ "NewPoints": int(order.Total / 1000),
"RedeemLink": "enaklo.co.id",
"BranchName": branchName,
"TransactionNumber": order.ID,
@@ -146,12 +147,13 @@ func (s *orderSvc) sendTransactionReceipt(ctx mycontext.Context, order *entity.O
"Items": itemsData,
"TotalPayment": fmt.Sprintf("Rp %s", formatCurrency(order.Total)),
"ViewTransactionLink": viewTransactionLink,
+ "ExpiryDate": order.CreatedAt.Format("02 January 2006"),
}
return s.notification.SendEmailTransactional(ctx, entity.SendEmailNotificationParam{
Sender: "noreply@enaklo.co.id",
Recipient: customer.Email,
- Subject: "Enaklo - Membership Statement",
+ Subject: "Hore, kamu dapat poin!",
TemplateName: "monthly_points",
TemplatePath: "templates/monthly_points.html",
Data: emailData,
diff --git a/templates/monthly_points.html b/templates/monthly_points.html
index 359d2f9..f286af0 100644
--- a/templates/monthly_points.html
+++ b/templates/monthly_points.html
@@ -1,8 +1,8 @@
-
+
- Laporan Keanggotaan Anda
+ Points Notification
@@ -12,148 +12,136 @@
padding: 0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
- background-color: #f1f0f7;
- }
-
- table,
- td {
- border-collapse: collapse;
- mso-table-lspace: 0pt;
- mso-table-rspace: 0pt;
- }
-
- img {
- border: 0;
- height: auto;
- line-height: 100%;
- outline: none;
- text-decoration: none;
- -ms-interpolation-mode: bicubic;
- }
-
- p {
- display: block;
- margin: 13px 0;
- }
-
- .mj-column-per-100 {
- width: 100% !important;
- max-width: 100%;
+ background-color: #f5f5f5;
+ font-family: Arial, sans-serif;
}
.content {
background-color: #ffffff;
margin: 0px auto;
max-width: 600px;
- padding: 20px;
- border-radius: 10px;
- box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
+ padding: 0;
+ border-radius: 12px;
+ box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
+ overflow: hidden;
}
.header {
- font-family: Ubuntu, Helvetica, Arial, sans-serif;
- font-size: 24px;
- line-height: 28px;
- color: #f46f02;
+ background-color: #d90000;
+ padding: 25px 30px;
text-align: center;
- margin-bottom: 20px;
- }
-
- .title {
- font-family: Ubuntu, Helvetica, Arial, sans-serif;
- font-size: 20px;
- line-height: 22px;
- color: #000000;
- text-align: center;
- margin-bottom: 20px;
- }
-
- .text {
- font-family: Ubuntu, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 22px;
- color: #000000;
- text-align: center;
- margin-bottom: 20px;
- }
-
- .points {
- display: block;
- width: fit-content;
- margin: 20px auto;
- background-color: #f5f5f5;
- color: #000000;
- text-align: center;
- padding: 15px 25px;
- border-radius: 5px;
- font-family: Ubuntu, Helvetica, Arial, sans-serif;
- font-size: 22px;
- line-height: 24px;
- font-weight: bold;
- letter-spacing: 1px;
- }
-
- .footer {
- font-family: Ubuntu, Helvetica, Arial, sans-serif;
- font-size: 12px;
- line-height: 15px;
- text-align: center;
- color: #808080;
- margin-top: 20px;
- }
-
- .divider {
- border-top: solid 1px #808080;
- margin: 20px auto;
- width: 100%;
}
.logo {
- display: block;
- margin: 0 auto 20px;
- width: 150px;
+ width: 120px;
+ margin-bottom: 15px;
+ }
+
+ .greeting {
+ color: white;
+ font-size: 22px;
+ font-weight: bold;
+ margin: 0;
+ }
+
+ .body-content {
+ padding: 30px;
+ }
+
+ .points-card {
+ background-color: #fff8f0;
+ border-radius: 10px;
+ padding: 20px;
+ margin-bottom: 25px;
+ border-left: 5px solid #f46f02;
+ }
+
+ .points-heading {
+ font-size: 16px;
+ color: #666;
+ margin: 0 0 5px 0;
+ }
+
+ .points-value {
+ font-weight: bold;
+ font-size: 28px;
+ color: #f46f02;
+ margin: 0 0 5px 0;
+ }
+
+ .expiry {
+ font-size: 14px;
+ color: #888;
+ margin: 0;
+ }
+
+ .total-points-card {
+ background-color: #f5f5f5;
+ border-radius: 10px;
+ padding: 20px;
+ margin-bottom: 25px;
+ }
+
+ .message {
+ font-size: 16px;
+ line-height: 1.5;
+ color: #333333;
+ margin-bottom: 25px;
}
.cta-button {
display: block;
- width: fit-content;
- margin: 20px auto;
- padding: 12px 20px;
+ width: 100%;
+ padding: 15px 0;
background-color: #d90000;
color: #ffffff !important;
font-size: 16px;
- font-family: Ubuntu, Helvetica, Arial, sans-serif;
font-weight: bold;
text-align: center;
text-decoration: none;
- border-radius: 5px;
- text-decoration: none !important;
+ border-radius: 8px;
+ }
+
+ .footer {
+ font-size: 12px;
+ line-height: 1.5;
+ text-align: center;
+ color: #808080;
+ margin-top: 30px;
+ padding-top: 20px;
+ border-top: 1px solid #eeeeee;
}
-
+
-

-
Laporan Keanggotaan Anda
-
- Hi {{ .UserName }},
- Berikut adalah laporan keanggotaan Anda untuk bulan ini. Saldo
{{ .PointsName }} Anda saat ini adalah:
+
-
{{ .PointsBalance }} {{ .PointsName }}
-
- Gunakan {{ .PointsName }} Anda untuk menukarkan diskon spesial dan hadiah menarik!
- Cek penawaran terbaru dan nikmati makanan favorit Anda.
-
-
Tukarkan Sekarang
-
-
-
+
\ No newline at end of file