From f28b301a280e2e7b7fc8c160456adc13f147a60c Mon Sep 17 00:00:00 2001 From: Jegor Date: Thu, 17 Jun 2021 17:18:36 +0200 Subject: [PATCH] wip: profile --- .../hot-deals-widget.component.ts | 12 +-- .../product-details.component.html | 3 + .../product-list/product-list.component.html | 25 +++++ .../components/profile/profile.component.css | 21 ++++ .../components/profile/profile.component.html | 99 +++++++++++++++++- .../components/profile/profile.component.ts | 4 + .../components/top-bar/top-bar.component.ts | 6 +- .../landingpage/landingpage.component.css | 50 --------- .../product-search-page.component.css | 46 +++++++- .../product-search-page.component.html | 7 ++ .../profile-page/profile-page.component.css | 4 + .../profile-page/profile-page.component.html | 7 ++ .../images/Delete_icon-icons.com_55931.png | Bin 0 -> 239 bytes 13 files changed, 220 insertions(+), 64 deletions(-) create mode 100644 Frontend/src/assets/images/Delete_icon-icons.com_55931.png diff --git a/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.ts b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.ts index 95635d7..d9a09e7 100644 --- a/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.ts +++ b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.ts @@ -81,14 +81,14 @@ export class HotDealsWidgetComponent implements OnInit { } getVendors(): void { - this.productsPricesMap.keys().forEach( - key => { - const currentDeal = this.productsPricesMap[key].lowestPrice; + this.bestDealsProductIds.forEach( + productId => { + const currentDeal = this.productsPricesMap[productId].lowestPrice; this.apiService.getVendorById(currentDeal.vendor_id).subscribe( vendor => { - this.productsPricesMap[key].vendor = vendor - }) - }) + this.productsPricesMap[productId].vendor = vendor; + }); + }); } diff --git a/Frontend/src/app/components/product-details/product-details.component.html b/Frontend/src/app/components/product-details/product-details.component.html index cdccfb3..a40e238 100644 --- a/Frontend/src/app/components/product-details/product-details.component.html +++ b/Frontend/src/app/components/product-details/product-details.component.html @@ -1,3 +1,6 @@ +
+ +
diff --git a/Frontend/src/app/components/product-list/product-list.component.html b/Frontend/src/app/components/product-list/product-list.component.html index 6f9a8e5..f5186c8 100644 --- a/Frontend/src/app/components/product-list/product-list.component.html +++ b/Frontend/src/app/components/product-list/product-list.component.html @@ -1,6 +1,30 @@
No Products found!
+
+
+
+
+
+
+
{{product.name}}
+
+

{{product.short_description}}

+
+

+

+
+
+
+

${{product.price}}

