fix further bugs
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
<div class="text-900 w-full md:w-10">{{ listing.brokerLicencing }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
@if(listing && listingUser && (listingUser.id===listing?.userId || isAdmin())){
|
||||
@if(listing && listingUser && (listingUser?.email===user?.email || isAdmin())){
|
||||
<button pButton pRipple label="Edit" icon="pi pi-file-edit" class="w-auto" [routerLink]="['/editBusinessListing', listing.id]"></button>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@if(listing && listingUser && (listingUser.id===listing?.userId || isAdmin())){
|
||||
@if(listing && listingUser && (listingUser?.email===user?.email || isAdmin())){
|
||||
<button pButton pRipple label="Edit" icon="pi pi-file-edit" class="w-auto" [routerLink]="['/editCommercialPropertyListing', listing.id]"></button>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@if( user?.id===(user$| async)?.id || isAdmin()){
|
||||
@if( user?.email===(user$| async)?.email || isAdmin()){
|
||||
<button pButton pRipple label="Edit" icon="pi pi-file-edit" class="w-auto" [routerLink]="['/account', user.id]"></button>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -48,7 +48,7 @@ export class DetailsUserComponent {
|
||||
|
||||
async ngOnInit() {
|
||||
this.user = await this.userService.getById(this.id);
|
||||
|
||||
this.user.email;
|
||||
const results = await Promise.all([await this.listingsService.getListingByUserId(this.id, 'business'), await this.listingsService.getListingByUserId(this.id, 'commercialProperty')]);
|
||||
// Zuweisen der Ergebnisse zu den Member-Variablen der Klasse
|
||||
this.businessListings = results[0];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ChangeDetectorRef, Component } from '@angular/core';
|
||||
import { ConfirmationService, MessageService } from 'primeng/api';
|
||||
import { User } from '../../../../../../bizmatch-server/src/models/db.model';
|
||||
import { CommercialPropertyListing, User } from '../../../../../../bizmatch-server/src/models/db.model';
|
||||
import { ListingType } from '../../../../../../bizmatch-server/src/models/main.model';
|
||||
import { ListingsService } from '../../../services/listings.service';
|
||||
import { SelectOptionsService } from '../../../services/select-options.service';
|
||||
@@ -36,7 +36,11 @@ export class MyListingComponent {
|
||||
}
|
||||
|
||||
async deleteListing(listing: ListingType) {
|
||||
await this.listingsService.deleteListing(listing.id, listing.listingsCategory);
|
||||
if (listing.listingsCategory === 'business') {
|
||||
await this.listingsService.deleteBusinessListing(listing.id);
|
||||
} else {
|
||||
await this.listingsService.deleteCommercialPropertyListing(listing.id, (<CommercialPropertyListing>listing).imagePath);
|
||||
}
|
||||
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]];
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export class HistoryService {
|
||||
}
|
||||
|
||||
get canGoBack(): boolean {
|
||||
return !!this.previousUrl;
|
||||
return !!this.previousUrl || window.history.length > 2;
|
||||
}
|
||||
|
||||
goBack(): void {
|
||||
|
||||
@@ -31,12 +31,16 @@ export class ListingsService {
|
||||
}
|
||||
}
|
||||
async getAllStates(listingsCategory?: 'business' | 'commercialProperty'): Promise<StatesResult[]> {
|
||||
const result = lastValueFrom(this.http.get<StatesResult[]>(`${this.apiBaseUrl}/bizmatch/listings/${listingsCategory}/states/all`));
|
||||
const result = lastValueFrom(this.http.get<StatesResult[]>(`${this.apiBaseUrl}/bizmatch/listings/business/states/all`));
|
||||
return result;
|
||||
}
|
||||
async deleteListing(id: string, listingsCategory: 'business' | 'professionals_brokers' | 'commercialProperty') {
|
||||
await lastValueFrom(this.http.delete<ListingType>(`${this.apiBaseUrl}/bizmatch/listings/${listingsCategory}/${id}`));
|
||||
async deleteBusinessListing(id: string) {
|
||||
await lastValueFrom(this.http.delete<ListingType>(`${this.apiBaseUrl}/bizmatch/listings/business/${id}`));
|
||||
}
|
||||
async deleteCommercialPropertyListing(id: string, imagePath: string) {
|
||||
await lastValueFrom(this.http.delete<ListingType>(`${this.apiBaseUrl}/bizmatch/listings/commercialProperty/${id}/${imagePath}`));
|
||||
}
|
||||
|
||||
async getPropertyImages(id: string): Promise<string[]> {
|
||||
return await lastValueFrom(this.http.get<string[]>(`${this.apiBaseUrl}/bizmatch/image/${id}`));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Build information, automatically generated by `the_build_script` :zwinkern:
|
||||
const build = {
|
||||
timestamp: 'NA',
|
||||
timestamp: "GER: 16.05.2024 22:55 | TX: 05/16/2024 3:55 PM"
|
||||
};
|
||||
|
||||
export default build;
|
||||
export default build;
|
||||
@@ -1,29 +1,29 @@
|
||||
@import "primeng/resources/primeng.css";
|
||||
@import 'primeng/resources/primeng.css';
|
||||
@import 'primeicons/primeicons.css';
|
||||
// @import 'primeflex/primeflex.scss';
|
||||
@import "primeflex/primeflex.css";
|
||||
@import 'primeflex/primeflex.css';
|
||||
@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');
|
||||
@import "primeng/resources/themes/lara-light-blue/theme.css";
|
||||
@import "@fortawesome/fontawesome-free/css/all.min.css";
|
||||
@import 'primeng/resources/themes/lara-light-blue/theme.css';
|
||||
@import '@fortawesome/fontawesome-free/css/all.min.css';
|
||||
|
||||
:root {
|
||||
--text-color-secondary:rgba(255, 255, 255);
|
||||
--wrapper-width:1491px;
|
||||
// --secondary-color: #ffffff; /* Setzt die secondary Farbe auf weiß */
|
||||
--text-color-secondary: rgba(255, 255, 255);
|
||||
--wrapper-width: 1491px;
|
||||
// --secondary-color: #ffffff; /* Setzt die secondary Farbe auf weiß */
|
||||
}
|
||||
.p-button.p-button-secondary.p-button-outlined{
|
||||
color: #ffffff;;
|
||||
.p-button.p-button-secondary.p-button-outlined {
|
||||
color: #ffffff;
|
||||
}
|
||||
html,
|
||||
body,
|
||||
app-root {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
app-root {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
h1,
|
||||
@@ -32,47 +32,54 @@ h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body, input, button, select, textarea {
|
||||
// font-family: 'Open Sans', sans-serif;
|
||||
font-family: var(--font-family);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
body,
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
textarea {
|
||||
// font-family: 'Open Sans', sans-serif;
|
||||
font-family: var(--font-family);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
*:focus,
|
||||
.p-focus {
|
||||
box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
p-menubarsub ul {
|
||||
gap: 4px;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
width: 3px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(155, 155, 155, 0.5);
|
||||
border-radius: 20px;
|
||||
border: transparent;
|
||||
background-color: rgba(155, 155, 155, 0.5);
|
||||
border-radius: 20px;
|
||||
border: transparent;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: var(--wrapper-width);
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
width: var(--wrapper-width);
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
.p-editor-container .ql-toolbar {
|
||||
background: #f9fafb;
|
||||
border-top-right-radius: 6px;
|
||||
border-top-left-radius: 6px;
|
||||
}
|
||||
.p-dropdown-panel .p-dropdown-header .p-dropdown-filter {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
.p-editor-container .ql-toolbar{
|
||||
background: #f9fafb;
|
||||
border-top-right-radius: 6px;
|
||||
border-top-left-radius: 6px;
|
||||
}
|
||||
Reference in New Issue
Block a user