Commit a392b07b622910712a627ee15bb17218d8058c0c

Authored by Marko Tikvić
1 parent 7d3deb50df
Exists in master and in 1 other branch v2

navigation

Showing 1 changed file with 8 additions and 8 deletions   Show diff stats
... ... @@ -207,15 +207,15 @@ func setListParams(db *ora.Ses, list *ListConfig, objType string) error {
207 207 return nil
208 208 }
209 209  
210   -func getListNavigation(db *ora.Ses, objType string) ([]ListNavNode, error) {
  210 +func getListNavigation(db *ora.Ses, listObjType string) ([]ListNavNode, error) {
211 211 resp := make([]ListNavNode, 0)
212 212 var err error
213 213 var stmt *ora.Stmt
214 214 query := `SELECT
215   - a.OBJECT_TYPE, a.LABEL, a.ICON, b.LIST_OBJECT_TYPE, b.PARENT_ID_FIELD, b.RB
216   - FROM LIST_CONFIG_CHILD a
217   - JOIN LIST_CONFIG_NAVIGATION b ON a.PARENT_CHILD_ID = b.PARENT_CHILD_ID
218   - WHERE a.PARENT_OBJECT_TYPE = '`+objType+`'
  215 + a.OBJECT_TYPE, a.PARENT_OBJECT_TYPE, a.LABEL, a.ICON, b.PARENT_ID_FIELD, b.RB
  216 + FROM LIST_CONFIG_NAVIGATION b
  217 + JOIN LIST_CONFIG_CHILD a ON b.PARENT_CHILD_ID = a.PARENT_CHILD_ID
  218 + WHERE b.LIST_OBJECT_TYPE = '`+listObjType+`'
219 219 ORDER BY b.RB ASC`
220 220  
221 221 stmt, err = db.Prep(query, ora.S, ora.S, ora.S, ora.S, ora.S)
... ... @@ -231,9 +231,9 @@ func getListNavigation(db *ora.Ses, objType string) ([]ListNavNode, error) {
231 231 for rset.Next() {
232 232 resp = append(resp, ListNavNode{
233 233 ObjectType: rset.Row[0].(string),
234   - LabelField: rset.Row[1].(string),
235   - Icon: rset.Row[2].(string),
236   - ParentObjectType: rset.Row[3].(string),
  234 + ParentObjectType: rset.Row[1].(string),
  235 + LabelField: rset.Row[2].(string),
  236 + Icon: rset.Row[3].(string),
237 237 ParentIdField: rset.Row[4].(string),
238 238 })
239 239 }
... ...