-
Notifications
You must be signed in to change notification settings - Fork 24
feat(dashboard): implement practitioner dashboard overview with waitng and open consultations preview (#29) #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ng and open consultations preview (HCW-home#29)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have one consultation card component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed seperate component and created a reusable consultation card
practitioner/src/index.html
Outdated
@@ -6,8 +6,10 @@ | |||
<base href="/"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||
<link rel="icon" type="image/x-icon" href="favicon.ico"> | |||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet"> | |||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use local font and icon files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used local fonts
practitioner/src/app/app.routes.ts
Outdated
component: AppComponent, | ||
children: [ | ||
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' }, | ||
{ path: 'dashboard', component: DashboardComponent }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use router paths from Enum of RoutePaths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added enum of routePaths in constants in constants folder and used it
justify-content: center; | ||
align-items: center; | ||
height: 200px; | ||
background-color: #f9f9f9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace hardcoded color with variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created variables in root style.scss and used it everywhere
this.consultationService | ||
.getWaitingConsultations() | ||
.subscribe((consultations) => { | ||
this.waitingConsultations = consultations.slice(0, 5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not slice in frontend!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the slice logic
justify-content: center; | ||
|
||
>app-waiting-room-card, | ||
>app-open-consultations-card { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This styles should be removed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed !!
Hey @gorg16, Done with the changes as asked !! |
admin/src/app/app.component.html
Outdated
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", | ||
"Segoe UI Symbol"; | ||
font-family: Helvetica, Arial, sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove any style form app component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i see , actually i am not working in admin section , just changed the font part by mistake , but will remove style from it
practitioner/src/styles.scss
Outdated
border-width: 0; | ||
} | ||
|
||
:root { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use variables.scss for scss variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a new section of styles to keep styles organized
[consultations]="waitingConsultations" [routerLink]="'/waiting-room'"></app-consultation-card> | ||
|
||
<app-consultation-card [title]="'OPEN CONSULTATIONS'" [description]="'Consultations in progress'" | ||
[consultations]="openConsultations" [routerLink]="'/consultations'"></app-consultation-card> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should use your RoutePaths enum for all navigations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup used everywhere now!!
practitioner/src/styles/styles.scss
Outdated
body { | ||
font-family: sans-serif; | ||
color: #333; | ||
background-color: #f9f9f9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use your variables for colors
<h2>{{ title }}</h2> | ||
<p class="card-description">{{ description }}</p> | ||
|
||
<div *ngIf="consultations.length === 0" class="empty-state"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use @if instead of *ngIf same for other directives
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id: string; | ||
patientName: string; | ||
joinTime: Date; | ||
status: 'waiting' | 'active' | 'completed'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create enum for status and use here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created and used where ever it is needed
} | ||
|
||
@if (consultations.length > 5) { | ||
<button class="view-all-button" [routerLink]="routerLink"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have common button component which will get variant as an input and some other Inputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, created a new reusable element for button and added more sections
} | ||
} | ||
|
||
.view-all-button { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused styles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
earlier i have created this button but removed later as i moved button as a seperate component ,now removed its style as well
Description
Fix #29
Implements the Practitioner Dashboard overview screen as described in issue. This screen provides a quick glance at active consultations.
Features Implemented
Waiting Room card
Displays last 3–5 waiting consultations (patient joined, practitioner not yet)
Open Consultations card
Shows last 3–5 ongoing consultations
Includes patient name and join time
“View All” button
proof of work