add sort
This commit is contained in:
No files matched your search
@@ -53,7 +53,9 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Di
|
||||
}
|
||||
}
|
||||
|
||||
plh.SearchCodeOrName(input.Search, tx)
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = plh.Sort(input.Sort, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.District{}).
|
||||
|
||||
@@ -55,6 +55,8 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Pr
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = plh.Sort(input.Sort, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Province{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
|
||||
@@ -55,6 +55,8 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Re
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = plh.Sort(input.Sort, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Regency{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
|
||||
@@ -55,6 +55,8 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Vi
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = plh.Sort(input.Sort, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Village{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
|
||||
Reference in New Issue
Block a user