diff --git a/list_config.go b/list_config.go index 3f9d2da..68008d9 100644 --- a/list_config.go +++ b/list_config.go @@ -49,11 +49,12 @@ type ListActions struct { } type ListNavNode struct { - ObjectType string `json:"objectType"` - LabelField string `json:"label"` - Icon string `json:"icon"` - ParentObjectType string `json:"parentObjectType"` - ParentIDField string `json:"parentIdField"` + ObjectType string `json:"objectType"` + LabelField string `json:"label"` + Icon string `json:"icon"` + ParentObjectType string `json:"parentObjectType"` + ParentIDField string `json:"parentIdField"` + ParentFilterField string `json:"parentFilterField"` } type ListParentNode struct { @@ -178,7 +179,7 @@ func newDefaultList(objType string) ListConfig { func setListParams(db *ora.Ses, list *ListConfig, objType string) error { var err error var stmt *ora.Stmt - query := `SELECT + query := `SELECT OBJECT_TYPE, TITLE, LAZY_LOAD, INLINE_EDIT FROM LIST_CONFIG WHERE OBJECT_TYPE = '` + objType + `'` @@ -217,9 +218,9 @@ func getListNavigation(db *ora.Ses, listObjType string) ([]ListNavNode, error) { resp := make([]ListNavNode, 0) var err error var stmt *ora.Stmt - query := `SELECT - a.OBJECT_TYPE, a.PARENT_OBJECT_TYPE, a.LABEL, a.ICON, b.PARENT_ID_FIELD, b.RB - FROM LIST_CONFIG_NAVIGATION b + query := `SELECT + a.OBJECT_TYPE, a.PARENT_OBJECT_TYPE, a.LABEL, a.ICON, a.PARENT_FILTER_FIELD, b.PARENT_ID_FIELD, b.RB + FROM LIST_CONFIG_NAVIGATION b JOIN LIST_CONFIG_CHILD a ON b.PARENT_CHILD_ID = a.PARENT_CHILD_ID WHERE b.LIST_OBJECT_TYPE = '`+listObjType+`' ORDER BY b.RB ASC` @@ -240,7 +241,9 @@ func getListNavigation(db *ora.Ses, listObjType string) ([]ListNavNode, error) { ParentObjectType: rset.Row[1].(string), LabelField: rset.Row[2].(string), Icon: rset.Row[3].(string), - ParentIDField: rset.Row[4].(string), + ParentFilterField: rset.Row[4].(string), + ParentIDField: rset.Row[5].(string), + // RB is ignored }) } if rset.Err != nil { @@ -255,7 +258,7 @@ func getListActions(db *ora.Ses, objType string) (ListActions, error) { var resp ListActions var err error var stmt *ora.Stmt - query := `SELECT + query := `SELECT ACTION_CREATE, ACTION_UPDATE, ACTION_DELETE, ACTION_EXPORT, ACTION_PRINT, ACTION_GRAPH FROM LIST_CONFIG