Skip to content

Commit

Permalink
Add information whether patient has logged in (#77)
Browse files Browse the repository at this point in the history
# Add information whether patient has logged in

## ♻️ Current situation & Problem
There is no information on the patient page whether patient has
successfully logged in or is it just invitation.

## ⚙️ Release Notes 
* Add information whether patient has logged in

### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
arkadiuszbachorski authored Oct 21, 2024
1 parent 544babd commit 88f794f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions routes/~_dashboard/~patients/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ export const getUserActivity = async ({
return {
lastActiveDate: user.lastActiveDate,
latestQuestionnaireDate: latestQuestionnaires.at(0)?.authored,
isInvitation: resourceType === 'invitation',
}
}

Expand Down
9 changes: 8 additions & 1 deletion routes/~_dashboard/~patients/~$id/UserActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
// SPDX-License-Identifier: MIT
//
import { Clock, FileQuestion } from 'lucide-react'
import { Clock, FileQuestion, Mail } from 'lucide-react'
import { type ReactNode } from 'react'
import {
Card,
Expand Down Expand Up @@ -42,6 +42,13 @@ export const UserActivity = ({ activity }: UserActivityProps) => (
</CardHeader>
<div className="px-5 pb-4 marker:text-primary">
<ul className="flex list-disc flex-col gap-4">
{activity.isInvitation && (
<ActivityRow
icon={<Mail className="size-5" />}
label="Invitation"
value="patient has not yet logged in"
/>
)}
<ActivityRow
icon={<Clock className="size-5" />}
label="Latest activity"
Expand Down

0 comments on commit 88f794f

Please sign in to comment.