├── .browserslistrc ├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── e2e ├── protractor.conf.js ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── src ├── app │ ├── app-routing.module.ts │ ├── app.component.css │ ├── app.component.html │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── components │ │ ├── auth │ │ │ ├── login │ │ │ │ ├── login.component.css │ │ │ │ ├── login.component.html │ │ │ │ └── login.component.ts │ │ │ ├── profile │ │ │ │ ├── profile.component.css │ │ │ │ ├── profile.component.html │ │ │ │ └── profile.component.ts │ │ │ ├── register │ │ │ │ ├── register.component.css │ │ │ │ ├── register.component.html │ │ │ │ └── register.component.ts │ │ │ └── rental-management │ │ │ │ ├── rental-management.component.css │ │ │ │ ├── rental-management.component.html │ │ │ │ └── rental-management.component.ts │ │ ├── brand-list │ │ │ ├── brand-list.component.css │ │ │ ├── brand-list.component.html │ │ │ └── brand-list.component.ts │ │ ├── car │ │ │ ├── car-add │ │ │ │ ├── car-add.component.css │ │ │ │ ├── car-add.component.html │ │ │ │ └── car-add.component.ts │ │ │ ├── car-detail │ │ │ │ ├── car-detail.component.css │ │ │ │ ├── car-detail.component.html │ │ │ │ ├── car-detail.component.ts │ │ │ │ └── rental │ │ │ │ │ ├── rental.component.css │ │ │ │ │ ├── rental.component.html │ │ │ │ │ └── rental.component.ts │ │ │ ├── car-filter │ │ │ │ ├── car-filter.component.css │ │ │ │ ├── car-filter.component.html │ │ │ │ └── car-filter.component.ts │ │ │ ├── car-update │ │ │ │ ├── car-update.component.css │ │ │ │ ├── car-update.component.html │ │ │ │ └── car-update.component.ts │ │ │ ├── car.component.css │ │ │ ├── car.component.html │ │ │ └── car.component.ts │ │ ├── color-list │ │ │ ├── color-list.component.css │ │ │ ├── color-list.component.html │ │ │ └── color-list.component.ts │ │ ├── master │ │ │ ├── footer │ │ │ │ ├── footer.component.css │ │ │ │ ├── footer.component.html │ │ │ │ └── footer.component.ts │ │ │ ├── master.component.css │ │ │ ├── master.component.html │ │ │ ├── master.component.ts │ │ │ └── navi │ │ │ │ ├── auth-menu │ │ │ │ ├── auth-menu.component.css │ │ │ │ ├── auth-menu.component.html │ │ │ │ └── auth-menu.component.ts │ │ │ │ ├── navi.component.css │ │ │ │ ├── navi.component.html │ │ │ │ └── navi.component.ts │ │ └── payment │ │ │ ├── card-saved │ │ │ ├── card-saved.component.css │ │ │ ├── card-saved.component.html │ │ │ └── card-saved.component.ts │ │ │ ├── payment.component.css │ │ │ ├── payment.component.html │ │ │ └── payment.component.ts │ ├── guards │ │ └── login.guard.ts │ ├── interceptors │ │ └── auth.interceptor.ts │ ├── models │ │ ├── details │ │ │ ├── carDetail.ts │ │ │ ├── customerDetail.ts │ │ │ └── rentalDetail.ts │ │ ├── entities │ │ │ ├── brand.ts │ │ │ ├── car.ts │ │ │ ├── carImage.ts │ │ │ ├── color.ts │ │ │ ├── customer.ts │ │ │ ├── fakeCard.ts │ │ │ └── rental.ts │ │ ├── loginModel.ts │ │ ├── registerModel.ts │ │ ├── responses │ │ │ ├── listResponseModel.ts │ │ │ ├── responseModel.ts │ │ │ └── singleResponseModel.ts │ │ └── tokenModel.ts │ ├── pipes │ │ ├── filter-brand-pipe.pipe.ts │ │ └── filter-color-pipe.pipe.ts │ └── services │ │ ├── auth.service.ts │ │ ├── brand.service.ts │ │ ├── car-image.service.ts │ │ ├── car.service.ts │ │ ├── color.service.ts │ │ ├── customer.service.ts │ │ ├── fakecard.service.ts │ │ ├── local-storage.service.ts │ │ ├── payment.service.ts │ │ └── rental.service.ts ├── assets │ ├── .gitkeep │ ├── images │ │ └── RentACar.gif │ └── register-login │ │ ├── css │ │ ├── style.css │ │ └── style.css.map │ │ ├── fonts │ │ ├── material-icon │ │ │ ├── css │ │ │ │ ├── material-design-iconic-font.css │ │ │ │ └── material-design-iconic-font.min.css │ │ │ └── fonts │ │ │ │ ├── Material-Design-Iconic-Font.eot │ │ │ │ ├── Material-Design-Iconic-Font.svg │ │ │ │ ├── Material-Design-Iconic-Font.ttf │ │ │ │ ├── Material-Design-Iconic-Font.woff │ │ │ │ └── Material-Design-Iconic-Font.woff2 │ │ └── poppins │ │ │ ├── poppins-v5-latin-300.eot │ │ │ ├── poppins-v5-latin-300.svg │ │ │ ├── poppins-v5-latin-300.ttf │ │ │ ├── poppins-v5-latin-300.woff │ │ │ ├── poppins-v5-latin-300.woff2 │ │ │ ├── poppins-v5-latin-300italic.eot │ │ │ ├── poppins-v5-latin-300italic.svg │ │ │ ├── poppins-v5-latin-300italic.ttf │ │ │ ├── poppins-v5-latin-300italic.woff │ │ │ ├── poppins-v5-latin-300italic.woff2 │ │ │ ├── poppins-v5-latin-500.eot │ │ │ ├── poppins-v5-latin-500.svg │ │ │ ├── poppins-v5-latin-500.ttf │ │ │ ├── poppins-v5-latin-500.woff │ │ │ ├── poppins-v5-latin-500.woff2 │ │ │ ├── poppins-v5-latin-500italic.eot │ │ │ ├── poppins-v5-latin-500italic.svg │ │ │ ├── poppins-v5-latin-500italic.ttf │ │ │ ├── poppins-v5-latin-500italic.woff │ │ │ ├── poppins-v5-latin-500italic.woff2 │ │ │ ├── poppins-v5-latin-600.eot │ │ │ ├── poppins-v5-latin-600.svg │ │ │ ├── poppins-v5-latin-600.ttf │ │ │ ├── poppins-v5-latin-600.woff │ │ │ ├── poppins-v5-latin-600.woff2 │ │ │ ├── poppins-v5-latin-700.eot │ │ │ ├── poppins-v5-latin-700.svg │ │ │ ├── poppins-v5-latin-700.ttf │ │ │ ├── poppins-v5-latin-700.woff │ │ │ ├── poppins-v5-latin-700.woff2 │ │ │ ├── poppins-v5-latin-700italic.eot │ │ │ ├── poppins-v5-latin-700italic.svg │ │ │ ├── poppins-v5-latin-700italic.ttf │ │ │ ├── poppins-v5-latin-700italic.woff │ │ │ ├── poppins-v5-latin-700italic.woff2 │ │ │ ├── poppins-v5-latin-800.eot │ │ │ ├── poppins-v5-latin-800.svg │ │ │ ├── poppins-v5-latin-800.ttf │ │ │ ├── poppins-v5-latin-800.woff │ │ │ ├── poppins-v5-latin-800.woff2 │ │ │ ├── poppins-v5-latin-800italic.eot │ │ │ ├── poppins-v5-latin-800italic.svg │ │ │ ├── poppins-v5-latin-800italic.ttf │ │ │ ├── poppins-v5-latin-800italic.woff │ │ │ ├── poppins-v5-latin-800italic.woff2 │ │ │ ├── poppins-v5-latin-900.eot │ │ │ ├── poppins-v5-latin-900.svg │ │ │ ├── poppins-v5-latin-900.ttf │ │ │ ├── poppins-v5-latin-900.woff │ │ │ ├── poppins-v5-latin-900.woff2 │ │ │ ├── poppins-v5-latin-italic.eot │ │ │ ├── poppins-v5-latin-italic.svg │ │ │ ├── poppins-v5-latin-italic.ttf │ │ │ ├── poppins-v5-latin-italic.woff │ │ │ ├── poppins-v5-latin-italic.woff2 │ │ │ ├── poppins-v5-latin-regular.eot │ │ │ ├── poppins-v5-latin-regular.svg │ │ │ ├── poppins-v5-latin-regular.ttf │ │ │ ├── poppins-v5-latin-regular.woff │ │ │ ├── poppins-v5-latin-regular.woff2 │ │ │ ├── roboto-condensed-v16-latin-700.eot │ │ │ ├── roboto-condensed-v16-latin-700.svg │ │ │ ├── roboto-condensed-v16-latin-700.ttf │ │ │ ├── roboto-condensed-v16-latin-700.woff │ │ │ ├── roboto-condensed-v16-latin-700.woff2 │ │ │ ├── roboto-condensed-v16-latin-700italic.eot │ │ │ ├── roboto-condensed-v16-latin-700italic.svg │ │ │ ├── roboto-condensed-v16-latin-700italic.ttf │ │ │ ├── roboto-condensed-v16-latin-700italic.woff │ │ │ ├── roboto-condensed-v16-latin-700italic.woff2 │ │ │ ├── roboto-condensed-v16-latin-italic.eot │ │ │ ├── roboto-condensed-v16-latin-italic.svg │ │ │ ├── roboto-condensed-v16-latin-italic.ttf │ │ │ ├── roboto-condensed-v16-latin-italic.woff │ │ │ ├── roboto-condensed-v16-latin-italic.woff2 │ │ │ ├── roboto-condensed-v16-latin-regular.eot │ │ │ ├── roboto-condensed-v16-latin-regular.svg │ │ │ ├── roboto-condensed-v16-latin-regular.ttf │ │ │ ├── roboto-condensed-v16-latin-regular.woff │ │ │ └── roboto-condensed-v16-latin-regular.woff2 │ │ ├── js │ │ └── main.js │ │ ├── scss │ │ ├── common │ │ │ ├── extend.scss │ │ │ ├── fonts.scss │ │ │ ├── global.scss │ │ │ ├── minxi.scss │ │ │ └── variables.scss │ │ ├── layouts │ │ │ ├── main.scss │ │ │ └── responsive.scss │ │ └── style.scss │ │ └── vendor │ │ └── jquery │ │ ├── jquery-ui.min.js │ │ └── jquery.min.js ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── main.ts ├── polyfills.ts ├── styles.css └── test.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.spec.json └── tslint.json /.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. 18 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://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 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Recap 2 | 3 | 4 | 5 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.3. 6 | 7 | ## Development server 8 | 9 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 10 | 11 | ## Code scaffolding 12 | 13 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 14 | 15 | ## Build 16 | 17 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 18 | 19 | ## Running unit tests 20 | 21 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 22 | 23 | ## Running end-to-end tests 24 | 25 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 26 | 27 | ## Further help 28 | 29 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. 30 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "cli": { 4 | "analytics": "70a2c3bf-5da2-4b4c-b454-2bb003f7a2db" 5 | }, 6 | "version": 1, 7 | "newProjectRoot": "projects", 8 | "projects": { 9 | "recap": { 10 | "projectType": "application", 11 | "schematics": { 12 | "@schematics/angular:application": { 13 | "strict": true 14 | } 15 | }, 16 | "root": "", 17 | "sourceRoot": "src", 18 | "prefix": "app", 19 | "architect": { 20 | "build": { 21 | "builder": "@angular-devkit/build-angular:browser", 22 | "options": { 23 | "outputPath": "dist/recap", 24 | "index": "src/index.html", 25 | "main": "src/main.ts", 26 | "polyfills": "src/polyfills.ts", 27 | "tsConfig": "tsconfig.app.json", 28 | "aot": true, 29 | "assets": [ 30 | "src/favicon.ico", 31 | "src/assets" 32 | ], 33 | "styles": [ 34 | "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", 35 | "./node_modules/bootstrap/dist/css/bootstrap.min.css", 36 | "./node_modules/bootstrap-select/dist/css/bootstrap-select.min.css", 37 | "node_modules/ngx-toastr/toastr.css", 38 | "src/styles.css" 39 | ], 40 | "scripts": [ 41 | "./node_modules/jquery/dist/jquery.min.js", 42 | "./node_modules/bootstrap/dist/js/bootstrap.min.js", 43 | "./node_modules/bootstrap-select/dist/js/bootstrap-select.min.js" 44 | ] 45 | }, 46 | "configurations": { 47 | "production": { 48 | "fileReplacements": [ 49 | { 50 | "replace": "src/environments/environment.ts", 51 | "with": "src/environments/environment.prod.ts" 52 | } 53 | ], 54 | "optimization": true, 55 | "outputHashing": "all", 56 | "sourceMap": false, 57 | "namedChunks": false, 58 | "extractLicenses": true, 59 | "vendorChunk": false, 60 | "buildOptimizer": true, 61 | "budgets": [ 62 | { 63 | "type": "initial", 64 | "maximumWarning": "500kb", 65 | "maximumError": "1mb" 66 | }, 67 | { 68 | "type": "anyComponentStyle", 69 | "maximumWarning": "2kb", 70 | "maximumError": "4kb" 71 | } 72 | ] 73 | } 74 | } 75 | }, 76 | "serve": { 77 | "builder": "@angular-devkit/build-angular:dev-server", 78 | "options": { 79 | "browserTarget": "recap:build" 80 | }, 81 | "configurations": { 82 | "production": { 83 | "browserTarget": "recap:build:production" 84 | } 85 | } 86 | }, 87 | "extract-i18n": { 88 | "builder": "@angular-devkit/build-angular:extract-i18n", 89 | "options": { 90 | "browserTarget": "recap:build" 91 | } 92 | }, 93 | "test": { 94 | "builder": "@angular-devkit/build-angular:karma", 95 | "options": { 96 | "main": "src/test.ts", 97 | "polyfills": "src/polyfills.ts", 98 | "tsConfig": "tsconfig.spec.json", 99 | "karmaConfig": "karma.conf.js", 100 | "assets": [ 101 | "src/favicon.ico", 102 | "src/assets" 103 | ], 104 | "styles": [ 105 | "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", 106 | "src/styles.css" 107 | ], 108 | "scripts": [] 109 | } 110 | }, 111 | "lint": { 112 | "builder": "@angular-devkit/build-angular:tslint", 113 | "options": { 114 | "tsConfig": [ 115 | "tsconfig.app.json", 116 | "tsconfig.spec.json", 117 | "e2e/tsconfig.json" 118 | ], 119 | "exclude": [ 120 | "**/node_modules/**" 121 | ] 122 | } 123 | }, 124 | "e2e": { 125 | "builder": "@angular-devkit/build-angular:protractor", 126 | "options": { 127 | "protractorConfig": "e2e/protractor.conf.js", 128 | "devServerTarget": "recap:serve" 129 | }, 130 | "configurations": { 131 | "production": { 132 | "devServerTarget": "recap:serve:production" 133 | } 134 | } 135 | } 136 | } 137 | } 138 | }, 139 | "defaultProject": "recap" 140 | } 141 | -------------------------------------------------------------------------------- /e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | browserName: 'chrome' 17 | }, 18 | directConnect: true, 19 | SELENIUM_PROMISE_MANAGER: false, 20 | baseUrl: 'http://localhost:4200/', 21 | framework: 'jasmine', 22 | jasmineNodeOpts: { 23 | showColors: true, 24 | defaultTimeoutInterval: 30000, 25 | print: function() {} 26 | }, 27 | onPrepare() { 28 | require('ts-node').register({ 29 | project: require('path').join(__dirname, './tsconfig.json') 30 | }); 31 | jasmine.getEnv().addReporter(new SpecReporter({ 32 | spec: { 33 | displayStacktrace: StacktraceOption.PRETTY 34 | } 35 | })); 36 | } 37 | }; -------------------------------------------------------------------------------- /e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { browser, logging } from 'protractor'; 2 | import { AppPage } from './app.po'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', async () => { 12 | await page.navigateTo(); 13 | expect(await page.getTitleText()).toEqual('recap app is running!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | async navigateTo(): Promise { 5 | return browser.get(browser.baseUrl); 6 | } 7 | 8 | async getTitleText(): Promise { 9 | return element(by.css('app-root .content span')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "../tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "../out-tsc/e2e", 6 | "module": "commonjs", 7 | "target": "es2018", 8 | "types": [ 9 | "jasmine", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | jasmine: { 17 | // you can add configuration options for Jasmine here 18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html 19 | // for example, you can disable the random execution with `random: false` 20 | // or set a specific seed with `seed: 4321` 21 | }, 22 | clearContext: false // leave Jasmine Spec Runner output visible in browser 23 | }, 24 | jasmineHtmlReporter: { 25 | suppressAll: true // removes the duplicated traces 26 | }, 27 | coverageReporter: { 28 | dir: require('path').join(__dirname, './coverage/recap'), 29 | subdir: '.', 30 | reporters: [ 31 | { type: 'html' }, 32 | { type: 'text-summary' } 33 | ] 34 | }, 35 | reporters: ['progress', 'kjhtml'], 36 | port: 9876, 37 | colors: true, 38 | logLevel: config.LOG_INFO, 39 | autoWatch: true, 40 | browsers: ['Chrome'], 41 | singleRun: false, 42 | restartOnFileChange: true 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "recap", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "^11.2.6", 15 | "@angular/cdk": "^11.2.8", 16 | "@angular/common": "~11.2.4", 17 | "@angular/compiler": "~11.2.4", 18 | "@angular/core": "~11.2.4", 19 | "@angular/forms": "~11.2.4", 20 | "@angular/material": "^11.2.8", 21 | "@angular/platform-browser": "~11.2.4", 22 | "@angular/platform-browser-dynamic": "~11.2.4", 23 | "@angular/router": "~11.2.4", 24 | "@fortawesome/fontawesome-free": "^5.15.3", 25 | "@material-ui/pickers": "^3.3.10", 26 | "bootstrap": "^5.0.0-beta2", 27 | "bootstrap-icons": "^1.4.1", 28 | "bootstrap-select": "^1.13.18", 29 | "font-awesome": "^4.7.0", 30 | "jquery": "^3.6.0", 31 | "moment": "^2.29.1", 32 | "ng-bootstrap-icons": "^1.3.0", 33 | "ngx-toastr": "^13.2.1", 34 | "popper.js": "^1.16.1", 35 | "poppins-font": "^1.0.1", 36 | "rxjs": "~6.6.0", 37 | "tslib": "^2.0.0", 38 | "typeface-poppins": "^1.1.13", 39 | "zone.js": "~0.11.3" 40 | }, 41 | "devDependencies": { 42 | "@angular-devkit/build-angular": "~0.1102.3", 43 | "@angular/cli": "~11.2.3", 44 | "@angular/compiler-cli": "~11.2.4", 45 | "@types/jasmine": "~3.6.0", 46 | "@types/jquery": "^3.5.5", 47 | "@types/node": "^12.11.1", 48 | "codelyzer": "^6.0.0", 49 | "jasmine-core": "~3.6.0", 50 | "jasmine-spec-reporter": "~5.0.0", 51 | "karma": "~6.1.0", 52 | "karma-chrome-launcher": "~3.1.0", 53 | "karma-coverage": "~2.0.3", 54 | "karma-jasmine": "~4.0.0", 55 | "karma-jasmine-html-reporter": "^1.5.0", 56 | "protractor": "~7.0.0", 57 | "ts-node": "~8.3.0", 58 | "tslint": "~6.1.0", 59 | "typescript": "~4.1.5" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | import { BrandListComponent } from './components/brand-list/brand-list.component'; 4 | import { CarAddComponent } from './components/car/car-add/car-add.component'; 5 | import { CarDetailComponent } from './components/car/car-detail/car-detail.component'; 6 | import { CarUpdateComponent } from './components/car/car-update/car-update.component'; 7 | import { CarComponent } from './components/car/car.component'; 8 | import { ColorListComponent } from './components/color-list/color-list.component'; 9 | import { LoginComponent } from './components/auth/login/login.component'; 10 | import { PaymentComponent } from './components/payment/payment.component'; 11 | import { ProfileComponent } from './components/auth/profile/profile.component'; 12 | import { RegisterComponent } from './components/auth/register/register.component'; 13 | import { RentalManagementComponent } from './components/auth/rental-management/rental-management.component'; 14 | import { RentalComponent } from './components/car/car-detail/rental/rental.component'; 15 | import { LoginGuard } from "./guards/login.guard"; 16 | 17 | const routes: Routes = [ 18 | { path: "", pathMatch: "full", redirectTo: "cars" }, 19 | { 20 | path: 'cars', children: [ 21 | { path: "", component: CarComponent }, 22 | { path: "brand/:brandId", component: CarComponent }, 23 | { path: "color/:colorId", component: CarComponent }, 24 | { path: "brand/:brandId", component: CarComponent }, 25 | { path: "color/:colorId", component: CarComponent }, 26 | { path: "brand/:brandId/color/:colorId", component: CarComponent }, 27 | { path: "brand/:brandId/cars/cardetail/:carId", component: CarComponent }, 28 | { path: "color/:colorId/cars/cardetail/:carId", component: CarComponent }, 29 | 30 | { path: "update/:carId", component: CarUpdateComponent }, 31 | 32 | { path: "add", component: CarAddComponent, canActivate: [LoginGuard] }, 33 | ] 34 | }, 35 | { 36 | path: "auth", children: [ 37 | { path: "rentals", component: RentalManagementComponent }, 38 | { path: "register", component: RegisterComponent }, 39 | { path: "profile", component: ProfileComponent }, 40 | { path: "login", component: LoginComponent }, 41 | ] 42 | }, 43 | 44 | { path: "brand/list", component: BrandListComponent, canActivate: [LoginGuard] }, 45 | { path: "color/list", component: ColorListComponent, canActivate: [LoginGuard] }, 46 | 47 | { path: "cardetail/:carId", component: CarDetailComponent }, 48 | { path: "payment/:rental", component: PaymentComponent }, 49 | { path: "rental/:carId", component: RentalComponent }, 50 | ]; 51 | 52 | @NgModule({ 53 | imports: [RouterModule.forRoot(routes)], 54 | exports: [RouterModule] 55 | }) 56 | export class AppRoutingModule { } 57 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | height: 100vh; 3 | display: block; 4 | } 5 | .content { 6 | padding: 2rem; 7 | box-sizing: border-box; 8 | } 9 | .card-content { 10 | padding: 1rem; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(async () => { 7 | await TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | }); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'recap'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.componentInstance; 26 | expect(app.title).toEqual('recap'); 27 | }); 28 | 29 | it('should render title', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.nativeElement; 33 | expect(compiled.querySelector('.content span').textContent).toContain('recap app is running!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'recap'; 10 | } 11 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 3 | import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; 4 | import { FormsModule, ReactiveFormsModule } from "@angular/forms"; 5 | import { BrowserModule } from '@angular/platform-browser'; 6 | 7 | import { CarDetailComponent } from './components/car/car-detail/car-detail.component'; 8 | import { CarFilterComponent } from './components/car/car-filter/car-filter.component'; 9 | import { RentalComponent } from './components/car/car-detail/rental/rental.component'; 10 | import { NaviComponent } from './components/master/navi/navi.component'; 11 | import { CarComponent } from './components/car/car.component'; 12 | 13 | import { FilterBrandPipePipe } from './pipes/filter-brand-pipe.pipe'; 14 | import { FilterColorPipePipe } from './pipes/filter-color-pipe.pipe'; 15 | 16 | import { AppRoutingModule } from './app-routing.module'; 17 | import { AppComponent } from './app.component'; 18 | 19 | import { AuthInterceptor } from './interceptors/auth.interceptor'; 20 | import { ToastrModule } from 'ngx-toastr'; 21 | 22 | import { RentalManagementComponent } from './components/auth/rental-management/rental-management.component'; 23 | import { CardSavedComponent } from './components/payment/card-saved/card-saved.component'; 24 | import { CarUpdateComponent } from './components/car/car-update/car-update.component'; 25 | import { BrandListComponent } from './components/brand-list/brand-list.component'; 26 | import { ColorListComponent } from './components/color-list/color-list.component'; 27 | import { AuthMenuComponent } from './components/master/navi/auth-menu/auth-menu.component'; 28 | import { RegisterComponent } from './components/auth/register/register.component'; 29 | import { PaymentComponent } from './components/payment/payment.component'; 30 | import { ProfileComponent } from './components/auth/profile/profile.component'; 31 | import { CarAddComponent } from './components/car/car-add/car-add.component'; 32 | import { FooterComponent } from './components/master/footer/footer.component'; 33 | import { LoginComponent } from './components/auth/login/login.component'; 34 | 35 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 36 | import { MasterComponent } from './components/master/master.component'; 37 | import { MatDatepickerModule } from '@angular/material/datepicker'; 38 | import { MatFormFieldModule } from '@angular/material/form-field'; 39 | import { MatPaginatorModule } from '@angular/material/paginator'; 40 | import { MatExpansionModule } from '@angular/material/expansion'; 41 | import { MatToolbarModule } from '@angular/material/toolbar'; 42 | import { MatNativeDateModule } from '@angular/material/core'; 43 | import { MatButtonModule } from '@angular/material/button'; 44 | import { MatInputModule } from '@angular/material/input'; 45 | import { MatTableModule } from '@angular/material/table'; 46 | import { MatSortModule } from '@angular/material/sort'; 47 | import { MatIconModule } from '@angular/material/icon'; 48 | import { MatCardModule } from '@angular/material/card'; 49 | 50 | 51 | @NgModule({ 52 | declarations: [ 53 | RentalManagementComponent, 54 | FilterBrandPipePipe, 55 | FilterColorPipePipe, 56 | CarDetailComponent, 57 | CarFilterComponent, 58 | CarUpdateComponent, 59 | BrandListComponent, 60 | ColorListComponent, 61 | CardSavedComponent, 62 | AuthMenuComponent, 63 | RegisterComponent, 64 | ProfileComponent, 65 | PaymentComponent, 66 | MasterComponent, 67 | FooterComponent, 68 | RentalComponent, 69 | CarAddComponent, 70 | LoginComponent, 71 | NaviComponent, 72 | AppComponent, 73 | CarComponent, 74 | ], 75 | imports: [ 76 | MatProgressSpinnerModule, 77 | MatDatepickerModule, 78 | MatNativeDateModule, 79 | MatFormFieldModule, 80 | MatPaginatorModule, 81 | MatExpansionModule, 82 | AppRoutingModule, 83 | MatToolbarModule, 84 | HttpClientModule, 85 | MatButtonModule, 86 | MatTableModule, 87 | MatInputModule, 88 | BrowserModule, 89 | MatSortModule, 90 | MatIconModule, 91 | MatCardModule, 92 | FormsModule, 93 | ReactiveFormsModule, 94 | BrowserAnimationsModule, 95 | ToastrModule.forRoot({ 96 | positionClass: "toast-bottom-right" 97 | }), 98 | ], 99 | providers: [ 100 | MatDatepickerModule, 101 | { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }, 102 | ], 103 | bootstrap: [AppComponent] 104 | }) 105 | export class AppModule { } 106 | -------------------------------------------------------------------------------- /src/app/components/auth/login/login.component.html: -------------------------------------------------------------------------------- 1 |
2 | 34 |
-------------------------------------------------------------------------------- /src/app/components/auth/login/login.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { 3 | FormGroup, 4 | FormBuilder, 5 | Validators, 6 | } from '@angular/forms'; 7 | import { ToastrService } from 'ngx-toastr'; 8 | import { CustomerDetail } from 'src/app/models/details/customerDetail'; 9 | import { LoginModel } from 'src/app/models/loginModel'; 10 | import { AuthService } from 'src/app/services/auth.service'; 11 | import { CustomerService } from 'src/app/services/customer.service'; 12 | import { LocalStorageService } from 'src/app/services/local-storage.service'; 13 | 14 | @Component({ 15 | selector: 'app-login', 16 | templateUrl: './login.component.html', 17 | styleUrls: ['./login.component.css'], 18 | }) 19 | export class LoginComponent implements OnInit { 20 | loginForm: FormGroup; 21 | customerDetail: CustomerDetail; 22 | currentCustomerEmail: string = ''; 23 | 24 | constructor( 25 | private formBuilder: FormBuilder, 26 | private authService: AuthService, 27 | private toastrService: ToastrService, 28 | private localStorageService: LocalStorageService, 29 | private customerService: CustomerService 30 | ) { } 31 | 32 | ngOnInit(): void { 33 | this.createLoginForm(); 34 | this.setCurrentCustomerEmail(); 35 | } 36 | 37 | createLoginForm() { 38 | this.loginForm = this.formBuilder.group({ 39 | email: [this.currentCustomerEmail, [Validators.required, Validators.email]], 40 | password: ['', [Validators.required]], 41 | }); 42 | } 43 | 44 | setCurrentCustomerEmail() { 45 | this.localStorageService.getCurrentCustomer() 46 | ? (this.currentCustomerEmail = this.localStorageService.getCurrentCustomer().email) 47 | : null; 48 | } 49 | 50 | login() { 51 | if (this.loginForm.invalid) { 52 | this.toastrService.warning('Lütfen boş alan bırakmayınız', 'Dikkat'); 53 | return; 54 | } 55 | let loginModel: LoginModel = Object.assign({}, this.loginForm.value); 56 | 57 | this.authService.login(loginModel).subscribe( 58 | (responseSuccess) => { 59 | this.toastrService.info(responseSuccess.message, 'Giriş Başarılı'); 60 | this.localStorageService.setToken(responseSuccess.data); 61 | this.getCustomerByEmail(loginModel.email); 62 | 63 | }, 64 | (responseError) => { 65 | return this.toastrService.error(responseError.error, 'Hata'); 66 | } 67 | ); 68 | } 69 | 70 | getCustomerByEmail(email: string) { 71 | this.customerService.getCustomerByEmail(email).subscribe((response) => { 72 | this.customerDetail = response.data; 73 | this.localStorageService.setCurrentCustomer(this.customerDetail); 74 | window.location.replace('/cars'); 75 | }); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/app/components/auth/profile/profile.component.css: -------------------------------------------------------------------------------- 1 | img { 2 | border-radius: 50% !important; 3 | border-color: blue; 4 | } 5 | .user-heading a { 6 | border-radius: 50% !important; 7 | -webkit-border-radius: 50% !important; 8 | border: 10px solid rgba(255, 255, 255, 0.3); 9 | display: inline-block; 10 | } 11 | .card-header { 12 | background-color: #bda9f7; 13 | } 14 | .material-icons.md-18 { 15 | font-size: 18px; 16 | width: 18px; 17 | height: 18px; 18 | } 19 | .material-icons.md-24 { 20 | font-size: 24px; 21 | width: 24px; 22 | height: auto; 23 | } 24 | .material-icons.md-36 { 25 | font-size: 36px; 26 | width: 36px; 27 | height: 36px; 28 | } 29 | .material-icons.md-48 { 30 | font-size: 48px; 31 | width: 36px; 32 | height: 48px; 33 | } 34 | .material-icons.md-100 { 35 | font-size: 100px; 36 | width: 100px; 37 | height: auto; 38 | cursor: pointer; 39 | } 40 | .element { 41 | display: inline-flex; 42 | align-items: center; 43 | height: 12rem; 44 | } 45 | mat-icon:hover { 46 | opacity: 0.6; 47 | } 48 | #addFotograph { 49 | display: none; 50 | } 51 | .example-headers-align .mat-expansion-panel-header-title, 52 | .example-headers-align .mat-expansion-panel-header-description { 53 | flex-basis: 0; 54 | } 55 | .example-headers-align .mat-expansion-panel-header-description { 56 | justify-content: space-between; 57 | align-items: center; 58 | } 59 | .example-headers-align .mat-form-field + .mat-form-field { 60 | margin-left: 8px; 61 | } 62 | -------------------------------------------------------------------------------- /src/app/components/auth/profile/profile.component.ts: -------------------------------------------------------------------------------- 1 | import { DatePipe } from '@angular/common'; 2 | import { Component, OnInit } from '@angular/core'; 3 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 4 | import { Router } from '@angular/router'; 5 | import { ToastrService } from 'ngx-toastr'; 6 | import { CustomerDetail } from 'src/app/models/details/customerDetail'; 7 | import { RentalDetail } from 'src/app/models/details/rentalDetail'; 8 | import { AuthService } from 'src/app/services/auth.service'; 9 | import { LocalStorageService } from 'src/app/services/local-storage.service'; 10 | import { RentalService } from 'src/app/services/rental.service'; 11 | 12 | declare var $: any; 13 | 14 | @Component({ 15 | selector: 'app-profile', 16 | templateUrl: './profile.component.html', 17 | styleUrls: ['./profile.component.css'], 18 | }) 19 | export class ProfileComponent implements OnInit { 20 | customerToUpdate: CustomerDetail; 21 | customerUpdateForm: FormGroup; 22 | rentals: RentalDetail[] = []; 23 | returnDate: Date; 24 | step = 0; 25 | 26 | constructor( 27 | private localStorageService: LocalStorageService, 28 | private formBuilder: FormBuilder, 29 | private toastrService: ToastrService, 30 | private authService: AuthService, 31 | private router: Router, 32 | private rentalService: RentalService, 33 | ) { } 34 | 35 | ngOnInit(): void { 36 | this.getCustomer(); 37 | this.getRentalByCustomer(); 38 | this.createCustomerUpdateForm(); 39 | } 40 | 41 | getCustomer() { 42 | this.customerToUpdate = this.localStorageService.getCurrentCustomer(); 43 | } 44 | 45 | getRentalByCustomer() { 46 | this.rentalService.getRentalByCustomerId(this.customerToUpdate.customerId).subscribe( 47 | (responseSuccess) => { 48 | this.rentals = responseSuccess.data; 49 | this.returnDate = (responseSuccess.data[0].returnDate); 50 | }) 51 | } 52 | 53 | createCustomerUpdateForm() { 54 | this.customerUpdateForm = this.formBuilder.group({ 55 | firstName: [this.customerToUpdate.firstName, [Validators.required]], 56 | lastName: [this.customerToUpdate.lastName, [Validators.required]], 57 | companyName: [this.customerToUpdate.companyName], 58 | email: [this.customerToUpdate.email, [Validators.required, Validators.email]], 59 | password: ['', [Validators.required]], 60 | confirmPassword: ['', [Validators.required]], 61 | findexPoint: [this.customerToUpdate.findexPoint] 62 | }); 63 | } 64 | 65 | update() { 66 | if (this.customerUpdateForm.invalid) { 67 | this.toastrService.warning('Bilgileri kontrol ediniz', 'Dikkat'); 68 | return; 69 | } 70 | 71 | if (this.customerUpdateForm.value['password'] != this.customerUpdateForm.value['confirmPassword']) { 72 | this.toastrService.warning('Şifreler uyuşmuyor', 'Dikkat'); 73 | return; 74 | } 75 | delete this.customerUpdateForm.value['confirmPassword']; 76 | this.customerToUpdate = Object.assign({ ...this.customerToUpdate }, this.customerUpdateForm.value); 77 | 78 | this.authService.update(this.customerToUpdate).subscribe( 79 | (responseSuccess) => { 80 | this.localStorageService.removeCurrentCustomer(); 81 | this.localStorageService.setCurrentCustomer(this.customerToUpdate); 82 | this.toastrService.success("Kullanıcı Güncellendi", 'Başarılı'); 83 | return this.router.navigate(["/cars"]); 84 | }, 85 | (responseError) => { 86 | if (responseError.error.ValidationErrors) { 87 | for (let i = 0; i < responseError.error.ValidationErrors.length; i++) { 88 | this.toastrService.error(responseError.error.ValidationErrors[i].ErrorMessage, 'Doğrulama Hatası'); 89 | } 90 | return; 91 | } 92 | this.toastrService.error(responseError.error.StatusCode + ' ' + responseError.error.Message, responseError.name); 93 | } 94 | ); 95 | } 96 | 97 | setStep(index: number) { 98 | this.step = index; 99 | } 100 | nextStep() { 101 | this.step++; 102 | } 103 | prevStep() { 104 | this.step--; 105 | } 106 | addFoto() { 107 | document.getElementById("addFotograph").click(); 108 | } 109 | setFindexColor() { 110 | if (this.customerToUpdate.findexPoint < 100) { 111 | return "color:red;"; 112 | } 113 | return "color:green;"; 114 | } 115 | setReturnDateColor(setReturnDate:Date) { 116 | let now = new Date(Date.now()); 117 | var checkReturnDate = new Date(setReturnDate.toString()); 118 | if (checkReturnDate > now) { 119 | return "color: green;"; 120 | } 121 | return "color: red;"; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/app/components/auth/register/register.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/app/components/auth/register/register.component.css -------------------------------------------------------------------------------- /src/app/components/auth/register/register.component.html: -------------------------------------------------------------------------------- 1 |
2 | 45 |
-------------------------------------------------------------------------------- /src/app/components/auth/register/register.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 3 | import { Router } from '@angular/router'; 4 | import { ToastrService } from 'ngx-toastr'; 5 | import { CustomerDetail } from 'src/app/models/details/customerDetail'; 6 | import { RegisterModel } from 'src/app/models/registerModel'; 7 | import { AuthService } from 'src/app/services/auth.service'; 8 | import { CustomerService } from 'src/app/services/customer.service'; 9 | import { LocalStorageService } from 'src/app/services/local-storage.service'; 10 | 11 | @Component({ 12 | selector: 'app-register', 13 | templateUrl: './register.component.html', 14 | styleUrls: ['./register.component.css', '../login/login.component.css'], 15 | }) 16 | export class RegisterComponent implements OnInit { 17 | registerForm: FormGroup; 18 | customerDetail: CustomerDetail; 19 | 20 | constructor( 21 | private formBuilder: FormBuilder, 22 | private toastrService: ToastrService, 23 | private authService: AuthService, 24 | private router: Router, 25 | private localStorageService: LocalStorageService, 26 | private customerService: CustomerService 27 | ) { } 28 | 29 | ngOnInit(): void { 30 | this.createRegisterForm(); 31 | } 32 | 33 | createRegisterForm() { 34 | this.registerForm = this.formBuilder.group({ 35 | firstName: ['', [Validators.required]], 36 | lastName: ['', [Validators.required]], 37 | email: ['', [Validators.required, Validators.email]], 38 | password: ['', [Validators.required]], 39 | confirmPassword: ['', [Validators.required]], 40 | }); 41 | } 42 | 43 | register() { 44 | if (this.registerForm.invalid) { 45 | this.toastrService.warning('Lütfen boş alan bırakmayınız', 'Dikkat'); 46 | return; 47 | } 48 | if ( 49 | this.registerForm.value['password'] != 50 | this.registerForm.value['confirmPassword'] 51 | ) { 52 | this.toastrService.error('Şifreler uyuşmuyor', 'Hata'); 53 | return; 54 | } 55 | delete this.registerForm.value['confirmPassword']; 56 | let registerModel: RegisterModel = Object.assign({},this.registerForm.value); 57 | this.authService.register(registerModel).subscribe( 58 | (responseSuccess) => { 59 | this.localStorageService.setToken(responseSuccess.data); 60 | this.getCustomerByEmail(registerModel.email); 61 | this.toastrService.success(responseSuccess.message, 'Başarılı'); 62 | 63 | return this.router.navigate(['/cars']); 64 | }, 65 | (responseError) => { 66 | if (responseError.error.ValidationErrors) { 67 | for ( 68 | let i = 0; 69 | i < responseError.error.ValidationErrors.length; 70 | i++ 71 | ) { 72 | this.toastrService.error( 73 | responseError.error.ValidationErrors[i].ErrorMessage, 74 | 'Doğrulama Hatası' 75 | ); 76 | } 77 | return; 78 | } 79 | this.toastrService.error( 80 | responseError.status + ' ' + responseError.name, 81 | responseError.error 82 | ); 83 | } 84 | ); 85 | } 86 | 87 | getCustomerByEmail(email: string) { 88 | this.customerService 89 | .getCustomerByEmail(email) 90 | .subscribe((responseSuccess) => { 91 | this.customerDetail = responseSuccess.data; 92 | this.localStorageService.setCurrentCustomer(this.customerDetail); 93 | }); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/app/components/auth/rental-management/rental-management.component.css: -------------------------------------------------------------------------------- 1 | td:last-child { 2 | text-align: center; 3 | } 4 | .formButton { 5 | padding: 0.1em 0.4em; 6 | } 7 | table { 8 | width: 100%; 9 | } 10 | .hide { 11 | display: none; 12 | } 13 | mat-footer-row mat-footer-cell { 14 | justify-content: center; 15 | font-style: italic; 16 | } 17 | .search-div { 18 | margin: 10px; 19 | } 20 | .search-form-field { 21 | width: 60%; 22 | margin-left: 10px; 23 | padding: 5px 10px; 24 | background-color: #f5f5f5; 25 | border-radius: 5px; 26 | } 27 | .search-form-field div.mat-form-field-underline { 28 | display: none; 29 | } 30 | .search-form-field div.mat-form-field-infix { 31 | border-top: 0px; 32 | } 33 | .search-form-field div.mat-form-field-wrapper { 34 | padding-bottom: 0px; 35 | } 36 | .search-form-field div.mat-form-field-suffix button { 37 | height: 32px; 38 | width: 32px; 39 | } 40 | -------------------------------------------------------------------------------- /src/app/components/auth/rental-management/rental-management.component.html: -------------------------------------------------------------------------------- 1 | 26 | 27 |
28 | 29 | menu 30 | RentACar 31 | navigate_next 32 | Kiralanan Araç Listesi 33 | 34 | car_rental 35 | 36 |
37 | 40 | 41 | 42 | 45 | 46 |
47 |
48 | 49 | 50 | 51 | Id 52 | {{element.rentalId}} 53 | 54 | 55 | 56 | Araba 57 | {{element.brandName}} {{ element.carModelYear }} 58 | 59 | 60 | 61 | Müşteri 62 | {{element.firstName}} {{ element.lastName }} 63 | 64 | 65 | 66 | Kiralanan Tarih 67 | {{ element.rentDate | date:'dd.MM.y hh:mm' }} 68 | 69 | 70 | 71 | Teslim Tarihi 72 | 73 | {{ element.returnDate | date:'dd.MM.y hh:mm' }} 74 | Teslim tarihi bilinmiyor 75 | 76 | 77 | 78 | 79 | 80 | Loading Data... 81 | 82 | 83 | 84 | 85 | No data. 86 | 87 | 88 | 89 | 90 | 91 | 92 | 94 | 95 | 96 | 97 |
98 |
-------------------------------------------------------------------------------- /src/app/components/auth/rental-management/rental-management.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | import { MatPaginator } from '@angular/material/paginator'; 3 | import { MatSort } from '@angular/material/sort'; 4 | import { MatTableDataSource } from '@angular/material/table'; 5 | import { Rental } from 'src/app/models/entities/rental'; 6 | import { RentalService } from 'src/app/services/rental.service'; 7 | 8 | @Component({ 9 | selector: 'app-rental-management', 10 | templateUrl: './rental-management.component.html', 11 | styleUrls: ['./rental-management.component.css'], 12 | }) 13 | export class RentalManagementComponent implements OnInit { 14 | rentDetails: Rental[] = []; 15 | dataLoaded = false; 16 | 17 | displayedColumns: string[] = ['rentalId', 'araba', 'musteri', 'kiralamaTarih', 'teslimTarih']; 18 | 19 | listData: MatTableDataSource; 20 | searchKey: string; 21 | 22 | @ViewChild(MatSort) sort: MatSort; 23 | @ViewChild(MatPaginator) paginator: MatPaginator; 24 | 25 | constructor(private rentalService: RentalService) { } 26 | 27 | ngOnInit(): void { 28 | this.getRentals(); 29 | } 30 | 31 | getRentals() { 32 | this.rentalService.getRental().subscribe((response) => { 33 | this.rentDetails = response.data; 34 | this.dataLoaded = response.success; 35 | 36 | this.listData = new MatTableDataSource(this.rentDetails); 37 | this.listData.sort = this.sort; 38 | this.listData.paginator = this.paginator; 39 | }); 40 | } 41 | 42 | onSearchClear() { 43 | this.searchKey = ""; 44 | this.applyFilter(); 45 | } 46 | 47 | applyFilter() { 48 | this.listData.filter = this.searchKey.trim().toLowerCase(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/app/components/brand-list/brand-list.component.css: -------------------------------------------------------------------------------- 1 | td:last-child { 2 | text-align: center; 3 | } 4 | .formButton { 5 | padding: 0.1em 0.4em; 6 | } 7 | table { 8 | width: 100%; 9 | } 10 | .hide { 11 | display: none; 12 | } 13 | mat-footer-row mat-footer-cell { 14 | justify-content: center; 15 | font-style: italic; 16 | } 17 | .search-div { 18 | margin: 10px; 19 | } 20 | .search-form-field { 21 | width: 60%; 22 | margin-left: 10px; 23 | padding: 5px 10px; 24 | background-color: #f5f5f5; 25 | border-radius: 5px; 26 | } 27 | .search-form-field div.mat-form-field-underline { 28 | display: none; 29 | } 30 | .search-form-field div.mat-form-field-infix { 31 | border-top: 0px; 32 | } 33 | .search-form-field div.mat-form-field-wrapper { 34 | padding-bottom: 0px; 35 | } 36 | .search-form-field div.mat-form-field-suffix button { 37 | height: 32px; 38 | width: 32px; 39 | } 40 | -------------------------------------------------------------------------------- /src/app/components/brand-list/brand-list.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | menu 4 | RentACar 5 | navigate_next 6 | Marka Listesi  7 | 8 | directions_car_field 9 | 10 |
11 | 14 | 15 | 16 | 19 | 20 |
21 |
22 | 23 | 24 | 25 | Id 26 | {{element.brandId}} 27 | 28 | 29 | 30 | Name 31 | {{element.brandName}} 32 | 33 | 34 | 35 | 36 | 37 | 41 | 45 | 46 | 47 | 48 | 49 | 50 | Loading Data... 51 | 52 | 53 | 54 | 55 | No data. 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
67 |
68 | 69 | 70 | 94 | 95 | 96 | 97 | 125 | 126 | 127 | 128 | 156 | -------------------------------------------------------------------------------- /src/app/components/brand-list/brand-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 3 | import { MatPaginator } from '@angular/material/paginator'; 4 | import { MatSort } from '@angular/material/sort'; 5 | import { MatTableDataSource } from '@angular/material/table'; 6 | import { ToastrService } from 'ngx-toastr'; 7 | import { Brand } from 'src/app/models/entities/brand'; 8 | import { BrandService } from 'src/app/services/brand.service'; 9 | 10 | @Component({ 11 | selector: 'app-brand-list', 12 | templateUrl: './brand-list.component.html', 13 | styleUrls: ['./brand-list.component.css'], 14 | }) 15 | export class BrandListComponent implements OnInit { 16 | brands: Brand[] = []; 17 | dataLoaded = false; 18 | brand: Brand; 19 | brandAddForm: FormGroup; 20 | brandUpdateForm: FormGroup; 21 | brandDeleteForm: FormGroup; 22 | selectedBrand: Brand; 23 | 24 | displayedColumns: string[] = ['brandId', 'brandName', 'actions']; 25 | 26 | listData: MatTableDataSource; 27 | searchKey: string; 28 | 29 | @ViewChild(MatSort) sort: MatSort; 30 | @ViewChild(MatPaginator) paginator: MatPaginator; 31 | 32 | constructor( 33 | private brandService: BrandService, 34 | private toastrService: ToastrService, 35 | private formBuilder: FormBuilder 36 | ) { } 37 | 38 | ngOnInit(): void { 39 | this.getBrands(); 40 | this.addCreateForm(); 41 | } 42 | 43 | getBrands() { 44 | this.brandService.getBrands().subscribe((response) => { 45 | this.brands = response.data; 46 | this.dataLoaded = response.success; 47 | 48 | this.listData = new MatTableDataSource(this.brands); 49 | this.listData.sort = this.sort; 50 | this.listData.paginator = this.paginator; 51 | }); 52 | } 53 | 54 | onSearchClear() { 55 | this.searchKey = ""; 56 | this.applyFilter(); 57 | } 58 | 59 | applyFilter() { 60 | this.listData.filter = this.searchKey.trim().toLowerCase(); 61 | } 62 | 63 | addCreateForm() { 64 | this.brandAddForm = this.formBuilder.group({ 65 | brandName: ['', [Validators.required]], 66 | }); 67 | } 68 | 69 | updateCreateForm() { 70 | this.brandUpdateForm = this.formBuilder.group({ 71 | brandId: [this.brand.brandId, [Validators.required]], 72 | brandName: [this.brand.brandName, [Validators.required]], 73 | }); 74 | } 75 | 76 | deleteCreateForm() { 77 | this.brandDeleteForm = this.formBuilder.group({ 78 | brandId: [this.brand.brandId, [Validators.required]], 79 | brandName: [this.brand.brandName, [Validators.required]], 80 | }); 81 | } 82 | 83 | addBrand() { 84 | if (this.brandAddForm.valid) { 85 | let addBrandModel = Object.assign({}, this.brandAddForm.value); 86 | this.brandService.addBrand(addBrandModel).subscribe( 87 | (response) => { 88 | this.toastrService.success(response.message, 'Başarılı'); 89 | setTimeout(() => { 90 | window.location.reload(); 91 | }, 2000); 92 | }, 93 | (responseError) => { 94 | if (responseError.error.ValidationErrors.length > 0) { 95 | for ( 96 | let i = 0; 97 | i < responseError.error.ValidationErrors.length; 98 | i++ 99 | ) { 100 | this.toastrService.error( 101 | responseError.error.ValidationErrors[i].ErrorMessage, 102 | 'Doğrulama Hatası' 103 | ); 104 | } 105 | } 106 | } 107 | ); 108 | } else { 109 | this.toastrService.warning( 110 | 'Marka ismi boş olamaz', 111 | 'Ekleme Başarısız'); 112 | } 113 | } 114 | 115 | updateBrand(brand: Brand) { 116 | this.brand = brand; 117 | this.updateCreateForm(); 118 | } 119 | 120 | btnUpdateBrand() { 121 | if (this.brandUpdateForm.valid) { 122 | let brandModel = Object.assign({}, this.brandUpdateForm.value); 123 | this.brandService.updateBrand(brandModel).subscribe( 124 | (response) => { 125 | this.toastrService.success(response.message, 'Başarılı'); 126 | setTimeout(() => { 127 | window.location.reload(); 128 | }, 2000); 129 | }, 130 | (responseError) => { 131 | if (responseError.error.ValidationErrors.length > 0) { 132 | for ( 133 | let i = 0; 134 | i < responseError.error.ValidationErrors.length; 135 | i++ 136 | ) { 137 | this.toastrService.error( 138 | responseError.error.ValidationErrors[i].ErrorMessage, 139 | 'Doğrulama Hatası' 140 | ); 141 | } 142 | } 143 | } 144 | ); 145 | } else { 146 | this.toastrService.warning( 147 | 'Marka ismi boş olamaz', 148 | 'Güncelleme Başarısız' 149 | ); 150 | } 151 | } 152 | 153 | deleteBrand(brand: Brand) { 154 | this.brand = brand; 155 | this.deleteCreateForm(); 156 | } 157 | 158 | btnDeleteBrand() { 159 | if (this.brandDeleteForm.valid) { 160 | let brandModel = Object.assign({}, this.brandDeleteForm.value); 161 | this.brandService.deleteBrand(brandModel).subscribe( 162 | (response) => { 163 | this.toastrService.success(response.message, 'Başarılı'); 164 | setTimeout(() => { 165 | window.location.reload(); 166 | }, 2000); 167 | }, 168 | (responseError) => { 169 | if (responseError.error.ValidationErrors.length > 0) { 170 | for ( 171 | let i = 0; 172 | i < responseError.error.ValidationErrors.length; 173 | i++ 174 | ) { 175 | this.toastrService.error( 176 | responseError.error.ValidationErrors[i].ErrorMessage, 177 | 'Doğrulama Hatası' 178 | ); 179 | } 180 | } 181 | } 182 | ); 183 | } else { 184 | this.toastrService.warning( 185 | 'Marka ismi boş olamaz', 186 | 'Güncelleme Başarısız' 187 | ); 188 | } 189 | } 190 | } 191 | -------------------------------------------------------------------------------- /src/app/components/car/car-add/car-add.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/app/components/car/car-add/car-add.component.css -------------------------------------------------------------------------------- /src/app/components/car/car-add/car-add.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
Araba ekle
5 |
6 |
7 |
8 |
9 | 10 | 11 |
12 | 13 | Araba adı zorunludur 14 | 15 | 16 | Minimum 2 karakter olmalıdır 17 | 18 |
19 | 20 | 21 |
22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
31 | 32 | 33 |
34 |
35 |
36 | 41 |
42 |
-------------------------------------------------------------------------------- /src/app/components/car/car-add/car-add.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { 3 | FormGroup, 4 | FormBuilder, 5 | Validators, 6 | } from '@angular/forms'; 7 | import { ToastrService } from 'ngx-toastr'; 8 | import { CarService } from 'src/app/services/car.service'; 9 | 10 | @Component({ 11 | selector: 'app-car-add', 12 | templateUrl: './car-add.component.html', 13 | styleUrls: ['./car-add.component.css'], 14 | }) 15 | export class CarAddComponent implements OnInit { 16 | carAddForm: FormGroup; 17 | 18 | constructor( 19 | private formBuilder: FormBuilder, 20 | private carService: CarService, 21 | private toastrService: ToastrService 22 | ) { } 23 | 24 | ngOnInit(): void { 25 | this.createCarAddForm(); 26 | } 27 | 28 | createCarAddForm() { 29 | this.carAddForm = this.formBuilder.group({ 30 | brandName: ['', [Validators.required, Validators.minLength(2)]], 31 | colorName: ['', [Validators.required, Validators.minLength(2)]], 32 | carModelYear: [0, [Validators.required, Validators.min(1950)]], 33 | carDailyPrice: [0, [Validators.required, Validators.min(0)]], 34 | carDescription: ['', [Validators.required]], 35 | }); 36 | } 37 | 38 | add() { 39 | if (this.carAddForm.valid) { 40 | let carModel = Object.assign({}, this.carAddForm.value); 41 | this.carService.add(carModel).subscribe( 42 | (response) => { 43 | this.toastrService.success(response.message, 'Başarılı!'); 44 | }, 45 | (responseError) => { 46 | if (responseError.error.ValudationErrors.length > 0) { 47 | for ( 48 | let i = 0; 49 | i < responseError.error.ValudationErrors.length; 50 | i++ 51 | ) { 52 | this.toastrService.error( 53 | responseError.error.ValudationErrors[i].ErrorMessage, 54 | 'Doğrulama Hatası' 55 | ); 56 | } 57 | this.toastrService.error( 58 | responseError.error.ValudationErrors, 59 | "Doğrulama Hatası" 60 | ); 61 | } 62 | } 63 | ); 64 | } else { 65 | this.toastrService.error('Formunuz Eksik', 'Dikkat!') 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/app/components/car/car-detail/car-detail.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/app/components/car/car-detail/car-detail.component.css -------------------------------------------------------------------------------- /src/app/components/car/car-detail/car-detail.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Loading... 4 |
5 |
6 |
7 |
8 | {{ carDetail.brandName }} - {{ carDetail.carModelYear }} 9 |
10 | 73 |
-------------------------------------------------------------------------------- /src/app/components/car/car-detail/car-detail.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { ActivatedRoute } from '@angular/router'; 3 | import { CarDetail } from 'src/app/models/details/carDetail'; 4 | import { CarImage } from 'src/app/models/entities/carImage'; 5 | import { CarImageService } from 'src/app/services/car-image.service'; 6 | import { CarService } from 'src/app/services/car.service'; 7 | 8 | @Component({ 9 | selector: 'app-car-detail', 10 | templateUrl: './car-detail.component.html', 11 | styleUrls: ['./car-detail.component.css'] 12 | }) 13 | 14 | export class CarDetailComponent implements OnInit { 15 | 16 | carImages: CarImage[] = []; 17 | carDetail: CarDetail; 18 | dataLoaded = false; 19 | apiUrl: string = "https://localhost:44352"; 20 | 21 | constructor(private carService: CarService, 22 | private carImageService: CarImageService, 23 | private activatedRoute: ActivatedRoute 24 | ) { } 25 | 26 | ngOnInit(): void { 27 | this.activatedRoute.params.subscribe(params => { 28 | this.getCarDetailsByCarId(params["carId"]); 29 | this.getCarImagesByCarId(params["carId"]); 30 | }) 31 | } 32 | 33 | getCarDetailsByCarId(carId: number) { 34 | this.carService.getCarDetailsByCarId(carId).subscribe(response => { 35 | this.carDetail = response.data; 36 | this.dataLoaded = true; 37 | }); 38 | } 39 | 40 | getCarImagesByCarId(carId: number) { 41 | this.carImageService.getCarImagesByCarId(carId).subscribe(response => { 42 | this.carImages = response.data; 43 | this.dataLoaded = true; 44 | }) 45 | } 46 | 47 | getSliderClassName(index: number) { 48 | if (index == 0) { 49 | return "carousel-item active"; 50 | } else { 51 | return "carousel-item"; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/app/components/car/car-detail/rental/rental.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/app/components/car/car-detail/rental/rental.component.css -------------------------------------------------------------------------------- /src/app/components/car/car-detail/rental/rental.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 6 |
7 | 8 | 9 | -------------------------------------------------------------------------------- /src/app/components/car/car-detail/rental/rental.component.ts: -------------------------------------------------------------------------------- 1 | import { DatePipe } from '@angular/common'; 2 | import { Component, Input, OnInit } from '@angular/core'; 3 | import { Router } from '@angular/router'; 4 | import { ToastrService } from 'ngx-toastr'; 5 | import { CarDetail } from 'src/app/models/details/carDetail'; 6 | import { RentalDetail } from 'src/app/models/details/rentalDetail'; 7 | import { Customer } from 'src/app/models/entities/customer'; 8 | import { LocalStorageService } from 'src/app/services/local-storage.service'; 9 | 10 | @Component({ 11 | selector: 'app-rental', 12 | templateUrl: './rental.component.html', 13 | styleUrls: ['./rental.component.css'], 14 | providers: [DatePipe], 15 | }) 16 | export class RentalComponent implements OnInit { 17 | customers: Customer[]; 18 | customerId: number; 19 | rentDate: Date; 20 | returnDate: Date; 21 | @Input() carDetail: CarDetail; 22 | dataLoaded = false; 23 | 24 | minDate: string | any; 25 | maxDate: string | null; 26 | maxMinDate: string | null; 27 | firstDateSelected: boolean = false; 28 | 29 | constructor( 30 | private router: Router, 31 | private toastrService: ToastrService, 32 | private datePipe: DatePipe, 33 | private localStorageService: LocalStorageService 34 | ) { } 35 | 36 | ngOnInit(): void { } 37 | 38 | getRentMinDate() { 39 | this.minDate = this.datePipe.transform(new Date(), 'yyyy-MM-dd'); 40 | return this.minDate; 41 | } 42 | 43 | getReturnMinDate() { 44 | if (this.rentDate != undefined) { 45 | let stringToDate = new Date(this.rentDate); 46 | let new_date = new Date(); 47 | new_date.setDate(stringToDate.getDate() + 1); 48 | return new_date.toISOString().slice(0, 10); 49 | } else { 50 | return this.rentDate; 51 | } 52 | } 53 | getReturnMaxDate() { 54 | this.maxDate = this.datePipe.transform( 55 | new Date(new Date().setFullYear(new Date().getFullYear() + 1)), 56 | 'yyyy-MM-dd' 57 | ); 58 | return this.maxDate; 59 | } 60 | 61 | createRental() { 62 | let MyRental: RentalDetail; 63 | if (localStorage.getItem('token') && this.rentDate != undefined) { 64 | //@ts-ignore 65 | MyRental = { 66 | carId: this.carDetail.carId, 67 | brandName: this.carDetail.brandName, 68 | colorName: this.carDetail.colorName, 69 | carModelYear: this.carDetail.carModelYear, 70 | carDailyPrice: this.carDetail.carDailyPrice, 71 | carDescription: this.carDetail.carDescription, 72 | rentDate: this.rentDate, 73 | returnDate: this.returnDate, 74 | customerId: this.localStorageService.getCurrentCustomer().customerId 75 | }; 76 | this.toastrService.info( 77 | 'Ödeme sayfasına yönlendiriliyorsunuz.', 78 | 'Ödeme İşlemleri' 79 | ); 80 | this.router.navigate(['/payment/', JSON.stringify(MyRental)]); 81 | } else if (!localStorage.getItem('token')) { 82 | this.toastrService.info('Giriş Yapın', 'Araba Kiralayabilmek için'); 83 | } else { 84 | this.toastrService.error('Dikkat', 'Tarih Seçtiğinizden Emin Olun'); 85 | } 86 | } 87 | 88 | onChangeEvent(event: any) { 89 | this.minDate = event.target.value; 90 | this.firstDateSelected = true; 91 | } 92 | 93 | setCustomerId(customerId: string) { 94 | this.customerId = +customerId; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/app/components/car/car-filter/car-filter.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/app/components/car/car-filter/car-filter.component.css -------------------------------------------------------------------------------- /src/app/components/car/car-filter/car-filter.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 10 |
11 | 12 |
13 | 20 |
21 |
22 |
23 |
24 | 27 |
28 |
29 |
30 |
31 | 34 |
35 |
36 |
37 |
-------------------------------------------------------------------------------- /src/app/components/car/car-filter/car-filter.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { ActivatedRoute, Router } from '@angular/router'; 3 | import { Brand } from 'src/app/models/entities/brand'; 4 | import { Color } from 'src/app/models/entities/color'; 5 | import { BrandService } from 'src/app/services/brand.service'; 6 | import { ColorService } from 'src/app/services/color.service'; 7 | 8 | @Component({ 9 | selector: 'app-car-filter', 10 | templateUrl: './car-filter.component.html', 11 | styleUrls: ['./car-filter.component.css'] 12 | }) 13 | export class CarFilterComponent implements OnInit { 14 | brands: Brand[] = []; 15 | colors: Color[] = []; 16 | brandIdFilter: number; 17 | colorIdFilter: number; 18 | 19 | constructor( 20 | private brandService: BrandService, 21 | private colorService: ColorService, 22 | private activatedRoute: ActivatedRoute, 23 | private router: Router) { } 24 | 25 | ngOnInit(): void { 26 | this.brandIdFilter = Number(this.activatedRoute.snapshot.paramMap.get('brandId')); 27 | this.colorIdFilter = Number(this.activatedRoute.snapshot.paramMap.get('colorId')); 28 | this.getBrands(); 29 | this.getColors(); 30 | } 31 | 32 | getBrands() { 33 | this.brandService.getBrands().subscribe(respone => { 34 | this.brands = respone.data; 35 | }) 36 | } 37 | 38 | getColors() { 39 | this.colorService.getColors().subscribe(response => { 40 | this.colors = response.data; 41 | }) 42 | } 43 | 44 | clearFilter() { 45 | this.brandIdFilter = 0; 46 | this.colorIdFilter = 0; 47 | } 48 | 49 | setFilteredRoute(brandIdFilter: number, colorIdFilter: number) { 50 | if (brandIdFilter && colorIdFilter) { 51 | this.router.navigate(['/cars/brand/' + brandIdFilter + '/color/' + colorIdFilter]); 52 | } else if (brandIdFilter) { 53 | this.router.navigate(['/cars/brand/' + brandIdFilter]); 54 | } else if (colorIdFilter) { 55 | this.router.navigate(['/cars/color/' + colorIdFilter]); 56 | } else { 57 | this.router.navigate(['/cars']); 58 | } 59 | } 60 | 61 | getSelectedBrand(brandId: number) { 62 | if (this.brandIdFilter == brandId) { 63 | return true; 64 | } else { 65 | return false; 66 | } 67 | } 68 | 69 | getSelectedColor(colorId: number) { 70 | if (this.colorIdFilter == colorId) { 71 | return true; 72 | } else { 73 | return false; 74 | } 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/app/components/car/car-update/car-update.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/app/components/car/car-update/car-update.component.css -------------------------------------------------------------------------------- /src/app/components/car/car-update/car-update.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
Araç Güncelle
4 |
5 |
6 |
7 |
8 |
9 |
10 | 11 |
12 | 17 |
18 |
19 |
20 |
21 |
22 | 23 |
24 | 29 |
30 |
31 |
32 |
33 |
34 |
35 | 36 |
37 | 38 |
39 |
40 |
41 |
42 |
43 |
44 | 45 |
46 | 47 |
48 |
49 |
50 |
51 |
52 | 53 |
54 | 55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 |
63 | 64 |
65 |
66 |
67 |
68 |
69 | 74 |
-------------------------------------------------------------------------------- /src/app/components/car/car-update/car-update.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 3 | import { ActivatedRoute } from '@angular/router'; 4 | import { ToastrService } from 'ngx-toastr'; 5 | import { Brand } from 'src/app/models/entities/brand'; 6 | import { CarDetail } from 'src/app/models/details/carDetail'; 7 | import { Color } from 'src/app/models/entities/color'; 8 | import { BrandService } from 'src/app/services/brand.service'; 9 | import { CarService } from 'src/app/services/car.service'; 10 | import { ColorService } from 'src/app/services/color.service'; 11 | 12 | @Component({ 13 | selector: 'app-car-update', 14 | templateUrl: './car-update.component.html', 15 | styleUrls: ['./car-update.component.css'], 16 | }) 17 | export class CarUpdateComponent implements OnInit { 18 | carUpdateForm: FormGroup; 19 | carDetail: CarDetail; 20 | 21 | brands: Brand[]; 22 | colors: Color[]; 23 | 24 | constructor( 25 | private formBuilder: FormBuilder, 26 | private brandService: BrandService, 27 | private colorService: ColorService, 28 | private carService: CarService, 29 | private toastrService: ToastrService, 30 | private activatedRoute: ActivatedRoute 31 | ) { } 32 | 33 | ngOnInit(): void { 34 | this.createCarUpdateForm(); 35 | this.getBrands(); 36 | this.getColors(); 37 | this.activatedRoute.params.subscribe((params) => { 38 | if (params['carId']) { 39 | this.getCarDetailsByCarId(params['carId']); 40 | } 41 | }); 42 | } 43 | 44 | createCarUpdateForm() { 45 | this.carUpdateForm = this.formBuilder.group({ 46 | brandName: ['', [Validators.required]], 47 | brandId: ['', [Validators.required]], 48 | colorId: ['', [Validators.required]], 49 | carModelYear: [0, [Validators.required]], 50 | carDailyPrice: [0, [Validators.required]], 51 | carDescription: ['', [Validators.required]], 52 | }); 53 | } 54 | 55 | getBrands() { 56 | this.brandService.getBrands().subscribe((response) => { 57 | this.brands = response.data; 58 | }); 59 | } 60 | 61 | getColors() { 62 | this.colorService.getColors().subscribe((response) => { 63 | this.colors = response.data; 64 | }); 65 | } 66 | 67 | updateCar() { 68 | if (this.carUpdateForm.valid) { 69 | let carModel = Object.assign({}, this.carUpdateForm.value); 70 | carModel.id = this.carDetail.carId; 71 | this.carService.update(carModel).subscribe( 72 | (response) => { 73 | this.toastrService.success(response.message); 74 | }, 75 | (responseError) => { 76 | this.toastrService.success(responseError.message); 77 | } 78 | ); 79 | } else { 80 | this.toastrService.error('Form eksik', 'Hata'); 81 | } 82 | } 83 | 84 | getCarDetailsByCarId(carId: number) { 85 | this.carService.getCarDetailsByCarId(carId).subscribe((response) => { 86 | this.carDetail = response.data; 87 | this.carUpdateForm.setValue({ 88 | brandName: this.carDetail.brandName, 89 | brandId: this.carDetail.brandId, 90 | colorId: this.carDetail.colorId, 91 | carModelYear: this.carDetail.carModelYear, 92 | carDailyPrice: this.carDetail.carDailyPrice, 93 | carDescription: this.carDetail.carDescription, 94 | }); 95 | }); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/app/components/car/car.component.css: -------------------------------------------------------------------------------- 1 | .card { 2 | margin-top: 1rem; 3 | border: 1px solid rgba(10, 10, 10, 0.1); 4 | box-shadow: 0px 0px 15px 3px rgba(10, 10, 10, 0.1); 5 | } 6 | td:last-child { 7 | text-align: center; 8 | } 9 | .formButton { 10 | padding: 0.1em 0.4em; 11 | } 12 | table { 13 | width: 100%; 14 | } 15 | .hide { 16 | display: none; 17 | } 18 | mat-footer-row mat-footer-cell { 19 | justify-content: center; 20 | font-style: italic; 21 | } 22 | .search-div { 23 | margin: 10px; 24 | } 25 | .search-form-field { 26 | width: 60%; 27 | margin-left: 10px; 28 | padding: 5px 10px; 29 | background-color: #f5f5f5; 30 | border-radius: 5px; 31 | } 32 | .search-form-field div.mat-form-field-underline { 33 | display: none; 34 | } 35 | .search-form-field div.mat-form-field-infix { 36 | border-top: 0px; 37 | } 38 | .search-form-field div.mat-form-field-wrapper { 39 | padding-bottom: 0px; 40 | } 41 | .search-form-field div.mat-form-field-suffix button { 42 | height: 32px; 43 | width: 32px; 44 | } 45 | .d-flex { 46 | display: flex; 47 | flex-wrap: wrap; 48 | } 49 | -------------------------------------------------------------------------------- /src/app/components/car/car.component.html: -------------------------------------------------------------------------------- 1 | 45 | 46 | 47 |
48 | 49 |
50 |
51 |
52 | 53 |
54 |
    55 |
  • {{ carDetail.carModelYear 56 | }}
  • 57 |
  • {{ carDetail.brandName }} 58 |
  • 59 |
  • 60 | {{ carDetail.carDailyPrice }} ₺ 61 |
  • 62 |
  • 63 | {{ carDetail.colorName }} 64 |
  • 65 |
  • {{ 66 | carDetail.findexPoint 67 | }}
  • 68 |
69 |
70 | 73 |
74 |
75 |
76 | 77 | 78 | 79 | Loading Data... 80 | 81 | 82 | 83 | 84 | No data. 85 | 86 | 87 | 88 | 89 |
-------------------------------------------------------------------------------- /src/app/components/car/car.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; 2 | import { MatPaginator } from '@angular/material/paginator'; 3 | import { MatTableDataSource } from '@angular/material/table'; 4 | import { ActivatedRoute } from '@angular/router'; 5 | import { Observable } from 'rxjs'; 6 | import { CarDetail } from 'src/app/models/details/carDetail'; 7 | import { CarService } from 'src/app/services/car.service'; 8 | 9 | 10 | @Component({ 11 | selector: 'app-car', 12 | templateUrl: './car.component.html', 13 | styleUrls: ['./car.component.css'] 14 | }) 15 | export class CarComponent implements OnInit, OnDestroy { 16 | carDetail: CarDetail[] = []; 17 | apiUrl: string = "https://localhost:44352"; 18 | dataLoaded = false; 19 | 20 | @ViewChild(MatPaginator) paginator: MatPaginator; 21 | obs: Observable; 22 | dataSource: MatTableDataSource; 23 | 24 | constructor(private carService: CarService, 25 | private activatedRoute: ActivatedRoute, 26 | private changeDetectorRef: ChangeDetectorRef) { } 27 | 28 | ngOnInit(): void { 29 | this.activatedRoute.params.subscribe(params => { 30 | if (params["brandId"] && params["colorId"]) { 31 | this.getCarDetails(params["brandId"], params["colorId"]); 32 | } 33 | else if (params["brandId"]) { 34 | this.getCarsByBrandId(params["brandId"]); 35 | } 36 | else if (params["colorId"]) { 37 | this.getCarsByColorId(params["colorId"]) 38 | } 39 | else { 40 | this.getCars(); 41 | } 42 | }) 43 | } 44 | 45 | ngOnDestroy() { 46 | if (this.dataSource) { 47 | this.dataSource.disconnect(); 48 | } 49 | } 50 | 51 | getCars() { 52 | this.carService.getCars().subscribe(response => { 53 | this.carDetail = response.data; 54 | this.dataLoaded = true; 55 | 56 | this.changeDetectorRef.detectChanges(); 57 | this.dataSource = new MatTableDataSource(this.carDetail); 58 | this.dataSource.paginator = this.paginator; 59 | this.obs = this.dataSource.connect(); 60 | }) 61 | } 62 | 63 | getCarsByBrandId(brandId: number) { 64 | this.carService.getCarsByBrandId(brandId).subscribe(response => { 65 | this.carDetail = response.data; 66 | this.dataLoaded = true; 67 | 68 | this.changeDetectorRef.detectChanges(); 69 | this.dataSource = new MatTableDataSource(this.carDetail); 70 | this.dataSource.paginator = this.paginator; 71 | this.obs = this.dataSource.connect(); 72 | }) 73 | } 74 | 75 | getCarsByColorId(colorId: number) { 76 | this.carService.getCarsByColorId(colorId).subscribe(response => { 77 | this.carDetail = response.data; 78 | this.dataLoaded = true; 79 | 80 | this.changeDetectorRef.detectChanges(); 81 | this.dataSource = new MatTableDataSource(this.carDetail); 82 | this.dataSource.paginator = this.paginator; 83 | this.obs = this.dataSource.connect(); 84 | }) 85 | } 86 | 87 | getCarDetails(brandId: number, colorId: number) { 88 | this.carService.getCarDetails(brandId, colorId).subscribe(response => { 89 | this.carDetail = response.data; 90 | this.dataLoaded = true; 91 | 92 | this.changeDetectorRef.detectChanges(); 93 | this.dataSource = new MatTableDataSource(this.carDetail); 94 | this.dataSource.paginator = this.paginator; 95 | this.obs = this.dataSource.connect(); 96 | }) 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/app/components/color-list/color-list.component.css: -------------------------------------------------------------------------------- 1 | td:last-child { 2 | text-align: center; 3 | } 4 | .formButton { 5 | padding: 0.1em 0.4em; 6 | } 7 | table { 8 | width: 100%; 9 | } 10 | .hide { 11 | display: none; 12 | } 13 | mat-footer-row mat-footer-cell { 14 | justify-content: center; 15 | font-style: italic; 16 | } 17 | .search-div { 18 | margin: 10px; 19 | } 20 | .search-form-field { 21 | width: 60%; 22 | margin-left: 10px; 23 | padding: 5px 10px; 24 | background-color: #f5f5f5; 25 | border-radius: 5px; 26 | } 27 | .search-form-field div.mat-form-field-underline { 28 | display: none; 29 | } 30 | .search-form-field div.mat-form-field-infix { 31 | border-top: 0px; 32 | } 33 | .search-form-field div.mat-form-field-wrapper { 34 | padding-bottom: 0px; 35 | } 36 | .search-form-field div.mat-form-field-suffix button { 37 | height: 32px; 38 | width: 32px; 39 | } 40 | -------------------------------------------------------------------------------- /src/app/components/color-list/color-list.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | menu 4 | RentACar 5 | navigate_next 6 | Renk Listesi 7 | 8 | format_paint 9 | 10 |
11 | 14 | 15 | 16 | 19 | 20 |
21 |
22 | 23 | 24 | 25 | Id 26 | {{element.colorId}} 27 | 28 | 29 | 30 | Name 31 | {{element.colorName}} 32 | 33 | 34 | 35 | 36 | 37 | 41 | 45 | 46 | 47 | 48 | 49 | 50 | Loading Data... 51 | 52 | 53 | 54 | 55 | No data. 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
67 |
68 | 69 | 70 | 94 | 95 | 96 | 97 | 125 | 126 | 127 | 128 | 156 | -------------------------------------------------------------------------------- /src/app/components/color-list/color-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 3 | import { MatPaginator } from '@angular/material/paginator'; 4 | import { MatSort } from '@angular/material/sort'; 5 | import { MatTableDataSource } from '@angular/material/table'; 6 | import { ToastrService } from 'ngx-toastr'; 7 | import { Color } from 'src/app/models/entities/color'; 8 | import { ColorService } from 'src/app/services/color.service'; 9 | 10 | @Component({ 11 | selector: 'app-color-list', 12 | templateUrl: './color-list.component.html', 13 | styleUrls: ['./color-list.component.css'] 14 | }) 15 | export class ColorListComponent implements OnInit { 16 | colors: Color[] = []; 17 | dataLoaded = false; 18 | color: Color; 19 | colorAddForm: FormGroup; 20 | colorUpdateForm: FormGroup; 21 | colorDeleteForm: FormGroup; 22 | selectedColor: Color; 23 | 24 | displayedColumns: string[] = ['colorId', 'colorName', 'actions']; 25 | 26 | listData: MatTableDataSource; 27 | searchKey: string; 28 | 29 | @ViewChild(MatSort) sort: MatSort; 30 | @ViewChild(MatPaginator) paginator: MatPaginator; 31 | 32 | constructor( 33 | private colorService: ColorService, 34 | private toastrService: ToastrService, 35 | private formBuilder: FormBuilder 36 | ) { } 37 | 38 | ngOnInit(): void { 39 | this.getColors(); 40 | this.addCreateForm(); 41 | } 42 | 43 | getColors() { 44 | this.colorService.getColors().subscribe((response) => { 45 | this.colors = response.data; 46 | this.dataLoaded = response.success; 47 | 48 | this.listData = new MatTableDataSource(this.colors); 49 | this.listData.sort = this.sort; 50 | this.listData.paginator = this.paginator; 51 | }); 52 | } 53 | 54 | onSearchClear() { 55 | this.searchKey = ""; 56 | this.applyFilter(); 57 | } 58 | 59 | applyFilter() { 60 | this.listData.filter = this.searchKey.trim().toLowerCase(); 61 | } 62 | 63 | addCreateForm() { 64 | this.colorAddForm = this.formBuilder.group({ 65 | colorName: ['', [Validators.required]], 66 | }); 67 | } 68 | 69 | updateCreateForm() { 70 | this.colorUpdateForm = this.formBuilder.group({ 71 | colorId: [this.color.colorId, [Validators.required]], 72 | colorName: [this.color.colorName, [Validators.required]], 73 | }); 74 | } 75 | 76 | deleteCreateForm() { 77 | this.colorDeleteForm = this.formBuilder.group({ 78 | colorId: [this.color.colorId, [Validators.required]], 79 | colorName: [this.color.colorName, [Validators.required]], 80 | }); 81 | } 82 | 83 | addColor() { 84 | if (this.colorAddForm.valid) { 85 | let addColorModel = Object.assign({}, this.colorAddForm.value); 86 | this.colorService.addColor(addColorModel).subscribe( 87 | (response) => { 88 | this.toastrService.success(response.message, 'Başarılı'); 89 | setTimeout(() => { 90 | window.location.reload(); 91 | }, 2000); 92 | }, 93 | (responseError) => { 94 | if (responseError.error.ValidationErrors.length > 0) { 95 | for ( 96 | let i = 0; 97 | i < responseError.error.ValidationErrors.length; 98 | i++ 99 | ) { 100 | this.toastrService.error( 101 | responseError.error.ValidationErrors[i].ErrorMessage, 102 | 'Doğrulama Hatası' 103 | ); 104 | } 105 | } 106 | } 107 | ); 108 | } else { 109 | this.toastrService.warning( 110 | 'Marka ismi boş olamaz', 111 | 'Ekleme Başarısız'); 112 | } 113 | } 114 | 115 | updateColor(color: Color) { 116 | this.color = color; 117 | this.updateCreateForm(); 118 | } 119 | 120 | btnUpdateColor() { 121 | if (this.colorUpdateForm.valid) { 122 | let colorModel = Object.assign({}, this.colorUpdateForm.value); 123 | this.colorService.updateColor(colorModel).subscribe( 124 | (response) => { 125 | this.toastrService.success(response.message, 'Başarılı'); 126 | setTimeout(() => { 127 | window.location.reload(); 128 | }, 1500); 129 | }, 130 | (responseError) => { 131 | if (responseError.error.ValidationErrors.length > 0) { 132 | for ( 133 | let i = 0; 134 | i < responseError.error.ValidationErrors.length; 135 | i++ 136 | ) { 137 | this.toastrService.error( 138 | responseError.error.ValidationErrors[i].ErrorMessage, 139 | 'Doğrulama Hatası' 140 | ); 141 | } 142 | } 143 | } 144 | ); 145 | } else { 146 | this.toastrService.warning( 147 | 'Marka ismi boş olamaz', 148 | 'Güncelleme Başarısız' 149 | ); 150 | } 151 | } 152 | 153 | deleteColor(color: Color) { 154 | this.color = color; 155 | this.deleteCreateForm(); 156 | } 157 | 158 | btnDeleteColor() { 159 | if (this.colorDeleteForm.valid) { 160 | let colorModel = Object.assign({}, this.colorDeleteForm.value); 161 | this.colorService.deleteColor(colorModel).subscribe( 162 | (response) => { 163 | this.toastrService.success(response.message, 'Başarılı'); 164 | setTimeout(() => { 165 | window.location.reload(); 166 | }, 2000); 167 | }, 168 | (responseError) => { 169 | if (responseError.error.ValidationErrors.length > 0) { 170 | for ( 171 | let i = 0; 172 | i < responseError.error.ValidationErrors.length; 173 | i++ 174 | ) { 175 | this.toastrService.error( 176 | responseError.error.ValidationErrors[i].ErrorMessage, 177 | 'Doğrulama Hatası' 178 | ); 179 | } 180 | } 181 | } 182 | ); 183 | } else { 184 | this.toastrService.warning( 185 | 'Marka ismi boş olamaz', 186 | 'Güncelleme Başarısız' 187 | ); 188 | } 189 | } 190 | } -------------------------------------------------------------------------------- /src/app/components/master/footer/footer.component.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #fbfbfd; 3 | } 4 | .new_footer_area { 5 | background: #fbfbfd; 6 | } 7 | .new_footer_top { 8 | padding: 120px 0px 270px; 9 | position: relative; 10 | overflow-x: hidden; 11 | } 12 | .new_footer_area .footer_bottom { 13 | padding-top: 5px; 14 | padding-bottom: 50px; 15 | } 16 | .footer_bottom { 17 | font-size: 14px; 18 | font-weight: 300; 19 | line-height: 20px; 20 | color: #7f88a6; 21 | padding: 27px 0px; 22 | } 23 | .new_footer_top .company_widget p { 24 | font-size: 16px; 25 | font-weight: 300; 26 | line-height: 28px; 27 | color: #6a7695; 28 | margin-bottom: 20px; 29 | } 30 | .new_footer_top .company_widget .f_subscribe_two .btn_get { 31 | border-width: 1px; 32 | margin-top: 20px; 33 | } 34 | .btn_get_two:hover { 35 | background: transparent; 36 | color: #5e2ced; 37 | } 38 | .btn_get:hover { 39 | color: #fff; 40 | background: #6754e2; 41 | border-color: #6754e2; 42 | -webkit-box-shadow: none; 43 | box-shadow: none; 44 | } 45 | a:hover, 46 | a:focus, 47 | .btn:hover, 48 | .btn:focus, 49 | button:hover, 50 | button:focus { 51 | text-decoration: none; 52 | outline: none; 53 | } 54 | .new_footer_top .f_widget.about-widget .f_list li a:hover { 55 | color: #5e2ced; 56 | } 57 | .new_footer_top .f_widget.about-widget .f_list li { 58 | margin-bottom: 11px; 59 | } 60 | .f_widget.about-widget .f_list li:last-child { 61 | margin-bottom: 0px; 62 | } 63 | .f_widget.about-widget .f_list li { 64 | margin-bottom: 15px; 65 | } 66 | .f_widget.about-widget .f_list { 67 | margin-bottom: 0px; 68 | } 69 | .new_footer_top .f_social_icon a { 70 | width: 44px; 71 | height: 44px; 72 | line-height: 43px; 73 | background: transparent; 74 | border: 1px solid #e2e2eb; 75 | font-size: 24px; 76 | } 77 | .f_social_icon a { 78 | width: 46px; 79 | height: 46px; 80 | border-radius: 50%; 81 | font-size: 14px; 82 | line-height: 45px; 83 | color: #858da8; 84 | display: inline-block; 85 | background: #ebeef5; 86 | text-align: center; 87 | -webkit-transition: all 0.2s linear; 88 | -o-transition: all 0.2s linear; 89 | transition: all 0.2s linear; 90 | } 91 | .ti-facebook:before { 92 | content: "\e741"; 93 | } 94 | .ti-twitter-alt:before { 95 | content: "\e74b"; 96 | } 97 | .ti-vimeo-alt:before { 98 | content: "\e74a"; 99 | } 100 | .ti-pinterest:before { 101 | content: "\e731"; 102 | } 103 | .btn_get_two { 104 | -webkit-box-shadow: none; 105 | box-shadow: none; 106 | background: #5e2ced; 107 | border-color: #5e2ced; 108 | color: #fff; 109 | } 110 | .btn_get_two:hover { 111 | background: transparent; 112 | color: #5e2ced; 113 | } 114 | .new_footer_top .f_social_icon a:hover { 115 | background: #5e2ced; 116 | border-color: #5e2ced; 117 | color: white; 118 | } 119 | .new_footer_top .f_social_icon a + a { 120 | margin-left: 4px; 121 | } 122 | .new_footer_top .f-title { 123 | margin-bottom: 30px; 124 | color: #263b5e; 125 | } 126 | .f_600 { 127 | font-weight: 600; 128 | } 129 | .f_size_18 { 130 | font-size: 18px; 131 | } 132 | h1, 133 | h2, 134 | h3, 135 | h4, 136 | h5, 137 | h6 { 138 | color: #4b505e; 139 | } 140 | .new_footer_top .f_widget.about-widget .f_list li a { 141 | color: #6a7695; 142 | } 143 | .new_footer_top .footer_bg { 144 | position: absolute; 145 | bottom: 0; 146 | background: url("http://droitthemes.com/html/saasland/img/seo/footer_bg.png") 147 | no-repeat scroll center 0; 148 | width: 100%; 149 | height: 266px; 150 | } 151 | .new_footer_top .footer_bg .footer_bg_one { 152 | background: url("https://1.bp.blogspot.com/-mvKUJFGEc-k/XclCOUSvCnI/AAAAAAAAUAE/jnBSf6Fe5_8tjjlKrunLBXwceSNvPcp3wCLcBGAsYHQ/s1600/volks.gif") 153 | no-repeat center center; 154 | width: 330px; 155 | height: 105px; 156 | background-size: 100%; 157 | position: absolute; 158 | bottom: 0; 159 | left: 30%; 160 | -webkit-animation: myfirst 22s linear infinite; 161 | animation: myfirst 22s linear infinite; 162 | } 163 | .new_footer_top .footer_bg .footer_bg_two { 164 | background: url("https://1.bp.blogspot.com/-hjgfxUW1o1g/Xck--XOdlxI/AAAAAAAAT_4/JWYFJl83usgRFMvRfoKkSDGd--_Sv04UQCLcBGAsYHQ/s1600/cyclist.gif") 165 | no-repeat center center; 166 | width: 88px; 167 | height: 100px; 168 | background-size: 100%; 169 | bottom: 0; 170 | left: 38%; 171 | position: absolute; 172 | -webkit-animation: myfirst 30s linear infinite; 173 | animation: myfirst 30s linear infinite; 174 | } 175 | @-moz-keyframes myfirst { 176 | 0% { 177 | left: -25%; 178 | } 179 | 100% { 180 | left: 100%; 181 | } 182 | } 183 | @-webkit-keyframes myfirst { 184 | 0% { 185 | left: -25%; 186 | } 187 | 100% { 188 | left: 100%; 189 | } 190 | } 191 | @keyframes myfirst { 192 | 0% { 193 | left: -25%; 194 | } 195 | 100% { 196 | left: 100%; 197 | } 198 | } 199 | /*************footer End*****************/ 200 | -------------------------------------------------------------------------------- /src/app/components/master/footer/footer.component.html: -------------------------------------------------------------------------------- 1 |
2 | 79 | 95 |
-------------------------------------------------------------------------------- /src/app/components/master/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-footer', 5 | templateUrl: './footer.component.html', 6 | styleUrls: ['./footer.component.css'] 7 | }) 8 | export class FooterComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit(): void { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/components/master/master.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/app/components/master/master.component.css -------------------------------------------------------------------------------- /src/app/components/master/master.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /src/app/components/master/master.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-master', 5 | templateUrl: './master.component.html', 6 | styleUrls: ['./master.component.css'] 7 | }) 8 | export class MasterComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit(): void { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/components/master/navi/auth-menu/auth-menu.component.css: -------------------------------------------------------------------------------- 1 | .b-example-divider { 2 | height: 3rem; 3 | background-color: rgba(0, 0, 0, 0.1); 4 | border: solid rgba(0, 0, 0, 0.15); 5 | border-width: 1px 0; 6 | box-shadow: inset 0 0.5em 1.5em rgba(0, 0, 0, 0.1), 7 | inset 0 0.125em 0.5em rgba(0, 0, 0, 0.15); 8 | } 9 | 10 | .form-control-dark { 11 | color: #fff; 12 | background-color: var(--bs-dark); 13 | border-color: var(--bs-gray); 14 | } 15 | .form-control-dark:focus { 16 | color: #fff; 17 | background-color: var(--bs-dark); 18 | border-color: #fff; 19 | box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25); 20 | } 21 | 22 | .bi { 23 | vertical-align: -0.125em; 24 | fill: currentColor; 25 | } 26 | 27 | .text-small { 28 | font-size: 85%; 29 | } 30 | 31 | .dropdown-toggle { 32 | outline: 0; 33 | } 34 | 35 | .bd-placeholder-img { 36 | font-size: 1.125rem; 37 | text-anchor: middle; 38 | -webkit-user-select: none; 39 | -moz-user-select: none; 40 | user-select: none; 41 | } 42 | 43 | @media (min-width: 768px) { 44 | .bd-placeholder-img-lg { 45 | font-size: 3.5rem; 46 | } 47 | } 48 | 49 | svg, 50 | i { 51 | cursor: pointer; 52 | } 53 | -------------------------------------------------------------------------------- /src/app/components/master/navi/auth-menu/auth-menu.component.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /src/app/components/master/navi/auth-menu/auth-menu.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import { ToastrService } from 'ngx-toastr'; 4 | import { CustomerDetail } from 'src/app/models/details/customerDetail'; 5 | import { AuthService } from 'src/app/services/auth.service'; 6 | import { LocalStorageService } from 'src/app/services/local-storage.service'; 7 | 8 | @Component({ 9 | selector: 'app-auth-menu', 10 | templateUrl: './auth-menu.component.html', 11 | styleUrls: ['./auth-menu.component.css'], 12 | }) 13 | export class AuthMenuComponent implements OnInit { 14 | 15 | constructor( 16 | private authService: AuthService, 17 | private localStorageService: LocalStorageService, 18 | private toastrService: ToastrService, 19 | private router: Router 20 | ) { } 21 | 22 | ngOnInit(): void { } 23 | 24 | isAuth() { 25 | return this.authService.isAuthenticated(); 26 | } 27 | 28 | logout() { 29 | this.localStorageService.removeToken(); 30 | this.localStorageService.removeCurrentCustomer(); 31 | this.toastrService.success('Çıkış yapıldı', 'Başarılı'); 32 | 33 | return this.router.navigate(['/auth/login']); 34 | } 35 | 36 | getCurrentCustomer(): CustomerDetail { 37 | return this.localStorageService.getCurrentCustomer(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/app/components/master/navi/navi.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/app/components/master/navi/navi.component.css -------------------------------------------------------------------------------- /src/app/components/master/navi/navi.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/master/navi/navi.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; 2 | import { MatSlideToggleChange } from '@angular/material/slide-toggle'; 3 | 4 | @Component({ 5 | selector: 'app-navi', 6 | templateUrl: './navi.component.html', 7 | styleUrls: ['./navi.component.css'], 8 | changeDetection: ChangeDetectionStrategy.OnPush 9 | }) 10 | export class NaviComponent { 11 | @Input() 12 | isDarkMode = false; 13 | 14 | @Output() 15 | readonly darkModeSwitched = new EventEmitter(); 16 | 17 | onDarkModeSwitched({ checked }: MatSlideToggleChange) { 18 | this.darkModeSwitched.emit(checked); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/app/components/payment/card-saved/card-saved.component.css: -------------------------------------------------------------------------------- 1 | td:hover { 2 | cursor: pointer; 3 | } 4 | -------------------------------------------------------------------------------- /src/app/components/payment/card-saved/card-saved.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Kayıtlı kartlarım 4 |
5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
{{ card.cardNumber }}|{{ card.expirationDate }}|{{ card.nameOnTheCard }}
18 |
19 |
-------------------------------------------------------------------------------- /src/app/components/payment/card-saved/card-saved.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, OnInit, Output } from '@angular/core'; 2 | import { CustomerDetail } from 'src/app/models/details/customerDetail'; 3 | import { FakeCard } from 'src/app/models/entities/fakeCard'; 4 | import { FakecardService } from 'src/app/services/fakecard.service'; 5 | import { LocalStorageService } from 'src/app/services/local-storage.service'; 6 | 7 | @Component({ 8 | selector: 'app-card-saved', 9 | templateUrl: './card-saved.component.html', 10 | styleUrls: ['./card-saved.component.css'] 11 | }) 12 | export class CardSavedComponent implements OnInit { 13 | cards: FakeCard[]; 14 | currentCustomer: CustomerDetail; 15 | @Output() selectedCard: EventEmitter = new EventEmitter(); 16 | 17 | constructor( 18 | private fakeCardService: FakecardService, 19 | private localStorageService: LocalStorageService 20 | ) { } 21 | 22 | ngOnInit(): void { 23 | this.currentCustomer = Object.assign({}, this.localStorageService.getCurrentCustomer()); 24 | this.getCardsByCustomerId(this.currentCustomer.customerId); 25 | } 26 | 27 | getCardsByCustomerId(customerId: number) { 28 | this.fakeCardService.getByCustomerId(customerId).subscribe(response => { 29 | this.cards = response.data; 30 | }); 31 | } 32 | 33 | selectCard(cardId: number) { 34 | let selectedCard = this.cards.find(card => card.id == cardId); 35 | 36 | //@ts-ignore 37 | let newSelectedCard: FakeCard = { 38 | customerId: selectedCard.customerId, 39 | nameOnTheCard: selectedCard.nameOnTheCard, 40 | cardNumber: selectedCard.cardNumber, 41 | expirationDate: selectedCard.expirationDate, 42 | cardCvv: selectedCard.cardCvv, 43 | }; 44 | 45 | this.selectedCard.emit(newSelectedCard); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/app/components/payment/payment.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/app/components/payment/payment.component.css -------------------------------------------------------------------------------- /src/app/components/payment/payment.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | İşlem Özeti 4 |
5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 |
BaşlangıçBitişMarkaRenkModel YılıGünlükToplam
{{ rental.rentDate }}{{ rental.returnDate }}{{ carDetail.brandName }}{{ carDetail.colorName }}{{ carDetail.carModelYear }}{{ carDetail.carDailyPrice | currency: "₺" }} 27 | {{ 28 | amountOfPayment | currency: "₺" 29 | }} 30 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | Kart bilgilerinizi doldurun 41 |
42 |
43 |
44 |
45 | 47 | 48 |
49 |
50 | 52 | 53 |
54 |
55 |
56 |
57 | 59 | 60 |
61 |
62 |
63 |
64 | 65 | 66 |
67 |
68 |
69 |
70 | 71 | 74 |
75 |
76 | 79 |
80 |
81 |
82 |
83 |
84 |
85 | 86 |
87 |
-------------------------------------------------------------------------------- /src/app/components/payment/payment.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 3 | import { ActivatedRoute, Router } from '@angular/router'; 4 | import { ToastrService } from 'ngx-toastr'; 5 | import { CarDetail } from 'src/app/models/details/carDetail'; 6 | import { Customer } from 'src/app/models/entities/customer'; 7 | import { FakeCard } from 'src/app/models/entities/fakeCard'; 8 | import { Rental } from 'src/app/models/entities/rental'; 9 | import { CarService } from 'src/app/services/car.service'; 10 | import { FakecardService } from 'src/app/services/fakecard.service'; 11 | import { LocalStorageService } from 'src/app/services/local-storage.service'; 12 | import { RentalService } from 'src/app/services/rental.service'; 13 | 14 | @Component({ 15 | selector: 'app-payment', 16 | templateUrl: './payment.component.html', 17 | styleUrls: ['./payment.component.css'], 18 | }) 19 | export class PaymentComponent implements OnInit { 20 | carDetail: CarDetail; 21 | rental: Rental; 22 | customer: Customer; 23 | getCustomerId: number; 24 | amountOfPayment: number = 0; 25 | fakeCard: FakeCard; 26 | cardExist: Boolean = false; 27 | cardAddForm: FormGroup; 28 | 29 | constructor( 30 | private activateRoute: ActivatedRoute, 31 | private carService: CarService, 32 | private router: Router, 33 | private toastrService: ToastrService, 34 | private rentalService: RentalService, 35 | private fakeCardService: FakecardService, 36 | private formBuilder: FormBuilder, 37 | private localStorageService: LocalStorageService 38 | ) { } 39 | 40 | ngOnInit(): void { 41 | this.activateRoute.params.subscribe((params) => { 42 | if (params['rental']) { 43 | this.createCardAddForm(); 44 | this.rental = JSON.parse(params['rental']); 45 | this.getCarDetail(); 46 | } 47 | }); 48 | } 49 | 50 | getCarDetail() { 51 | this.carService 52 | .getCarDetailsByCarId(this.rental.carId) 53 | .subscribe((response) => { 54 | this.carDetail = response.data; 55 | this.paymentCalculator(); 56 | }); 57 | } 58 | 59 | createCardAddForm() { 60 | this.cardAddForm = this.formBuilder.group({ 61 | customerId: [this.localStorageService.getCurrentCustomer().customerId, [Validators.required]], 62 | nameOnTheCard: ['', [Validators.required]], 63 | cardNumber: ['', [Validators.required]], 64 | expirationDate: ['', [Validators.required]], 65 | cardCvv: ['', [Validators.required]], 66 | save: [true], 67 | }); 68 | } 69 | 70 | paymentCalculator() { 71 | if (this.rental.returnDate != null) { 72 | var date1 = new Date(this.rental.returnDate.toString()); 73 | var date2 = new Date(this.rental.rentDate.toString()); 74 | var difference = date1.getTime() - date2.getTime(); 75 | var numberOfDays = Math.ceil(difference / (1000 * 3600 * 24)); 76 | 77 | this.amountOfPayment = numberOfDays * this.carDetail.carDailyPrice; 78 | if (this.amountOfPayment <= 0) { 79 | this.router.navigate(['/cars']); 80 | this.toastrService.error( 81 | 'Araç listesine yönlendiriliyorsunuz', 82 | 'Hatalı işlem' 83 | ); 84 | } 85 | } 86 | } 87 | 88 | add() { 89 | if (this.cardAddForm.invalid) { 90 | return this.toastrService.warning('Bilgilerinizi kontrol ediniz', 'Dikkat'); 91 | } 92 | if (this.cardAddForm.value.save) { 93 | delete this.cardAddForm.value.save; 94 | this.fakeCard = Object.assign({}, this.cardAddForm.value); 95 | } 96 | return this.addRental(this.rental); 97 | } 98 | 99 | addRental(rental: Rental) { 100 | this.rentalService.addRental(rental).subscribe(responseSuccess => { 101 | this.toastrService.success(responseSuccess.message, 'Başarılı'); 102 | return this.router.navigate(['']); 103 | }, responseError => { 104 | if (responseError.error.ValidationErrors) { 105 | for (let i = 0; i < responseError.error.ValidationErrors.length; i++) { 106 | this.toastrService.error( 107 | responseError.error.ValidationErrors[i].ErrorMessage, 'Doğrulama Hatası' 108 | ); 109 | } 110 | return false; 111 | } 112 | this.toastrService.error(responseError.error.message, 'Hata'); 113 | return false; 114 | }); 115 | } 116 | 117 | addCard(card: FakeCard) { 118 | this.fakeCardService.add(card).subscribe(responseSuccess => { 119 | return responseSuccess.success 120 | }, responseError => { 121 | if (responseError.error.ValidationErrors.length > 0) { 122 | for (let i = 0; i < responseError.error.ValidationErrors.length; i++) { 123 | this.toastrService.error( 124 | responseError.error.ValidationErrors[i].ErrorMessage, 'Doğrulama Hatası' 125 | ); 126 | } 127 | return; 128 | } 129 | this.toastrService.error(responseError.error.Message, responseError.error.StatusCode); 130 | return; 131 | }); 132 | } 133 | 134 | setSelectedCard(cardOnEventing: FakeCard) { 135 | this.fakeCard = Object.assign(cardOnEventing, { save: false }); 136 | this.cardAddForm.setValue(this.fakeCard); 137 | } 138 | } -------------------------------------------------------------------------------- /src/app/guards/login.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, Router } from '@angular/router'; 3 | import { ToastrService } from 'ngx-toastr'; 4 | import { Observable } from 'rxjs'; 5 | import { AuthService } from '../services/auth.service'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class LoginGuard implements CanActivate { 11 | constructor( 12 | private authService: AuthService, 13 | private toastrService: ToastrService, 14 | private router: Router 15 | ) { 16 | 17 | } 18 | canActivate( 19 | route: ActivatedRouteSnapshot, 20 | state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree { 21 | 22 | if (this.authService.isAuthenticated()) { 23 | return true; 24 | } else { 25 | this.router.navigate(["login"]) 26 | this.toastrService.info("Sisteme giriş yapmalısınız") 27 | return false; 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/app/interceptors/auth.interceptor.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { 3 | HttpRequest, 4 | HttpHandler, 5 | HttpEvent, 6 | HttpInterceptor 7 | } from '@angular/common/http'; 8 | import { Observable } from 'rxjs'; 9 | import { LocalStorageService } from '../services/local-storage.service'; 10 | 11 | @Injectable() 12 | export class AuthInterceptor implements HttpInterceptor { 13 | 14 | constructor( 15 | private localStorageService: LocalStorageService 16 | ) { } 17 | 18 | intercept(request: HttpRequest, next: HttpHandler): Observable> { 19 | let tokenModel = this.localStorageService.getToken(); 20 | 21 | if (!tokenModel) { 22 | return next.handle(request); 23 | } 24 | 25 | let newRequest: HttpRequest; 26 | 27 | newRequest = request.clone({ 28 | headers: request.headers.set("Authorization", "Bearer " + tokenModel.token) 29 | }) 30 | 31 | return next.handle(newRequest); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/app/models/details/carDetail.ts: -------------------------------------------------------------------------------- 1 | import { Car } from "../entities/car"; 2 | import { CarImage } from "../entities/carImage"; 3 | 4 | export interface CarDetail extends Car { 5 | brandName: string; 6 | colorName: string; 7 | status: boolean; 8 | carImages: CarImage[]; 9 | } -------------------------------------------------------------------------------- /src/app/models/details/customerDetail.ts: -------------------------------------------------------------------------------- 1 | import { Customer } from "../entities/customer"; 2 | 3 | export interface CustomerDetail extends Customer { 4 | firstName: string; 5 | lastName: string; 6 | email: string; 7 | status: boolean; 8 | password: string; 9 | } -------------------------------------------------------------------------------- /src/app/models/details/rentalDetail.ts: -------------------------------------------------------------------------------- 1 | import { Rental } from "../entities/rental"; 2 | 3 | export interface RentalDetail extends Rental { 4 | brandName: string; 5 | colorName: string; 6 | firstName: string; 7 | lastName: string; 8 | companyName: string; 9 | carModelYear: number; 10 | carDailyPrice: number; 11 | carDescription: string; 12 | } -------------------------------------------------------------------------------- /src/app/models/entities/brand.ts: -------------------------------------------------------------------------------- 1 | export interface Brand { 2 | brandId: number; 3 | brandName: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/models/entities/car.ts: -------------------------------------------------------------------------------- 1 | export interface Car { 2 | carId: number; 3 | colorId: number; 4 | brandId: number; 5 | carModelYear: number; 6 | carDailyPrice: number; 7 | carDescription: string; 8 | findexPoint: number; 9 | } 10 | -------------------------------------------------------------------------------- /src/app/models/entities/carImage.ts: -------------------------------------------------------------------------------- 1 | export interface CarImage { 2 | id: number; 3 | carId: number; 4 | imagePath: string; 5 | imageDate: Date; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/models/entities/color.ts: -------------------------------------------------------------------------------- 1 | export interface Color { 2 | colorId: number; 3 | colorName: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/models/entities/customer.ts: -------------------------------------------------------------------------------- 1 | export interface Customer { 2 | customerId: number; 3 | userId: number; 4 | companyName: string; 5 | findexPoint: number; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/models/entities/fakeCard.ts: -------------------------------------------------------------------------------- 1 | export interface FakeCard { 2 | id: number; 3 | customerId: number; 4 | nameOnTheCard: string; 5 | cardNumber: string; 6 | cardCvv: string; 7 | expirationDate: string; 8 | moneyInTheCard: number; 9 | } 10 | -------------------------------------------------------------------------------- /src/app/models/entities/rental.ts: -------------------------------------------------------------------------------- 1 | export interface Rental { 2 | rentalId: number; 3 | carId: number; 4 | customerId: number; 5 | rentDate: Date; 6 | returnDate?: Date; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/models/loginModel.ts: -------------------------------------------------------------------------------- 1 | export interface LoginModel { 2 | email: string; 3 | password: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/models/registerModel.ts: -------------------------------------------------------------------------------- 1 | import { LoginModel } from './loginModel'; 2 | 3 | export interface RegisterModel extends LoginModel { 4 | firstName: string; 5 | lastName: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/models/responses/listResponseModel.ts: -------------------------------------------------------------------------------- 1 | import { ResponseModel } from "./responseModel"; 2 | 3 | export interface ListResponseModel extends ResponseModel{ 4 | data:T[]; 5 | } -------------------------------------------------------------------------------- /src/app/models/responses/responseModel.ts: -------------------------------------------------------------------------------- 1 | export interface ResponseModel { 2 | success: boolean; 3 | message: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/models/responses/singleResponseModel.ts: -------------------------------------------------------------------------------- 1 | import { ResponseModel } from './responseModel'; 2 | 3 | export interface SingleResponseModel extends ResponseModel { 4 | data: T; 5 | } 6 | -------------------------------------------------------------------------------- /src/app/models/tokenModel.ts: -------------------------------------------------------------------------------- 1 | export interface TokenModel { 2 | token: string; 3 | expiration: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/pipes/filter-brand-pipe.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import { Brand } from '../models/entities/brand'; 3 | 4 | @Pipe({ 5 | name: 'filterBrandPipe' 6 | }) 7 | export class FilterBrandPipePipe implements PipeTransform { 8 | 9 | transform(value: Brand[], filterBrandText: string): Brand[] { 10 | filterBrandText = filterBrandText ? filterBrandText.toLocaleLowerCase() : ""; 11 | return filterBrandText ? value 12 | .filter((b: Brand) => b.brandName.toLocaleLowerCase().indexOf(filterBrandText) !== -1) 13 | : value; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/app/pipes/filter-color-pipe.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import { Color } from '../models/entities/color'; 3 | 4 | @Pipe({ 5 | name: 'filterColorPipe' 6 | }) 7 | export class FilterColorPipePipe implements PipeTransform { 8 | 9 | transform(value: Color[], filterColorText: string): Color[] { 10 | filterColorText = filterColorText ? filterColorText.toLocaleLowerCase() : ""; 11 | return filterColorText ? value 12 | .filter((c: Color) => c.colorName.toLocaleLowerCase().indexOf(filterColorText) !== -1) 13 | : value; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/app/services/auth.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { Observable } from 'rxjs'; 4 | import { environment } from 'src/environments/environment'; 5 | import { Customer } from '../models/entities/customer'; 6 | import { LoginModel } from '../models/loginModel'; 7 | import { RegisterModel } from '../models/registerModel'; 8 | import { SingleResponseModel } from '../models/responses/singleResponseModel'; 9 | import { TokenModel } from '../models/tokenModel'; 10 | import { LocalStorageService } from './local-storage.service'; 11 | 12 | @Injectable({ 13 | providedIn: 'root', 14 | }) 15 | export class AuthService { 16 | apiUrl = environment.baseUrl; 17 | 18 | constructor( 19 | private httpClient: HttpClient, 20 | private localStorageService: LocalStorageService 21 | ) { } 22 | 23 | login(loginModel: LoginModel) { 24 | return this.httpClient.post>(this.apiUrl + 'auth/login', loginModel); 25 | } 26 | 27 | register(registerModel: RegisterModel) { 28 | return this.httpClient.post>(this.apiUrl + 'auth/register', registerModel); 29 | } 30 | 31 | update(customer: Customer): Observable> { 32 | return this.httpClient.post>(this.apiUrl + 'auth/update', customer); 33 | } 34 | 35 | isAuthenticated(): boolean { 36 | return !!this.localStorageService.getToken(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/app/services/brand.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { Observable } from 'rxjs'; 4 | import { environment } from 'src/environments/environment'; 5 | import { Brand } from '../models/entities/brand'; 6 | import { ListResponseModel } from '../models/responses/listResponseModel'; 7 | import { ResponseModel } from '../models/responses/responseModel'; 8 | 9 | @Injectable({ 10 | providedIn: 'root' 11 | }) 12 | export class BrandService { 13 | apiUrl = environment.baseUrl; 14 | 15 | constructor(private httpClient: HttpClient) { } 16 | 17 | getBrands(): Observable> { 18 | let newPath = this.apiUrl + "brands/getall"; 19 | return this.httpClient.get>(newPath); 20 | } 21 | 22 | addBrand(brand: Brand): Observable { 23 | let newPath = this.apiUrl + "brands/add"; 24 | return this.httpClient.post(newPath, brand); 25 | } 26 | 27 | updateBrand(brand: Brand): Observable { 28 | let newPath = this.apiUrl + "brands/update"; 29 | return this.httpClient.post(newPath, brand) 30 | } 31 | 32 | deleteBrand(brand: Brand): Observable { 33 | let newPath = this.apiUrl + "brands/delete"; 34 | return this.httpClient.post(newPath, brand) 35 | } 36 | 37 | deleteByBramdId(brandId: number): Observable { 38 | let newPath = this.apiUrl + "brands/deletebyid?brandId=" + brandId; 39 | return this.httpClient.post(newPath, null) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/app/services/car-image.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { Observable } from 'rxjs'; 4 | import { environment } from 'src/environments/environment'; 5 | import { CarImage } from '../models/entities/carImage'; 6 | import { ListResponseModel } from '../models/responses/listResponseModel'; 7 | 8 | @Injectable({ 9 | providedIn: 'root' 10 | }) 11 | export class CarImageService { 12 | apiUrl = environment.baseUrl; 13 | 14 | constructor(private httpClient: HttpClient) { } 15 | 16 | getCarImages(): Observable> { 17 | let newPath = this.apiUrl + "carimages/getall"; 18 | return this.httpClient.get>(newPath); 19 | } 20 | 21 | getCarImagesByCarId(carId: number): Observable> { 22 | let newPath = this.apiUrl + "carimages/getcarimagesbycarid?carId=" + carId; 23 | return this.httpClient.get>(newPath); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/app/services/car.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { Observable } from 'rxjs'; 4 | import { Car } from '../models/entities/car'; 5 | import { ListResponseModel } from '../models/responses/listResponseModel'; 6 | import { environment } from "src/environments/environment"; 7 | import { CarDetail } from '../models/details/carDetail'; 8 | import { SingleResponseModel } from '../models/responses/singleResponseModel'; 9 | 10 | @Injectable({ 11 | providedIn: 'root' 12 | }) 13 | export class CarService { 14 | apiUrl = environment.baseUrl; 15 | 16 | constructor(private httpClient: HttpClient) { } 17 | 18 | getCars(): Observable> { 19 | let newPath = this.apiUrl + "cars/getcardetail"; 20 | return this.httpClient.get>(newPath); 21 | } 22 | 23 | getCarsByBrandId(brandId: number): Observable> { 24 | let newPath = this.apiUrl + "cars/getcarsbybrandid?brandId=" + brandId; 25 | return this.httpClient.get>(newPath); 26 | } 27 | 28 | getCarsByColorId(colorId: number): Observable> { 29 | let newPath = this.apiUrl + "cars/getbycolorid?colorId=" + colorId; 30 | return this.httpClient.get>(newPath); 31 | } 32 | 33 | getCarDetails(brandId: number, colorId: number): Observable> { 34 | let newPath = this.apiUrl + "cars/getcardetailbrandandcolorid?brandId=" + brandId + "&colorId=" + colorId; 35 | return this.httpClient.get>(newPath); 36 | } 37 | 38 | getCarDetailsByCarId(carId: number): Observable> { 39 | let newPath = this.apiUrl + "cars/getcardetailbycarid?carId=" + carId; 40 | return this.httpClient.get>(newPath); 41 | } 42 | 43 | add(car: Car): Observable> { 44 | return this.httpClient.post>(this.apiUrl + "cars/add", car); 45 | } 46 | 47 | update(car: Car): Observable> { 48 | return this.httpClient.post>(this.apiUrl + "cars/update", car); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/app/services/color.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { Observable } from 'rxjs'; 4 | import { environment } from 'src/environments/environment'; 5 | import { Color } from '../models/entities/color'; 6 | import { ListResponseModel } from '../models/responses/listResponseModel'; 7 | import { ResponseModel } from '../models/responses/responseModel'; 8 | 9 | @Injectable({ 10 | providedIn: 'root' 11 | }) 12 | export class ColorService { 13 | apiUrl = environment.baseUrl; 14 | 15 | constructor(private httpClient: HttpClient) { } 16 | 17 | getColors(): Observable> { 18 | let newUrl = this.apiUrl + "colors/getall"; 19 | return this.httpClient.get>(newUrl); 20 | } 21 | 22 | addColor(color: Color): Observable { 23 | let newPath = this.apiUrl + "colors/add"; 24 | return this.httpClient.post(newPath, color); 25 | } 26 | 27 | updateColor(color: Color): Observable { 28 | let newPath = this.apiUrl + "colors/update"; 29 | return this.httpClient.post(newPath, color) 30 | } 31 | 32 | deleteColor(color: Color): Observable { 33 | let newPath = this.apiUrl + "colors/delete"; 34 | return this.httpClient.post(newPath, color) 35 | } 36 | 37 | deleteByColorId(colorId: number): Observable { 38 | let newPath = this.apiUrl + "colors/deletebyid?colorId=" + colorId; 39 | return this.httpClient.post(newPath,null) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/app/services/customer.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Observable } from 'rxjs'; 3 | import { HttpClient } from '@angular/common/http'; 4 | import { ListResponseModel } from '../models/responses/listResponseModel'; 5 | import { environment } from 'src/environments/environment'; 6 | import { SingleResponseModel } from '../models/responses/singleResponseModel'; 7 | import { CustomerDetail } from '../models/details/customerDetail'; 8 | 9 | @Injectable({ 10 | providedIn: 'root', 11 | }) 12 | export class CustomerService { 13 | apiUrl = environment.baseUrl; 14 | 15 | constructor(private httpClient: HttpClient) { } 16 | 17 | getCustomers(): Observable> { 18 | let newPath = this.apiUrl + 'customers/getcustomerdetail'; 19 | return this.httpClient.get>(newPath); 20 | } 21 | 22 | getCustomerById(customerId: number): Observable> { 23 | let newPath = this.apiUrl + 'customers/getcustomerdetailbycustomerid?customerId=' + customerId; 24 | return this.httpClient.get>(newPath); 25 | } 26 | 27 | getCustomerByEmail(email: string): Observable> { 28 | let newPath = this.apiUrl + 'customers/getcustomerbyemail?email=' + email; 29 | console.log(this.httpClient.get>(newPath)); 30 | return this.httpClient.get>(newPath); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/app/services/fakecard.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { Observable } from 'rxjs'; 4 | import { environment } from 'src/environments/environment'; 5 | import { FakeCard } from '../models/entities/fakeCard'; 6 | import { ListResponseModel } from '../models/responses/listResponseModel'; 7 | import { ResponseModel } from '../models/responses/responseModel'; 8 | 9 | @Injectable({ 10 | providedIn: 'root', 11 | }) 12 | export class FakecardService { 13 | constructor(private httpClient: HttpClient) { } 14 | 15 | apiUrl = environment.baseUrl; 16 | 17 | isCardExist(fakeCard: FakeCard): Observable { 18 | let newPath = this.apiUrl + 'fakecards/iscardexist'; 19 | return this.httpClient.post(newPath, fakeCard); 20 | } 21 | 22 | getCardByNumber(cardNumber: string): Observable> { 23 | let newPath = this.apiUrl + 'fakecards/getbycardnumber?cardnumber=' + cardNumber; 24 | return this.httpClient.get>(newPath); 25 | } 26 | 27 | add(card: FakeCard): Observable { 28 | return this.httpClient.post(this.apiUrl + "fakecards/add", card); 29 | } 30 | 31 | getByCustomerId(customerId: number): Observable> { 32 | let newPath = 33 | this.apiUrl + 'fakecards/getbycustomerId?customerId=' + customerId; 34 | return this.httpClient.get>(newPath); 35 | } 36 | 37 | updateCard(fakeCard: FakeCard) { 38 | let newPath = this.apiUrl + 'fakecards/update'; 39 | this.httpClient.put(newPath, fakeCard); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/app/services/local-storage.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { CustomerDetail } from '../models/details/customerDetail'; 3 | import { TokenModel } from '../models/tokenModel'; 4 | 5 | @Injectable({ 6 | providedIn: 'root', 7 | }) 8 | export class LocalStorageService { 9 | tokenKey: string = 'token'; 10 | currentCustomer: string = 'currentCustomer'; 11 | 12 | constructor() { } 13 | 14 | setToken(tokenValue: TokenModel) { 15 | localStorage.setItem(this.tokenKey, JSON.stringify(tokenValue)); 16 | } 17 | 18 | getToken(): TokenModel { 19 | return JSON.parse(localStorage.getItem(this.tokenKey)); 20 | } 21 | 22 | removeToken() { 23 | localStorage.removeItem(this.tokenKey); 24 | } 25 | 26 | setCurrentCustomer(currentCustomerValue: CustomerDetail) { 27 | localStorage.setItem(this.currentCustomer, JSON.stringify(currentCustomerValue)); 28 | } 29 | 30 | getCurrentCustomer(): CustomerDetail { 31 | return JSON.parse(localStorage.getItem(this.currentCustomer)); 32 | } 33 | 34 | removeCurrentCustomer() { 35 | localStorage.removeItem(this.currentCustomer); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/app/services/payment.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { environment } from 'src/environments/environment'; 4 | import { Rental } from '../models/entities/rental'; 5 | import { ResponseModel } from '../models/responses/responseModel'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class PaymentService { 11 | apiUrl = environment.baseUrl; 12 | 13 | constructor( 14 | private httpClient: HttpClient 15 | ) { } 16 | 17 | pay(rental: Rental, amount: number) { 18 | let path = this.apiUrl + "rentals/paymentadd"; 19 | this.httpClient.post(path, { payment: { amount: amount }, rental: rental }) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/app/services/rental.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { Observable } from 'rxjs'; 4 | import { environment } from 'src/environments/environment'; 5 | import { ListResponseModel } from '../models/responses/listResponseModel'; 6 | import { Rental } from '../models/entities/rental'; 7 | import { ResponseModel } from '../models/responses/responseModel'; 8 | import { RentalDetail } from '../models/details/rentalDetail'; 9 | 10 | @Injectable({ 11 | providedIn: 'root', 12 | }) 13 | export class RentalService { 14 | apiUrl = environment.baseUrl; 15 | rentingCar: Rental; 16 | 17 | constructor(private httpClient: HttpClient) { 18 | this.getRental(); 19 | } 20 | 21 | getRental(): Observable> { 22 | let newPath = this.apiUrl + 'rentals/getrentaldetail'; 23 | return this.httpClient.get>(newPath); 24 | } 25 | 26 | getRentalByCarId(carId: number): Observable> { 27 | let newPath = this.apiUrl + 'rentals/getrentaldetailbycarid?carId=' + carId; 28 | return this.httpClient.get>(newPath); 29 | } 30 | 31 | getRentalByCustomerId(customerId: number): Observable> { 32 | let newPath = this.apiUrl + 'rentals/getrentaldetailbycustomerid?customerId=' + customerId; 33 | return this.httpClient.get>(newPath); 34 | } 35 | 36 | addRental(rental: Rental) { 37 | let newPath = this.apiUrl + 'rentals/add'; 38 | return this.httpClient.post(newPath, rental); 39 | } 40 | 41 | getRentingCar() { 42 | return this.rentingCar; 43 | } 44 | 45 | isCarAvailable(carId: number): Observable { 46 | let newPath = this.apiUrl + 'rentals/iscaravailable?carId=' + carId; 47 | return this.httpClient.get(newPath); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/assets/images/RentACar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/images/RentACar.gif -------------------------------------------------------------------------------- /src/assets/register-login/fonts/material-icon/fonts/Material-Design-Iconic-Font.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/material-icon/fonts/Material-Design-Iconic-Font.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/material-icon/fonts/Material-Design-Iconic-Font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/material-icon/fonts/Material-Design-Iconic-Font.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/material-icon/fonts/Material-Design-Iconic-Font.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/material-icon/fonts/Material-Design-Iconic-Font.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/material-icon/fonts/Material-Design-Iconic-Font.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/material-icon/fonts/Material-Design-Iconic-Font.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-300.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-300.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-300.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-300.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-300.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-300italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-300italic.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-300italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-300italic.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-300italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-300italic.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-300italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-300italic.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-500.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-500.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-500.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-500.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-500.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-500.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-500italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-500italic.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-500italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-500italic.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-500italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-500italic.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-500italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-500italic.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-600.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-600.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-600.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-600.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-600.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-600.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-600.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-700.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-700.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-700.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-700.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-700.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-700.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-700italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-700italic.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-700italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-700italic.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-700italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-700italic.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-700italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-700italic.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-800.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-800.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-800.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-800.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-800.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-800.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-800.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-800.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-800italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-800italic.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-800italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-800italic.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-800italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-800italic.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-800italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-800italic.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-900.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-900.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-900.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-900.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-italic.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-italic.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-italic.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-italic.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-regular.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-regular.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-regular.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/poppins-v5-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/poppins-v5-latin-regular.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700italic.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700italic.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700italic.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-700italic.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-italic.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-italic.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-italic.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-italic.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-regular.eot -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-regular.ttf -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-regular.woff -------------------------------------------------------------------------------- /src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/fonts/poppins/roboto-condensed-v16-latin-regular.woff2 -------------------------------------------------------------------------------- /src/assets/register-login/js/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/assets/register-login/js/main.js -------------------------------------------------------------------------------- /src/assets/register-login/scss/common/extend.scss: -------------------------------------------------------------------------------- 1 | /* @extend display-flex; */ 2 | display-flex { 3 | display: flex; 4 | display: -webkit-flex; 5 | } 6 | /* @extend list-type-ulli; */ 7 | list-type-ulli { 8 | list-style-type: none; 9 | margin: 0; 10 | padding: 0; 11 | } 12 | -------------------------------------------------------------------------------- /src/assets/register-login/scss/common/global.scss: -------------------------------------------------------------------------------- 1 | a:focus, a:active { text-decoration: none; outline: none; @include transition(all 300ms ease 0s); } 2 | input, select, textarea { outline: none; @include appearance( unset ); } 3 | input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { 4 | @include appearance( none ); 5 | margin: 0; 6 | } 7 | input:focus, select:focus, textarea:focus { outline: none; @include box-shadow-input(none); } 8 | input[type=checkbox] { @include appearance( checkbox ); } 9 | input[type=radio] { @include appearance( radio ); } 10 | img { max-width: 100%; height: auto; } 11 | figure { margin: 0; } 12 | p { margin-bottom: 0px; font-size: 15px; color: #777;} 13 | h2 { 14 | line-height: 1.66; 15 | margin: 0; 16 | padding: 0; 17 | font-weight: bold; 18 | color: $black-color; 19 | font-family: Poppins; 20 | font-size: 36px; 21 | } 22 | .main { 23 | background: #f8f8f8; 24 | padding: 150px 0; 25 | } 26 | .clear { clear: both; } 27 | body { 28 | font-size: 13px; 29 | line-height: 1.8; 30 | color: $black-color; 31 | background: #f8f8f8; 32 | font-weight: 400; 33 | font-family: Poppins; 34 | } 35 | .container { 36 | width: 900px; 37 | background: #fff; 38 | margin: 0 auto; 39 | @include box-shadow(0px 15px 16.83px 0.17px rgba(0, 0, 0, 0.05)); 40 | @include border-radius(20px); 41 | } 42 | 43 | .display-flex { 44 | @extend display-flex; 45 | @include justify-content(space-between); 46 | @include align-items(center); 47 | } 48 | 49 | .display-flex-center { 50 | @extend display-flex; 51 | @include justify-content(center); 52 | @include align-items(center); 53 | } 54 | 55 | .position-center { 56 | position: absolute; 57 | top: 50%; 58 | left: 50%; 59 | @include transform(translate(-50%,-50%)); 60 | } 61 | -------------------------------------------------------------------------------- /src/assets/register-login/scss/common/minxi.scss: -------------------------------------------------------------------------------- 1 | // mixin 2 | @mixin border-radius($value) { 3 | border-radius: $value; 4 | -moz-border-radius: $value; 5 | -webkit-border-radius: $value; 6 | -o-border-radius: $value; 7 | -ms-border-radius: $value; 8 | } 9 | @mixin background-size($value) { 10 | background-size: $value; 11 | -moz-background-size: $value; 12 | -webkit-background-size: $value; 13 | -o-background-size: $value; 14 | -ms-background-size: $value; 15 | } 16 | @mixin background-gradient-three($color1, $color2, $color3) { 17 | background: linear-gradient($color1, $color2, $color3); 18 | background: -moz-linear-gradient($color1, $color2, $color3); 19 | background: -webkit-linear-gradient($color1, $color2, $color3); 20 | background: -o-linear-gradient($color1, $color2, $color3); 21 | background: -ms-linear-gradient($color1, $color2, $color3); 22 | } 23 | @mixin background-gradient-six($color1, $color2, $color3, $color4, $color5, $color6) { 24 | background: linear-gradient($color1, $color2, $color3, $color4, $color5, $color6); 25 | background: -moz-linear-gradient($color1, $color2, $color3, $color4, $color5, $color6); 26 | background: -webkit-linear-gradient($color1, $color2, $color3, $color4, $color5, $color6); 27 | background: -o-linear-gradient($color1, $color2, $color3, $color4, $color5, $color6); 28 | background: -ms-linear-gradient($color1, $color2, $color3, $color4, $color5, $color6); 29 | } 30 | @mixin transform($value) { 31 | transform: $value; 32 | -moz-transform: $value; 33 | -webkit-transform: $value; 34 | -o-transform: $value; 35 | -ms-transform: $value; 36 | } 37 | @mixin box-shadow($value) { 38 | box-shadow: $value; 39 | -moz-box-shadow: $value; 40 | -webkit-box-shadow: $value; 41 | -o-box-shadow: $value; 42 | -ms-box-shadow: $value; 43 | } 44 | @mixin filter($value) { 45 | filter: $value; 46 | -moz-filter: $value; 47 | -webkit-filter: $value; 48 | -o-filter: $value; 49 | -ms-filter: $value; 50 | } 51 | @mixin transition($value) { 52 | transition: $value; 53 | -moz-transition: $value; 54 | -webkit-transition: $value; 55 | -o-transition: $value; 56 | -ms-transition: $value; 57 | } 58 | @mixin animation($value) { 59 | animation: $value; 60 | -moz-animation: $value; 61 | -webkit-animation: $value; 62 | -o-animation: $value; 63 | -ms-animation: $value; 64 | } 65 | @mixin transform-origin($value) { 66 | transform-origin: $value; 67 | -moz-transform-origin: $value; 68 | -webkit-transform-origin: $value; 69 | -o-transform-origin: $value; 70 | -ms-transform-origin: $value; 71 | } 72 | @mixin appearance($value) { 73 | appearance: $value !important; 74 | -moz-appearance: $value !important; 75 | -webkit-appearance: $value !important; 76 | -o-appearance: $value !important; 77 | -ms-appearance: $value !important; 78 | } 79 | @mixin box-shadow-input($value) { 80 | box-shadow: $value !important; 81 | -moz-box-shadow: $value !important; 82 | -webkit-box-shadow: $value !important; 83 | -o-box-shadow: $value !important; 84 | -ms-box-shadow: $value !important; 85 | } 86 | 87 | //flex 88 | @mixin flex-wrap($value) { 89 | flex-wrap: $value; 90 | -moz-flex-wrap: $value; 91 | -webkit-flex-wrap: $value; 92 | -o-flex-wrap: $value; 93 | -ms-flex-wrap: $value; 94 | } 95 | @mixin flex-direction($value) { 96 | flex-direction: $value; 97 | -moz-flex-direction: $value; 98 | -webkit-flex-direction: $value; 99 | -o-flex-direction: $value; 100 | -ms-flex-direction: $value; 101 | } 102 | @mixin flex-flow($value) { 103 | flex-flow: $value; 104 | -moz-flex-flow: $value; 105 | -webkit-flex-flow: $value; 106 | -o-flex-flow: $value; 107 | -ms-flex-flow: $value; 108 | } 109 | @mixin justify-content($value) { 110 | justify-content: $value; 111 | -moz-justify-content: $value; 112 | -webkit-justify-content: $value; 113 | -o-justify-content: $value; 114 | -ms-justify-content: $value; 115 | } 116 | @mixin align-items($value) { 117 | align-items: $value; 118 | -moz-align-items: $value; 119 | -webkit-align-items: $value; 120 | -o-align-items: $value; 121 | -ms-align-items: $value; 122 | } 123 | @mixin order($value) { 124 | order: $value; 125 | -moz-order: $value; 126 | -webkit-order: $value; 127 | -o-order: $value; 128 | -ms-order: $value; 129 | } 130 | @mixin flex($value) { 131 | flex: $value; 132 | -moz-flex: $value; 133 | -webkit-flex: $value; 134 | -o-flex: $value; 135 | -ms-flex: $value; 136 | } 137 | 138 | 139 | @mixin input-placeholder($value) { 140 | &::-webkit-input-placeholder { 141 | color: $value; 142 | } 143 | &::-moz-placeholder { 144 | color: $value; 145 | } 146 | &:-ms-input-placeholder { 147 | color: $value; 148 | } 149 | &:-moz-placeholder { 150 | color: $value; 151 | } 152 | } -------------------------------------------------------------------------------- /src/assets/register-login/scss/common/variables.scss: -------------------------------------------------------------------------------- 1 | $black-color : #222; 2 | $blue-color : #6dabe4; 3 | $grey-light: #999; -------------------------------------------------------------------------------- /src/assets/register-login/scss/layouts/main.scss: -------------------------------------------------------------------------------- 1 | .signup { 2 | margin-bottom: 150px; 3 | } 4 | .signup-content { 5 | @extend display-flex; 6 | padding: 75px 0; 7 | // flex-flow: wrap; 8 | } 9 | .signup-form, .signup-image, .signin-form, .signin-image{ 10 | width: 50%; 11 | overflow: hidden; 12 | } 13 | .signup-image { 14 | margin: 0 55px; 15 | } 16 | .form-title { 17 | margin-bottom: 33px; 18 | } 19 | .signup-image { 20 | margin-top: 45px; 21 | } 22 | figure { 23 | margin-bottom: 50px; 24 | text-align: center; 25 | } 26 | .form-submit { 27 | display: inline-block; 28 | background: $blue-color; 29 | color: #fff; 30 | border-bottom: none; 31 | width: auto; 32 | padding: 15px 39px; 33 | @include border-radius(5px); 34 | margin-top: 25px; 35 | cursor: pointer; 36 | &:hover { 37 | background: darken($blue-color, 10%); 38 | } 39 | } 40 | 41 | #signin { 42 | margin-top: 16px; 43 | } 44 | .signup-image-link { 45 | font-size: 14px; 46 | color: $black-color; 47 | display: block; 48 | text-align: center; 49 | } 50 | 51 | .term-service { 52 | font-size: 13px; 53 | color: $black-color; 54 | } 55 | .signup-form { 56 | margin-left: 75px; 57 | margin-right: 75px; 58 | padding-left: 34px; 59 | } 60 | .register-form { 61 | width: 100%; 62 | } 63 | .form-group { 64 | position: relative; 65 | margin-bottom: 25px; 66 | overflow: hidden; 67 | &:last-child { 68 | margin-bottom: 0px; 69 | } 70 | } 71 | 72 | input { 73 | width: 100%; 74 | display: block; 75 | border: none; 76 | border-bottom: 1px solid $grey-light; 77 | padding: 6px 30px; 78 | font-family: Poppins; 79 | box-sizing: border-box; 80 | @include input-placeholder($grey-light); 81 | &:focus { 82 | border-bottom: 1px solid $black-color; 83 | @include input-placeholder($black-color); 84 | } 85 | } 86 | 87 | input[type=checkbox]:not(old){ 88 | width : 2em; 89 | margin : 0; 90 | padding : 0; 91 | font-size : 1em; 92 | display: none; 93 | } 94 | input[type=checkbox]:not(old) + label{ 95 | display : inline-block; 96 | line-height : 1.5em; 97 | margin-top: 6px; 98 | } 99 | input[type=checkbox]:not(old) + label > span{ 100 | display : inline-block; 101 | width : 13px; 102 | height : 13px; 103 | margin-right: 15px; 104 | margin-bottom: 3px; 105 | border : 1px solid $grey-light; 106 | @include border-radius(2px); 107 | background : rgb(255,255,255); 108 | background-image : -moz-linear-gradient(rgb(255,255,255),rgb(255,255,255)); 109 | background-image : -ms-linear-gradient(rgb(255,255,255),rgb(255,255,255)); 110 | background-image : -o-linear-gradient(rgb(255,255,255),rgb(255,255,255)); 111 | background-image : -webkit-linear-gradient(rgb(255,255,255),rgb(255,255,255)); 112 | background-image : linear-gradient(rgb(255,255,255),rgb(255,255,255 )); 113 | vertical-align : bottom; 114 | } 115 | input[type=checkbox]:not(old):checked + label > span,{ 116 | background-image : -moz-linear-gradient(rgb(255,255,255),rgb(255,255,255)); 117 | background-image : -ms-linear-gradient(rgb(255,255,255),rgb(255,255,255)); 118 | background-image : -o-linear-gradient(rgb(255,255,255),rgb(255,255,255)); 119 | background-image : -webkit-linear-gradient(rgb(255,255,255),rgb(255,255,255)); 120 | background-image : linear-gradient(rgb(255,255,255),rgb(255,255,255 )); 121 | } 122 | input[type=checkbox]:not(old):checked + label > span:before{ 123 | content : '\f26b'; 124 | display : block; 125 | color : $black-color; 126 | font-size : 11px; 127 | line-height : 1.2; 128 | text-align : center; 129 | font-family: 'Material-Design-Iconic-Font'; 130 | font-weight: bold; 131 | } 132 | .agree-term { 133 | display: inline-block; 134 | width: auto; 135 | } 136 | 137 | label { 138 | position: absolute; 139 | left: 0; 140 | top: 50%; 141 | @include transform(translateY(-50%)); 142 | color: $black-color; 143 | } 144 | .label-has-error { 145 | top: 22%; 146 | } 147 | label.error { 148 | position: relative; 149 | background: url('../images/unchecked.gif') no-repeat; 150 | background-position-y: 3px; 151 | padding-left: 20px; 152 | display: block; 153 | margin-top: 20px; 154 | } 155 | label.valid { 156 | display: block; 157 | 158 | position: absolute; 159 | right: 0; 160 | left: auto; 161 | margin-top: -6px; 162 | width: 20px; 163 | height: 20px; 164 | background: transparent; 165 | &:after { 166 | font-family: 'Material-Design-Iconic-Font'; 167 | content: '\f269'; 168 | width: 100%; 169 | height: 100%; 170 | position: absolute; 171 | /* right: 0; */ 172 | font-size: 16px; 173 | color: green; 174 | } 175 | } 176 | .label-agree-term { 177 | position: relative; 178 | top: 0%; 179 | @include transform(translateY(0)); 180 | } 181 | .material-icons-name { 182 | font-size: 18px; 183 | } 184 | 185 | 186 | // Login 187 | 188 | .signin-content { 189 | @extend display-flex; 190 | padding-top: 67px; 191 | padding-bottom: 87px; 192 | // padding: 67px 0; 193 | } 194 | .social-login { 195 | @extend display-flex; 196 | @include align-items(center); 197 | margin-top: 80px; 198 | } 199 | .social-label { 200 | display: inline-block; 201 | margin-right: 15px; 202 | } 203 | .socials { 204 | @extend display-flex; 205 | @extend list-type-ulli; 206 | li { 207 | padding: 5px; 208 | &:last-child { 209 | margin-right: 0px; 210 | } 211 | a { 212 | text-decoration: none; 213 | i { 214 | width: 30px; 215 | height: 30px; 216 | color: #fff; 217 | font-size: 14px; 218 | @include border-radius(5px); 219 | @include transform(translateZ(0)); 220 | -webkit-transition-duration: 0.3s; 221 | transition-duration: 0.3s; 222 | -webkit-transition-property: transform; 223 | transition-property: transform; 224 | -webkit-transition-timing-function: ease-out; 225 | transition-timing-function: ease-out; 226 | } 227 | } 228 | &:hover { 229 | a { 230 | i { 231 | -webkit-transform: scale(1.3) translateZ(0); 232 | transform: scale(1.3) translateZ(0); 233 | } 234 | } 235 | } 236 | } 237 | } 238 | .zmdi-facebook { 239 | background: #3b5998; 240 | } 241 | .zmdi-twitter { 242 | background: #1da0f2; 243 | } 244 | .zmdi-google { 245 | background: #e72734; 246 | } 247 | .signin-form { 248 | margin-right: 90px; 249 | margin-left: 80px; 250 | } 251 | .signin-image { 252 | margin-left: 110px; 253 | margin-right: 20px; 254 | margin-top: 10px; 255 | } 256 | -------------------------------------------------------------------------------- /src/assets/register-login/scss/layouts/responsive.scss: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 1600px) { 2 | 3 | } 4 | 5 | @media screen and (max-width: 1300px) { 6 | 7 | } 8 | 9 | //end 1200px 10 | @media screen and (max-width: 1200px) { 11 | .container { 12 | width: calc( 100% - 30px); 13 | max-width: 100%; 14 | } 15 | } 16 | 17 | @media screen and (min-width: 1024px) { 18 | .container { 19 | max-width: 1200px; 20 | } 21 | } 22 | 23 | //end 1200px 24 | @media screen and (max-width: 1024px) { 25 | } 26 | 27 | //end 1024px 28 | @media screen and (max-width: 992px) { 29 | 30 | } 31 | 32 | //end 992px 33 | @media screen and (max-width: 768px) { 34 | 35 | .signup-content, .signin-content { 36 | @include flex-direction(column); 37 | @include justify-content(center); 38 | } 39 | .signup-form { 40 | margin-left: 0px; 41 | margin-right: 0px; 42 | padding-left: 0px; 43 | /* box-sizing: border-box; */ 44 | padding: 0 30px; 45 | } 46 | .signin-image { 47 | margin-left: 0px; 48 | margin-right: 0px; 49 | margin-top: 50px; 50 | @include order(2); 51 | } 52 | .signup-form, .signup-image, .signin-form, .signin-image { 53 | width: auto; 54 | } 55 | 56 | .social-login { 57 | @include justify-content(center); 58 | } 59 | .form-button { 60 | text-align: center; 61 | } 62 | .signin-form { 63 | @include order(1); 64 | margin-right: 0px; 65 | margin-left: 0px; 66 | padding: 0 30px; 67 | } 68 | .form-title { 69 | text-align: center; 70 | } 71 | 72 | } 73 | 74 | @media screen and (max-width: 620px) { 75 | 76 | } 77 | 78 | //end 767px 79 | @media screen and (max-width: 575px) { 80 | 81 | } 82 | 83 | //end 575px 84 | @media screen and (max-width: 480px) { 85 | 86 | } 87 | 88 | //end 480px 89 | @media screen and (max-width: 400px) { 90 | .social-login { 91 | @include flex-direction(column); 92 | } 93 | .social-label { 94 | margin-right: 0px; 95 | margin-bottom: 10px; 96 | } 97 | } 98 | 99 | //end 400px 100 | 101 | @media screen and (max-width: 320px) {} -------------------------------------------------------------------------------- /src/assets/register-login/scss/style.scss: -------------------------------------------------------------------------------- 1 | //Common 2 | @import 'common/extend.scss'; 3 | @import 'common/fonts.scss'; 4 | @import 'common/minxi.scss'; 5 | @import 'common/variables.scss'; 6 | @import 'common/global.scss'; 7 | 8 | //layout 9 | @import 'layouts/main.scss'; 10 | 11 | // Responsive 12 | @import 'layouts/responsive.scss'; -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false, 7 | baseUrl: "https://localhost:44352/api/", 8 | }; 9 | 10 | /* 11 | * For easier debugging in development mode, you can import the following file 12 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 13 | * 14 | * This import should be commented out in production mode because it will have a negative impact 15 | * on performance if an error is thrown. 16 | */ 17 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 18 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelihVarilci/ReCapProjectFrontend/93dfe62b80f1ad0f75ccdce6d3a2af1b8903b8d3/src/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Recap 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /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 | /** 22 | * IE11 requires the following for NgClass support on SVG elements 23 | */ 24 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 25 | 26 | /** 27 | * Web Animations `@angular/platform-browser/animations` 28 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 29 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 30 | */ 31 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 32 | 33 | /** 34 | * By default, zone.js will patch all possible macroTask and DomEvents 35 | * user can disable parts of macroTask/DomEvents patch by setting following flags 36 | * because those flags need to be set before `zone.js` being loaded, and webpack 37 | * will put import in the top of bundle, so user need to create a separate file 38 | * in this directory (for example: zone-flags.ts), and put the following flags 39 | * into that file, and then add the following code before importing zone.js. 40 | * import './zone-flags'; 41 | * 42 | * The flags allowed in zone-flags.ts are listed here. 43 | * 44 | * The following flags will work for all browsers. 45 | * 46 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 47 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 48 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 49 | * 50 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 51 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 52 | * 53 | * (window as any).__Zone_enable_cross_context_check = true; 54 | * 55 | */ 56 | 57 | /*************************************************************************************************** 58 | * Zone JS is required by default for Angular itself. 59 | */ 60 | import 'zone.js/dist/zone'; // Included with Angular CLI. 61 | 62 | 63 | /*************************************************************************************************** 64 | * APPLICATION IMPORTS 65 | */ 66 | -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import "~@fortawesome/fontawesome-free/css/all.css"; 3 | @import "~bootstrap-icons/font/bootstrap-icons.css"; 4 | html, 5 | body { 6 | height: 100%; 7 | } 8 | body { 9 | margin: 0; 10 | font-family: Roboto, "Helvetica Neue", sans-serif; 11 | } 12 | -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | keys(): string[]; 13 | (id: string): T; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting() 21 | ); 22 | // Then we find all the tests. 23 | const context = require.context('./', true, /\.spec\.ts$/); 24 | // And load the modules. 25 | context.keys().map(context); 26 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "strictNullChecks": false, 10 | "strictPropertyInitialization": false, 11 | "noImplicitReturns": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "sourceMap": true, 14 | "declaration": false, 15 | "downlevelIteration": true, 16 | "experimentalDecorators": true, 17 | "moduleResolution": "node", 18 | "importHelpers": true, 19 | "target": "es2015", 20 | "module": "es2020", 21 | "lib": [ 22 | "es2018", 23 | "dom" 24 | ] 25 | }, 26 | "angularCompilerOptions": { 27 | "enableI18nLegacyMessageIdFormat": false, 28 | "strictInjectionParameters": true, 29 | "strictInputAccessModifiers": true, 30 | "strictTemplates": true 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------