feat: add projects flow and consolidate default project handling
This commit is contained in:
@@ -67,7 +67,7 @@ func NewWebHandler(templatesPath string, componentService *services.ComponentSer
|
||||
}
|
||||
|
||||
// Load each page template with base
|
||||
simplePages := []string{"login.html", "configs.html", "admin_pricing.html", "pricelists.html", "pricelist_detail.html"}
|
||||
simplePages := []string{"login.html", "configs.html", "projects.html", "project_detail.html", "admin_pricing.html", "pricelists.html", "pricelist_detail.html"}
|
||||
for _, page := range simplePages {
|
||||
pagePath := filepath.Join(templatesPath, page)
|
||||
var tmpl *template.Template
|
||||
@@ -186,6 +186,17 @@ func (h *WebHandler) Configs(c *gin.Context) {
|
||||
h.render(c, "configs.html", gin.H{"ActivePage": "configs"})
|
||||
}
|
||||
|
||||
func (h *WebHandler) Projects(c *gin.Context) {
|
||||
h.render(c, "projects.html", gin.H{"ActivePage": "projects"})
|
||||
}
|
||||
|
||||
func (h *WebHandler) ProjectDetail(c *gin.Context) {
|
||||
h.render(c, "project_detail.html", gin.H{
|
||||
"ActivePage": "projects",
|
||||
"ProjectUUID": c.Param("uuid"),
|
||||
})
|
||||
}
|
||||
|
||||
func (h *WebHandler) AdminPricing(c *gin.Context) {
|
||||
h.render(c, "admin_pricing.html", gin.H{"ActivePage": "admin"})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user