export DB, Event creation, broker with city/state
This commit is contained in:
@@ -13,9 +13,9 @@ import { ValidatedInputComponent } from '../../../components/validated-input/val
|
||||
import { ValidatedNgSelectComponent } from '../../../components/validated-ng-select/validated-ng-select.component';
|
||||
import { ValidatedTextareaComponent } from '../../../components/validated-textarea/validated-textarea.component';
|
||||
import { ValidationMessagesService } from '../../../components/validation-messages.service';
|
||||
import { AuditService } from '../../../services/audit.service';
|
||||
import { HistoryService } from '../../../services/history.service';
|
||||
import { ListingsService } from '../../../services/listings.service';
|
||||
import { LogService } from '../../../services/log.service';
|
||||
import { MailService } from '../../../services/mail.service';
|
||||
import { SelectOptionsService } from '../../../services/select-options.service';
|
||||
import { UserService } from '../../../services/user.service';
|
||||
@@ -71,7 +71,7 @@ export class DetailsBusinessListingComponent {
|
||||
public keycloakService: KeycloakService,
|
||||
private validationMessagesService: ValidationMessagesService,
|
||||
private messageService: MessageService,
|
||||
private logService: LogService,
|
||||
private auditService: AuditService,
|
||||
public emailService: EMailService,
|
||||
) {
|
||||
this.router.events.subscribe(event => {
|
||||
@@ -89,12 +89,13 @@ export class DetailsBusinessListingComponent {
|
||||
this.user = await this.userService.getByMail(this.keycloakUser.email);
|
||||
this.mailinfo = createMailInfo(this.user);
|
||||
}
|
||||
this.auditService.createEvent({ listingId: this.listing.id, eventType: 'view', eventTimestamp: new Date(), userAgent: navigator.userAgent, userId: this.user?.email });
|
||||
try {
|
||||
this.listing = await lastValueFrom(this.listingsService.getListingById(this.id, 'business'));
|
||||
this.listingUser = await this.userService.getByMail(this.listing.email);
|
||||
this.description = this.sanitizer.bypassSecurityTrustHtml(this.listing.description);
|
||||
} catch (error) {
|
||||
this.logService.log({ severity: 'error', text: error.error.message });
|
||||
this.auditService.log({ severity: 'error', text: error.error.message });
|
||||
this.router.navigate(['notfound']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ import { ValidatedInputComponent } from '../../../components/validated-input/val
|
||||
import { ValidatedNgSelectComponent } from '../../../components/validated-ng-select/validated-ng-select.component';
|
||||
import { ValidatedTextareaComponent } from '../../../components/validated-textarea/validated-textarea.component';
|
||||
import { ValidationMessagesService } from '../../../components/validation-messages.service';
|
||||
import { AuditService } from '../../../services/audit.service';
|
||||
import { HistoryService } from '../../../services/history.service';
|
||||
import { ImageService } from '../../../services/image.service';
|
||||
import { ListingsService } from '../../../services/listings.service';
|
||||
import { LogService } from '../../../services/log.service';
|
||||
import { MailService } from '../../../services/mail.service';
|
||||
import { SelectOptionsService } from '../../../services/select-options.service';
|
||||
import { UserService } from '../../../services/user.service';
|
||||
@@ -80,7 +80,7 @@ export class DetailsCommercialPropertyListingComponent {
|
||||
private ngZone: NgZone,
|
||||
private validationMessagesService: ValidationMessagesService,
|
||||
private messageService: MessageService,
|
||||
private logService: LogService,
|
||||
private auditService: AuditService,
|
||||
private emailService: EMailService,
|
||||
) {
|
||||
this.mailinfo = { sender: {}, email: '', url: environment.mailinfoUrl };
|
||||
@@ -116,7 +116,7 @@ export class DetailsCommercialPropertyListingComponent {
|
||||
this.images.push(new ImageItem({ src: imageURL, thumb: imageURL }));
|
||||
});
|
||||
} catch (error) {
|
||||
this.logService.log({ severity: 'error', text: error.error.message });
|
||||
this.auditService.log({ severity: 'error', text: error.error.message });
|
||||
this.router.navigate(['notfound']);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
@for (user of users; track user) {
|
||||
<div class="bg-white rounded-lg shadow-md p-6 flex flex-col justify-between">
|
||||
<div class="flex items-start space-x-4">
|
||||
<!-- <img src="https://placehold.co/80x105" alt="Portrait of Amanda Taylor, a professional woman with long dark hair" class="rounded-md w-20 h-26 object-cover" /> -->
|
||||
@if(user.hasProfile){
|
||||
<img src="{{ env.imageBaseUrl }}/pictures/profile/{{ emailToDirName(user.email) }}.avif?_ts={{ ts }}" class="rounded-md w-20 h-26 object-cover" />
|
||||
} @else {
|
||||
@@ -12,13 +11,17 @@
|
||||
}
|
||||
<div class="flex-1">
|
||||
<p class="text-sm text-gray-800 mb-2">{{ user.description }}</p>
|
||||
<h3 class="text-lg font-semibold">{{ user.firstname }} {{ user.lastname }}</h3>
|
||||
<app-customer-sub-type [customerSubType]="user.customerSubType"></app-customer-sub-type>
|
||||
<p class="text-sm text-gray-600 mt-1">{{ user.companyName }}</p>
|
||||
<h3 class="text-lg font-semibold">
|
||||
{{ user.firstname }} {{ user.lastname }}<span class="bg-gray-200 text-gray-700 text-xs font-semibold px-2 py-1 rounded ml-4">{{ user.location?.name }} - {{ user.location?.state }}</span>
|
||||
</h3>
|
||||
<div class="flex items-center space-x-2 mt-2">
|
||||
<app-customer-sub-type [customerSubType]="user.customerSubType"></app-customer-sub-type>
|
||||
<p class="text-sm text-gray-600">{{ user.companyName }}</p>
|
||||
</div>
|
||||
<div class="flex items-center justify-between my-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 flex justify-between items-center">
|
||||
<!-- <img src="https://placehold.co/35x45" alt="Lone Star Business Brokers logo" class="w-8 h-10 object-contain" /> -->
|
||||
@if(user.hasCompanyLogo){
|
||||
<img src="{{ env.imageBaseUrl }}/pictures/logo/{{ emailToDirName(user.email) }}.avif?_ts={{ ts }}" class="w-8 h-10 object-contain" />
|
||||
} @else {
|
||||
@@ -30,6 +33,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Component } from '@angular/core';
|
||||
import { Router, RouterModule } from '@angular/router';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
import { User } from '../../../../../bizmatch-server/src/models/db.model';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { AuditService } from '../../services/audit.service';
|
||||
import { UserService } from '../../services/user.service';
|
||||
import { map2User } from '../../utils/utils';
|
||||
|
||||
@@ -18,7 +18,7 @@ export class SuccessComponent {
|
||||
user: User;
|
||||
maxAttemptsReached: boolean = false; // Neue Variable hinzufügen
|
||||
|
||||
constructor(private keycloakService: KeycloakService, private userService: UserService, private logService: LogService, private router: Router) {}
|
||||
constructor(private keycloakService: KeycloakService, private userService: UserService, private auditService: AuditService, private router: Router) {}
|
||||
|
||||
async ngOnInit() {
|
||||
let email = null;
|
||||
@@ -35,7 +35,7 @@ export class SuccessComponent {
|
||||
|
||||
async checkSubscriptionPlan(email: string, error?: string) {
|
||||
if (!email) {
|
||||
this.logService.log({ severity: 'error', text: `Unauthorized Access to Success Page ${error}` });
|
||||
this.auditService.log({ severity: 'error', text: `Unauthorized Access to Success Page ${error}` });
|
||||
this.router.navigate(['home']);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user