feat(prov_servidor): add many2many integrations linking
- ProvServidor model: add Integraciones []Submodules (many2many:prov_servidor_submodules) - GetAllProvServidor: preload Integraciones - SetProvServidorIntegraciones: new model func to replace associations - New endpoint PUT /app/provservidor/:id/integraciones - GetSubmodules: support ?limit= query param - prov_servidor.html: show integrations as badges in table, view modal, and edit modal with checkboxes to select one or more existing submodules Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot
parent
c834e40e83
commit
b4b60810a1
@@ -39,7 +39,11 @@ func GetSubmodules(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
searchQuery := c.Query("search", "") // Obtener el término de búsqueda
|
||||
limit := 10 // Número de módulos por página
|
||||
limitStr := c.Query("limit", "10")
|
||||
limit, _ := strconv.Atoi(limitStr)
|
||||
if limit <= 0 {
|
||||
limit = 10
|
||||
}
|
||||
offset := (page - 1) * limit
|
||||
|
||||
// Llama a AllModules con el término de búsqueda
|
||||
|
||||
Reference in New Issue
Block a user