+
+
+
+
+
+
+
+ diff --git a/Frontend/src/app/components/profile/profile.component.css b/Frontend/src/app/components/profile/profile.component.css index e69de29..42605dc 100644 --- a/Frontend/src/app/components/profile/profile.component.css +++ b/Frontend/src/app/components/profile/profile.component.css @@ -0,0 +1,21 @@ +.inf-content{ + border:1px solid #DDDDDD; + -webkit-border-radius:10px; + -moz-border-radius:10px; + border-radius:10px; + box-shadow: 7px 7px 7px rgba(0, 0, 0, 0.3); +} + +.header-in-page { + padding-top: calc(1rem + 20px); + padding-bottom: 1rem; +} + +table, th, td { + border: 1px solid black; +} + +.delete:hover { + cursor: pointer; + color: #0d5a4b; +} diff --git a/Frontend/src/app/components/profile/profile.component.html b/Frontend/src/app/components/profile/profile.component.html index 4bfa28e..9c9f0a6 100644 --- a/Frontend/src/app/components/profile/profile.component.html +++ b/Frontend/src/app/components/profile/profile.component.html @@ -1,3 +1,100 @@ +
+
+
+
+ +
    +
  • +
  • +
  • +
  • +
  • +
+
+
+ Information
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + Username + + + bootnipets +
+ + + Role + + + User +
+ + + Email + + + noreply@email.com +
+ + + created + + + 20 jul 20014 +
+
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + +
ProduktPreisLöschen
+ {{productsMap[alarm.product_id]?.name}} + + {{alarm.defined_price/100}} + + +
+
+
+ diff --git a/Frontend/src/app/components/profile/profile.component.ts b/Frontend/src/app/components/profile/profile.component.ts index 5620827..02eb9af 100644 --- a/Frontend/src/app/components/profile/profile.component.ts +++ b/Frontend/src/app/components/profile/profile.component.ts @@ -49,4 +49,8 @@ export class ProfileComponent implements OnInit { } ) } + + delete() { + + } } diff --git a/Frontend/src/app/components/top-bar/top-bar.component.ts b/Frontend/src/app/components/top-bar/top-bar.component.ts index aa639fb..bbf5226 100644 --- a/Frontend/src/app/components/top-bar/top-bar.component.ts +++ b/Frontend/src/app/components/top-bar/top-bar.component.ts @@ -4,9 +4,9 @@ import {Router} from "@angular/router"; @Component({ - selector: 'app-top-bar', - templateUrl: './top-bar.component.html', - styleUrls: ['./top-bar.component.css'] + selector: 'app-top-bar', + templateUrl: './top-bar.component.html', + styleUrls: ['./top-bar.component.css'] }) export class TopBarComponent implements OnInit { diff --git a/Frontend/src/app/pages/landingpage/landingpage.component.css b/Frontend/src/app/pages/landingpage/landingpage.component.css index cac058e..e69de29 100644 --- a/Frontend/src/app/pages/landingpage/landingpage.component.css +++ b/Frontend/src/app/pages/landingpage/landingpage.component.css @@ -1,50 +0,0 @@ -#mainComponents { - margin: 5em; - margin-top: .5em; - margin-bottom: .5em; -} - -#productListsContainer { - display: grid; - grid-template-areas: - 'search search' - 'popularSearches bestDeals'; - grid-template-columns: 50% 50%; -} - -#searchContainer { - position: relative; - grid-area: search; - height: 10em; -} - -#searchContainer input { - position: relative; - font-size: 1.5em; - padding: .25em; - display: block; - border: 1px solid #ccc; - border-radius: 4px; - box-sizing: border-box; - margin: auto; - -ms-transform: translateY(50%); - transform: translateY(2.5em); -} - -#popularSearchesList { - grid-area: popularSearches; - padding: .5em; -} - -#popularSearchesList h2 { - text-align: center; -} - -#bestDealsList { - grid-area: bestDeals; - padding: .5em; -} - -#bestDealsList h2 { - text-align: center; -} diff --git a/Frontend/src/app/pages/product-search-page/product-search-page.component.css b/Frontend/src/app/pages/product-search-page/product-search-page.component.css index 653b875..6b48f27 100644 --- a/Frontend/src/app/pages/product-search-page/product-search-page.component.css +++ b/Frontend/src/app/pages/product-search-page/product-search-page.component.css @@ -1,5 +1,43 @@ -#mainComponents { - margin: 5em; - margin-top: .5em; - margin-bottom: .5em; +body { + background: #eee } + +.ratings i { + font-size: 16px; + color: red +} + +.strike-text { + color: red; + text-decoration: line-through +} + +.product-image { + width: 20%; + height: 20%; +} + +.dot { + height: 7px; + width: 7px; + margin-left: 6px; + margin-right: 6px; + margin-top: 3px; + background-color: blue; + border-radius: 50%; + display: inline-block +} + +.spec-1 { + color: #938787; + font-size: 15px +} + +h5 { + font-weight: 400 +} + +.para { + font-size: 16px +} + diff --git a/Frontend/src/app/pages/product-search-page/product-search-page.component.html b/Frontend/src/app/pages/product-search-page/product-search-page.component.html index cedafa9..03d93fe 100644 --- a/Frontend/src/app/pages/product-search-page/product-search-page.component.html +++ b/Frontend/src/app/pages/product-search-page/product-search-page.component.html @@ -1,7 +1,14 @@ + +
+ +
+
+ +
diff --git a/Frontend/src/app/pages/profile-page/profile-page.component.css b/Frontend/src/app/pages/profile-page/profile-page.component.css index e69de29..593c8e9 100644 --- a/Frontend/src/app/pages/profile-page/profile-page.component.css +++ b/Frontend/src/app/pages/profile-page/profile-page.component.css @@ -0,0 +1,4 @@ +.header-in-page { + padding-top: calc(2rem + 20px); + padding-bottom: 6rem; +} diff --git a/Frontend/src/app/pages/profile-page/profile-page.component.html b/Frontend/src/app/pages/profile-page/profile-page.component.html index efb0505..592be07 100644 --- a/Frontend/src/app/pages/profile-page/profile-page.component.html +++ b/Frontend/src/app/pages/profile-page/profile-page.component.html @@ -1,3 +1,10 @@ + +
+
+
+
+ + diff --git a/Frontend/src/assets/images/Delete_icon-icons.com_55931.png b/Frontend/src/assets/images/Delete_icon-icons.com_55931.png new file mode 100644 index 0000000000000000000000000000000000000000..f1e94608a640e6aa8369435d38cc67debe580984 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8wRq z_>O=u<5X=vX`tXlPZ!6Kh}O5$9Jv}41YGwE&RghrNq6tuxWjn~vp2Rj8ZAydVlzQx z_WR^J92#8nc^lX#bUn=MZ(aFDwNv){8dnK1hBqQv8FDR=p+(j4tEZPGNN61p)p);U ztDK&JjA#I(Xh7pjChgDvKLuWlGM{;`@jSQ7FS({SF~wY2`7-m?$G