New Quotator and some major changes to pricing admin

This commit is contained in:
Mikhail Chusavitin
2026-01-26 18:30:45 +03:00
parent a93644131c
commit d7d6e9d62c
24 changed files with 565 additions and 112 deletions

View File

@@ -5,8 +5,8 @@ import (
"strconv"
"github.com/gin-gonic/gin"
"github.com/mchus/quoteforge/internal/repository"
"github.com/mchus/quoteforge/internal/services"
"git.mchus.pro/mchus/quoteforge/internal/repository"
"git.mchus.pro/mchus/quoteforge/internal/services"
)
type ComponentHandler struct {
@@ -23,7 +23,6 @@ func (h *ComponentHandler) List(c *gin.Context) {
filter := repository.ComponentFilter{
Category: c.Query("category"),
Vendor: c.Query("vendor"),
Search: c.Query("search"),
HasPrice: c.Query("has_price") == "true",
}
@@ -58,15 +57,3 @@ func (h *ComponentHandler) GetCategories(c *gin.Context) {
c.JSON(http.StatusOK, categories)
}
func (h *ComponentHandler) GetVendors(c *gin.Context) {
category := c.Query("category")
vendors, err := h.componentService.GetVendors(category)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.JSON(http.StatusOK, vendors)
}