mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-12-23 20:15:13 +00:00
Compare commits
No commits in common. "b1db97af877ef646f0b340c84bb4b0cd438f27d6" and "0bc02ee9ea1a40fef8fa3cba08da38eecf7e2963" have entirely different histories.
b1db97af87
...
0bc02ee9ea
|
@ -11,7 +11,7 @@
|
||||||
<!-- About Section Content-->
|
<!-- About Section Content-->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-4 ms-auto"><p class="lead">You follow the same passion as we do and you want to find alternatives to the de-facto monopolist Amazon?</p></div>
|
<div class="col-lg-4 ms-auto"><p class="lead">You follow the same passion as we do and you want to find alternatives to the de-facto monopolist Amazon?</p></div>
|
||||||
<div class="col-lg-4 me-auto"><p class="lead">In this case, welcome aboard! We’re happy that you share our passion and hope that we can help you achieving this goal with the website.</p></div>
|
<div class="col-lg-4 me-auto"><p class="lead">In this case, welcome aboard! We’re happy that you share our passion and hope that we can help you achieving this goal with the website</p></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-about-us',
|
selector: 'app-about-us',
|
||||||
templateUrl: './about-us.component.html',
|
templateUrl: './about-us.component.html',
|
||||||
styleUrls: ['./about-us.component.css']
|
styleUrls: ['./about-us.component.css']
|
||||||
})
|
})
|
||||||
export class AboutUsComponent implements OnInit {
|
export class AboutUsComponent implements OnInit {
|
||||||
|
|
||||||
constructor() {
|
constructor() { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,47 +1,44 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import {ApiService} from '../../../services/api.service';
|
import {ApiService} from "../../../services/api.service";
|
||||||
import {Router} from '@angular/router';
|
import {Router} from "@angular/router";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-registration',
|
selector: 'app-registration',
|
||||||
templateUrl: './registration.component.html',
|
templateUrl: './registration.component.html',
|
||||||
styleUrls: ['./registration.component.css']
|
styleUrls: ['./registration.component.css']
|
||||||
})
|
})
|
||||||
export class RegistrationComponent implements OnInit {
|
export class RegistrationComponent implements OnInit {
|
||||||
form: any;
|
form: any;
|
||||||
loading = false;
|
loading = false;
|
||||||
submitted = false;
|
submitted = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private api: ApiService,
|
private api : ApiService,
|
||||||
private router: Router
|
private router: Router
|
||||||
) {
|
) { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.form = this.formBuilder.group({
|
this.form = this.formBuilder.group({
|
||||||
username: ['', Validators.required],
|
username: ['', Validators.required],
|
||||||
email: ['', Validators.required],
|
email: ['', Validators.required],
|
||||||
password: ['', [
|
password: ['', [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
Validators.minLength(8)]
|
Validators.minLength(8)]
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
get me() {
|
get me() { return this.form.controls; }
|
||||||
return this.form.controls;
|
|
||||||
}
|
|
||||||
|
|
||||||
onSubmit(): void {
|
onSubmit() {
|
||||||
this.api.registerUser(this.form.value.username, this.form.value.password, this.form.value.email).subscribe(
|
this.api.registerUser(this.form.value.username, this.form.value.password, this.form.value.email).subscribe(
|
||||||
res => {
|
res=> {
|
||||||
this.api.saveSessionInfoToLocalStorage(res);
|
this.api.saveSessionInfoToLocalStorage(res);
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-resetpasswort',
|
selector: 'app-resetpasswort',
|
||||||
templateUrl: './resetpasswort.component.html',
|
templateUrl: './resetpasswort.component.html',
|
||||||
styleUrls: ['./resetpasswort.component.css']
|
styleUrls: ['./resetpasswort.component.css']
|
||||||
})
|
})
|
||||||
export class ResetpasswortComponent implements OnInit {
|
export class ResetpasswortComponent implements OnInit {
|
||||||
|
|
||||||
constructor() {
|
constructor() { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-bottom-bar',
|
selector: 'app-bottom-bar',
|
||||||
templateUrl: './bottom-bar.component.html',
|
templateUrl: "./bottom-bar.component.html",
|
||||||
styleUrls: ['./bottom-bar.component.css']
|
styleUrls: ["./bottom-bar.component.css"]
|
||||||
})
|
})
|
||||||
export class BottomBarComponent implements OnInit {
|
export class BottomBarComponent implements OnInit {
|
||||||
|
|
||||||
constructor() {
|
constructor() { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-copyright',
|
selector: 'app-copyright',
|
||||||
templateUrl: './copyright.component.html',
|
templateUrl: './copyright.component.html',
|
||||||
styleUrls: ['./copyright.component.css']
|
styleUrls: ['./copyright.component.css']
|
||||||
})
|
})
|
||||||
export class CopyrightComponent implements OnInit {
|
export class CopyrightComponent implements OnInit {
|
||||||
|
|
||||||
constructor() {
|
constructor() { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,23 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-footer',
|
selector: 'app-footer',
|
||||||
templateUrl: './footer.component.html',
|
templateUrl: './footer.component.html',
|
||||||
styleUrls: ['./footer.component.css']
|
styleUrls: ['./footer.component.css']
|
||||||
})
|
})
|
||||||
export class FooterComponent implements OnInit {
|
export class FooterComponent implements OnInit {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute
|
private route: ActivatedRoute
|
||||||
) {
|
) {}
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
navigateImprint(): void {
|
navigateImprint(): void {
|
||||||
this.router.navigate([('/impressum')]);
|
this.router.navigate([('/impressum')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-greeting-info-slider',
|
selector: 'app-greeting-info-slider',
|
||||||
templateUrl: './greeting-info-slider.component.html',
|
templateUrl: './greeting-info-slider.component.html',
|
||||||
styleUrls: ['./greeting-info-slider.component.css']
|
styleUrls: ['./greeting-info-slider.component.css']
|
||||||
})
|
})
|
||||||
export class GreetingInfoSliderComponent implements OnInit {
|
export class GreetingInfoSliderComponent implements OnInit {
|
||||||
|
|
||||||
constructor() {
|
constructor() { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<section class="page-section portfolio" id="top-gesuchte">
|
<section class="page-section portfolio" id="top-gesuchte">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- Portfolio Section Heading-->
|
<!-- Portfolio Section Heading-->
|
||||||
<h2 class="page-section-heading text-center text-uppercase text-secondary mb-0">TOP-OFFERS</h2>
|
<h2 class="page-section-heading text-center text-uppercase text-secondary mb-0">TOP-SEARCHES</h2>
|
||||||
<!-- Icon Divider-->
|
<!-- Icon Divider-->
|
||||||
<div class="divider-custom">
|
<div class="divider-custom">
|
||||||
<div class="divider-custom-line"></div>
|
<div class="divider-custom-line"></div>
|
||||||
|
|
|
@ -4,9 +4,9 @@ import {Product} from '../../models/product';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-hot-deals-widget',
|
selector: 'app-hot-deals-widget',
|
||||||
templateUrl: './hot-deals-widget.component.html',
|
templateUrl: './hot-deals-widget.component.html',
|
||||||
styleUrls: ['./hot-deals-widget.component.css']
|
styleUrls: ['./hot-deals-widget.component.css']
|
||||||
})
|
})
|
||||||
export class HotDealsWidgetComponent implements OnInit {
|
export class HotDealsWidgetComponent implements OnInit {
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ export class HotDealsWidgetComponent implements OnInit {
|
||||||
default: {
|
default: {
|
||||||
this.getProductsByIds();
|
this.getProductsByIds();
|
||||||
this.getAmazonPricesForBestDeals();
|
this.getAmazonPricesForBestDeals();
|
||||||
this.getVendors();
|
this.getVendors()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ export class HotDealsWidgetComponent implements OnInit {
|
||||||
deals => {
|
deals => {
|
||||||
deals.forEach(deal => {
|
deals.forEach(deal => {
|
||||||
this.bestDealsProductIds.push(deal.product_id);
|
this.bestDealsProductIds.push(deal.product_id);
|
||||||
this.productsPricesMap [deal.product_id] = {lowestPrice: deal};
|
this.productsPricesMap [deal.product_id] = {lowestPrice: deal}
|
||||||
});
|
});
|
||||||
this.loadParams();
|
this.loadParams();
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ export class HotDealsWidgetComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getAmazonPricesForBestDeals(): void {
|
getAmazonPricesForBestDeals(): void{
|
||||||
this.bestDealsProductIds.forEach(id => {
|
this.bestDealsProductIds.forEach(id => {
|
||||||
this.apiService.getAmazonPrice(id).subscribe(
|
this.apiService.getAmazonPrice(id).subscribe(
|
||||||
price => {
|
price => {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
|
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
|
||||||
<div class="portfolio-item-caption-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
|
<div class="portfolio-item-caption-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<img width="100%" class="productImage" src="assets/images/cropped-unknown-1-1.png"/>
|
<img class="productImage" src="assets/images/Betterzon.svg"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-4 mb-5">
|
<div class="col-md-6 col-lg-4 mb-5">
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
|
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
|
||||||
<div class="portfolio-item-caption-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
|
<div class="portfolio-item-caption-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<img width="100%" class="productImage" src="assets/images/plantshub.jpg"/>
|
<img class="productImage" src="assets/images/Betterzon.svg"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-4 mb-5">
|
<div class="col-md-6 col-lg-4 mb-5">
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
|
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
|
||||||
<div class="portfolio-item-caption-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
|
<div class="portfolio-item-caption-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<img width="70%" class="productImage" src="assets/images/CeangalLogo.png"/>
|
<img class="productImage" src="assets/images/Betterzon.svg"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,9 +4,9 @@ import {Product} from '../../models/product';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-kunden',
|
selector: 'app-kunden',
|
||||||
templateUrl: './kunden.component.html',
|
templateUrl: './kunden.component.html',
|
||||||
styleUrls: ['./kunden.component.css']
|
styleUrls: ['./kunden.component.css']
|
||||||
})
|
})
|
||||||
export class KundenComponent implements OnInit {
|
export class KundenComponent implements OnInit {
|
||||||
products: Product[] = [];
|
products: Product[] = [];
|
||||||
|
|
|
@ -46,7 +46,7 @@ export class ProductDetailsComponent implements OnInit {
|
||||||
this.getProduct();
|
this.getProduct();
|
||||||
this.getVendors();
|
this.getVendors();
|
||||||
this.getPrices();
|
this.getPrices();
|
||||||
if (this.apiService.getSessionInfoFromLocalStorage().session_id != '') {
|
if (this.apiService.getSessionInfoFromLocalStorage().session_id != "") {
|
||||||
this.isLoggedIn = true;
|
this.isLoggedIn = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,10 +123,10 @@ export class ProductDetailsComponent implements OnInit {
|
||||||
return Math.round(percentage);
|
return Math.round(percentage);
|
||||||
}
|
}
|
||||||
|
|
||||||
setPriceAlarm(): void {
|
setPriceAlarm() {
|
||||||
this.apiService.createPriceAlarms(this.productId, this.price * 100).subscribe(
|
this.apiService.createPriceAlarms(this.productId, this.price*100).subscribe(
|
||||||
alarms => console.log(alarms)
|
alarms => console.log(alarms)
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,3 @@ table, th, td {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #0d5a4b;
|
color: #0d5a4b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit {
|
|
||||||
width: 5%;
|
|
||||||
height: 5%;
|
|
||||||
}
|
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
{{alarm.defined_price/100}}€
|
{{alarm.defined_price/100}}€
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<img class="delete" src="../assets/images/pencil.png">
|
<img class="delete" src="../assets/images/Delete_icon-icons.com_55931.png" (click)="delete(alarm.alarm_id)">
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<img class="delete" src="../assets/images/Delete_icon-icons.com_55931.png" (click)="delete(alarm.alarm_id)">
|
<img class="delete" src="../assets/images/Delete_icon-icons.com_55931.png" (click)="delete(alarm.alarm_id)">
|
||||||
|
|
|
@ -1,26 +1,25 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import {ApiService} from '../../services/api.service';
|
import {ApiService} from "../../services/api.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-profile',
|
selector: 'app-profile',
|
||||||
templateUrl: './profile.component.html',
|
templateUrl: './profile.component.html',
|
||||||
styleUrls: ['./profile.component.css']
|
styleUrls: ['./profile.component.css']
|
||||||
})
|
})
|
||||||
export class ProfileComponent implements OnInit {
|
export class ProfileComponent implements OnInit {
|
||||||
|
|
||||||
currentUser: any;
|
currentUser: any;
|
||||||
obj: any;
|
obj:any;
|
||||||
alarms: any [];
|
alarms: any [];
|
||||||
productsMap: any = {};
|
productsMap: any = {};
|
||||||
|
|
||||||
constructor(private api: ApiService) {
|
constructor(private api: ApiService ) { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
||||||
this.api.getUserInfo().subscribe(
|
this.api.getUserInfo().subscribe(
|
||||||
user => {
|
user=> {
|
||||||
this.currentUser = user;
|
this.currentUser = user
|
||||||
console.log(this.currentUser);
|
console.log(this.currentUser);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -31,33 +30,29 @@ export class ProfileComponent implements OnInit {
|
||||||
getPriceAlarms(): void {
|
getPriceAlarms(): void {
|
||||||
this.api.getPriceAlarms().subscribe(
|
this.api.getPriceAlarms().subscribe(
|
||||||
alarms => {
|
alarms => {
|
||||||
this.alarms = alarms;
|
this.alarms = alarms
|
||||||
this.getProductsByIds();
|
this.getProductsByIds()
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getProductsByIds(): void {
|
getProductsByIds(): void {
|
||||||
const productIds: number [] = [];
|
let productIds: number [] = [];
|
||||||
this.alarms.forEach(
|
this.alarms.forEach(
|
||||||
alarm => {
|
alarm => {productIds.push(alarm.product_id)}
|
||||||
productIds.push(alarm.product_id);
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
this.api.getProductsByIds(productIds).subscribe(
|
this.api.getProductsByIds(productIds).subscribe(
|
||||||
products => {
|
products => {
|
||||||
products.forEach(
|
products.forEach(
|
||||||
product => {
|
product => {this.productsMap[product.product_id] = product}
|
||||||
this.productsMap[product.product_id] = product;
|
)
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
delete(id: number): void {
|
delete(id:number): void {
|
||||||
this.api.deletePriceAlarm(id).subscribe(
|
this.api.deletePriceAlarm(id).subscribe(
|
||||||
res => window.location.reload()
|
res => window.location.reload()
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-slider-for-products',
|
selector: 'app-slider-for-products',
|
||||||
templateUrl: './slider-for-products.component.html',
|
templateUrl: './slider-for-products.component.html',
|
||||||
styleUrls: ['./slider-for-products.component.css']
|
styleUrls: ['./slider-for-products.component.css']
|
||||||
})
|
})
|
||||||
export class SliderForProductsComponent implements OnInit {
|
export class SliderForProductsComponent implements OnInit {
|
||||||
|
|
||||||
constructor() {
|
constructor() { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||||
<ul class="navbar-nav ms-auto">
|
<ul class="navbar-nav ms-auto">
|
||||||
<li class="nav-item mx-0 mx-lg-1"><a class="nav-link py-3 px-0 px-lg-3 rounded" href="#top-gesuchte">top-offers</a></li>
|
<li class="nav-item mx-0 mx-lg-1"><a class="nav-link py-3 px-0 px-lg-3 rounded" href="#top-gesuchte">top-searches</a></li>
|
||||||
<li class="nav-item mx-0 mx-lg-1"><a class="nav-link py-3 px-0 px-lg-3 rounded" href="#about">about</a></li>
|
<li class="nav-item mx-0 mx-lg-1"><a class="nav-link py-3 px-0 px-lg-3 rounded" href="#about">about</a></li>
|
||||||
<li class="nav-item mx-0 mx-lg-1"><a class="nav-link py-3 px-0 px-lg-3 rounded" href="#unsere-kunden">our clients</a></li>
|
<li class="nav-item mx-0 mx-lg-1"><a class="nav-link py-3 px-0 px-lg-3 rounded" href="#unsere-kunden">our clients</a></li>
|
||||||
<li class="nav-item mx-0 mx-lg-1" *ngIf="!isLoggedIn"><a class="nav-link py-3 px-0 px-lg-3 rounded" routerLink="/signin">sign in</a></li>
|
<li class="nav-item mx-0 mx-lg-1" *ngIf="!isLoggedIn"><a class="nav-link py-3 px-0 px-lg-3 rounded" routerLink="/signin">sign in</a></li>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Component, Input, OnInit} from '@angular/core';
|
import {Component, Input, OnInit} from '@angular/core';
|
||||||
import {ApiService} from '../../services/api.service';
|
import {ApiService} from "../../services/api.service";
|
||||||
import {NavigationEnd, Router} from '@angular/router';
|
import {Router} from "@angular/router";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -20,12 +20,13 @@ export class TopBarComponent implements OnInit {
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit() {
|
||||||
|
|
||||||
this.api.getUserInfo().subscribe(data => {
|
this.api.getUserInfo().subscribe(data => {
|
||||||
console.log(data);
|
console.log(data)
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.api.getSessionInfoFromLocalStorage().session_id !== '') {
|
if (this.api.getSessionInfoFromLocalStorage().session_id != "") {
|
||||||
this.isLoggedIn = true;
|
this.isLoggedIn = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,11 +34,7 @@ export class TopBarComponent implements OnInit {
|
||||||
logout(): void {
|
logout(): void {
|
||||||
localStorage.setItem('session_id', '');
|
localStorage.setItem('session_id', '');
|
||||||
localStorage.setItem('session_key', '');
|
localStorage.setItem('session_key', '');
|
||||||
if (this.router.url === '/profile') {
|
window.location.reload()
|
||||||
this.router.navigate(['/']);
|
|
||||||
} else {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getSearchedProducts(): void {
|
getSearchedProducts(): void {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 51 KiB |
Binary file not shown.
Before Width: | Height: | Size: 74 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Loading…
Reference in New Issue
Block a user