non active phase daily checklist

This commit is contained in:
giovanni
2026-06-08 21:01:20 +07:00
parent 540434e33b
commit 59d72f20b4
5 changed files with 79 additions and 1 deletions
@@ -50,6 +50,7 @@ func (s phasesService) GetAll(c *fiber.Ctx, params *validation.Query) ([]entity.
phasess, total, err := s.Repository.GetAll(c.Context(), offset, params.Limit, func(db *gorm.DB) *gorm.DB {
db = s.withRelations(db)
db = db.Where("is_active = true")
if params.Search != "" {
return db.Where("name ILIKE ?", "%"+params.Search+"%")
}