Bug in Suchfunktion behoben
This commit is contained in:
parent
ba53bba0f6
commit
6404792946
@ -169,14 +169,18 @@ func (db *DB) GetOverviewTableDataByName(n string) ([]OverviewTableData, error)
|
|||||||
ON b.id = g.briefing_id
|
ON b.id = g.briefing_id
|
||||||
INNER JOIN participants AS p
|
INNER JOIN participants AS p
|
||||||
ON p.id = g.participant_id
|
ON p.id = g.participant_id
|
||||||
|
INNER JOIN questions AS q
|
||||||
|
ON q.id = g.question_id
|
||||||
INNER JOIN instructors AS i
|
INNER JOIN instructors AS i
|
||||||
ON i.id = b.instructor_id
|
ON i.id = b.instructor_id
|
||||||
WHERE
|
WHERE
|
||||||
q.id = 1 AND
|
q.id = 1 AND
|
||||||
|
(
|
||||||
i.first_name LIKE ? OR
|
i.first_name LIKE ? OR
|
||||||
i.last_name LIKE ? OR
|
i.last_name LIKE ? OR
|
||||||
p.first_name LIKE ? OR
|
p.first_name LIKE ? OR
|
||||||
p.last_name LIKE ?
|
p.last_name LIKE ?
|
||||||
|
)
|
||||||
ORDER BY
|
ORDER BY
|
||||||
b.id DESC,
|
b.id DESC,
|
||||||
p.id
|
p.id
|
||||||
|
@ -46,7 +46,6 @@ func HandleInternalLogin(db *data.DB, ss *[]*Session, cs chan<- *Session) http.H
|
|||||||
|
|
||||||
func (s *Session) HandleSearch(db *data.DB) http.HandlerFunc {
|
func (s *Session) HandleSearch(db *data.DB) http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Println("hier")
|
|
||||||
var err error
|
var err error
|
||||||
data := tableHTMLData{}
|
data := tableHTMLData{}
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
<form>
|
<form>
|
||||||
<label for="search-input">Suche</label>
|
<label for="search-input">Suche</label>
|
||||||
<input type="text" name="search" id="search-input" hx-post="/search/{{.SessionID}}/" hx-target="#results">
|
<input id="search-input" name="search" type="text" hx-post="/search/{{.SessionID}}/" hx-target="#results"
|
||||||
|
hx-trigger="keyup changed delay:200ms" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form>
|
<form>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user