mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Pick up previous selection of boards checkboxes on edit
This commit is contained in:
parent
79e3f1be47
commit
d655f1b42f
1 changed files with 12 additions and 6 deletions
|
@ -288,6 +288,10 @@ func getBoards(config trelloConfig) (boards []trelloBoard, err error) {
|
||||||
defer res.Body.Close()
|
defer res.Body.Close()
|
||||||
dec := json.NewDecoder(res.Body)
|
dec := json.NewDecoder(res.Body)
|
||||||
err = dec.Decode(&b)
|
err = dec.Decode(&b)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// we only show open, team boards (not personal)
|
// we only show open, team boards (not personal)
|
||||||
for _, b := range b {
|
for _, b := range b {
|
||||||
|
@ -296,13 +300,15 @@ func getBoards(config trelloConfig) (boards []trelloBoard, err error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
for bx, bd := range boards {
|
||||||
fmt.Println(err)
|
for _, cd := range config.Boards {
|
||||||
return nil, err
|
if bd.ID == cd.ID {
|
||||||
}
|
boards[bx].Included = cd.Included // to pick up the previous selection or not
|
||||||
|
goto foundID
|
||||||
for bx := range boards {
|
}
|
||||||
|
}
|
||||||
boards[bx].Included = true // include boards by default
|
boards[bx].Included = true // include boards by default
|
||||||
|
foundID:
|
||||||
}
|
}
|
||||||
|
|
||||||
return boards, nil
|
return boards, nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue