2 |
61 |
--------------------------------------------------------------------------------
/src/app/components/template/pedido/pedido-dialog/pedido-dialog.component.html:
--------------------------------------------------------------------------------
1 |
Meu Pedido
2 |
3 |
4 |
5 |
6 | | Item |
7 | {{transaction.item}} |
8 | Total |
9 |
10 |
11 |
12 |
13 | Preço |
14 | {{transaction.price | currency: 'BRL'}} |
15 | {{getTotalPrice() | currency: 'BRL'}} |
16 |
17 |
18 |
19 |
20 | Excluir |
21 |
22 | remove_circle
23 | |
24 |
25 | delete
26 | |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
40 |
41 |
45 |
--------------------------------------------------------------------------------
/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/guide/browser-support
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /** IE11 requires the following for NgClass support on SVG elements */
22 | // import 'classlist.js'; // Run `npm install --save classlist.js`.
23 |
24 | /**
25 | * Web Animations `@angular/platform-browser/animations`
26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
28 | */
29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
30 |
31 | /**
32 | * By default, zone.js will patch all possible macroTask and DomEvents
33 | * user can disable parts of macroTask/DomEvents patch by setting following flags
34 | * because those flags need to be set before `zone.js` being loaded, and webpack
35 | * will put import in the top of bundle, so user need to create a separate file
36 | * in this directory (for example: zone-flags.ts), and put the following flags
37 | * into that file, and then add the following code before importing zone.js.
38 | * import './zone-flags';
39 | *
40 | * The flags allowed in zone-flags.ts are listed here.
41 | *
42 | * The following flags will work for all browsers.
43 | *
44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
46 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
47 | *
48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge
50 | *
51 | * (window as any).__Zone_enable_cross_context_check = true;
52 | *
53 | */
54 |
55 | /***************************************************************************************************
56 | * Zone JS is required by default for Angular itself.
57 | */
58 | import 'zone.js/dist/zone'; // Included with Angular CLI.
59 |
60 |
61 | /***************************************************************************************************
62 | * APPLICATION IMPORTS
63 | */
64 |
--------------------------------------------------------------------------------
/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule, LOCALE_ID } from '@angular/core';
3 | import { FormsModule } from "@angular/forms";
4 | import { HttpClientModule } from '@angular/common/http';
5 |
6 | import { AppRoutingModule } from './app-routing.module';
7 | import { AppComponent } from './app.component';
8 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
9 | import { HeaderComponent } from './components/template/header/header.component';
10 | import { ContentComponent } from './components/template/content/content.component';
11 | import { FooterComponent } from './components/template/footer/footer.component';
12 | import { PedidoComponent } from './components/template/pedido/pedido.component';
13 |
14 | import { FlexLayoutModule } from "@angular/flex-layout";
15 |
16 | //material
17 | import {MatToolbarModule} from '@angular/material/toolbar';
18 | import {MatIconModule} from '@angular/material/icon';
19 | import {MatTabsModule} from '@angular/material/tabs';
20 | import {MatCardModule} from '@angular/material/card';
21 | import {MatButtonModule} from '@angular/material/button';
22 | import {MatButtonToggleModule} from '@angular/material/button-toggle';
23 | import {MatBadgeModule} from '@angular/material/badge';
24 | import {MatDialogModule} from '@angular/material/dialog';
25 | import {MatTableModule} from '@angular/material/table';
26 | import {MatInputModule} from '@angular/material/input';
27 | import {MatFormFieldModule} from '@angular/material/form-field';
28 | import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
29 | import {MatSnackBarModule} from '@angular/material/snack-bar';
30 |
31 | import {ScrollingModule} from '@angular/cdk/scrolling';
32 | import { PedidoDialogComponent } from './components/template/pedido/pedido-dialog/pedido-dialog.component';
33 |
34 | import localePt from '@angular/common/locales/pt';
35 | import { registerLocaleData } from '@angular/common';
36 | import { PedidoFormComponent } from './components/template/pedido/pedido-form/pedido-form.component'
37 |
38 | registerLocaleData(localePt);
39 |
40 | @NgModule({
41 | declarations: [
42 | AppComponent,
43 | HeaderComponent,
44 | ContentComponent,
45 | FooterComponent,
46 | PedidoComponent,
47 | PedidoDialogComponent,
48 | PedidoFormComponent,
49 | ],
50 | imports: [
51 | BrowserModule,
52 | AppRoutingModule,
53 | BrowserAnimationsModule,
54 | MatToolbarModule,
55 | MatIconModule,
56 | MatTabsModule,
57 | MatCardModule,
58 | FlexLayoutModule,
59 | MatButtonModule,
60 | MatBadgeModule,
61 | MatDialogModule,
62 | MatButtonToggleModule,
63 | ScrollingModule,
64 | MatTableModule,
65 | MatInputModule,
66 | MatFormFieldModule,
67 | FormsModule,
68 | HttpClientModule,
69 | MatProgressSpinnerModule,
70 | MatSnackBarModule
71 | ],
72 | providers: [{
73 | provide: LOCALE_ID,
74 | useValue: 'pt-BR'
75 | }
76 | ],
77 | bootstrap: [AppComponent]
78 | })
79 | export class AppModule { }
80 |
--------------------------------------------------------------------------------
/src/app/components/template/content/content.component.html:
--------------------------------------------------------------------------------
1 |
0; else loading">
2 |
3 |
4 | local_pizza
5 | Pizzas
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 |
16 | {{ pizza.name }}
17 | {{ pizza.ingredients }}
18 |
19 |
20 |
21 |

