Skip to content

Commit

Permalink
rm address & city
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-mange committed Feb 5, 2020
1 parent a1abf88 commit 99a6c65
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 33 deletions.
3 changes: 0 additions & 3 deletions app/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ class CustomerCreateQBOSerializer(serializers.Serializer):
last_name = serializers.CharField()
email = serializers.CharField()
phone = serializers.IntegerField()
address_line1 = serializers.CharField(required=False, allow_blank=True, allow_null=True)
address_line2 = serializers.CharField(required=False, allow_blank=True, allow_null=True)
city = serializers.CharField(required=False, allow_blank=True, allow_null=True)
zip = serializers.CharField()
crm = serializers.ChoiceField(choices=[crm[0] for crm in CRMS])

Expand Down
3 changes: 0 additions & 3 deletions app/api/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ def _populate_customer(self, customer: Customer, data: dict):
phone = PhoneNumber()
phone.FreeFormNumber = data['phone']
address = Address()
address.Line1 = data.get('address_line1')
address.Line2 = data.get('address_line2')
address.City = data.get('city')
address.PostalCode = data['zip']

customer.PrimaryEmailAddr = email
Expand Down
3 changes: 0 additions & 3 deletions ng/src/app/customer-edit/customer-edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ export class CustomerEditComponent implements OnInit {
email: this.api.estimateData.email,
phone: this.api.estimateData.phone,
crm: this.api.estimateData.crm,
address_line1: this.api.estimateData.address_line1,
address_line2: this.api.estimateData.address_line2,
city: this.api.estimateData.city,
zip: this.api.estimateData.zip,
};
}
Expand Down
15 changes: 0 additions & 15 deletions ng/src/app/customer-form/customer-form.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,6 @@
<label for="phone">Phone</label>
<input minlength="10" maxlength="10" class="form-control" [class.is-invalid]="form.controls.phone.dirty && !form.controls.phone.valid" id="phone" formControlName="phone" autocomplete="false">
</div>
<!-- address line 1 -->
<div class="form-group">
<label for="addressLine1">Address Line 1</label>
<input type="text" class="form-control" id="addressLine1" [class.is-invalid]="form.controls.address_line1.dirty && !form.controls.address_line1.valid" formControlName="address_line1">
</div>
<!-- address line 2 -->
<div class="form-group">
<label for="addressLine2">Address Line 2</label>
<input type="text" class="form-control" id="addressLine2" [class.is-invalid]="form.controls.address_line2.dirty && !form.controls.address_line2.valid" formControlName="address_line2">
</div>
<!-- city -->
<div class="form-group">
<label for="city">City</label>
<input type="text" class="form-control" id="city" [class.is-invalid]="form.controls.city.dirty && !form.controls.city.valid" formControlName="city">
</div>
<!-- zip -->
<div class="form-group">
<label for="zip">Zip</label>
Expand Down
3 changes: 0 additions & 3 deletions ng/src/app/customer-form/customer-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ export class CustomerFormComponent implements OnInit {
email: new FormControl(this.initial.email, [Validators.email, Validators.required]),
phone: new FormControl(phone, [Validators.pattern(/^\d{10}$/), Validators.required]),
crm: [this.initial.crm, Validators.required],
address_line1: [this.initial.address_line1],
address_line2: [this.initial.address_line2],
city: [this.initial.city],
zip: [this.initial.zip, Validators.required],
});
}
Expand Down
3 changes: 0 additions & 3 deletions ng/src/app/customer-search/customer-search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ export class CustomerSearchComponent implements OnInit {
last_name: this.customer.FamilyName,
email: this.customer.PrimaryEmailAddr ? this.customer.PrimaryEmailAddr.Address : '',
phone: this._getFirstPhoneNumberFromQBOCustomer(),
address_line1: this.customer.BillAddr ? this.customer.BillAddr.Line1 : '',
address_line2: this.customer.BillAddr ? this.customer.BillAddr.Line2 : '',
zip: this.customer.BillAddr ? this.customer.BillAddr.PostalCode : '',
city: this.customer.BillAddr ? this.customer.BillAddr.City : '',
crm: this.customer.ResaleNum,
});
this.api.fetchInvoices({customer_id: this.customer.Id}).subscribe(
Expand Down
3 changes: 0 additions & 3 deletions ng/src/app/estimate-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ export type EstimateData = {
last_name?: string,
email?: string,
phone?: number,
address_line1?: string,
address_line2?: string,
city?: string,
state?: string,
zip?: string,
main_concern?: string,
Expand Down

0 comments on commit 99a6c65

Please sign in to comment.