mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
feat: filter improvement
This commit is contained in:
@@ -51,9 +51,18 @@ func (u *ExpenseController) GetAll(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
query := &validation.Query{
|
||||
Page: c.QueryInt("page", 1),
|
||||
Limit: c.QueryInt("limit", 10),
|
||||
Search: c.Query("search", ""),
|
||||
Page: c.QueryInt("page", 1),
|
||||
Limit: c.QueryInt("limit", 10),
|
||||
Search: strings.TrimSpace(c.Query("search", "")),
|
||||
TransactionDate: strings.TrimSpace(c.Query("transaction_date", "")),
|
||||
RealizationDate: strings.TrimSpace(c.Query("realization_date", "")),
|
||||
LocationID: uint64(c.QueryInt("location_id", 0)),
|
||||
VendorID: uint64(c.QueryInt("vendor_id", 0)),
|
||||
Category: strings.TrimSpace(c.Query("category", "")),
|
||||
ApprovalStatus: strings.TrimSpace(c.Query("approval_status", "")),
|
||||
RealizationStatus: strings.TrimSpace(c.Query("realization_status", "")),
|
||||
ProjectFlockID: uint64(c.QueryInt("project_flock_id", 0)),
|
||||
ProjectFlockKandangID: uint64(c.QueryInt("project_flock_kandang_id", 0)),
|
||||
}
|
||||
|
||||
if query.Page < 1 || query.Limit < 1 {
|
||||
|
||||
Reference in New Issue
Block a user