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
+1
View File
@@ -85,6 +85,7 @@ func UserRoutes(app fiber.Router) {
protected.Get("/loadprovservidor", controllers.GetProvServidor)
protected.Post("/provservidor", controllers.CreateProvServidor)
protected.Put("/provservidor/:id", controllers.UpdateProvServidor)
protected.Put("/provservidor/:id/integraciones", controllers.SetProvServidorIntegraciones)
protected.Delete("/provservidor/:id", controllers.DeleteProvServidor)
// Rutas de tipos de servidor