Add search filtering to stash UI
This commit is contained in:
parent
b7263a4bd6
commit
cdf0a562fc
|
@ -15,13 +15,19 @@ var (
|
|||
source string
|
||||
cardCondition string
|
||||
|
||||
searchCriteria logic.SearchCriteria = logic.SearchCriteria{
|
||||
SetCode: "",
|
||||
Foil: logic.Either,
|
||||
Promo: logic.Either,
|
||||
Language: "en",
|
||||
}
|
||||
searchOptions logic.SearchOptions
|
||||
)
|
||||
|
||||
func getSearchOptions(db *sql.DB) {
|
||||
if searchOptions == nil {
|
||||
fmt.Println("LOADING")
|
||||
options, err := logic.GetAllSearchOptions(db)
|
||||
options, err := logic.GetAllSearchOptions(db, searchCriteria)
|
||||
logic.Check(err)
|
||||
searchOptions = options
|
||||
fmt.Println("READY")
|
||||
|
@ -61,7 +67,7 @@ func InsertSelectedCard(db *sql.DB) {
|
|||
return
|
||||
}
|
||||
|
||||
if storageBoxLabel == "" {
|
||||
if storageBoxLabel == "" || cardCondition == "" {
|
||||
GetStorageOptions()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue