Skip to content

Commit

Permalink
Display roles on user profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
ciukstar committed Nov 19, 2023
1 parent b7a3048 commit f18e3bd
Show file tree
Hide file tree
Showing 41 changed files with 137 additions and 76 deletions.
6 changes: 3 additions & 3 deletions config/routes.yesodroutes
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
/service/+Services ServiceR GET POST
/services ServicesR GET

/profile ProfileR GET
/account/#UserId/photo AccountPhotoR GET
/account AccountR GET POST
/account/#UserId/profile ProfileR GET
/account/#UserId/photo AccountPhotoR GET
/account AccountR GET POST

/ HomeR GET

Expand Down
20 changes: 7 additions & 13 deletions src/Foundation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,16 @@ instance Yesod App where
authRoute :: App -> Maybe (Route App)
authRoute _ = Just $ AuthR LoginR

isAuthorized
:: Route App -- ^ The route the user is visiting.
-> Bool -- ^ Whether or not this is a "write" request.
-> Handler AuthResult
-- Routes not requiring authentication.
isAuthorized :: Route App -> Bool -> Handler AuthResult

isAuthorized (StaticR _) _ = return Authorized

isAuthorized (AuthR _) _ = return Authorized
isAuthorized HomeR _ = return Authorized
isAuthorized FaviconR _ = return Authorized
isAuthorized RobotsR _ = return Authorized
isAuthorized PhotoPlaceholderR _ = return Authorized

isAuthorized (StaticR _) _ = return Authorized

isAuthorized r@(StatsR PopOffersR) _ = setUltDest r >> isAnalyst
isAuthorized r@(StatsR WorkloadsR) _ = setUltDest r >> isAnalyst
isAuthorized r@(StatsR (WorkloadEmplMonthR _ _)) _ = setUltDest r >> isAnalyst
Expand Down Expand Up @@ -225,8 +222,6 @@ instance Yesod App where
isAuthorized r@(AdminR (BusinessContactEditR _ _)) _ = setUltDest r >> isAdmin
isAuthorized r@(AdminR (BusinessContactDeleteR _ _)) _ = setUltDest r >> isAdmin



isAuthorized ContactR _ = return Authorized

isAuthorized BookEndR _ = return Authorized
Expand Down Expand Up @@ -260,12 +255,11 @@ instance Yesod App where
isAuthorized r@(TasksDayListR {}) _ = setUltDest r >> isEmployee
isAuthorized r@(TaskItemR {}) _ = setUltDest r >> isEmployee
isAuthorized r@(TaskHistR {}) _ = setUltDest r >> isEmployee



isAuthorized (ProfileR _) _ = isAuthenticated
isAuthorized AccountR _ = return Authorized
isAuthorized (AccountPhotoR _) _ = return Authorized
isAuthorized ProfileR _ = isAuthenticated

isAuthorized ServicesR _ = return Authorized
isAuthorized (ServiceR _) _ = return Authorized
Expand Down
41 changes: 31 additions & 10 deletions src/Handler/Account.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,18 @@ import Yesod.Auth (Route (LoginR, LogoutR), maybeAuth)

import Foundation
( Handler, Widget
, Route (StaticR, AccountPhotoR, HomeR, AccountR, PhotoPlaceholderR, AuthR)
, Route
( StaticR, AccountPhotoR, HomeR, AccountR, PhotoPlaceholderR
, AuthR, AdminR
)
, AdminR (AdmStaffPhotoR)
, AppMessage
( MsgAccount, MsgCancel, MsgUsername, MsgPassword
, MsgPhoto, MsgFullName, MsgEmail, MsgSignUp, MsgBack
, MsgConfirmPassword, MsgYouMustEnterTwoValues
, MsgConfirmPassword, MsgYouMustEnterTwoValues, MsgEmployee
, MsgPasswordsDoNotMatch, MsgRegistration, MsgUserProfile
, MsgLogout, MsgLogin, MsgLoginToSeeYourProfile
, MsgLogout, MsgLogin, MsgLoginToSeeYourProfile, MsgRoles
, MsgAdministrator, MsgAnalyst
)
)

Expand All @@ -57,22 +62,38 @@ import Database.Persist (Entity (Entity), insert, insert_)

