Skip to main content
The specialist dashboard provides comprehensive tools for managing appointments, configuring availability, viewing client history, and adding diagnoses.

Dashboard overview

The SpecialistPageComponent serves as the main dashboard for specialists:
specialist-page.component.ts:9-20
@Component({
  selector: 'app-specialist-page',
  imports: [SplashComponent, UserInformationCardComponent, AppointmentsPendingComponent],
  templateUrl: './specialist-page.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class SpecialistPageComponent {
  private readonly authFacade = inject(AuthFacade);
  readonly user: Signal<UserBase | null> = this.authFacade.user;
  readonly isCheckingAuth: Signal<boolean> = this.authFacade.isCheckingAuth;
}

Key features

Manage appointments

View, update, and complete client appointments

Set availability

Configure working hours and available time slots

Add diagnoses

Record diagnosis details for completed appointments

View client history

Access complete appointment history for returning clients

Specialist model

Specialists have additional properties beyond the base user model:
specialist.model.ts:3-8
export interface Specialist extends UserBase {
  specialties: Specialty[];
  availability: Availability[];
  availabilityName: string; // From "AVAILABILITY_PRESETS_OPTIONS"
}

Specialties

Specialists can offer multiple services:
specialty.model.ts:1-7
export interface Specialty {
  id: string;
  name: string;
  description: string;
  active: boolean;
}
Examples include:
  • Haircut
  • Beard trim
  • Hair coloring
  • Styling
  • Hair treatment
Specialists can add or remove specialties from their profile to reflect their current service offerings.

Appointment management

Viewing appointments

The dashboard displays pending appointments prominently using the AppointmentsPendingComponent:
  • Upcoming appointment details
  • Client information
  • Specialty and service details
  • Appointment date and time
  • Quick action buttons

Loading specialist appointments

Appointments are automatically loaded based on the specialist’s ID:
appointment.facade.ts:92-98
let appointments: Appointment[] = [];
if (user.role === UserRoles.CLIENT) {
  console.log(user.id)
  appointments = await this.appointmentService.getForClient(user.id);
} else if (user.role === UserRoles.SPECIALIST) {
  appointments = await this.appointmentService.getForSpecialist(user.id);
}

Filtering by status

Specialists can filter appointments by status:
appointment.facade.ts:168-185
async getSpecialistAppointmentsByStatus(
  specialistId: string,
  statuses: AppointmentStatus[]
): Promise<Appointment[]> {
  this._loading.set(true);
  this._error.set(null);
  try {
    return await this.appointmentService.getForSpecialistByStatuses(
      specialistId,
      statuses
    );
  } catch (err: any) {
    this._error.set(err.message || 'Error al obtener los turnos por estado');
    return [];
  } finally {
    this._loading.set(false);
  }
}
View all scheduled appointments waiting to be completed

Date range queries

Specialists can query appointments within specific date ranges:
appointment.facade.ts:187-206
async getAppointmentsBySpecialistAndDateRange(
  specialistId: string,
  startDate: Date,
  endDate: Date
): Promise<Appointment[]> {
  this._loading.set(true);
  this._error.set(null);
  try {
    return await this.appointmentService.getAppointmentsBySpecialistAndDateRange(
      specialistId,
      startDate,
      endDate
    );
  } catch (err: any) {
    this._error.set(err.message || 'Error al obtener los turnos del especialista');
    return [];
  } finally {
    this._loading.set(false);
  }
}
This is useful for:
  • Reviewing weekly schedules
  • Generating monthly reports
  • Planning time off
  • Analyzing appointment patterns

Completing appointments

Specialists can mark appointments as completed and add diagnosis information:
1

Select appointment

Choose a pending appointment from the list
2

Complete appointment

Click the complete button to mark it as finished
3

Add diagnosis

Enter diagnosis details and optional annotations
diagnosis.model.ts:1-4
export interface Diagnosis {
  details: string;
  anotations?: string;
}
4

Save changes

The appointment is updated with the completed status and diagnosis

Updating appointment status

await appointmentFacade.updateAppointment(appointmentId, {
  status: AppointmentStatus.COMPLETED,
  diagnosis: {
    details: 'Haircut and beard trim completed successfully',
    anotations: 'Client requested shorter sides'
  }
});
Once an appointment is marked as completed, the client can rate the service.

Canceling appointments

Specialists can cancel appointments when necessary:
  1. Select the appointment to cancel
  2. Click the cancel button
  3. Provide a detailed cancellation reason
  4. Confirm the cancellation
The system records who canceled the appointment:
await appointmentFacade.updateAppointment(appointmentId, {
  status: AppointmentStatus.CANCELED,
  canceledBy: UserRoles.SPECIALIST,
  cancellationReason: 'Unexpected personal emergency'
});
Frequent cancellations may affect specialist ratings and client trust. Only cancel when absolutely necessary.

Managing availability

Specialists must configure their availability so clients can book appointments:

Availability model

Availability is stored as an array of time slots:
specialist.model.ts:5-6
availability: Availability[];
availabilityName: string; // From "AVAILABILITY_PRESETS_OPTIONS"

Preset schedules

Specialists can choose from preset availability templates:
  • Full-time: Monday-Friday, 9:00 AM - 6:00 PM
  • Part-time: Monday-Friday, 2:00 PM - 6:00 PM
  • Weekends: Saturday-Sunday, 10:00 AM - 5:00 PM
  • Custom: Define your own schedule

During registration

Specialists select their availability during account creation:
register-form.component.ts:128-129
// Specialist properties
specialties: [[], [Validators.required, Validators.minLength(1)]],
availability: [[], Validators.required],
Specialists can update their availability at any time through their profile settings.

Client history

Specialists can view complete appointment history for returning clients:
appointment.facade.ts:153-166
async loadCompletedAppointmentsByClientId(clientId: string): Promise<void> {
  this._loading.set(true);
  this._error.set(null);
  try {
    const appointments = await this.appointmentService.getCompletedForClient(
      clientId
    );
    this._viewedClientAppointments.set(appointments);
  } catch (err: any) {
    this._error.set(err.message || 'Error al obtener la historia del cliente.');
  } finally {
    this._loading.set(false);
  }
}
This feature provides:
  • Previous diagnoses and treatment notes
  • Service preferences
  • Rating history
  • Appointment frequency
Access to client history helps specialists provide personalized service and track treatment progress.

Profile management

Specialists can update their profile:

Editable fields

  • First name and last name
  • Phone number
  • Profile picture

Managing specialties

Specialists can add or remove specialties:
  1. Navigate to profile settings
  2. Open the specialty selector
  3. Select or deselect specialties
  4. Save changes
The system validates that at least one specialty is selected:
register-form.component.ts:143-147
specialties?.setValidators([
  Validators.required,
  Validators.minLength(1),
]);
availability?.setValidators([Validators.required]);

Dashboard components

User information card

Displays specialist profile:
  • Name and profile picture
  • Contact information
  • Specialties offered
  • Availability schedule

Appointments pending

Shows upcoming appointments with:
  • Client name and contact
  • Appointment date and time
  • Service requested
  • Action buttons (complete, cancel, view details)
The specialist dashboard provides quick navigation to:
  • Home: Return to main dashboard
  • Appointments: View all appointments with filtering
  • Clients: Access client list and history
  • Profile: Edit professional information
  • Logout: Sign out of the application

Appointment workflow

Typical specialist workflow:
1

Review schedule

Check pending appointments for the day/week
2

Prepare for appointments

Review client history if available
3

Complete service

Provide the requested service to the client
4

Add diagnosis

Record service details and any observations
5

Mark as completed

Update appointment status to completed
6

Wait for rating

Client can now rate the service

Reactive state management

The specialist dashboard uses Angular signals for real-time updates:
  • Automatic appointment list updates
  • Loading states during data operations
  • Error handling with notifications
  • Optimistic UI updates for better UX

Permissions

Specialists have access to: ✅ View own appointments ✅ Complete and cancel appointments ✅ Add diagnoses to completed appointments ✅ View client appointment history ✅ Update own profile and availability ❌ Book appointments (specialist-specific limitation) ❌ Access other specialists’ appointments ❌ Modify client information ❌ Delete appointments
Admin users have access to all specialist features plus additional administrative capabilities.

Next steps

Appointments

Deep dive into appointment management

User Roles

Understand all user roles and permissions

Build docs developers (and LLMs) love