├── src ├── assets │ └── .gitkeep ├── app │ ├── app.component.css │ ├── core │ │ ├── components │ │ │ ├── home │ │ │ │ ├── home.component.css │ │ │ │ ├── home.component.html │ │ │ │ ├── home.component.ts │ │ │ │ └── home.component.spec.ts │ │ │ ├── login │ │ │ │ ├── login.component.css │ │ │ │ ├── login.component.html │ │ │ │ ├── login.component.ts │ │ │ │ └── login.component.spec.ts │ │ │ └── bs-navbar │ │ │ │ ├── bs-navbar.component.css │ │ │ │ ├── bs-navbar.component.spec.ts │ │ │ │ ├── bs-navbar.component.ts │ │ │ │ └── bs-navbar.component.html │ │ └── core.module.ts │ ├── shopping │ │ ├── components │ │ │ ├── check-out │ │ │ │ ├── check-out.component.css │ │ │ │ ├── check-out.component.html │ │ │ │ ├── check-out.component.ts │ │ │ │ └── check-out.component.spec.ts │ │ │ ├── my-orders │ │ │ │ ├── my-orders.component.css │ │ │ │ ├── my-orders.component.html │ │ │ │ ├── my-orders.component.ts │ │ │ │ └── my-orders.component.spec.ts │ │ │ ├── products │ │ │ │ ├── products.component.css │ │ │ │ ├── product-filter │ │ │ │ │ ├── product-filter.component.css │ │ │ │ │ ├── product-filter.component.html │ │ │ │ │ ├── product-filter.component.ts │ │ │ │ │ └── product-filter.component.spec.ts │ │ │ │ ├── products.component.html │ │ │ │ ├── products.component.spec.ts │ │ │ │ └── products.component.ts │ │ │ ├── order-success │ │ │ │ ├── order-success.component.css │ │ │ │ ├── order-success.component.html │ │ │ │ ├── order-success.component.ts │ │ │ │ └── order-success.component.spec.ts │ │ │ ├── shipping-form │ │ │ │ ├── shipping-form.component.css │ │ │ │ ├── shipping-form.component.spec.ts │ │ │ │ ├── shipping-form.component.ts │ │ │ │ └── shipping-form.component.html │ │ │ ├── shopping-cart-summary │ │ │ │ ├── shopping-cart-summary.component.css │ │ │ │ ├── shopping-cart-summary.component.ts │ │ │ │ ├── shopping-cart-summary.component.html │ │ │ │ └── shopping-cart-summary.component.spec.ts │ │ │ └── shopping-cart │ │ │ │ ├── shopping-cart.component.css │ │ │ │ ├── shopping-cart.component.ts │ │ │ │ ├── shopping-cart.component.spec.ts │ │ │ │ └── shopping-cart.component.html │ │ └── shopping.module.ts │ ├── admin │ │ ├── components │ │ │ ├── admin-orders │ │ │ │ ├── admin-orders.component.css │ │ │ │ ├── admin-orders.component.html │ │ │ │ ├── admin-orders.component.ts │ │ │ │ └── admin-orders.component.spec.ts │ │ │ ├── admin-products │ │ │ │ ├── admin-products.component.css │ │ │ │ ├── admin-products.component.spec.ts │ │ │ │ ├── admin-products.component.html │ │ │ │ └── admin-products.component.ts │ │ │ └── product-form │ │ │ │ ├── product-form.component.css │ │ │ │ ├── product-form.component.spec.ts │ │ │ │ ├── product-form.component.ts │ │ │ │ └── product-form.component.html │ │ ├── services │ │ │ ├── admin-auth-guard.service.spec.ts │ │ │ └── admin-auth-guard.service.ts │ │ └── admin.module.ts │ ├── app.component.html │ ├── shared │ │ ├── models │ │ │ ├── app-user.ts │ │ │ ├── product.ts │ │ │ ├── shopping-cart-item.ts │ │ │ ├── order.ts │ │ │ └── shopping-cart.ts │ │ ├── components │ │ │ ├── product-quantity │ │ │ │ ├── product-quantity.component.css │ │ │ │ ├── product-quantity.component.html │ │ │ │ ├── product-quantity.component.ts │ │ │ │ └── product-quantity.component.spec.ts │ │ │ └── product-card │ │ │ │ ├── product-card.component.css │ │ │ │ ├── product-card.component.ts │ │ │ │ ├── product-card.component.spec.ts │ │ │ │ └── product-card.component.html │ │ ├── services │ │ │ ├── category.service.ts │ │ │ ├── auth.service.spec.ts │ │ │ ├── user.service.spec.ts │ │ │ ├── auth-guard.service.spec.ts │ │ │ ├── order.service.spec.ts │ │ │ ├── product.service.spec.ts │ │ │ ├── category.service.spec.ts │ │ │ ├── shopping-cart.service.spec.ts │ │ │ ├── user.service.ts │ │ │ ├── auth-guard.service.ts │ │ │ ├── product.service.ts │ │ │ ├── order.service.ts │ │ │ ├── auth.service.ts │ │ │ └── shopping-cart.service.ts │ │ └── shared.module.ts │ ├── app.component.ts │ ├── app.component.spec.ts │ └── app.module.ts ├── favicon.ico ├── typings.d.ts ├── tsconfig.app.json ├── index.html ├── main.ts ├── tsconfig.spec.json ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── styles.scss ├── test.ts └── polyfills.ts ├── firebase.json ├── .firebaserc ├── e2e ├── app.po.ts ├── tsconfig.e2e.json └── app.e2e-spec.ts ├── .editorconfig ├── tsconfig.json ├── .gitignore ├── protractor.conf.js ├── README.md ├── karma.conf.js ├── .angular-cli.json ├── package.json └── tslint.json /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/core/components/home/home.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/core/components/login/login.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/shopping/components/check-out/check-out.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/shopping/components/my-orders/my-orders.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/admin/components/admin-orders/admin-orders.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/admin/components/admin-products/admin-products.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/admin/components/product-form/product-form.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/shopping/components/products/products.component.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/app/shopping/components/order-success/order-success.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/shopping/components/shipping-form/shipping-form.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "dist" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/app/core/components/home/home.component.html: -------------------------------------------------------------------------------- 1 |
2 | home works! 3 |
4 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "oshop-f3445" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/app/shopping/components/shopping-cart-summary/shopping-cart-summary.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mosh-hamedani/organic-shop/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /src/app/core/components/bs-navbar/bs-navbar.component.css: -------------------------------------------------------------------------------- 1 | 2 | .dropdown-toggle { 3 | cursor: pointer; 4 | } -------------------------------------------------------------------------------- /src/app/shopping/components/products/product-filter/product-filter.component.css: -------------------------------------------------------------------------------- 1 | 2 | .sticky-top { 3 | top: 80px; 4 | } -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 |We received your order and will process it within the next 24 hours!
-------------------------------------------------------------------------------- /src/app/shared/models/product.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface Product { 3 | $key: string; 4 | title: string; 5 | price: number; 6 | category: string; 7 | imageUrl: string; 8 | } -------------------------------------------------------------------------------- /src/app/shopping/components/shopping-cart/shopping-cart.component.css: -------------------------------------------------------------------------------- 1 | 2 | .thumbnail { 3 | width: 80px; 4 | height: 80px; 5 | border-radius: 100%; 6 | background-size: cover; 7 | } 8 | 9 | .card { 10 | margin-bottom: 80px; 11 | } -------------------------------------------------------------------------------- /e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class OshopPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/app/shared/components/product-card/product-card.component.css: -------------------------------------------------------------------------------- 1 | 2 | .card { 3 | margin-bottom: 30px; 4 | } 5 | 6 | .card-img-top { 7 | height: 200px; 8 | } 9 | 10 | .card-footer { 11 | padding: 0; 12 | background: #fff; 13 | } 14 | 15 | .card-footer button { 16 | cursor: pointer; 17 | text-transform: uppercase; 18 | } -------------------------------------------------------------------------------- /src/app/shopping/components/check-out/check-out.component.html: -------------------------------------------------------------------------------- 1 || Customer | 6 |Date | 7 |8 | |
|---|---|---|
| {{ order.shipping.name }} | 13 |{{ order.datePlaced | date}} | 14 |15 | View 16 | | 17 |
| Customer | 6 |Date | 7 |8 | |
|---|---|---|
| {{ order.shipping.name }} | 13 |{{ order.datePlaced | date}} | 14 |15 | View 16 | | 17 |
You have {{ cart.totalItemsCount }} items in your shopping cart.
5 |{{ product.price | currency:'USD':true }}
6 |3 | New Product 4 |
5 |6 | 10 |
11 | 12 |5 | You have {{ cart.totalItemsCount }} items in your shopping cart. 6 | 7 | 8 |
9 || 14 | | Product | 15 |Quantity | 16 |Price | 17 |
|---|---|---|---|
|
22 |
23 |
24 | |
25 | 26 | {{ item.title }} 27 | | 28 |
29 | |
32 | 33 | {{ item.totalPrice | currency:'USD':true }} 34 | | 35 |
| 40 | | 41 | | 42 | | {{ cart.totalPrice | currency:'USD':true }} | 43 |
| 46 | Check Out 47 | | 48 ||||