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