mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-12-23 20:15:13 +00:00
Compare commits
No commits in common. "c3c0fa73b97f4040235a9bf9ddd26dde8cfea4f8" and "5c02314180287babe7f4c9c017f7a638ff8b478a" have entirely different histories.
c3c0fa73b9
...
5c02314180
|
@ -11,7 +11,7 @@
|
|||
<!-- About Section Content-->
|
||||
<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 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>
|
||||
</section>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-about-us',
|
||||
|
@ -7,8 +7,7 @@ import {Component, OnInit} from '@angular/core';
|
|||
})
|
||||
export class AboutUsComponent implements OnInit {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
||||
import {ApiService} from '../../../services/api.service';
|
||||
import {Router} from '@angular/router';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import {ApiService} from "../../../services/api.service";
|
||||
import {Router} from "@angular/router";
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -16,10 +16,9 @@ export class RegistrationComponent implements OnInit {
|
|||
|
||||
constructor(
|
||||
private formBuilder: FormBuilder,
|
||||
private api: ApiService,
|
||||
private api : ApiService,
|
||||
private router: Router
|
||||
) {
|
||||
}
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.form = this.formBuilder.group({
|
||||
|
@ -32,13 +31,11 @@ export class RegistrationComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
get me() {
|
||||
return this.form.controls;
|
||||
}
|
||||
get me() { return this.form.controls; }
|
||||
|
||||
onSubmit(): void {
|
||||
onSubmit() {
|
||||
this.api.registerUser(this.form.value.username, this.form.value.password, this.form.value.email).subscribe(
|
||||
res => {
|
||||
res=> {
|
||||
this.api.saveSessionInfoToLocalStorage(res);
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-resetpasswort',
|
||||
|
@ -7,8 +7,7 @@ import {Component, OnInit} from '@angular/core';
|
|||
})
|
||||
export class ResetpasswortComponent implements OnInit {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
<!-- Footer Social Icons-->
|
||||
<div class="col-lg-4 mb-5 mb-lg-0">
|
||||
<h4 class="text-uppercase mb-4">FOLLOW US</h4>
|
||||
<h4 class="text-uppercase mb-4">FOLLOW UNS</h4>
|
||||
<a class="btn btn-outline-light btn-social mx-1" href="https://github.com/Mueller-Patrick/Betterzon"><i class="fab fa-fw fa-github"></i></a>
|
||||
<a class="btn btn-outline-light btn-social mx-1" href="https://blog.betterzon.xyz/"><i class="fab fa-fw fa-dribbble"></i></a>
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-bottom-bar',
|
||||
templateUrl: './bottom-bar.component.html',
|
||||
styleUrls: ['./bottom-bar.component.css']
|
||||
templateUrl: "./bottom-bar.component.html",
|
||||
styleUrls: ["./bottom-bar.component.css"]
|
||||
})
|
||||
export class BottomBarComponent implements OnInit {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-copyright',
|
||||
|
@ -7,8 +7,7 @@ import {Component, OnInit} from '@angular/core';
|
|||
})
|
||||
export class CopyrightComponent implements OnInit {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
|
@ -11,8 +11,7 @@ export class FooterComponent implements OnInit {
|
|||
constructor(
|
||||
private router: Router,
|
||||
private route: ActivatedRoute
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-greeting-info-slider',
|
||||
|
@ -7,8 +7,7 @@ import {Component, OnInit} from '@angular/core';
|
|||
})
|
||||
export class GreetingInfoSliderComponent implements OnInit {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<section class="page-section portfolio" id="top-gesuchte">
|
||||
<div class="container">
|
||||
<!-- 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-->
|
||||
<div class="divider-custom">
|
||||
<div class="divider-custom-line"></div>
|
||||
|
@ -17,10 +17,10 @@
|
|||
<div class="bbb_deals_item_name">{{productsPricesMap[productId]?.product?.name}}</div>
|
||||
</div>
|
||||
<div class="bbb_deals_info_line d-flex flex-row justify-content-start">
|
||||
<div class="bbb_deals_item_category">Amazon: <span id="bbb_deals_item_price_a"><strike>{{productsPricesMap[productId]?.amazonPrice?.price_in_cents/100}}€</strike></span></div>
|
||||
<div class="bbb_deals_item_category">Amazon: <span id="bbb_deals_item_price_a"><strike>{{productsPricesMap[productId]?.amazonPrice?.price_in_cents/100}}$</strike></span></div>
|
||||
</div>
|
||||
<div class="bbb_deals_info_line d-flex flex-row justify-content-start">
|
||||
<div class="bbb_deals_item_category">{{productsPricesMap[productId]?.vendor?.name}}: <span id="bbb_deals_item_price_b">{{productsPricesMap[productId]?.lowestPrice?.price_in_cents/100}}€</span></div>
|
||||
<div class="bbb_deals_item_category">{{productsPricesMap[productId]?.vendor?.name}}: <span id="bbb_deals_item_price_b">{{productsPricesMap[productId]?.lowestPrice?.price_in_cents/100}}</span></div>
|
||||
</div>
|
||||
<div class="available_bar">
|
||||
<span style="width:17%"></span>
|
||||
|
|
|
@ -52,7 +52,7 @@ export class HotDealsWidgetComponent implements OnInit {
|
|||
default: {
|
||||
this.getProductsByIds();
|
||||
this.getAmazonPricesForBestDeals();
|
||||
this.getVendors();
|
||||
this.getVendors()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ export class HotDealsWidgetComponent implements OnInit {
|
|||
deals => {
|
||||
deals.forEach(deal => {
|
||||
this.bestDealsProductIds.push(deal.product_id);
|
||||
this.productsPricesMap [deal.product_id] = {lowestPrice: deal};
|
||||
this.productsPricesMap [deal.product_id] = {lowestPrice: deal}
|
||||
});
|
||||
this.loadParams();
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ export class HotDealsWidgetComponent implements OnInit {
|
|||
}
|
||||
|
||||
|
||||
getAmazonPricesForBestDeals(): void {
|
||||
getAmazonPricesForBestDeals(): void{
|
||||
this.bestDealsProductIds.forEach(id => {
|
||||
this.apiService.getAmazonPrice(id).subscribe(
|
||||
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-content text-center text-white"><i class="fas fa-plus fa-3x"></i></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 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-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
|
||||
</div>
|
||||
<img width="100%" class="productImage" src="assets/images/plantshub.jpg"/>
|
||||
<img class="productImage" src="assets/images/Betterzon.svg"/>
|
||||
</div>
|
||||
</div>
|
||||
<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-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
|
||||
</div>
|
||||
<img width="70%" class="productImage" src="assets/images/CeangalLogo.png"/>
|
||||
<img class="productImage" src="assets/images/Betterzon.svg"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -46,7 +46,7 @@ export class ProductDetailsComponent implements OnInit {
|
|||
this.getProduct();
|
||||
this.getVendors();
|
||||
this.getPrices();
|
||||
if (this.apiService.getSessionInfoFromLocalStorage().session_id != '') {
|
||||
if (this.apiService.getSessionInfoFromLocalStorage().session_id != "") {
|
||||
this.isLoggedIn = true;
|
||||
}
|
||||
}
|
||||
|
@ -123,10 +123,10 @@ export class ProductDetailsComponent implements OnInit {
|
|||
return Math.round(percentage);
|
||||
}
|
||||
|
||||
setPriceAlarm(): void {
|
||||
this.apiService.createPriceAlarms(this.productId, this.price * 100).subscribe(
|
||||
setPriceAlarm() {
|
||||
this.apiService.createPriceAlarms(this.productId, this.price*100).subscribe(
|
||||
alarms => console.log(alarms)
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -19,8 +19,3 @@ table, th, td {
|
|||
cursor: pointer;
|
||||
color: #0d5a4b;
|
||||
}
|
||||
|
||||
.edit {
|
||||
width: 5%;
|
||||
height: 5%;
|
||||
}
|
||||
|
|
|
@ -86,10 +86,10 @@
|
|||
{{productsMap[alarm.product_id]?.name}}
|
||||
</td>
|
||||
<td>
|
||||
{{alarm.defined_price/100}}€
|
||||
{{alarm.defined_price/100}}
|
||||
</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>
|
||||
<img class="delete" src="../assets/images/Delete_icon-icons.com_55931.png" (click)="delete(alarm.alarm_id)">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {ApiService} from '../../services/api.service';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {ApiService} from "../../services/api.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
|
@ -9,18 +9,17 @@ import {ApiService} from '../../services/api.service';
|
|||
export class ProfileComponent implements OnInit {
|
||||
|
||||
currentUser: any;
|
||||
obj: any;
|
||||
obj:any;
|
||||
alarms: any [];
|
||||
productsMap: any = {};
|
||||
|
||||
constructor(private api: ApiService) {
|
||||
}
|
||||
constructor(private api: ApiService ) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.api.getUserInfo().subscribe(
|
||||
user => {
|
||||
this.currentUser = user;
|
||||
user=> {
|
||||
this.currentUser = user
|
||||
console.log(this.currentUser);
|
||||
},
|
||||
);
|
||||
|
@ -31,33 +30,29 @@ export class ProfileComponent implements OnInit {
|
|||
getPriceAlarms(): void {
|
||||
this.api.getPriceAlarms().subscribe(
|
||||
alarms => {
|
||||
this.alarms = alarms;
|
||||
this.getProductsByIds();
|
||||
this.alarms = alarms
|
||||
this.getProductsByIds()
|
||||
}
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
getProductsByIds(): void {
|
||||
const productIds: number [] = [];
|
||||
let productIds: number [] = [];
|
||||
this.alarms.forEach(
|
||||
alarm => {
|
||||
productIds.push(alarm.product_id);
|
||||
}
|
||||
alarm => {productIds.push(alarm.product_id)}
|
||||
);
|
||||
this.api.getProductsByIds(productIds).subscribe(
|
||||
products => {
|
||||
products.forEach(
|
||||
product => {
|
||||
this.productsMap[product.product_id] = product;
|
||||
product => {this.productsMap[product.product_id] = product}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
delete(id: number): void {
|
||||
delete(id:number): void {
|
||||
this.api.deletePriceAlarm(id).subscribe(
|
||||
res => window.location.reload()
|
||||
);
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-slider-for-products',
|
||||
|
@ -7,8 +7,7 @@ import {Component, OnInit} from '@angular/core';
|
|||
})
|
||||
export class SliderForProductsComponent implements OnInit {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<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="#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>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {ApiService} from '../../services/api.service';
|
||||
import {NavigationEnd, Router} from '@angular/router';
|
||||
import {ApiService} from "../../services/api.service";
|
||||
import {Router} from "@angular/router";
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -20,12 +20,13 @@ export class TopBarComponent implements OnInit {
|
|||
) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
ngOnInit() {
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -33,11 +34,7 @@ export class TopBarComponent implements OnInit {
|
|||
logout(): void {
|
||||
localStorage.setItem('session_id', '');
|
||||
localStorage.setItem('session_key', '');
|
||||
if (this.router.url === '/profile') {
|
||||
this.router.navigate(['/']);
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
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