From b62877d1bd5ca6c25d537ea52a9e6e937d709101 Mon Sep 17 00:00:00 2001 From: Finley Ghosh Date: Sun, 7 Dec 2025 17:35:21 +1100 Subject: [PATCH] Adding interface reference, fixing manual quote reminders dropdown width / anchor --- go/internal/cmc/handlers/quotes/quotes.go | 7 +++++-- go/templates/quotes/index.html | 12 +++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/go/internal/cmc/handlers/quotes/quotes.go b/go/internal/cmc/handlers/quotes/quotes.go index 2a6a54eb..2b2945f9 100644 --- a/go/internal/cmc/handlers/quotes/quotes.go +++ b/go/internal/cmc/handlers/quotes/quotes.go @@ -174,7 +174,7 @@ type QuoteQueries interface { InsertQuoteReminder(ctx context.Context, params db.InsertQuoteReminderParams) (sql.Result, error) GetExpiringSoonQuotes(ctx context.Context, dateADD interface{}) ([]db.GetExpiringSoonQuotesRow, error) GetRecentlyExpiredQuotes(ctx context.Context, dateSUB interface{}) ([]db.GetRecentlyExpiredQuotesRow, error) - GetExpiringSoonQuotesOnDay(ctx context.Context, dateADD interface{}) ([]db.GetExpiringSoonQuotesOnDayRow, error) + GetExpiringSoonQuotesOnDay(ctx context.Context, arg db.GetExpiringSoonQuotesOnDayParams) ([]db.GetExpiringSoonQuotesOnDayRow, error) GetRecentlyExpiredQuotesOnDay(ctx context.Context, dateSUB interface{}) ([]db.GetRecentlyExpiredQuotesOnDayRow, error) DisableQuoteReminders(ctx context.Context, params db.DisableQuoteRemindersParams) (sql.Result, error) EnableQuoteReminders(ctx context.Context, id int32) (sql.Result, error) @@ -259,7 +259,10 @@ func (h *QuotesHandler) GetOutstandingQuotesOnDay(r *http.Request, day int) ([]m ctx := r.Context() // If day is positive, get quotes expiring on that day; if negative, get recently expired quotes on that day in the past if day >= 0 { - quotes, err := h.queries.GetExpiringSoonQuotesOnDay(ctx, day) + quotes, err := h.queries.GetExpiringSoonQuotesOnDay(ctx, db.GetExpiringSoonQuotesOnDayParams{ + DATEADD: day, + DATEADD_2: day, + }) if err != nil { return nil, err } diff --git a/go/templates/quotes/index.html b/go/templates/quotes/index.html index ffee15b2..ee8b93ce 100644 --- a/go/templates/quotes/index.html +++ b/go/templates/quotes/index.html @@ -65,6 +65,7 @@ {{if .RemindersDisabled}} {{else}} +
{{if eq .LatestReminderType "No Reminder"}} @@ -80,7 +81,7 @@ {{end}}
- {{end}} @@ -162,6 +164,7 @@ {{if .RemindersDisabled}} {{else}} +
{{if eq .LatestReminderType "No Reminder"}} @@ -177,7 +180,7 @@ {{end}}
- {{end}} @@ -526,11 +530,12 @@ document.getElementById('enableModalConfirmBtn').addEventListener('click', async +
${buttonHTML} ${dropdownHTML}
- `; } });