Customer Id: {{customer.customerId}}
+Name: {{customer.name}}
+Type: {{CustomerType[customer.customerType]}}
+ +Back \ No newline at end of file diff --git a/ui/src/app/customer-detail/customer-detail.component.scss b/ui/src/app/customer-detail/customer-detail.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/ui/src/app/customer-detail/customer-detail.component.spec.ts b/ui/src/app/customer-detail/customer-detail.component.spec.ts new file mode 100644 index 0000000..8ae027e --- /dev/null +++ b/ui/src/app/customer-detail/customer-detail.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CustomerDetailComponent } from './customer-detail.component'; + +describe('CustomerDetailComponent', () => { + let component: CustomerDetailComponent; + let fixture: ComponentFixture| Name | +Type | ++ |
|---|---|---|
| {{customer.name}} | +{{CustomerType[customer.customerType]}} | ++ Open + | +
JobId: {{job.jobId}}
+Customer: {{job.customer?.name ?? "Unknown"}}
+Customer Type: {{job.customer?.customerType !== null ? CustomerType[job.customer.customerType] : "Unknown" }}
Engineer: {{job.engineer}}
When: {{job.when | date:'shortDate'}}
diff --git a/ui/src/app/job-detail/job-detail.component.ts b/ui/src/app/job-detail/job-detail.component.ts index 0ce610d..134cc2c 100644 --- a/ui/src/app/job-detail/job-detail.component.ts +++ b/ui/src/app/job-detail/job-detail.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { JobService } from '../services/job.service'; import { JobModel } from '../models/job.model'; +import { CustomerType } from '../models/customer.model'; @Component({ selector: 'app-job-detail', @@ -13,6 +14,7 @@ export class JobDetailComponent implements OnInit { private jobId: number; public job: JobModel; + CustomerType = CustomerType; constructor( private route: ActivatedRoute, diff --git a/ui/src/app/job/job.component.html b/ui/src/app/job/job.component.html index 085c531..3fcb24e 100644 --- a/ui/src/app/job/job.component.html +++ b/ui/src/app/job/job.component.html @@ -6,6 +6,12 @@