Skip to content

Commit

Permalink
feat: Add schedule status do patient detail
Browse files Browse the repository at this point in the history
  • Loading branch information
andreroggeri committed Jan 23, 2021
1 parent 0767a06 commit a5592b3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/app/patient/patient-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@
<td mat-cell *matCellDef="let schedule"> {{schedule.date | date:'dd/MM/yy H:mm' }} </td>
</ng-container>

<ng-container matColumnDef="scheduleStatus">
<th mat-header-cell *matHeaderCellDef> Status </th>
<td mat-cell *matCellDef="let schedule">
<app-schedule-status [status]="schedule.status"></app-schedule-status>
</td>
</ng-container>

<tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr>
<tr mat-row class="actionable" *matRowDef="let rowData; columns: columnsToDisplay"
(click)="viewSchedule(rowData)">
Expand Down
2 changes: 2 additions & 0 deletions src/app/patient/patient-detail.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { of } from 'rxjs';
import { ClinicService } from '../clinic/clinic.service';
import { DentalPlanService } from '../dental-plan/dental-plan.service';
import { DataTablePagerModule } from '../shared/components/pager/datatable-pager.module';
import { SharedComponentsModule } from '../shared/components/shared-components.module';
import { DirectivesModule } from '../shared/directives/directives.module';
import { MaterialAppModule } from '../shared/material.app.module';
import { ClinicDatabase } from '../shared/testing/databases/clinic.database';
Expand Down Expand Up @@ -45,6 +46,7 @@ describe('PatientDetailComponent', () => {
DataTablePagerModule,
HttpClientTestingModule,
RouterTestingModule,
SharedComponentsModule,
],
declarations: [PatientDetailComponent],
providers: [
Expand Down
2 changes: 1 addition & 1 deletion src/app/patient/patient-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class PatientDetailComponent extends BaseComponent implements OnInit {
isSubmitting = false;
filteredPlans: Observable<IPagedResponse<IDentalPlanResponse>>;
datasource: PatientSchedulesDataSource;
columnsToDisplay = ['scheduleDate'];
columnsToDisplay = ['scheduleDate', 'scheduleStatus'];

constructor(
private dialog: MatDialog,
Expand Down
2 changes: 2 additions & 0 deletions src/app/patient/patient.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { NgxMaskModule } from 'ngx-mask';
import { ClinicService } from '../clinic/clinic.service';
import { DentalPlanService } from '../dental-plan/dental-plan.service';
import { DataTablePagerModule } from '../shared/components/pager/datatable-pager.module';
import { SharedComponentsModule } from '../shared/components/shared-components.module';
import { DirectivesModule } from '../shared/directives/directives.module';
import { AuthGuard } from '../shared/guards/auth.guard';
import { MaterialAppModule } from '../shared/material.app.module';
Expand All @@ -32,6 +33,7 @@ export const patientRoutes: Routes = [
DataTablePagerModule,
DirectivesModule,
NgxMaskModule,
SharedComponentsModule,
],
declarations: [
PatientComponent,
Expand Down

0 comments on commit a5592b3

Please sign in to comment.