23 |
24 |
25 |
26 | {{ pizza.price | currency: 'BRL' }}
27 |
28 |
29 |
30 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | local_bar
47 | Bebidas
48 |
49 |
50 |
51 |
52 |
53 |
54 |
57 |
58 |
59 |
60 | {{ bebida.name }}
61 | {{ bebida.volume }}
62 |
63 |
64 |
65 |

67 |
68 |
69 |
70 | {{ bebida.price | currency: 'BRL' }}
71 |
72 |
73 |
74 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tslint:recommended",
3 | "rulesDirectory": [
4 | "codelyzer"
5 | ],
6 | "rules": {
7 | "align": {
8 | "options": [
9 | "parameters",
10 | "statements"
11 | ]
12 | },
13 | "array-type": false,
14 | "arrow-return-shorthand": true,
15 | "curly": true,
16 | "deprecation": {
17 | "severity": "warning"
18 | },
19 | "eofline": true,
20 | "import-blacklist": [
21 | true,
22 | "rxjs/Rx"
23 | ],
24 | "import-spacing": true,
25 | "indent": {
26 | "options": [
27 | "spaces"
28 | ]
29 | },
30 | "max-classes-per-file": false,
31 | "max-line-length": [
32 | true,
33 | 140
34 | ],
35 | "member-ordering": [
36 | true,
37 | {
38 | "order": [
39 | "static-field",
40 | "instance-field",
41 | "static-method",
42 | "instance-method"
43 | ]
44 | }
45 | ],
46 | "no-console": [
47 | true,
48 | "debug",
49 | "info",
50 | "time",
51 | "timeEnd",
52 | "trace"
53 | ],
54 | "no-empty": false,
55 | "no-inferrable-types": [
56 | true,
57 | "ignore-params"
58 | ],
59 | "no-non-null-assertion": true,
60 | "no-redundant-jsdoc": true,
61 | "no-switch-case-fall-through": true,
62 | "no-var-requires": false,
63 | "object-literal-key-quotes": [
64 | true,
65 | "as-needed"
66 | ],
67 | "quotemark": [
68 | true,
69 | "single"
70 | ],
71 | "semicolon": {
72 | "options": [
73 | "always"
74 | ]
75 | },
76 | "space-before-function-paren": {
77 | "options": {
78 | "anonymous": "never",
79 | "asyncArrow": "always",
80 | "constructor": "never",
81 | "method": "never",
82 | "named": "never"
83 | }
84 | },
85 | "typedef": [
86 | true,
87 | "call-signature"
88 | ],
89 | "typedef-whitespace": {
90 | "options": [
91 | {
92 | "call-signature": "nospace",
93 | "index-signature": "nospace",
94 | "parameter": "nospace",
95 | "property-declaration": "nospace",
96 | "variable-declaration": "nospace"
97 | },
98 | {
99 | "call-signature": "onespace",
100 | "index-signature": "onespace",
101 | "parameter": "onespace",
102 | "property-declaration": "onespace",
103 | "variable-declaration": "onespace"
104 | }
105 | ]
106 | },
107 | "variable-name": {
108 | "options": [
109 | "ban-keywords",
110 | "check-format",
111 | "allow-pascal-case"
112 | ]
113 | },
114 | "whitespace": {
115 | "options": [
116 | "check-branch",
117 | "check-decl",
118 | "check-operator",
119 | "check-separator",
120 | "check-type",
121 | "check-typecast"
122 | ]
123 | },
124 | "component-class-suffix": true,
125 | "contextual-lifecycle": true,
126 | "directive-class-suffix": true,
127 | "no-conflicting-lifecycle": true,
128 | "no-host-metadata-property": true,
129 | "no-input-rename": true,
130 | "no-inputs-metadata-property": true,
131 | "no-output-native": true,
132 | "no-output-on-prefix": true,
133 | "no-output-rename": true,
134 | "no-outputs-metadata-property": true,
135 | "template-banana-in-box": true,
136 | "template-no-negated-async": true,
137 | "use-lifecycle-interface": true,
138 | "use-pipe-transform-interface": true,
139 | "directive-selector": [
140 | true,
141 | "attribute",
142 | "app",
143 | "camelCase"
144 | ],
145 | "component-selector": [
146 | true,
147 | "element",
148 | "app",
149 | "kebab-case"
150 | ]
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/src/assets/card/cardapio.svg:
--------------------------------------------------------------------------------
1 |
2 |
74 |
--------------------------------------------------------------------------------
/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "pizzaria": {
7 | "projectType": "application",
8 | "schematics": {
9 | "@schematics/angular:application": {
10 | "strict": true
11 | }
12 | },
13 | "root": "",
14 | "sourceRoot": "src",
15 | "prefix": "app",
16 | "architect": {
17 | "build": {
18 | "builder": "@angular-devkit/build-angular:browser",
19 | "options": {
20 | "outputPath": "dist/pizzaria",
21 | "index": "src/index.html",
22 | "main": "src/main.ts",
23 | "polyfills": "src/polyfills.ts",
24 | "tsConfig": "tsconfig.app.json",
25 | "aot": true,
26 | "assets": [
27 | "src/favicon.ico",
28 | "src/assets"
29 | ],
30 | "styles": [
31 | "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
32 | "src/styles.css"
33 | ],
34 | "scripts": []
35 | },
36 | "configurations": {
37 | "production": {
38 | "fileReplacements": [
39 | {
40 | "replace": "src/environments/environment.ts",
41 | "with": "src/environments/environment.prod.ts"
42 | }
43 | ],
44 | "optimization": true,
45 | "outputHashing": "all",
46 | "sourceMap": false,
47 | "namedChunks": false,
48 | "extractLicenses": true,
49 | "vendorChunk": false,
50 | "buildOptimizer": true,
51 | "budgets": [
52 | {
53 | "type": "initial",
54 | "maximumWarning": "500kb",
55 | "maximumError": "1mb"
56 | },
57 | {
58 | "type": "anyComponentStyle",
59 | "maximumWarning": "2kb",
60 | "maximumError": "4kb"
61 | }
62 | ]
63 | }
64 | }
65 | },
66 | "serve": {
67 | "builder": "@angular-devkit/build-angular:dev-server",
68 | "options": {
69 | "browserTarget": "pizzaria:build"
70 | },
71 | "configurations": {
72 | "production": {
73 | "browserTarget": "pizzaria:build:production"
74 | }
75 | }
76 | },
77 | "extract-i18n": {
78 | "builder": "@angular-devkit/build-angular:extract-i18n",
79 | "options": {
80 | "browserTarget": "pizzaria:build"
81 | }
82 | },
83 | "test": {
84 | "builder": "@angular-devkit/build-angular:karma",
85 | "options": {
86 | "main": "src/test.ts",
87 | "polyfills": "src/polyfills.ts",
88 | "tsConfig": "tsconfig.spec.json",
89 | "karmaConfig": "karma.conf.js",
90 | "assets": [
91 | "src/favicon.ico",
92 | "src/assets"
93 | ],
94 | "styles": [
95 | "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
96 | "src/styles.css"
97 | ],
98 | "scripts": []
99 | }
100 | },
101 | "lint": {
102 | "builder": "@angular-devkit/build-angular:tslint",
103 | "options": {
104 | "tsConfig": [
105 | "tsconfig.app.json",
106 | "tsconfig.spec.json",
107 | "e2e/tsconfig.json"
108 | ],
109 | "exclude": [
110 | "**/node_modules/**"
111 | ]
112 | }
113 | },
114 | "e2e": {
115 | "builder": "@angular-devkit/build-angular:protractor",
116 | "options": {
117 | "protractorConfig": "e2e/protractor.conf.js",
118 | "devServerTarget": "pizzaria:serve"
119 | },
120 | "configurations": {
121 | "production": {
122 | "devServerTarget": "pizzaria:serve:production"
123 | }
124 | }
125 | }
126 | }
127 | }
128 | },
129 | "defaultProject": "pizzaria"
130 | }
131 |
--------------------------------------------------------------------------------
/src/assets/card/pizza-pink.svg:
--------------------------------------------------------------------------------
1 |
2 |
69 |
--------------------------------------------------------------------------------
/github/pizza.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/header/pizza.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------