import Model
( ultDestKey
, User (userName, User, userPassword, userFullName, userEmail), UserId
, UserId, User (userName, User, userPassword, userFullName, userEmail)
, UserPhoto (UserPhoto, userPhotoUser, userPhotoPhoto, userPhotoMime)
, EntityField (UserPhotoUser)
, EntityField (UserPhotoUser, StaffUser, RoleStaff, RoleName)
, Staff (Staff), Role
)

import Database.Esqueleto.Experimental
(selectOne, from, table, where_
, (^.), (==.), val
(Value (Value), selectOne, from, table, where_
, (^.), (==.), val, just, select, distinct
)

import Settings.StaticFiles (img_add_photo_alternate_FILL0_wght400_GRAD0_opsz48_svg)
import Settings.StaticFiles
( img_add_photo_alternate_FILL0_wght400_GRAD0_opsz48_svg )


getProfileR :: Handler Html
getProfileR = do
getProfileR :: UserId -> Handler Html
getProfileR uid = do
user <- maybeAuth
ult <- getUrlRender >>= \rndr -> fromMaybe (rndr HomeR) <$> lookupSession ultDestKey

empl <- runDB $ selectOne $ do
x <- from $ table @Staff
where_ $ x ^. StaffUser ==. just (val uid)
return x

jobs <- case empl of
Just (Entity eid _) -> runDB $ select $ distinct $ do
x <- from $ table @Role
where_ $ x ^. RoleStaff ==. val eid
return $ x ^. RoleName
Nothing -> return []

defaultLayout $ do
setTitleI MsgUserProfile
$(widgetFile "profile")
Expand Down
2 changes: 1 addition & 1 deletion templates/about/about.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto} loading=lazy
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/business/about/about.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<div.mdc-dialog__scrim>

$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/business/brand/brand.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div.mdc-dialog__scrim>

$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/business/business.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div.mdc-dialog__scrim>

$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/business/contact/contacts.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<div.mdc-dialog__scrim>

$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/business/schedule/calendar/calendar.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/business/schedule/hours/hours.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/contacts/contacts.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div.mdc-dialog__scrim>

$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/services/services.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $if null sids
<i.material-symbols-outlined>search
$if null sids
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/staff/staff.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<span.mdc-icon-button__focus-ring>
<i.material-symbols-outlined>search
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/users/users.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<span.mdc-icon-button__focus-ring>
<i.material-symbols-outlined>search
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/appointments/appointments.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<span.mdc-icon-button__focus-ring>
<i.material-symbols-outlined>search
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/appointments/calendar/page.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<span.mdc-icon-button__focus-ring>
<i.material-symbols-outlined>search
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/appointments/login.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end role=toolbar>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
onerror="this.src = '@{PhotoPlaceholderR}'">
Expand Down
2 changes: 1 addition & 1 deletion templates/auth/403.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end role=toolbar>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto} loading=lazy
Expand Down
2 changes: 1 addition & 1 deletion templates/auth/403admin.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end role=toolbar>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto} loading=lazy
Expand Down
2 changes: 1 addition & 1 deletion templates/auth/403analyst.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end role=toolbar>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto} loading=lazy
Expand Down
2 changes: 1 addition & 1 deletion templates/auth/403empl.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end role=toolbar>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto} loading=lazy
Expand Down
2 changes: 1 addition & 1 deletion templates/book/customer/banner.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/book/customer/customer.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/book/end.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/book/offers/banner.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<span.mdc-icon-button__focus-ring>
<i.material-symbols-outlined>search
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/book/offers/offers.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<span.mdc-icon-button__focus-ring>
<i.material-symbols-outlined>search
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/book/staff/banner.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/book/staff/staff.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/book/time/banner.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/book/time/time.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/contacts/contact.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end role=toolbar>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto}
Expand Down
2 changes: 1 addition & 1 deletion templates/homepage.hamlet
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<section.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end>
$maybe Entity uid _ <- user
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR} role=button title=_{MsgUserProfile}>
<a.mdc-top-app-bar__action-item.mdc-icon-button href=@{ProfileR uid} role=button title=_{MsgUserProfile}>
<span.mdc-icon-button__ripple>
<span.mdc-icon-button__focus-ring>
<img src=@{AccountPhotoR uid} style="clip-path:circle(50%)" alt=_{MsgPhoto} loading=lazy
Expand Down
Loading

0 comments on commit f18e3bd

Please sign in to comment.