Skip to content

Commit 9f99505

Browse files
Dan WahlinDan Wahlin
Dan Wahlin
authored and
Dan Wahlin
committed
Removed unneeded properties for customer inserts.
1 parent d8fd8bd commit 9f99505

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

src/public/app/customers/customer-edit-reactive.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ export class CustomerEditReactiveComponent implements OnInit {
1515

1616
customerForm: FormGroup;
1717
customer: ICustomer = {
18-
_id: '',
1918
firstName: '',
2019
lastName: '',
2120
gender: '',
2221
address: '',
2322
email: '',
2423
city: '',
25-
stateId: 0,
2624
zip: 0
2725
};
2826
states: IState[];

src/public/app/customers/customer-edit.component.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,12 @@ import { ICustomer, IState } from '../shared/interfaces';
1212
export class CustomerEditComponent implements OnInit {
1313

1414
customer: ICustomer = {
15-
_id: '',
1615
firstName: '',
1716
lastName: '',
1817
gender: '',
1918
address: '',
2019
email: '',
2120
city: '',
22-
state: {
23-
abbreviation: '',
24-
name: ''
25-
},
26-
stateId: 0,
2721
zip: 0
2822
};
2923
states: IState[];

src/public/app/shared/interfaces.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { ModuleWithProviders } from '@angular/core';
22

33
export interface ICustomer {
4-
_id: string;
4+
_id?: string;
55
firstName: string;
66
lastName: string;
77
email: string;
88
address: string;
99
city: string;
1010
state?: IState;
11-
stateId: number;
11+
stateId?: number;
1212
zip: number;
1313
gender: string;
1414
orderCount?: number;

0 commit comments

Comments
 (0)