show all listings, Bug Fixes
This commit is contained in:
@@ -80,7 +80,9 @@ export class AccountComponent {
|
||||
printInvoice(invoice: Invoice) {}
|
||||
|
||||
async updateProfile(user: User) {
|
||||
this.user.licensedIn = this.userLicensedIn.map(l => `${l.name}|${l.value}`);
|
||||
await this.userService.save(this.user);
|
||||
this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'Acount changes have been persisted', life: 3000 });
|
||||
}
|
||||
|
||||
onUploadCompanyLogo(event: any) {
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
@for (image of propertyImages; track image) {
|
||||
<span cdkDropList mixedCdkDropList>
|
||||
<div cdkDrag mixedCdkDragSizeHelper class="image-wrap">
|
||||
<img src="property/{{ listing.id }}/{{ image }}" [alt]="image" class="shadow-2" cdkDrag />
|
||||
<img src="property/{{ listing.imagePath }}/{{ image }}" [alt]="image" class="shadow-2" cdkDrag />
|
||||
<fa-icon [icon]="faTrash" (click)="deleteConfirm(image)"></fa-icon>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<tr>
|
||||
<td class="wide-column line-height-3">{{ listing.title }}</td>
|
||||
<td>{{ selectOptions.getListingsCategory(listing.listingsCategory) }}</td>
|
||||
<td>{{ selectOptions.getState(listing.city) }}</td>
|
||||
<td>{{ selectOptions.getState(listing.state) }}</td>
|
||||
<td>
|
||||
@if(isBusinessListing(listing)){
|
||||
<button pButton pRipple icon="pi pi-pencil" class="p-button-rounded p-button-success mr-2" [routerLink]="['/editBusinessListing', listing.id]"></button>
|
||||
|
||||
@@ -34,12 +34,14 @@ export class MyListingComponent {
|
||||
const keycloakUser = this.userService.getKeycloakUser();
|
||||
const email = keycloakUser.email;
|
||||
this.user = await this.userService.getByMail(email);
|
||||
this.myListings = await this.listingsService.getListingByUserId(this.user.id);
|
||||
const result = await Promise.all([await this.listingsService.getListingByUserId(this.user.id, 'business'), await this.listingsService.getListingByUserId(this.user.id, 'commercialProperty')]);
|
||||
this.myListings = [...result[0], ...result[1]];
|
||||
}
|
||||
|
||||
async deleteListing(listing: ListingType) {
|
||||
await this.listingsService.deleteListing(listing.id, getListingType(listing));
|
||||
this.myListings = await this.listingsService.getListingByUserId(this.user.id);
|
||||
const result = await Promise.all([await this.listingsService.getListingByUserId(this.user.id, 'business'), await this.listingsService.getListingByUserId(this.user.id, 'commercialProperty')]);
|
||||
this.myListings = [...result[0], ...result[1]];
|
||||
}
|
||||
|
||||
confirm(event: Event, listing: ListingType) {
|
||||
|
||||
Reference in New Issue
Block a user