Update template email

This commit is contained in:
aditya.siregar
2025-03-08 00:35:23 +07:00
parent 3c80b710af
commit 18003313dd
54 changed files with 2309 additions and 199 deletions
+1 -13
View File
@@ -6,7 +6,6 @@ import (
"enaklo-pos-be/internal/handlers/request"
"enaklo-pos-be/internal/handlers/response"
"enaklo-pos-be/internal/services"
"enaklo-pos-be/internal/utils"
"encoding/json"
"net/http"
"time"
@@ -22,7 +21,7 @@ type Handler struct {
func (h *Handler) Route(group *gin.RouterGroup, jwt gin.HandlerFunc) {
route := group.Group("/order")
route.POST("/inquiry", jwt, h.Inquiry)
route.POST("/inquiry", h.Inquiry)
route.POST("/execute", jwt, h.Execute)
route.GET("/history", jwt, h.History)
route.GET("/detail", jwt, h.Detail)
@@ -104,20 +103,14 @@ func MapOrderToCreateOrderResponse(orderResponse *entity.OrderResponse, req requ
return response.CreateOrderResponse{
ID: order.ID,
RefID: order.RefID,
PartnerID: order.PartnerID,
Status: order.Status,
Amount: order.Amount,
PaymentType: order.PaymentType,
CreatedAt: order.CreatedAt,
OrderItems: orderItems,
Token: orderResponse.Token,
Fee: order.Fee,
Total: order.Total,
VisitDate: order.VisitDate.Format("2006-01-02"),
SiteName: order.Site.Name,
BankCode: req.BankCode,
BankName: utils.BankName(req.BankCode),
}
}
@@ -136,7 +129,6 @@ func MapOrderToExecuteOrderResponse(orderResponse *entity.ExecuteOrderResponse)
return response.ExecuteOrderResponse{
ID: order.ID,
RefID: order.RefID,
PartnerID: order.PartnerID,
Status: order.Status,
Amount: order.Amount,
@@ -239,10 +231,6 @@ func (h *Handler) toOrderDetail(order *entity.Order) *response.OrderDetail {
qrCode := ""
if order.Status == "PAID" {
qrCode = order.RefID
}
var siteName string
if order.Site != nil {