Add URL links to mailer page

This commit is contained in:
Eli Ribble 2026-03-03 17:29:30 +00:00
parent 4be9c72060
commit c9eee95cbb
No known key found for this signature in database
4 changed files with 12 additions and 5 deletions

View file

@ -20,7 +20,8 @@ func MakeGet[T any](f handlerFunctionGet[T]) http.HandlerFunc {
return
}
RenderOrError(w, resp.Template, Content[T]{
C: resp.Content,
C: resp.Content,
URL: NewContentURL(),
})
}
}

View file

@ -126,11 +126,14 @@
<!-- Action Buttons -->
<div class="action-buttons">
<a href="{{ .URL.RMO.Evidence }}" class="btn btn-success flex-grow-1">
<a
href="{{ call .URL.RMO.Evidence .C.PublicID }}"
class="btn btn-success flex-grow-1"
>
<i class="bi bi-check-circle me-2"></i> Correct
</a>
<a
href="{{ .URL.RMO.UpdateLocation }}"
href="{{ call .URL.RMO.UpdateLocation .C.PublicID }}"
class="btn btn-outline-primary flex-grow-1"
>
<i class="bi bi-geo-alt me-2"></i> Update Location

View file

@ -21,6 +21,7 @@ func NewContentURL() ContentURL {
return ContentURL{
Configuration: newContentURLConfiguration(),
OAuthRefreshArcGIS: config.MakeURLNidus("/arcgis/oauth/begin"),
RMO: newContentURLRMO(),
Root: config.MakeURLNidus("/"),
Route: config.MakeURLNidus("/route"),
Sidebar: newContentURLSidebar(),

View file

@ -23,7 +23,8 @@ type address struct {
Country string `db:"country"`
}
type contentMailer struct {
Address address
Address address
PublicID string
}
func getMailer(ctx context.Context, r *http.Request) (*html.Response[contentMailer], *nhttp.ErrorWithStatus) {
@ -60,7 +61,8 @@ func getMailer(ctx context.Context, r *http.Request) (*html.Response[contentMail
}
return html.NewResponse(
"rmo/mailer.html", contentMailer{
Address: report,
Address: report,
PublicID: public_id,
},
), nil