working #31
@@ -41,7 +41,7 @@
|
||||
<img [src]="newListing.logo" />
|
||||
<!-- Need to fix for image file upload -->
|
||||
<div id="FileUploadPlaceholder" ></div>
|
||||
<input type="file" (change)="onFileSelected($event)" accept="image/*" />
|
||||
<input name="file" type="file" (change)="onFileSelected($event)" accept="image/*" />
|
||||
|
||||
<button type="button" (click)="prevStep()">Back</button>
|
||||
<button type="button" (click)="nextStep()">Next</button>
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
<div class="half-frame">
|
||||
<label>Company Phone Number</label>
|
||||
<input class="input-field" name="email" [(ngModel)]="newListing.phone" type="text" placeholder="+1 800-000-0000" />
|
||||
<input class="input-field" name="phone" [(ngModel)]="newListing.phone" type="text" placeholder="+1 800-000-0000" />
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" (click)="prevStep()">Back</button>
|
||||
|
||||
@@ -30,8 +30,19 @@ export class CompanyEditorComponent {
|
||||
};
|
||||
|
||||
ngOnInit(){
|
||||
// Query param CompanyID -> Edit
|
||||
// Query param null -> New
|
||||
this.route.queryParams.subscribe(params => {
|
||||
const CompanyID = params['CompanyID'] ? +params['CompanyID'] : null;
|
||||
if (CompanyID !== null){
|
||||
this.http.get<Company>("api/company?CompanyID=" + CompanyID).subscribe({
|
||||
next: data => {
|
||||
this.newListing = data;
|
||||
},
|
||||
error: err => {
|
||||
this.ErrorMsg = err.error;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngAfterViewInit(){
|
||||
|
||||
Reference in New Issue
Block a user