Skip to content

Commit

Permalink
ref: pass some data to apply active css class for chosen customer s…
Browse files Browse the repository at this point in the history
…ide menu
  • Loading branch information
abbasfisal committed Nov 28, 2024
1 parent f6e8f31 commit afc2bc1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 579 deletions.
12 changes: 7 additions & 5 deletions internal/modules/public/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,17 @@ func (p PublicHandler) LogOut(c *gin.Context) {

func (p PublicHandler) ShowProfile(c *gin.Context) {
html.CustomerRender(c, http.StatusFound, "customer_profile", gin.H{
"TITLE": "مدیریت پروفایل",
"TITLE": "مدیریت پروفایل",
"ACTIVE": "profile",
})
return
}

func (p PublicHandler) EditProfile(c *gin.Context) {
html.CustomerRender(c, http.StatusFound, "customer_edit_profile",
gin.H{
"TITLE": "ویرایش پروفایل",
"TITLE": "ویرایش پروفایل",
"ACTIVE": "edit_profile",
},
)
return
Expand Down Expand Up @@ -642,13 +644,12 @@ func (p PublicHandler) ShowOrderList(c *gin.Context) {
html.CustomerRender(c, http.StatusNotFound, "profile_orders", gin.H{
"TITLE": "لیست سفارشات",
"PAGINATION": nil,
"ACTIVE": "orders",
})
return
} else {
c.JSON(200, gin.H{
"else": 1,
"err": err.Error(),
"msg": custom_error.SomethingWrongHappened,
"msg": custom_error.SomethingWrongHappened,
})
return
}
Expand All @@ -659,6 +660,7 @@ func (p PublicHandler) ShowOrderList(c *gin.Context) {
"TITLE": "لیست سفارشات",
"PAGINATION": orderPaginations,
"PrimaryMessage": "لیست سفارشات",
"ACTIVE": "orders",
},
)
return
Expand Down
Loading

0 comments on commit afc2bc1

Please sign in to comment.