Skip to content

Commit

Permalink
Added Home Facility name beside doctors name while assigning doctor i…
Browse files Browse the repository at this point in the history
…n Consutation Page (coronasafe#3897)

* Added Home Facility name beside doctors name while assigning doctor in Consutation Page

* refactored the code

* Update src/Components/Common/OnlineUsersSelect.tsx

Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>
  • Loading branch information
2 people authored and aeswibon committed Dec 8, 2022
1 parent 3c9404e commit 4cdec34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Components/Common/OnlineUsersSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ export const OnlineUsersSelect = (props: Props) => {
}
></span>
<span className="font-normal block truncate">
{user.first_name} {user.last_name}
{user.first_name} {user.last_name}{" "}
{user.home_facility_object?.name &&
<span className="text-gray-700 ml-2">{user.home_facility_object?.name}</span>
}
</span>
</div>
{user.id?.toString() == userId && (
Expand Down
5 changes: 5 additions & 0 deletions src/Components/Users/models.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
interface HomeFacilityObjectModel {
id?: string;
name?: string;
}
export interface UserModel {
id?: number;
username?: string;
Expand All @@ -15,4 +19,5 @@ export interface UserModel {
is_superuser?: boolean;
verified?: boolean;
last_login?: Date;
home_facility_object?: HomeFacilityObjectModel;
}

0 comments on commit 4cdec34

Please sign in to comment.