FEAT[BE]: implement expense report retrieval with filtering options

This commit is contained in:
aguhh18
2025-12-15 09:11:26 +07:00
parent c79e35c217
commit cbb3368141
12 changed files with 330 additions and 158 deletions
+7 -4
View File
@@ -5,6 +5,8 @@ import (
"github.com/gofiber/fiber/v2"
"gorm.io/gorm"
commonRepo "gitlab.com/mbugroup/lti-api.git/internal/common/repository"
approvalService "gitlab.com/mbugroup/lti-api.git/internal/common/service"
sRepport "gitlab.com/mbugroup/lti-api.git/internal/modules/repports/services"
expenseRepo "gitlab.com/mbugroup/lti-api.git/internal/modules/expenses/repositories"
@@ -13,11 +15,12 @@ import (
type RepportModule struct{}
func (RepportModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
// Initialize expense realization repository
expRealizationRepo := expenseRepo.NewExpenseRealizationRepository(db)
// Initialize report service with expense realization repo
repportService := sRepport.NewRepportService(validate, expRealizationRepo)
expenseRealizationRepository := expenseRepo.NewExpenseRealizationRepository(db)
approvalRepository := commonRepo.NewApprovalRepository(db)
approvalSvc := approvalService.NewApprovalService(approvalRepository)
repportService := sRepport.NewRepportService(validate, expenseRealizationRepository, approvalSvc)
RepportRoutes(router, repportService)
}