Umbau zu tailwind + mobile friendly: LandingPage & Footer
This commit is contained in:
@@ -27,26 +27,27 @@ export class HomeComponent {
|
||||
minPrice: string;
|
||||
criteria: ListingCriteria;
|
||||
states = [];
|
||||
isMenuOpen = false;
|
||||
public constructor(private router: Router, private activatedRoute: ActivatedRoute, public selectOptions: SelectOptionsService, public keycloakService: KeycloakService, private listingsService: ListingsService) {
|
||||
this.criteria = onChange(getCriteriaStateObject(), getSessionStorageHandler);
|
||||
resetCriteria(this.criteria);
|
||||
}
|
||||
async ngOnInit() {
|
||||
if (this.activeTabAction === 'business' || this.activeTabAction === 'commercialProperty') {
|
||||
const statesResult = await this.listingsService.getAllStates(this.activeTabAction);
|
||||
this.states = statesResult.map(s => s.state).map(ls => ({ name: this.selectOptions.getState(ls as string), value: ls }));
|
||||
} else {
|
||||
this.states = [];
|
||||
}
|
||||
// if (this.activeTabAction === 'business' || this.activeTabAction === 'commercialProperty') {
|
||||
// const statesResult = await this.listingsService.getAllStates(this.activeTabAction);
|
||||
// this.states = statesResult.map(s => s.state).map(ls => ({ name: this.selectOptions.getState(ls as string), value: ls }));
|
||||
// } else {
|
||||
// this.states = [];
|
||||
// }
|
||||
}
|
||||
async changeTab(tabname: 'business' | 'commercialProperty' | 'broker') {
|
||||
this.activeTabAction = tabname;
|
||||
if (this.activeTabAction === 'business' || this.activeTabAction === 'commercialProperty') {
|
||||
const statesResult = await this.listingsService.getAllStates(this.activeTabAction);
|
||||
this.states = statesResult.map(s => s.state).map(ls => ({ name: this.selectOptions.getState(ls as string), value: ls }));
|
||||
} else {
|
||||
this.states = this.selectOptions.states;
|
||||
}
|
||||
// if (this.activeTabAction === 'business' || this.activeTabAction === 'commercialProperty') {
|
||||
// const statesResult = await this.listingsService.getAllStates(this.activeTabAction);
|
||||
// this.states = statesResult.map(s => s.state).map(ls => ({ name: this.selectOptions.getState(ls as string), value: ls }));
|
||||
// } else {
|
||||
// this.states = this.selectOptions.states;
|
||||
// }
|
||||
}
|
||||
search() {
|
||||
const data = { keep: true };
|
||||
@@ -61,4 +62,7 @@ export class HomeComponent {
|
||||
register() {
|
||||
this.keycloakService.register({ redirectUri: `${window.location.origin}/account` });
|
||||
}
|
||||
toggleMenu() {
|
||||
this.isMenuOpen = !this.isMenuOpen;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user