Skip to content

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

Merged
merged 13 commits into from
Apr 11, 2025

Conversation

Vaibhavsahu2810
Copy link
Contributor

@Vaibhavsahu2810 Vaibhavsahu2810 commented Apr 9, 2025

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

image

Copy link
Collaborator

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

Copy link
Contributor Author

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

@@ -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">
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used local fonts

component: AppComponent,
children: [
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },
Copy link
Collaborator

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

Copy link
Contributor Author

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;
Copy link
Collaborator

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

Copy link
Contributor Author

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);
Copy link
Collaborator

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!

Copy link
Contributor Author

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 {
Copy link
Collaborator

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed !!

@Vaibhavsahu2810
Copy link
Contributor Author

Vaibhavsahu2810 commented Apr 10, 2025

Hey @gorg16, Done with the changes as asked !!

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;
Copy link
Collaborator

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

Copy link
Contributor Author

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

border-width: 0;
}

:root {
Copy link
Collaborator

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

Copy link
Contributor Author

@Vaibhavsahu2810 Vaibhavsahu2810 Apr 10, 2025

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>
Copy link
Collaborator

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

Copy link
Contributor Author

@Vaibhavsahu2810 Vaibhavsahu2810 Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup used everywhere now!!

body {
font-family: sans-serif;
color: #333;
background-color: #f9f9f9;
Copy link
Collaborator

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">
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used @if, @for, and @else according to new syntax

id: string;
patientName: string;
joinTime: Date;
status: 'waiting' | 'active' | 'completed';
Copy link
Collaborator

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

Copy link
Contributor Author

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">
Copy link
Collaborator

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

Copy link
Contributor Author

@Vaibhavsahu2810 Vaibhavsahu2810 Apr 10, 2025

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 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused styles

Copy link
Contributor Author

@Vaibhavsahu2810 Vaibhavsahu2810 Apr 11, 2025

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

@gorg16 gorg16 merged commit 0fa36b3 into HCW-home:main Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Practitioner Dashboard overview with waiting and open consultations preview
2 participants