Add org name and user name to dashboard

This commit is contained in:
Eli Ribble 2026-04-17 17:51:02 +00:00
parent ba8c0016ac
commit c938cb231e
No known key found for this signature in database
3 changed files with 6 additions and 2 deletions

View file

@ -24,6 +24,7 @@ func Session(r *router) *sessionR {
type organization struct {
ID int32 `json:"id"`
Name string `json:"name"`
ServiceArea *types.ServiceArea `json:"service_area"`
}
@ -88,6 +89,7 @@ func (res *sessionR) Get(ctx context.Context, r *http.Request, user platform.Use
},
Organization: organization{
ID: user.Organization.ID,
Name: user.Organization.Name(),
ServiceArea: user.Organization.ServiceArea,
},
Self: *u,

View file

@ -655,6 +655,7 @@ export interface User {
}
export interface Organization {
id: number;
name: string;
service_area?: Bounds;
}
export interface UserNotificationCounts {

View file

@ -2,9 +2,10 @@
<!-- Dashboard Header -->
<div class="row mb-4">
<div class="col-md-6">
<h1>{{ dashboard.organization.name }} Dashboard</h1>
<h1>{{ session?.organization?.name }} Dashboard</h1>
<p class="text-muted">
Overview of mosquito control activities in your district
Hey {{ session?.self?.display_name }}, here's an overview of mosquito
control activities in your district
</p>
</div>
<div