-
+
diff --git a/bizmatch/src/app/components/search-modal/search-modal.component.scss b/bizmatch/src/app/components/search-modal/search-modal.component.scss
index e69de29..6613ac2 100644
--- a/bizmatch/src/app/components/search-modal/search-modal.component.scss
+++ b/bizmatch/src/app/components/search-modal/search-modal.component.scss
@@ -0,0 +1,6 @@
+::ng-deep .ng-select.custom .ng-select-container {
+ --tw-bg-opacity: 1;
+ background-color: rgb(249 250 251 / var(--tw-bg-opacity));
+ height: 46px;
+ border-radius: 0.5rem;
+}
diff --git a/bizmatch/src/app/components/search-modal/search-modal.component.ts b/bizmatch/src/app/components/search-modal/search-modal.component.ts
index 6084705..638bf81 100644
--- a/bizmatch/src/app/components/search-modal/search-modal.component.ts
+++ b/bizmatch/src/app/components/search-modal/search-modal.component.ts
@@ -1,5 +1,6 @@
import { AsyncPipe, NgIf } from '@angular/common';
import { Component } from '@angular/core';
+import { NgSelectModule } from '@ng-select/ng-select';
import { BusinessListingCriteria, CommercialPropertyListingCriteria, KeyValue, KeyValueStyle, UserListingCriteria } from '../../../../../bizmatch-server/src/models/main.model';
import { SelectOptionsService } from '../../services/select-options.service';
import { SharedModule } from '../../shared/shared/shared.module';
@@ -8,8 +9,9 @@ import { ModalService } from './modal.service';
@Component({
selector: 'app-search-modal',
standalone: true,
- imports: [SharedModule, AsyncPipe, NgIf],
+ imports: [SharedModule, AsyncPipe, NgIf, NgSelectModule],
templateUrl: './search-modal.component.html',
+ styleUrl: './search-modal.component.scss',
})
export class SearchModalComponent {
constructor(public selectOptions: SelectOptionsService, public modalService: ModalService) {}
diff --git a/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.ts b/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.ts
index 9ef33e3..b1d9be6 100644
--- a/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.ts
+++ b/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.ts
@@ -20,7 +20,7 @@ import { getCriteriaStateObject, getSessionStorageHandler, map2User } from '../.
imports: [SharedModule],
providers: [],
templateUrl: './details-business-listing.component.html',
- styleUrl: './details-business-listing.component.scss',
+ styleUrl: '../details.scss',
})
export class DetailsBusinessListingComponent {
// listings: Array;
@@ -70,7 +70,7 @@ export class DetailsBusinessListingComponent {
}
});
this.mailinfo = { sender: {}, email: '', url: environment.mailinfoUrl };
- this.criteria = onChange(getCriteriaStateObject('business'), getSessionStorageHandler);
+ this.criteria = onChange(getCriteriaStateObject('business'), getSessionStorageHandler.bind('business'));
}
async ngOnInit() {
diff --git a/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.scss b/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.scss
deleted file mode 100644
index fa2ba82..0000000
--- a/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.scss
+++ /dev/null
@@ -1,53 +0,0 @@
-::ng-deep p {
- display: block;
- margin-top: 1em;
- margin-bottom: 1em;
- margin-left: 0;
- margin-right: 0;
- font-size: 1rem; /* oder 1rem, abhängig vom Browser und den Standardeinstellungen */
- line-height: 1.5;
-}
-::ng-deep h1 {
- display: block;
- font-size: 2em; /* etwa 32px */
- margin-top: 0.67em;
- margin-bottom: 0.67em;
- margin-left: 0;
- margin-right: 0;
- font-weight: bold;
-}
-::ng-deep h2 {
- display: block;
- font-size: 1.5em; /* etwa 24px */
- margin-top: 0.83em;
- margin-bottom: 0.83em;
- margin-left: 0;
- margin-right: 0;
- font-weight: bold;
-}
-::ng-deep h3 {
- display: block;
- font-size: 1.17em; /* etwa 18.72px */
- margin-top: 1em;
- margin-bottom: 1em;
- margin-left: 0;
- margin-right: 0;
- font-weight: bold;
-}
-::ng-deep ul {
- display: block;
- list-style-type: disc; /* listet Punkte (•) vor jedem Listenelement auf */
- margin-top: 1em;
- margin-bottom: 1em;
- margin-left: 0;
- margin-right: 0;
- padding-left: 40px; /* Standard-Einrückung für Listen */
-}
-::ng-deep li {
- display: list-item; /* Zeigt das Element als Listenelement an */
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- margin-bottom: 0;
- padding-left: 0;
-}
diff --git a/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.ts b/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.ts
index 6e00fc8..b7ee178 100644
--- a/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.ts
+++ b/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.ts
@@ -3,7 +3,6 @@ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import { ActivatedRoute, Router } from '@angular/router';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { KeycloakService } from 'keycloak-angular';
-import onChange from 'on-change';
import { lastValueFrom } from 'rxjs';
import { CommercialPropertyListing, User } from '../../../../../../bizmatch-server/src/models/db.model';
import { CommercialPropertyListingCriteria, ErrorResponse, KeycloakUser, MailInfo } from '../../../../../../bizmatch-server/src/models/main.model';
@@ -15,7 +14,7 @@ import { MailService } from '../../../services/mail.service';
import { SelectOptionsService } from '../../../services/select-options.service';
import { UserService } from '../../../services/user.service';
import { SharedModule } from '../../../shared/shared/shared.module';
-import { getCriteriaStateObject, getSessionStorageHandler, map2User } from '../../../utils/utils';
+import { map2User } from '../../../utils/utils';
@Component({
selector: 'app-details-commercial-property-listing',
@@ -23,7 +22,7 @@ import { getCriteriaStateObject, getSessionStorageHandler, map2User } from '../.
imports: [SharedModule],
providers: [],
templateUrl: './details-commercial-property-listing.component.html',
- styleUrl: './details-commercial-property-listing.component.scss',
+ styleUrl: '../details.scss',
})
export class DetailsCommercialPropertyListingComponent {
responsiveOptions = [
@@ -73,7 +72,7 @@ export class DetailsCommercialPropertyListingComponent {
) {
this.mailinfo = { sender: {}, email: '', url: environment.mailinfoUrl };
- this.criteria = onChange(getCriteriaStateObject('commercialProperty'), getSessionStorageHandler);
+ // this.criteria = onChange(getCriteriaStateObject('commercialProperty'), getSessionStorageHandler);
}
async ngOnInit() {
diff --git a/bizmatch/src/app/pages/details/details-user/details-user.component.scss b/bizmatch/src/app/pages/details/details-user/details-user.component.scss
deleted file mode 100644
index fa2ba82..0000000
--- a/bizmatch/src/app/pages/details/details-user/details-user.component.scss
+++ /dev/null
@@ -1,53 +0,0 @@
-::ng-deep p {
- display: block;
- margin-top: 1em;
- margin-bottom: 1em;
- margin-left: 0;
- margin-right: 0;
- font-size: 1rem; /* oder 1rem, abhängig vom Browser und den Standardeinstellungen */
- line-height: 1.5;
-}
-::ng-deep h1 {
- display: block;
- font-size: 2em; /* etwa 32px */
- margin-top: 0.67em;
- margin-bottom: 0.67em;
- margin-left: 0;
- margin-right: 0;
- font-weight: bold;
-}
-::ng-deep h2 {
- display: block;
- font-size: 1.5em; /* etwa 24px */
- margin-top: 0.83em;
- margin-bottom: 0.83em;
- margin-left: 0;
- margin-right: 0;
- font-weight: bold;
-}
-::ng-deep h3 {
- display: block;
- font-size: 1.17em; /* etwa 18.72px */
- margin-top: 1em;
- margin-bottom: 1em;
- margin-left: 0;
- margin-right: 0;
- font-weight: bold;
-}
-::ng-deep ul {
- display: block;
- list-style-type: disc; /* listet Punkte (•) vor jedem Listenelement auf */
- margin-top: 1em;
- margin-bottom: 1em;
- margin-left: 0;
- margin-right: 0;
- padding-left: 40px; /* Standard-Einrückung für Listen */
-}
-::ng-deep li {
- display: list-item; /* Zeigt das Element als Listenelement an */
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- margin-bottom: 0;
- padding-left: 0;
-}
diff --git a/bizmatch/src/app/pages/details/details-user/details-user.component.ts b/bizmatch/src/app/pages/details/details-user/details-user.component.ts
index 7d01357..dd4834a 100644
--- a/bizmatch/src/app/pages/details/details-user/details-user.component.ts
+++ b/bizmatch/src/app/pages/details/details-user/details-user.component.ts
@@ -19,7 +19,7 @@ import { formatPhoneNumber, map2User } from '../../../utils/utils';
standalone: true,
imports: [SharedModule],
templateUrl: './details-user.component.html',
- styleUrl: './details-user.component.scss',
+ styleUrl: '../details.scss',
})
export class DetailsUserComponent {
private id: string | undefined = this.activatedRoute.snapshot.params['id'] as string | undefined;
diff --git a/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.scss b/bizmatch/src/app/pages/details/details.scss
similarity index 89%
rename from bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.scss
rename to bizmatch/src/app/pages/details/details.scss
index fa2ba82..b0dba7a 100644
--- a/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.scss
+++ b/bizmatch/src/app/pages/details/details.scss
@@ -1,4 +1,4 @@
-::ng-deep p {
+:host ::ng-deep p {
display: block;
margin-top: 1em;
margin-bottom: 1em;
@@ -7,7 +7,7 @@
font-size: 1rem; /* oder 1rem, abhängig vom Browser und den Standardeinstellungen */
line-height: 1.5;
}
-::ng-deep h1 {
+:host ::ng-deep h1 {
display: block;
font-size: 2em; /* etwa 32px */
margin-top: 0.67em;
@@ -16,7 +16,7 @@
margin-right: 0;
font-weight: bold;
}
-::ng-deep h2 {
+:host ::ng-deep h2 {
display: block;
font-size: 1.5em; /* etwa 24px */
margin-top: 0.83em;
@@ -25,7 +25,7 @@
margin-right: 0;
font-weight: bold;
}
-::ng-deep h3 {
+:host ::ng-deep h3 {
display: block;
font-size: 1.17em; /* etwa 18.72px */
margin-top: 1em;
@@ -34,7 +34,7 @@
margin-right: 0;
font-weight: bold;
}
-::ng-deep ul {
+:host ::ng-deep ul {
display: block;
list-style-type: disc; /* listet Punkte (•) vor jedem Listenelement auf */
margin-top: 1em;
@@ -43,7 +43,7 @@
margin-right: 0;
padding-left: 40px; /* Standard-Einrückung für Listen */
}
-::ng-deep li {
+:host ::ng-deep li {
display: list-item; /* Zeigt das Element als Listenelement an */
margin-left: 0;
margin-right: 0;
diff --git a/bizmatch/src/app/pages/home/home.component.ts b/bizmatch/src/app/pages/home/home.component.ts
index db546a6..6b58610 100644
--- a/bizmatch/src/app/pages/home/home.component.ts
+++ b/bizmatch/src/app/pages/home/home.component.ts
@@ -7,7 +7,7 @@ import onChange from 'on-change';
import { BusinessListingCriteria, CommercialPropertyListingCriteria, KeycloakUser, UserListingCriteria } from '../../../../../bizmatch-server/src/models/main.model';
import { ListingsService } from '../../services/listings.service';
import { SelectOptionsService } from '../../services/select-options.service';
-import { getCriteriaStateObject, getSessionStorageHandler, map2User } from '../../utils/utils';
+import { getCriteriaStateObject, getSessionStorageHandlerWrapper, map2User } from '../../utils/utils';
@Component({
selector: 'app-home',
standalone: true,
@@ -26,7 +26,7 @@ export class HomeComponent {
user: KeycloakUser;
prompt: string;
public constructor(private router: Router, private activatedRoute: ActivatedRoute, public selectOptions: SelectOptionsService, public keycloakService: KeycloakService, private listingsService: ListingsService) {
- this.criteria = onChange(getCriteriaStateObject('business'), getSessionStorageHandler);
+ this.criteria = onChange(getCriteriaStateObject('business'), getSessionStorageHandlerWrapper(this.activeTabAction));
}
async ngOnInit() {
const token = await this.keycloakService.getToken();
diff --git a/bizmatch/src/app/pages/listings/broker-listings/broker-listings.component.ts b/bizmatch/src/app/pages/listings/broker-listings/broker-listings.component.ts
index c30fe23..3e3e6eb 100644
--- a/bizmatch/src/app/pages/listings/broker-listings/broker-listings.component.ts
+++ b/bizmatch/src/app/pages/listings/broker-listings/broker-listings.component.ts
@@ -10,7 +10,7 @@ import { ImageService } from '../../../services/image.service';
import { ListingsService } from '../../../services/listings.service';
import { SelectOptionsService } from '../../../services/select-options.service';
import { UserService } from '../../../services/user.service';
-import { getCriteriaStateObject, getSessionStorageHandler } from '../../../utils/utils';
+import { getCriteriaStateObject, getSessionStorageHandlerWrapper } from '../../../utils/utils';
@Component({
selector: 'app-broker-listings',
@@ -49,7 +49,7 @@ export class BrokerListingsComponent {
private imageService: ImageService,
private route: ActivatedRoute,
) {
- this.criteria = onChange(getCriteriaStateObject('user'), getSessionStorageHandler);
+ this.criteria = onChange(getCriteriaStateObject('broker'), getSessionStorageHandlerWrapper('broker'));
this.route.data.subscribe(async () => {
if (this.router.getCurrentNavigation().extras.state) {
} else {
diff --git a/bizmatch/src/app/pages/listings/business-listings/business-listings.component.ts b/bizmatch/src/app/pages/listings/business-listings/business-listings.component.ts
index 19051f9..8d7181a 100644
--- a/bizmatch/src/app/pages/listings/business-listings/business-listings.component.ts
+++ b/bizmatch/src/app/pages/listings/business-listings/business-listings.component.ts
@@ -9,7 +9,7 @@ import { environment } from '../../../../environments/environment';
import { ImageService } from '../../../services/image.service';
import { ListingsService } from '../../../services/listings.service';
import { SelectOptionsService } from '../../../services/select-options.service';
-import { getCriteriaStateObject, getSessionStorageHandler } from '../../../utils/utils';
+import { getCriteriaStateObject, getSessionStorageHandlerWrapper } from '../../../utils/utils';
@Component({
selector: 'app-business-listings',
@@ -45,7 +45,7 @@ export class BusinessListingsComponent {
private imageService: ImageService,
private route: ActivatedRoute,
) {
- this.criteria = onChange(getCriteriaStateObject('business'), getSessionStorageHandler);
+ this.criteria = onChange(getCriteriaStateObject('business'), getSessionStorageHandlerWrapper('business'));
this.route.data.subscribe(async () => {
if (this.router.getCurrentNavigation().extras.state) {
} else {
@@ -59,6 +59,7 @@ export class BusinessListingsComponent {
//initFlowbite();
}
async init() {
+ this.reset();
const statesResult = await this.listingsService.getAllStates('business');
this.states = statesResult.map(ls => ({ name: this.selectOptions.getState(ls.state as string), value: ls.state, count: ls.count }));
this.search();
diff --git a/bizmatch/src/app/pages/listings/commercial-property-listings/commercial-property-listings.component.ts b/bizmatch/src/app/pages/listings/commercial-property-listings/commercial-property-listings.component.ts
index 5705004..32903d7 100644
--- a/bizmatch/src/app/pages/listings/commercial-property-listings/commercial-property-listings.component.ts
+++ b/bizmatch/src/app/pages/listings/commercial-property-listings/commercial-property-listings.component.ts
@@ -9,7 +9,7 @@ import { environment } from '../../../../environments/environment';
import { ImageService } from '../../../services/image.service';
import { ListingsService } from '../../../services/listings.service';
import { SelectOptionsService } from '../../../services/select-options.service';
-import { getCriteriaStateObject, getSessionStorageHandler } from '../../../utils/utils';
+import { getCriteriaStateObject, getSessionStorageHandlerWrapper } from '../../../utils/utils';
@Component({
selector: 'app-commercial-property-listings',
@@ -44,7 +44,7 @@ export class CommercialPropertyListingsComponent {
private imageService: ImageService,
private route: ActivatedRoute,
) {
- this.criteria = onChange(getCriteriaStateObject('commercialProperty'), getSessionStorageHandler);
+ this.criteria = onChange(getCriteriaStateObject('commercialProperty'), getSessionStorageHandlerWrapper('commercialProperty'));
this.route.data.subscribe(async () => {
if (this.router.getCurrentNavigation().extras.state) {
} else {
diff --git a/bizmatch/src/app/pages/subscription/account/account.component.scss b/bizmatch/src/app/pages/subscription/account/account.component.scss
index fbf9cd1..7640bee 100644
--- a/bizmatch/src/app/pages/subscription/account/account.component.scss
+++ b/bizmatch/src/app/pages/subscription/account/account.component.scss
@@ -37,6 +37,6 @@
quill-editor {
width: 100%;
}
-::ng-deep .ng-select.ng-select-single .ng-select-container {
+:host ::ng-deep .ng-select.ng-select-single .ng-select-container {
height: 42px;
}
diff --git a/bizmatch/src/app/pages/subscription/edit-business-listing/edit-business-listing.component.scss b/bizmatch/src/app/pages/subscription/edit-business-listing/edit-business-listing.component.scss
index f45ae5c..81411a5 100644
--- a/bizmatch/src/app/pages/subscription/edit-business-listing/edit-business-listing.component.scss
+++ b/bizmatch/src/app/pages/subscription/edit-business-listing/edit-business-listing.component.scss
@@ -8,7 +8,7 @@
// margin: 0 auto;
// }
-::ng-deep quill-editor {
+:host ::ng-deep quill-editor {
.ql-container {
min-height: 200px;
}
diff --git a/bizmatch/src/app/utils/utils.ts b/bizmatch/src/app/utils/utils.ts
index 1b9bb20..88e4d52 100644
--- a/bizmatch/src/app/utils/utils.ts
+++ b/bizmatch/src/app/utils/utils.ts
@@ -164,11 +164,20 @@ export function formatPhoneNumber(phone: string): string {
}
return phone;
}
-export const getSessionStorageHandler = function (path, value, previous, applyData) {
- sessionStorage.setItem('criteria', JSON.stringify(this));
+// export const getSessionStorageHandler = function (path, value, previous, applyData) {
+// sessionStorage.setItem(applyData, JSON.stringify(this));
+// };
+export const getSessionStorageHandler = function (criteriaType, path, value, previous, applyData) {
+ sessionStorage.setItem(`${criteriaType}_criteria`, JSON.stringify(this));
+ console.log('Zusätzlicher Parameter:', criteriaType);
+};
+export const getSessionStorageHandlerWrapper = param => {
+ return function (path, value, previous, applyData) {
+ getSessionStorageHandler.call(this, param, path, value, previous, applyData);
+ };
};
-export function getCriteriaStateObject(criteriaType: 'business' | 'commercialProperty' | 'user') {
+export function getCriteriaStateObject(criteriaType: 'business' | 'commercialProperty' | 'broker') {
let initialState;
if (criteriaType === 'business') {
initialState = createEmptyBusinessListingCriteria();
@@ -177,7 +186,7 @@ export function getCriteriaStateObject(criteriaType: 'business' | 'commercialPro
} else {
initialState = createEmptyUserListingCriteria();
}
- const storedState = sessionStorage.getItem('criteria');
+ const storedState = sessionStorage.getItem(`${criteriaType}_criteria`);
return storedState ? JSON.parse(storedState) : initialState;
}