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:
Lizandro Guarnizo
2026-05-21 10:34:01 -05:00
co-authored by Copilot
parent c834e40e83
commit b4b60810a1
5 changed files with 145 additions and 38 deletions
+5 -1
View File
@@ -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