Bug Fixing overall

This commit is contained in:
2024-05-06 20:13:09 +02:00
parent bb5a408cdc
commit 6b61c19bd7
52 changed files with 1926 additions and 1048 deletions

View File

@@ -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';