mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 05:21:57 +00:00
Feat(BE-304): add permission in report and closing
This commit is contained in:
@@ -42,6 +42,7 @@ const (
|
||||
const (
|
||||
P_ReportExpenseGetAll = "lti.repport.expense.list"
|
||||
P_ReportDeliveryGetAll = "lti.repport.delivery.list"
|
||||
P_ReportPurchaseSupplierGetAll = "lti.repport.purchasesupplier.list"
|
||||
)
|
||||
|
||||
|
||||
@@ -55,14 +56,15 @@ const (
|
||||
P_ClosingGetAll = "lti.closing.list"
|
||||
P_ClosingPenjualan = "lti.closing.penjualan"
|
||||
P_ClosingGetSummary = "lti.closing.getsummary"
|
||||
|
||||
|
||||
//?baru
|
||||
P_ClosingGetOverhead = "lti.closing.getoverhead"
|
||||
P_ClosingCountSapronakKandang = "lti.closing.getsapronakcountbykandang"
|
||||
P_ClosingCountSapronakKandang = "lti.closing.getsapronakcount.kandang"
|
||||
P_ClosingCountSapronak = "lti.closing.getsapronakcount"
|
||||
P_ClosingSapronak = "lti.closing.getsapronak"
|
||||
|
||||
P_ClosingExpeditionHpp = "lti.closing.expedition"
|
||||
P_ClosingExpeditionHppByKandang = "lti.closing.expedition.kandang"
|
||||
P_ClosingDataProduction = "lti.closing.production.data"
|
||||
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -21,14 +21,14 @@ func ClosingRoutes(v1 fiber.Router, u user.UserService, s closing.ClosingService
|
||||
// route.Patch("/:id", m.Auth(u), ctrl.UpdateOne)
|
||||
// route.Delete("/:id", m.Auth(u), ctrl.DeleteOne)
|
||||
|
||||
route.Get("/",m.RequirePermissions(m.P_ClosingGetAll), ctrl.GetAll)
|
||||
route.Get("/:project_flock_id/penjualan",m.RequirePermissions(m.P_ClosingPenjualan), ctrl.GetPenjualan)
|
||||
route.Get("/:projectFlockId",m.RequirePermissions(m.P_ClosingGetSummary), ctrl.GetClosingSummary)
|
||||
route.Get("/:project_flock_id/overhead",m.RequirePermissions(m.P_ClosingGetOverhead), ctrl.GetOverhead)
|
||||
route.Get("/:project_flock_id/:project_flock_kandang_id/perhitungan_sapronak",m.RequirePermissions(m.P_ClosingCountSapronakKandang) ,ctrl.GetSapronakByKandang)
|
||||
route.Get("/:project_flock_id/perhitungan_sapronak",m.RequirePermissions(m.P_ClosingCountSapronak) ,ctrl.GetSapronakByProject)
|
||||
route.Get("/:projectFlockId/sapronak",m.RequirePermissions(m.P_ClosingSapronak), ctrl.GetClosingSapronak)
|
||||
route.Get("/:project_flock_id/expedition-hpp", ctrl.GetExpeditionHPP)
|
||||
route.Get("/:project_flock_id/:project_flock_kandang_id/expedition-hpp", ctrl.GetExpeditionHPPByKandang)
|
||||
route.Get("/:projectFlockId/data-produksi", ctrl.GetClosingDataProduksi)
|
||||
route.Get("/", m.RequirePermissions(m.P_ClosingGetAll), ctrl.GetAll)
|
||||
route.Get("/:project_flock_id/penjualan", m.RequirePermissions(m.P_ClosingPenjualan), ctrl.GetPenjualan)
|
||||
route.Get("/:projectFlockId", m.RequirePermissions(m.P_ClosingGetSummary), ctrl.GetClosingSummary)
|
||||
route.Get("/:project_flock_id/overhead", m.RequirePermissions(m.P_ClosingGetOverhead), ctrl.GetOverhead)
|
||||
route.Get("/:project_flock_id/:project_flock_kandang_id/perhitungan_sapronak", m.RequirePermissions(m.P_ClosingCountSapronakKandang), ctrl.GetSapronakByKandang)
|
||||
route.Get("/:project_flock_id/perhitungan_sapronak", m.RequirePermissions(m.P_ClosingCountSapronak), ctrl.GetSapronakByProject)
|
||||
route.Get("/:projectFlockId/sapronak", m.RequirePermissions(m.P_ClosingSapronak), ctrl.GetClosingSapronak)
|
||||
route.Get("/:project_flock_id/expedition-hpp", m.RequirePermissions(m.P_ClosingExpeditionHpp), ctrl.GetExpeditionHPP)
|
||||
route.Get("/:project_flock_id/:project_flock_kandang_id/expedition-hpp", m.RequirePermissions(m.P_ClosingExpeditionHppByKandang), ctrl.GetExpeditionHPPByKandang)
|
||||
route.Get("/:projectFlockId/data-produksi", m.RequirePermissions(m.P_ClosingDataProduction), ctrl.GetClosingDataProduksi)
|
||||
}
|
||||
|
||||
@@ -17,5 +17,5 @@ func RepportRoutes(v1 fiber.Router, u user.UserService, s repport.RepportService
|
||||
|
||||
route.Get("/expense", m.RequirePermissions(m.P_ReportExpenseGetAll), ctrl.GetExpense)
|
||||
route.Get("/marketing", m.RequirePermissions(m.P_ReportDeliveryGetAll), ctrl.GetMarketing)
|
||||
route.Get("/purchase-supplier", ctrl.GetPurchaseSupplier)
|
||||
route.Get("/purchase-supplier", m.RequirePermissions(m.P_ReportPurchaseSupplierGetAll), ctrl.GetPurchaseSupplier)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user