Bug Fixing overall
This commit is contained in:
@@ -85,6 +85,7 @@ export class EditBusinessListingComponent {
|
||||
draggedImage: ImageProperty;
|
||||
faTrash = faTrash;
|
||||
data: CommercialPropertyListing;
|
||||
typesOfBusiness = [];
|
||||
constructor(
|
||||
public selectOptions: SelectOptionsService,
|
||||
private router: Router,
|
||||
@@ -109,10 +110,13 @@ export class EditBusinessListingComponent {
|
||||
this.data = this.router.getCurrentNavigation().extras.state['data'];
|
||||
}
|
||||
});
|
||||
this.typesOfBusiness = selectOptions.typesOfBusiness.map(e => {
|
||||
return { name: e.name, value: parseInt(e.value) };
|
||||
});
|
||||
}
|
||||
async ngOnInit() {
|
||||
if (this.mode === 'edit') {
|
||||
this.listing = await lastValueFrom(this.listingsService.getListingById(this.id));
|
||||
this.listing = await lastValueFrom(this.listingsService.getListingById(this.id, 'business'));
|
||||
} else {
|
||||
this.listing = createGenericObject<BusinessListing>();
|
||||
this.listing.listingsCategory = 'business';
|
||||
|
||||
Reference in New Issue
Block a user