diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index 7b13ff2..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Push-Development - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - name: Push Development - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Run tests - run: docker-compose run test - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - tags: user/app:latest \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index f5519be..53eb44d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,36 +1,6 @@ version: '3.8' services: - flaskaled-srv1: - image: postgres:latest - container_name: flaskaled-srv1 - ports: - - "5433:5432" - volumes: - - ./backend/init-db1.sql:/docker-entrypoint-initdb.d/init-db1.sql - environment: - - POSTGRES_HOST=flaskaled-srv1 - - POSTGRES_PORT=5432 - - POSTGRES_DB=flaskaledDb1 - - POSTGRES_USER=flaskaled1 - - POSTGRES_PASSWORD=aled1 - restart: unless-stopped - - flaskaled-srv2: - image: postgres:latest - container_name: flaskaled-srv2 - ports: - - "5434:5432" - volumes: - - ./backend/init-db2.sql:/docker-entrypoint-initdb.d/init-db2.sql - environment: - - POSTGRES_HOST=flaskaled-srv2 - - POSTGRES_PORT=5432 - - POSTGRES_DB=flaskaledDb2 - - POSTGRES_USER=flaskaled2 - - POSTGRES_PASSWORD=aled2 - restart: unless-stopped - backend: container_name: backend build: ./backend @@ -39,55 +9,12 @@ services: - "5000:5000" volumes: - ./backend:/data/backend - depends_on: - - flaskaled-srv1 - - flaskaled-srv2 - links: - - flaskaled-srv1 - - flaskaled-srv2 environment: - FLASK_APP=app.py - FLASK_ENV=development - FLASK_DEBUG=1 - PYTHONUNBUFFERED=1 - - DATABASE_URL_USERS=postgresql://flaskaled1:aled1@flaskaled-srv1/flaskaledDb1 - - DATABASE_URL_LOGS=postgresql://flaskaled2:aled2@flaskaled-srv2/flaskaledDb2 - - ALLOW_ORIGIN=frontend - - SECRET_KEY=default_secret_key - - frontend: - container_name: frontend - build: ./frontend - command: npm start - ports: - - "4200:4200" - volumes: - - ./frontend:/data/frontend - - ./frontend/node_modules:/data/frontend/node_modules - depends_on: - - backend - links: - - backend - environment: - - NODE_ENV=development - - test: - container_name: test - build: ./backend - command: python test.py - volumes: - - ./backend:/data/backend - depends_on: - - flaskaled-srv1 - - flaskaled-srv2 - links: - - flaskaled-srv1 - - flaskaled-srv2 - environment: - - FLASK_APP=app.py - - FLASK_ENV=test - - FLASK_DEBUG=0 - - PYTHONUNBUFFERED=1 - - DATABASE_URL_USERS=postgresql://flaskaled1:aled1@flaskaled-srv1/flaskaledDb1 - - DATABASE_URL_LOGS=postgresql://flaskaled2:aled2@flaskaled-srv2/flaskaledDb2 - - SECRET_KEY=default_secret_key + - DATABASE_URL_USERS=postgresql://flaskaled1:aled1@10.1.3.10:5433/flaskaledDb1 + - DATABASE_URL_LOGS=postgresql://flaskaled2:aled2@10.1.4.10:5434/flaskaledDb2 + - ALLOW_ORIGIN=10.1.1.10 + - SECRET_KEY=default_secret_key \ No newline at end of file diff --git a/frontend/.browserslistrc b/frontend/.browserslistrc deleted file mode 100644 index 427441d..0000000 --- a/frontend/.browserslistrc +++ /dev/null @@ -1,17 +0,0 @@ -# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -# For the full list of supported browsers by the Angular framework, please see: -# https://angular.io/guide/browser-support - -# You can see what browsers were selected by your queries by running: -# npx browserslist - -last 1 Chrome version -last 1 Firefox version -last 2 Edge major versions -last 2 Safari major versions -last 2 iOS major versions -Firefox ESR -not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. diff --git a/frontend/.editorconfig b/frontend/.editorconfig deleted file mode 100644 index 59d9a3a..0000000 --- a/frontend/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -# Editor configuration, see https://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.ts] -quote_type = single - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/frontend/.gitignore b/frontend/.gitignore deleted file mode 100644 index bac05b4..0000000 --- a/frontend/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/tmp -/out-tsc -# Only exists if Bazel was run -/bazel-out - -# dependencies -/node_modules - -# profiling files -chrome-profiler-events*.json - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -.history/* -.idea/* - -# misc -/.angular/cache -/.sass-cache -/connect.lock -/coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# System Files -.DS_Store -Thumbs.db - -package-lock.json diff --git a/frontend/Dockerfile b/frontend/Dockerfile deleted file mode 100644 index b0c17cc..0000000 --- a/frontend/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM node:latest -WORKDIR /data/frontend -COPY ["package.json", "package-lock.json*", "./"] -RUN npm install --NODE_ENV -RUN npm install -g @angular/cli -COPY . . diff --git a/frontend/README.md b/frontend/README.md deleted file mode 100644 index bdce2f4..0000000 --- a/frontend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Frontend - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.10. - -## Development server - -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. - -## Code scaffolding - -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`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. - -## Further help - -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. diff --git a/frontend/angular.json b/frontend/angular.json deleted file mode 100644 index 99c397a..0000000 --- a/frontend/angular.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "frontend": { - "projectType": "application", - "schematics": { - "@schematics/angular:component": { - "style": "scss" - }, - "@schematics/angular:application": { - "strict": true - } - }, - "root": "", - "sourceRoot": "src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "dist/frontend", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", - "./node_modules/bootstrap/scss/bootstrap.scss", - "src/styles.scss" - ], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "browserTarget": "frontend:build:production" - }, - "development": { - "browserTarget": "frontend:build:development" - } - }, - "defaultConfiguration": "development" - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "frontend:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], - "scripts": [] - } - } - } - } - }, - "defaultProject": "frontend" -} diff --git a/frontend/karma.conf.js b/frontend/karma.conf.js deleted file mode 100644 index 3635639..0000000 --- a/frontend/karma.conf.js +++ /dev/null @@ -1,44 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - jasmine: { - // you can add configuration options for Jasmine here - // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html - // for example, you can disable the random execution with `random: false` - // or set a specific seed with `seed: 4321` - }, - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - jasmineHtmlReporter: { - suppressAll: true // removes the duplicated traces - }, - coverageReporter: { - dir: require('path').join(__dirname, './coverage/frontend'), - subdir: '.', - reporters: [ - { type: 'html' }, - { type: 'text-summary' } - ] - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/frontend/package.json b/frontend/package.json deleted file mode 100644 index 43ae649..0000000 --- a/frontend/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "frontend", - "version": "0.0.0", - "scripts": { - "ng": "ng", - "start": "ng serve --host 0.0.0.0", - "build": "ng build", - "watch": "ng build --watch --configuration development", - "test": "ng test" - }, - "private": true, - "dependencies": { - "@angular/animations": "~13.1.1", - "@angular/cdk": "^13.0.2", - "@angular/common": "~13.1.1", - "@angular/compiler": "~13.1.1", - "@angular/core": "~13.1.1", - "@angular/forms": "~13.1.1", - "@angular/material": "^13.0.2", - "@angular/platform-browser": "~13.1.1", - "@angular/platform-browser-dynamic": "~13.1.1", - "@angular/router": "~13.1.1", - "bootstrap": "^5.1.3", - "jquery": "^3.6.0", - "popper": "^1.0.1", - "rxjs": "~6.6.0", - "tslib": "^2.3.0", - "zone.js": "~0.11.4" - }, - "devDependencies": { - "@angular-devkit/build-angular": "^13.1.4", - "@angular/cli": "~13.1.2", - "@angular/compiler-cli": "~13.1.1", - "@types/jasmine": "~3.8.0", - "@types/node": "^12.11.1", - "jasmine-core": "~3.8.0", - "karma": "~6.3.0", - "karma-chrome-launcher": "~3.1.0", - "karma-coverage": "~2.0.3", - "karma-jasmine": "~4.0.0", - "karma-jasmine-html-reporter": "~1.7.0", - "typescript": "~4.5.4" - } -} diff --git a/frontend/src/app/admin/myProfil/commentary.txt b/frontend/src/app/admin/myProfil/commentary.txt deleted file mode 100644 index ef51b49..0000000 --- a/frontend/src/app/admin/myProfil/commentary.txt +++ /dev/null @@ -1,7 +0,0 @@ -La page "admin/myProfil" contient: - - les informations de l'admin (composant "page-profil") - - un bouton "modifier profil" pour modifier les informations de l'admin (composant "popup-update-profil") - -Cette page est la même que la page de la partie utilisateur. - -Ainsi, on a rangé cette page dans le dossier "common/components/profil". diff --git a/frontend/src/app/admin/userList/page-user-list/page-user-list.component.html b/frontend/src/app/admin/userList/page-user-list/page-user-list.component.html deleted file mode 100644 index 483b6db..0000000 --- a/frontend/src/app/admin/userList/page-user-list/page-user-list.component.html +++ /dev/null @@ -1,67 +0,0 @@ -
- - - - -
- -
- - -
- - Filter - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Pseudo{{person.nickname}}Email{{person.email}}Rôle{{person.role}}Actions - - -
- - - - - -
-

diff --git a/frontend/src/app/admin/userList/page-user-list/page-user-list.component.scss b/frontend/src/app/admin/userList/page-user-list/page-user-list.component.scss deleted file mode 100644 index 78b21a9..0000000 --- a/frontend/src/app/admin/userList/page-user-list/page-user-list.component.scss +++ /dev/null @@ -1,18 +0,0 @@ -mat-paginator, table { - width: 80%; - margin: auto 10%; -} - -.btnContainer { - margin: 50px 10% 20px 0px; - text-align: right; -} - -.btnAjouter { - border: solid 1px black; -} - -.filtre { - text-align: center; - width: 33%; -} diff --git a/frontend/src/app/admin/userList/page-user-list/page-user-list.component.spec.ts b/frontend/src/app/admin/userList/page-user-list/page-user-list.component.spec.ts deleted file mode 100644 index 6bad939..0000000 --- a/frontend/src/app/admin/userList/page-user-list/page-user-list.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PageUserListComponent } from './page-user-list.component'; - -describe('PageAdminComponent', () => { - let component: PageUserListComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PageUserListComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PageUserListComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/admin/userList/page-user-list/page-user-list.component.ts b/frontend/src/app/admin/userList/page-user-list/page-user-list.component.ts deleted file mode 100644 index 6496d7e..0000000 --- a/frontend/src/app/admin/userList/page-user-list/page-user-list.component.ts +++ /dev/null @@ -1,152 +0,0 @@ -import {AfterViewInit, Component, ViewChild} from '@angular/core'; -import {MatTableDataSource} from "@angular/material/table"; -import {MatSort} from "@angular/material/sort"; -import {MatPaginator} from "@angular/material/paginator"; -import {MatDialog} from "@angular/material/dialog"; -import {PopupCreatePersonComponent} from "../popup-create-person/popup-create-person.component"; -import {MatSnackBar} from "@angular/material/snack-bar"; -import {PopupUpdatePersonAdminComponent} from "../popup-update-person-admin/popup-update-person-admin.component"; -import {PopupDeleteProfilComponent} from "../../../common/components/popup-delete-profil/popup-delete-profil.component"; -import {MessageService} from "../../../common/services/message/message.service"; - - - -@Component({ - selector: 'app-page-user-list', - templateUrl: './page-user-list.component.html', - styleUrls: ['./page-user-list.component.scss'] -}) -export class PageUserListComponent implements AfterViewInit -{ - displayedColumns: string[] = [ "nickname", "email", "role", "actions" ]; - dataSource: MatTableDataSource = new MatTableDataSource(); - @ViewChild(MatSort) sort: MatSort; - @ViewChild(MatPaginator) paginator: MatPaginator; - configSnackBar = { duration: 2000, panelClass: "custom-class" }; - - - constructor( private messageService: MessageService, - public dialog: MatDialog, - private snackBar: MatSnackBar) { } - - - ngAfterViewInit(): void - { - this.messageService - .get('users?order_by=nickname') - .subscribe(retour => this.ngAfterViewInitCallback(retour), err => this.ngAfterViewInitCallback(err)); - } - - - ngAfterViewInitCallback(retour: any): void - { - if(retour.status !== "success") { - console.log(retour); - } - else { - let tabPerson: { id: number, email: string, nickname: string, is_admin: boolean }[] = retour.data; - tabPerson = tabPerson.map( person => { - if(!person.is_admin) return Object.assign(person, {role: "utilisateur"}); - else return Object.assign(person, {role: "admin"}); - }); - this.dataSource = new MatTableDataSource(tabPerson); - this.dataSource.sort = this.sort; - this.dataSource.paginator = this.paginator; - } - } - - - applyFilter(event: Event) - { - const filterValue = (event.target as HTMLInputElement).value; - this.dataSource.filter = filterValue.trim().toLowerCase(); - } - - - // Appuie sur le bouton "create" - onCreate(): void - { - const config = { width: '50%' }; - this.dialog - .open(PopupCreatePersonComponent, config) - .afterClosed() - .subscribe( retour => { - - if((retour === null) || (retour === undefined)) - { - this.snackBar.open( "Opération annulée", "", this.configSnackBar); - } - else { - if(retour.data.is_admin) retour.data.role = "admin" ; - else retour.data.role = "utilisateur" ; - this.dataSource.data.push(retour.data); - this.dataSource.data = this.dataSource.data; - this.dataSource = this.dataSource; - this.snackBar.open( "L'utilisateur a bien été créé ✔", "", this.configSnackBar); - } - }); - } - - - // Appuie sur le bouton "edit" - onUpdate(personToUpdate: any): void - { - const config = { - width: '50%', - data: { person: personToUpdate } - }; - this.dialog - .open(PopupUpdatePersonAdminComponent, config) - .afterClosed() - .subscribe( is_admin => { - - if((is_admin === null) || (is_admin === undefined)) - { - this.snackBar.open("Opération annulée", "", this.configSnackBar); - } - else { - const index = this.dataSource.data.findIndex(elt => (elt.id === personToUpdate.id)); - this.dataSource.data[index].is_admin = is_admin; - if(is_admin) this.dataSource.data[index].role = "admin"; - else this.dataSource.data[index].role = "utilisateur"; - this.snackBar.open("L'utilisateur a bien été modifié ✔", "", this.configSnackBar); - } - - }); - } - - - // Appuie sur le bouton "delete" - onDelete(personToDelete: any): void - { - const config = { - data: { - id: personToDelete.id, - email: personToDelete.email, - me: false, - } - }; - this.dialog - .open(PopupDeleteProfilComponent, config) - .afterClosed() - .subscribe( retour => { - - if((retour === null) || (retour === undefined)) - { - this.snackBar.open("Opération annulée", "", this.configSnackBar); - } - else if(retour.status === "error") - { - this.snackBar.open(retour.error.message, "", this.configSnackBar); - } - else { - const index = this.dataSource.data.findIndex( elt => (elt.id === personToDelete.id)); - this.dataSource.data.splice(index, 1); - this.dataSource.data = this.dataSource.data; - this.dataSource = this.dataSource; - this.snackBar.open("L'utilisateur a bien été supprimé ✔", "", this.configSnackBar); - } - }); - } - -} diff --git a/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.html b/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.html deleted file mode 100644 index 15a27f5..0000000 --- a/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.html +++ /dev/null @@ -1,47 +0,0 @@ -
- -

Ajouter un utilisateur

- - - - - - Pseudo - -
- - - - Email - -
- - - - Mot de passe - -
- - - - Confirmation mot de passe - -
- - - - Utilisateur   - Admin -

- - - - -
- {{errorMessage}} -
- - - - -
diff --git a/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.scss b/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.scss deleted file mode 100644 index a95b14d..0000000 --- a/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.scss +++ /dev/null @@ -1,13 +0,0 @@ -.myContainer { - text-align: center; -} - -::ng-deep .mat-radio-inner-circle { - color: black !important; - background-color: black !important; -} - -::ng-deep .mat-radio-outer-circle{ - color: black !important; - border: solid 1px gray !important; -} diff --git a/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.spec.ts b/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.spec.ts deleted file mode 100644 index 29a8b97..0000000 --- a/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PopupCreatePersonComponent } from './popup-create-person.component'; - -describe('PopupCreerUtilisateurComponent', () => { - let component: PopupCreatePersonComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PopupCreatePersonComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PopupCreatePersonComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.ts b/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.ts deleted file mode 100644 index 11f0b1c..0000000 --- a/frontend/src/app/admin/userList/popup-create-person/popup-create-person.component.ts +++ /dev/null @@ -1,95 +0,0 @@ -import {Component, Inject} from '@angular/core'; -import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; -import {CheckEmailService} from "../../../common/services/checkEmail/check-email.service"; -import {MessageService} from "../../../common/services/message/message.service"; - - - -@Component({ - selector: 'app-popup-create-person', - templateUrl: './popup-create-person.component.html', - styleUrls: ['./popup-create-person.component.scss'] -}) -export class PopupCreatePersonComponent -{ - nickname: string = ""; - email: string = ""; - is_admin: boolean = false; - password: string = ""; - - confirmPassword: string = "" ; - hasError: boolean = false; - errorMessage: string = "" ; - - - constructor( public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private checkEmailService: CheckEmailService, - private messageService: MessageService ) { } - - - // Appuie sur le bouton "valider" - onValider(): void - { - this.checkField(); - if(!this.hasError) - { - const data = { - email: this.email, - nickname: this.nickname, - password: this.password, - is_admin: this.is_admin - }; - this.messageService - .post("admin/create/user", data) - .subscribe(ret => this.onValiderCallback(ret), err => this.onValiderCallback(err)); - } - } - - - // Callback de 'onValider' - onValiderCallback(retour: any) - { - if(retour.status !== 'success') - { - console.log(retour); - this.errorMessage = retour.error.message; - this.hasError = true; - } - else - { - this.dialogRef.close(retour); - } - } - - - // Check les champs saisis par l'utilisateur - checkField(): void - { - if(this.nickname.length === 0) { - this.errorMessage = "Veuillez remplir le champ 'pseudo'."; - this.hasError = true; - } - else if(this.email.length === 0) { - this.errorMessage = "Veuillez remplir le champ 'email'."; - this.hasError = true; - } - else if(!this.checkEmailService.isValidEmail(this.email)) { - this.errorMessage = "Email invalide."; - this.hasError = true; - } - else if(this.password.length === 0) { - this.errorMessage = "Veuillez remplir le champ 'mot de passe'."; - this.hasError = true; - } - else if(this.password !== this.confirmPassword) { - this.errorMessage = "Le mot de passe est différent de sa confirmation."; - this.hasError = true; - } - else { - this.errorMessage = "" ; - this.hasError = false; - } - } - -} diff --git a/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.html b/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.html deleted file mode 100644 index 2c2e58c..0000000 --- a/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.html +++ /dev/null @@ -1,57 +0,0 @@ -
-
- -

Modifier

- - -
- - - - Utilisateur   - Admin -

- - -
- - -
- Modifier mot de passe: - -
- - -
- - - Nouveau mot de passe - - -
- - - Confirmation nouveau mot de passe - - -
-

- - -
- - -
- {{errorMessage}} -
- - -
- - -
- -
-
diff --git a/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.scss b/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.scss deleted file mode 100644 index 1317c7a..0000000 --- a/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.scss +++ /dev/null @@ -1,37 +0,0 @@ -.boite { - font-size: small; -} - -h3 { - text-align: center; -} - -button { - font-size: small; -} - -img { - margin: 0px 0px 10px 0px; - width: 5vw; - height: 5vw; - border: solid 2px black; - border-radius: 50%; - font-size: xxx-large; -} - -// ------------------------------------------------------------------------- - -// aura -::ng-deep .mat-checkbox-ripple .mat-ripple-element { - background-color: grey !important; -} - -// contenu coche -::ng-deep .mat-checkbox-checked.mat-accent .mat-checkbox-background { - background-color: black !important; -} - -// indeterminate -::ng-deep .mat-checkbox .mat-checkbox-frame { - background-color: white !important; -} diff --git a/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.spec.ts b/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.spec.ts deleted file mode 100644 index 431857c..0000000 --- a/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PopupUpdatePersonAdminComponent } from './popup-update-person-admin.component'; - -describe('PopupUpdatePersonAdminComponent', () => { - let component: PopupUpdatePersonAdminComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PopupUpdatePersonAdminComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PopupUpdatePersonAdminComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.ts b/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.ts deleted file mode 100644 index 1bf55e4..0000000 --- a/frontend/src/app/admin/userList/popup-update-person-admin/popup-update-person-admin.component.ts +++ /dev/null @@ -1,87 +0,0 @@ -import {Component, Inject, OnInit} from '@angular/core'; -import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; -import {CheckEmailService} from "../../../common/services/checkEmail/check-email.service"; -import {MessageService} from "../../../common/services/message/message.service"; - - - -@Component({ - selector: 'app-popup-update-person-admin', - templateUrl: './popup-update-person-admin.component.html', - styleUrls: ['./popup-update-person-admin.component.scss'] -}) -export class PopupUpdatePersonAdminComponent implements OnInit -{ - id: number = 0; - is_admin: boolean = false; - newPassword: string = ""; - - confirmNewPassword: string = "" ; - changePassword: boolean = false ; - hasError: boolean = false; - errorMessage: string = "" ; - - - constructor( public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private checkEmailService: CheckEmailService, - private messageService: MessageService ) { } - - - ngOnInit(): void - { - this.id = this.data.person.id; - this.is_admin = this.data.person.is_admin; - } - - - // Appuie sur le bouton "valider" - onValider(): void - { - this.checkField(); - if(!this.hasError) - { - let data = {}; - if(this.changePassword) data = { id: this.id, is_admin: this.is_admin, password: this.newPassword } - else data = { id: this.id, is_admin: this.is_admin }; - this.messageService - .put("admin/update/user", data) - .subscribe(ret => this.onValiderCallback(ret), err => this.onValiderCallback(err)); - } - } - - - // Callback de 'onValider' - onValiderCallback(retour: any) - { - if(retour.status !== 'success') - { - console.log(retour); - this.errorMessage = retour.error.message; - this.hasError = true; - } - else - { - this.dialogRef.close(this.is_admin); - } - } - - - // Check les champs saisis par l'utilisateur - checkField(): void - { - if((this.changePassword) && (this.newPassword.length === 0)) { - this.errorMessage = "Veuillez remplir le champ 'mot de passe'"; - this.hasError = true; - } - else if((this.changePassword) && (this.newPassword !== this.confirmNewPassword)) { - this.errorMessage = "Le mot de passe est différent de sa confirmation"; - this.hasError = true; - } - else { - this.errorMessage = "" ; - this.hasError = false; - } - } - -} diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts deleted file mode 100644 index 6fd371d..0000000 --- a/frontend/src/app/app-routing.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import {PageLoginComponent} from "./login/page-login/page-login.component"; -import {PageRegisterComponent} from "./register/page-register/page-register.component"; -import {PageProfilComponent} from "./common/components/page-profil/page-profil.component"; -import {PageUserListComponent} from "./admin/userList/page-user-list/page-user-list.component"; -import {PageRegistryComponent} from "./user/page-registry/page-registry.component"; -import {UserGuard} from "./common/guards/user/user.guard"; -import {AdminGuard} from "./common/guards/admin/admin.guard"; - -const routes: Routes = [ - - { path: "", component: PageLoginComponent }, - { path: "login", component: PageLoginComponent }, - - { path: "register", component: PageRegisterComponent }, - - { path: "user", component: PageRegistryComponent, canActivate: [UserGuard] }, - { path: "user/registry", component: PageRegistryComponent, canActivate: [UserGuard] }, - { path: "user/myProfil", component: PageProfilComponent, canActivate: [UserGuard] }, - - { path: "admin", component: PageUserListComponent, canActivate: [AdminGuard] }, - { path: "admin/userList", component: PageUserListComponent, canActivate: [AdminGuard] }, - { path: "admin/myProfil", component: PageProfilComponent, canActivate: [AdminGuard] }, -]; - -@NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] -}) -export class AppRoutingModule { } diff --git a/frontend/src/app/app.component.html b/frontend/src/app/app.component.html deleted file mode 100644 index d5d92f3..0000000 --- a/frontend/src/app/app.component.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/frontend/src/app/app.component.scss b/frontend/src/app/app.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/src/app/app.component.spec.ts b/frontend/src/app/app.component.spec.ts deleted file mode 100644 index 74b5b3e..0000000 --- a/frontend/src/app/app.component.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { RouterTestingModule } from '@angular/router/testing'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ - RouterTestingModule - ], - declarations: [ - AppComponent - ], - }).compileComponents(); - }); - - it('should create the app', () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - it(`should have as title 'frontend'`, () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app.title).toEqual('frontend'); - }); - - it('should render title', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('.content span')?.textContent).toContain('frontend app is running!'); - }); -}); diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts deleted file mode 100644 index 0c5a793..0000000 --- a/frontend/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] -}) -export class AppComponent { - title = 'frontend'; -} diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts deleted file mode 100644 index ebfbd59..0000000 --- a/frontend/src/app/app.module.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; - -import { AppRoutingModule } from './app-routing.module'; -import { AppComponent } from './app.component'; -import { PageRegisterComponent } from './register/page-register/page-register.component'; -import {FormsModule} from "@angular/forms"; -import {BrowserAnimationsModule} from "@angular/platform-browser/animations"; -import {MatFormFieldModule} from "@angular/material/form-field"; -import {MatInputModule} from "@angular/material/input"; -import {PageLoginComponent} from "./login/page-login/page-login.component"; -import { NavbarComponent } from './common/components/navbar/navbar.component'; -import {MatButtonModule} from "@angular/material/button"; -import { PageProfilComponent } from './common/components/page-profil/page-profil.component'; -import { PopupUpdateProfilComponent } from './common/components/popup-update-profil/popup-update-profil.component'; -import {MatDividerModule} from "@angular/material/divider"; -import {MatCheckboxModule} from "@angular/material/checkbox"; -import {MatDialogModule} from "@angular/material/dialog"; -import {MatSnackBarModule} from "@angular/material/snack-bar"; -import { PageUserListComponent } from './admin/userList/page-user-list/page-user-list.component'; -import { PopupCreatePersonComponent } from './admin/userList/popup-create-person/popup-create-person.component'; -import {MatTableModule} from "@angular/material/table"; -import {MatPaginatorModule} from "@angular/material/paginator"; -import { PopupConfirmRegisterComponent } from './register/popup-confirm-register/popup-confirm-register.component'; -import {MatIconModule} from "@angular/material/icon"; -import {MatRadioModule} from "@angular/material/radio"; -import { PageRegistryComponent } from './user/page-registry/page-registry.component'; -import { PopupDeleteProfilComponent } from './common/components/popup-delete-profil/popup-delete-profil.component'; -import {MatSortModule} from "@angular/material/sort"; -import { PopupUpdatePersonAdminComponent } from './admin/userList/popup-update-person-admin/popup-update-person-admin.component'; -import {HttpClientModule} from "@angular/common/http"; - - - -@NgModule({ - declarations: [ - AppComponent, - PageLoginComponent, - PageRegisterComponent, - NavbarComponent, - PageProfilComponent, - PopupUpdateProfilComponent, - PageUserListComponent, - PopupCreatePersonComponent, - PopupConfirmRegisterComponent, - PageRegistryComponent, - PopupDeleteProfilComponent, - PopupUpdatePersonAdminComponent - ], - imports: [ - BrowserModule, - AppRoutingModule, - FormsModule, - BrowserAnimationsModule, - HttpClientModule, - MatFormFieldModule, - MatInputModule, - MatButtonModule, - MatDividerModule, - MatCheckboxModule, - MatDialogModule, - MatSnackBarModule, - MatTableModule, - MatPaginatorModule, - MatSortModule, - MatIconModule, - MatRadioModule - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/frontend/src/app/common/components/navbar/navbar.component.html b/frontend/src/app/common/components/navbar/navbar.component.html deleted file mode 100644 index 2d09333..0000000 --- a/frontend/src/app/common/components/navbar/navbar.component.html +++ /dev/null @@ -1,108 +0,0 @@ - -
- -
- - - - - - -
- -
- - - - - - -
- -
- - - - - - -
- -
diff --git a/frontend/src/app/common/components/navbar/navbar.component.scss b/frontend/src/app/common/components/navbar/navbar.component.scss deleted file mode 100644 index a64cc59..0000000 --- a/frontend/src/app/common/components/navbar/navbar.component.scss +++ /dev/null @@ -1,59 +0,0 @@ -.navbar { - background-color: black; - height: 60px; - font-size: medium; - color: white; -} - - -.navbar-expand-lg { - border-bottom: solid; - border-color: white; - border-bottom-width: 2px; -} - - -// PolyNotFound -.navbar-brand { - font-family: cursive; - font-weight: bold; - font-size: x-large; - margin-left: 15px; - color: white; -} - - -// Recherche, Mes Playlists, Historique -.nav-link { - color: white; -} -.nav-link:hover { - color: grey; -} - - -// Bonton deconnexion -.btnDeconnexion { - font-size: medium; - margin: 0px 10px 0px 10px -} -.btnDeconnexion:hover { - color: grey; -} - - -.monLi { - margin: 0px 10px 0px 10px; -} - - -img { - border: solid 2px white; - border-radius: 50px; - margin: 0px 10px 0px 15px; - width: 40px; - height: 40px; -} -img:hover { - cursor: pointer; -} diff --git a/frontend/src/app/common/components/navbar/navbar.component.spec.ts b/frontend/src/app/common/components/navbar/navbar.component.spec.ts deleted file mode 100644 index f8ccd6f..0000000 --- a/frontend/src/app/common/components/navbar/navbar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { NavbarComponent } from './navbar.component'; - -describe('NavbarComponent', () => { - let component: NavbarComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ NavbarComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(NavbarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/components/navbar/navbar.component.ts b/frontend/src/app/common/components/navbar/navbar.component.ts deleted file mode 100644 index 19d0c04..0000000 --- a/frontend/src/app/common/components/navbar/navbar.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {Component, Input, OnInit} from '@angular/core'; -import {ProfilService} from "../../services/profil/profil.service"; -import {MessageService} from "../../services/message/message.service"; - -@Component({ - selector: 'app-navbar', - templateUrl: './navbar.component.html', - styleUrls: ['./navbar.component.scss'] -}) -export class NavbarComponent implements OnInit -{ - @Input() pour = "login"; - - constructor(private profilService: ProfilService, private messageService: MessageService) { } - - ngOnInit(): void {} - - onDeconnexion(): void - { - this.messageService - .delete('logout') - .subscribe(retour => this.onDeconnexionCallback(retour), err => this.onDeconnexionCallback(err)); - this.profilService.setId(-1); - this.profilService.setIsAdmin(false); - } - - onDeconnexionCallback(retour: any): void - { - if(retour.status !== "success") console.log(retour); - } - -} diff --git a/frontend/src/app/common/components/page-profil/page-profil.component.html b/frontend/src/app/common/components/page-profil/page-profil.component.html deleted file mode 100644 index ad7d8a3..0000000 --- a/frontend/src/app/common/components/page-profil/page-profil.component.html +++ /dev/null @@ -1,53 +0,0 @@ -
- - - - - - -
- - -
-
Pseudo:
-
{{person.nickname}}
-
- - -
-
Mail:
-
{{person.email}}
-
- - -
-
Rôle:
-
- utilisateur - admin -
- - -
- -
-
- -
-
- -
-
- -
-
-
- -
- - -
diff --git a/frontend/src/app/common/components/page-profil/page-profil.component.scss b/frontend/src/app/common/components/page-profil/page-profil.component.scss deleted file mode 100644 index fa50561..0000000 --- a/frontend/src/app/common/components/page-profil/page-profil.component.scss +++ /dev/null @@ -1,45 +0,0 @@ -.myContainer { - max-width: 100vw; - height: 100vh; - overflow-x: hidden; -} - - -.boite { - margin-left: auto; - margin-right: auto; - width: 50%; - margin-top: 10vh; - border: solid 3px; - border-radius: 10px; - padding: 20px 40px 20px 40px; - background-color: #ffffff; - text-align: center; - box-shadow: 10px 5px 5px black; -} - - -.myRow { - margin: 15px 0px 15px 0px; -} -.myLabel { - text-align: right; - padding: 0px 5px 0px 0px; - margin: 0px; - font-weight: bold; -} -.myValue { - text-align: left; - padding: 0px 0px 0px 5px; - margin: 0px; -} - - -.btnContainer { - text-align: center; - margin-top: 40px; -} -.myBtn { - border: solid 1px black; - background-color: white; -} diff --git a/frontend/src/app/common/components/page-profil/page-profil.component.spec.ts b/frontend/src/app/common/components/page-profil/page-profil.component.spec.ts deleted file mode 100644 index 958b80e..0000000 --- a/frontend/src/app/common/components/page-profil/page-profil.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PageProfilComponent } from './page-profil.component'; - -describe('PageUtilisateurComponent', () => { - let component: PageProfilComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PageProfilComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PageProfilComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/components/page-profil/page-profil.component.ts b/frontend/src/app/common/components/page-profil/page-profil.component.ts deleted file mode 100644 index 23e3d43..0000000 --- a/frontend/src/app/common/components/page-profil/page-profil.component.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {MatDialog} from "@angular/material/dialog"; -import {MatSnackBar} from "@angular/material/snack-bar"; -import {PopupUpdateProfilComponent} from "../popup-update-profil/popup-update-profil.component"; -import {Router} from "@angular/router"; -import {PopupDeleteProfilComponent} from "../popup-delete-profil/popup-delete-profil.component"; -import {MessageService} from "../../services/message/message.service"; -import {HttpParams} from "@angular/common/http"; -import {ProfilService} from "../../services/profil/profil.service"; - - - -@Component({ - selector: 'app-page-profil', - templateUrl: './page-profil.component.html', - styleUrls: ['./page-profil.component.scss'] -}) -export class PageProfilComponent implements OnInit -{ - person = { - id: "", - nickname: "", - email: "", - is_admin: false, - }; - from: string = "" ; - configSnackbar = { duration: 3000, panelClass: "custom-class" }; - - - constructor( private messageService: MessageService, - private profilService: ProfilService, - public dialog: MatDialog, - private snackBar: MatSnackBar, - private router: Router ) { } - - - ngOnInit(): void - { - if(this.router.url.startsWith("/user")) this.from = "user" ; - else if(this.router.url.startsWith("/admin")) this.from = "admin" ; - - let params = new HttpParams() - params = params.set("order_by", "nickname"); - params = params.set("id", this.profilService.getId()); - this.messageService - .get("users", params) - .subscribe(ret => this.ngOnInitCallback(ret), err => this.ngOnInitCallback(err)); - } - - - // Callback de ngOnInit - ngOnInitCallback(retour: any): void - { - if(retour.status !== "success") { - console.log(retour); - } - else { - this.person = retour.data[0]; - } - } - - - // Appuie sur le bouton modifier - onModifier(): void - { - const config = { - width: '25%', - data: { person: this.person } - }; - this.dialog - .open(PopupUpdateProfilComponent, config) - .afterClosed() - .subscribe(retour => this.onModifierCallback(retour)); - } - - - // Callback de onModifier - onModifierCallback(retour: any): void - { - if((retour === null) || (retour === undefined)) this.snackBar.open( "Opération annulé", "", this.configSnackbar); - else if(retour.status === "success") this.person = retour.data; - } - - - // Appuie sur le bouton supprimer - onSupprimer(): void - { - const config = { - data: { - id: this.person.id, - email: this.person.email, - me: true, - } - }; - this.dialog - .open(PopupDeleteProfilComponent, config) - .afterClosed() - .subscribe(retour => this.onSupprimerCallback(retour)); - } - - - // Callback de onSupprimer - onSupprimerCallback(retour: any): void - { - if((retour === null) || (retour === undefined)) this.snackBar.open( "Opération annulé", "", this.configSnackbar); - else if(retour.status === "error") this.snackBar.open(retour.error.message, "", this.configSnackbar); - else if(retour.status === "success") this.router.navigateByUrl("/login"); - } - -} diff --git a/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.html b/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.html deleted file mode 100644 index 9118e3b..0000000 --- a/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.html +++ /dev/null @@ -1,14 +0,0 @@ - - Êtes-vous sûr de vouloir supprimer votre compte ? - - - - - Êtes-vous sûr de vouloir supprimer {{email}} ? - - - - - - - diff --git a/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.scss b/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.spec.ts b/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.spec.ts deleted file mode 100644 index 8743fad..0000000 --- a/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PopupDeleteProfilComponent } from './popup-delete-profil.component'; - -describe('PopupDeleteProfilComponent', () => { - let component: PopupDeleteProfilComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PopupDeleteProfilComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PopupDeleteProfilComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.ts b/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.ts deleted file mode 100644 index 49d6b5b..0000000 --- a/frontend/src/app/common/components/popup-delete-profil/popup-delete-profil.component.ts +++ /dev/null @@ -1,68 +0,0 @@ -import {Component, Inject, OnInit} from '@angular/core'; -import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; -import {MessageService} from "../../services/message/message.service"; -import {HttpParams} from "@angular/common/http"; - - - -@Component({ - selector: 'app-popup-delete-profil', - templateUrl: './popup-delete-profil.component.html', - styleUrls: ['./popup-delete-profil.component.scss'] -}) -export class PopupDeleteProfilComponent implements OnInit -{ - id: number; - me: boolean = false; // on se supprime soi-même - email: string = ""; - - - constructor( private messageService: MessageService, - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any ) { } - - - ngOnInit(): void { - this.id = this.data.id; - this.me = this.data.me; - this.email = this.data.email; - } - - - // Appuie sur 'valider' - onValider(): void - { - if(this.me) - { - this.messageService - .delete("user/delete") - .subscribe(ret => this.onValiderCallback(ret), err => this.onValiderCallback(err)); - } - else { - //let params = (new HttpParams()).set("id", this.id); - this.messageService - .delete("admin/delete/user/"+this.id) - .subscribe(ret => this.onValiderCallback(ret), err => this.onValiderCallback(err)); - } - } - - - // Callback de onValider - onValiderCallback(retour: any): void - { - if(retour.status === "success") - { - this.dialogRef.close(retour); - } - else if(retour.status === "error") - { - console.log(retour); - this.dialogRef.close(retour); - } - else { - console.log(retour); - this.dialogRef.close(null); - } - } - -} diff --git a/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.html b/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.html deleted file mode 100644 index c28fe07..0000000 --- a/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.html +++ /dev/null @@ -1,55 +0,0 @@ -
-
- -

Modifier

- - -

- - - - Pseudo - -
- - -
- - -
- Modifier mot de passe: - -
- - -
- - - Nouveau mot de passe - - -
- - - Confirmation nouveau mot de passe - - -
-

- - -
- - -
- {{errorMessage}} -
- - -
- - -
- -
-
diff --git a/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.scss b/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.scss deleted file mode 100644 index 1317c7a..0000000 --- a/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.scss +++ /dev/null @@ -1,37 +0,0 @@ -.boite { - font-size: small; -} - -h3 { - text-align: center; -} - -button { - font-size: small; -} - -img { - margin: 0px 0px 10px 0px; - width: 5vw; - height: 5vw; - border: solid 2px black; - border-radius: 50%; - font-size: xxx-large; -} - -// ------------------------------------------------------------------------- - -// aura -::ng-deep .mat-checkbox-ripple .mat-ripple-element { - background-color: grey !important; -} - -// contenu coche -::ng-deep .mat-checkbox-checked.mat-accent .mat-checkbox-background { - background-color: black !important; -} - -// indeterminate -::ng-deep .mat-checkbox .mat-checkbox-frame { - background-color: white !important; -} diff --git a/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.spec.ts b/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.spec.ts deleted file mode 100644 index 6d2a26b..0000000 --- a/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PopupUpdateProfilComponent } from './popup-update-profil.component'; - -describe('PopupModifierUtilisateurComponent', () => { - let component: PopupUpdateProfilComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PopupUpdateProfilComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PopupUpdateProfilComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.ts b/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.ts deleted file mode 100644 index 4d92bc2..0000000 --- a/frontend/src/app/common/components/popup-update-profil/popup-update-profil.component.ts +++ /dev/null @@ -1,108 +0,0 @@ -import {Component, Inject, OnInit} from '@angular/core'; -import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; -import {CheckEmailService} from "../../services/checkEmail/check-email.service"; -import {MessageService} from "../../services/message/message.service"; - - - -@Component({ - selector: 'app-popup-update-profil', - templateUrl: './popup-update-profil.component.html', - styleUrls: ['./popup-update-profil.component.scss'] -}) -export class PopupUpdateProfilComponent implements OnInit -{ - personCopy: any; - newPassword: string = ""; - confirmNewPassword: string = "" ; - changePassword: boolean = false ; - hasError: boolean = false; - errorMessage: string = "" ; - - - constructor( private checkEmailService: CheckEmailService, - private messageService: MessageService, - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any ) { } - - - ngOnInit(): void - { - const person = this.data.person; - this.personCopy = { - id: person.id, - nickname: person.nickname, - email: person.email, - is_admin: person.is_admin - }; - } - - - // Appuie sur le bouton "valider" - onValider(): void - { - this.checkField(); - if(!this.hasError) - { - let data: any = {nickname: this.personCopy.nickname}; - if(this.changePassword) data = { - nickname: this.personCopy.nickname, - password: this.newPassword - }; - this.messageService - .put("user/update", data) - .subscribe(ret => this.onValiderCallback(ret), err => this.onValiderCallback(err)); - } - } - - - // Callback de 'onValider' - onValiderCallback(retour: any) - { - if(retour.status === "success") - { - this.dialogRef.close(retour); - } - else if(retour.status === "error") - { - console.log(retour); - this.errorMessage = retour.message; - this.hasError = true; - } - else { - console.log(retour); - this.dialogRef.close(null); - } - } - - - // Check les champs saisis par l'utilisateur - checkField(): void - { - if(this.personCopy.nickname.length === 0) { - this.errorMessage = "Veuillez remplir le champ 'pseudo'" ; - this.hasError = true; - } - else if(this.personCopy.email.length === 0) { - this.errorMessage = "Veuillez remplir le champ 'email'" ; - this.hasError = true; - } - else if(!this.checkEmailService.isValidEmail(this.personCopy.email)) { - this.errorMessage = "Email invalide" ; - this.hasError = true; - } - else if((this.changePassword) && (this.newPassword.length === 0)) { - this.errorMessage = "Veuillez remplir le champ 'mot de passe'"; - this.hasError = true; - } - else if((this.changePassword) && (this.newPassword !== this.confirmNewPassword)) { - this.errorMessage = "Le mot de passe est différent de sa confirmation"; - this.hasError = true; - } - else { - this.errorMessage = "" ; - this.hasError = false; - } - } - -} diff --git a/frontend/src/app/common/guards/admin/admin.guard.spec.ts b/frontend/src/app/common/guards/admin/admin.guard.spec.ts deleted file mode 100644 index e982f62..0000000 --- a/frontend/src/app/common/guards/admin/admin.guard.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { AdminGuard } from './admin.guard'; - -describe('AdminGuard', () => { - let guard: AdminGuard; - - beforeEach(() => { - TestBed.configureTestingModule({}); - guard = TestBed.inject(AdminGuard); - }); - - it('should be created', () => { - expect(guard).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/guards/admin/admin.guard.ts b/frontend/src/app/common/guards/admin/admin.guard.ts deleted file mode 100644 index 701b288..0000000 --- a/frontend/src/app/common/guards/admin/admin.guard.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Injectable } from '@angular/core'; -import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree} from '@angular/router'; -import { Observable } from 'rxjs'; -import {ProfilService} from "../../services/profil/profil.service"; - -@Injectable({ - providedIn: 'root' -}) -export class AdminGuard implements CanActivate -{ - - constructor(private profilService: ProfilService, private router: Router) {} - - - canActivate( route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable | Promise | boolean | UrlTree - { - if(this.profilService.getId() === -1) // si non connecté - { - this.router.navigateByUrl("/login"); - return false; - } - else { - if(this.profilService.isAdmin()) return true; - else { - this.router.navigateByUrl("/login"); - return false; - } - } - } - -} diff --git a/frontend/src/app/common/guards/user/user.guard.spec.ts b/frontend/src/app/common/guards/user/user.guard.spec.ts deleted file mode 100644 index a657320..0000000 --- a/frontend/src/app/common/guards/user/user.guard.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { UserGuard } from './user.guard'; - -describe('UserGuard', () => { - let guard: UserGuard; - - beforeEach(() => { - TestBed.configureTestingModule({}); - guard = TestBed.inject(UserGuard); - }); - - it('should be created', () => { - expect(guard).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/guards/user/user.guard.ts b/frontend/src/app/common/guards/user/user.guard.ts deleted file mode 100644 index d357d34..0000000 --- a/frontend/src/app/common/guards/user/user.guard.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Injectable } from '@angular/core'; -import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree} from '@angular/router'; -import { Observable } from 'rxjs'; -import {ProfilService} from "../../services/profil/profil.service"; - -@Injectable({ - providedIn: 'root' -}) -export class UserGuard implements CanActivate -{ - - constructor(private profilService: ProfilService, private router: Router) {} - - - canActivate( route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable | Promise | boolean | UrlTree - { - if(this.profilService.getId() === -1) // si non connecté - { - this.router.navigateByUrl("/login"); - return false; - } - else { - if(!this.profilService.isAdmin()) return true; - else { - this.router.navigateByUrl("/login"); - return false; - } - } - } - -} diff --git a/frontend/src/app/common/services/checkEmail/check-email.service.spec.ts b/frontend/src/app/common/services/checkEmail/check-email.service.spec.ts deleted file mode 100644 index 49250c3..0000000 --- a/frontend/src/app/common/services/checkEmail/check-email.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { CheckEmailService } from './check-email.service'; - -describe('CheckEmailService', () => { - let service: CheckEmailService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(CheckEmailService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/services/checkEmail/check-email.service.ts b/frontend/src/app/common/services/checkEmail/check-email.service.ts deleted file mode 100644 index 0ed4cb8..0000000 --- a/frontend/src/app/common/services/checkEmail/check-email.service.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class CheckEmailService -{ - - isValidEmail(email: string): boolean - { - let re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - return re.test(email); - } - -} diff --git a/frontend/src/app/common/services/fictitiousDatas/fictitious-datas.service.spec.ts b/frontend/src/app/common/services/fictitiousDatas/fictitious-datas.service.spec.ts deleted file mode 100644 index 17d518a..0000000 --- a/frontend/src/app/common/services/fictitiousDatas/fictitious-datas.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { FictitiousDatasService } from './fictitious-datas.service'; - -describe('FictitiousDatasService', () => { - let service: FictitiousDatasService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(FictitiousDatasService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/services/fictitiousDatas/fictitious-datas.service.ts b/frontend/src/app/common/services/fictitiousDatas/fictitious-datas.service.ts deleted file mode 100644 index e4eb760..0000000 --- a/frontend/src/app/common/services/fictitiousDatas/fictitious-datas.service.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Injectable } from '@angular/core'; - - -@Injectable({ - providedIn: 'root' -}) -export class FictitiousDatasService -{ - - getUser() - { - const id = (Math.floor(Math.random()*100000)).toString() - return { - id: id, - nickname: "Riri"+id, - email: "riri"+id+"@gmail.com", - hash_pass: "blablabla", - is_admin: false, - } - } - - getAdmin() - { - const id = (Math.floor(Math.random()*100000)).toString() - return { - id: id, - nickname: "Fifi"+id, - email: "fifi"+id+"@gmail.com", - hash_pass: "blablabla", - is_admin: true, - } - } - - getTabPerson(n: number) - { - let tab = []; - - for(let i=0 ; i { - let service: HashageService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(HashageService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/services/hashage/hashage.service.ts b/frontend/src/app/common/services/hashage/hashage.service.ts deleted file mode 100644 index f76562e..0000000 --- a/frontend/src/app/common/services/hashage/hashage.service.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class HashageService -{ - // Fonction de hashage (faible) - run(input: string): string - { - let hash = 0; - for (let i = 0; i < input.length; i++) { - let ch = input.charCodeAt(i); - hash = ((hash << 5) - hash) + ch; - hash = hash & hash; - } - return hash.toString(); - } -} diff --git a/frontend/src/app/common/services/message/message.service.spec.ts b/frontend/src/app/common/services/message/message.service.spec.ts deleted file mode 100644 index 1db761b..0000000 --- a/frontend/src/app/common/services/message/message.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { MessageService } from './message.service'; - -describe('MessageService', () => { - let service: MessageService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(MessageService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/services/message/message.service.ts b/frontend/src/app/common/services/message/message.service.ts deleted file mode 100644 index 4c4ec1c..0000000 --- a/frontend/src/app/common/services/message/message.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Injectable } from '@angular/core'; -import {HttpClient, HttpParams} from "@angular/common/http"; -import {Observable} from "rxjs"; -import {environment} from "../../../../environments/environment"; - -@Injectable({ - providedIn: 'root' -}) -export class MessageService -{ - - constructor( private http: HttpClient ) { } - - post(url: string, data: any): Observable - { - const urlComplete = environment.debutUrl + url ; - return this.http.post(urlComplete, data, {withCredentials: true}); - } - - get(url: string, params:HttpParams = new HttpParams()): Observable - { - const urlComplete = environment.debutUrl + url ; - return this.http.get(urlComplete,{ withCredentials: true, params: params }); - } - - put(url: string, data: any): Observable - { - const urlComplete = environment.debutUrl + url ; - return this.http.put(urlComplete, data, {withCredentials: true}); - } - - delete(url: string, params:HttpParams = new HttpParams()): Observable - { - const urlComplete = environment.debutUrl + url ; - return this.http.delete(urlComplete,{withCredentials: true}); - } - -} diff --git a/frontend/src/app/common/services/profil/profil.service.spec.ts b/frontend/src/app/common/services/profil/profil.service.spec.ts deleted file mode 100644 index 5cee000..0000000 --- a/frontend/src/app/common/services/profil/profil.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { ProfilService } from './profil.service'; - -describe('ProfilService', () => { - let service: ProfilService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(ProfilService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/common/services/profil/profil.service.ts b/frontend/src/app/common/services/profil/profil.service.ts deleted file mode 100644 index 71fac4a..0000000 --- a/frontend/src/app/common/services/profil/profil.service.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class ProfilService -{ - - constructor() - { - if(localStorage.getItem('id') === null) this.setId(-1); - if(localStorage.getItem('isAdmin') === null) this.setIsAdmin(false); - } - - getId(): number - { - let idString = localStorage.getItem('id'); - if(idString === null) return -1; - else return parseInt(idString); - } - - setId(id: number): void - { - localStorage.setItem('id', id.toString()); - } - - isAdmin(): boolean - { - let isAdminString = localStorage.getItem('isAdmin'); - if(isAdminString === "T") return true; - else return false; - } - - setIsAdmin(isAdmin: boolean): void - { - let isAdminString = "" ; - if(isAdmin) isAdminString = "T"; - else isAdminString = "F"; - localStorage.setItem('isAdmin', isAdminString); - } - -} diff --git a/frontend/src/app/login/page-login/page-login.component.html b/frontend/src/app/login/page-login/page-login.component.html deleted file mode 100644 index 493e7b7..0000000 --- a/frontend/src/app/login/page-login/page-login.component.html +++ /dev/null @@ -1,40 +0,0 @@ -
-
- - - - - - - -
-
- - -
-

FlaskAled

- User Icon -
- - -
- - - -
- {{errorMessage}} -
- -
- - - - -
-
- - -
-
diff --git a/frontend/src/app/login/page-login/page-login.component.scss b/frontend/src/app/login/page-login/page-login.component.scss deleted file mode 100644 index 8924202..0000000 --- a/frontend/src/app/login/page-login/page-login.component.scss +++ /dev/null @@ -1,271 +0,0 @@ -html { - background-color: #56baed; -} - -body { - font-family: "Poppins", sans-serif; - height: 100vh; -} - -a { - color: #5E89FF; - display:inline-block; - text-decoration: none; - font-weight: 400; -} - -h2 { - text-align: center; - font-size: 16px; - font-weight: 600; - text-transform: uppercase; - display:inline-block; - margin: 40px 8px 10px 8px; - color: #cccccc; -} - - - -/* STRUCTURE */ - -.wrapper { - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - width: 100%; - min-height: 80%; - padding: 20px; -} - -#formContent { - -webkit-border-radius: 10px 10px 10px 10px; - border-radius: 10px 10px 10px 10px; - background: #fff; - padding: 30px; - width: 90%; - max-width: 450px; - position: relative; - padding: 0px; - -webkit-box-shadow: 0 30px 60px 0 rgba(0,0,0,0.3); - box-shadow: 0 30px 60px 0 rgba(0,0,0,0.3); - text-align: center; -} - -#formFooter { - background-color: #f6f6f6; - border-top: 1px solid #dce8f1; - padding: 25px; - text-align: center; - -webkit-border-radius: 0 0 10px 10px; - border-radius: 0 0 10px 10px; -} - - - -/* TABS */ - -h2.inactive { - color: #cccccc; -} - -h2.active { - color: #0d0d0d; - border-bottom: 2px solid #5fbae9; -} - - - -/* FORM TYPOGRAPHY*/ - -input[type=button], input[type=submit], input[type=reset] { - background-color: #5E89FF; - border: none; - color: white; - padding: 15px 80px; - text-align: center; - text-decoration: none; - display: inline-block; - text-transform: uppercase; - font-size: 13px; - -webkit-box-shadow: 0 10px 30px 0 rgba(95,186,233,0.4); - box-shadow: 0 10px 30px 0 rgba(95,186,233,0.4); - -webkit-border-radius: 5px 5px 5px 5px; - border-radius: 5px 5px 5px 5px; - margin: 5px 20px 40px 20px; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; - transition: all 0.3s ease-in-out; -} - -input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover { - background-color: #39ace7; -} - -input[type=button]:active, input[type=submit]:active, input[type=reset]:active { - -moz-transform: scale(0.95); - -webkit-transform: scale(0.95); - -o-transform: scale(0.95); - -ms-transform: scale(0.95); - transform: scale(0.95); -} - -input[type=text], input[type=password] { - background-color: #f6f6f6; - border: none; - color: #0d0d0d; - padding: 15px 32px; - text-align: center; - text-decoration: none; - display: inline-block; - font-size: 16px; - margin: 5px; - width: 85%; - border: 2px solid #f6f6f6; - -webkit-transition: all 0.5s ease-in-out; - -moz-transition: all 0.5s ease-in-out; - -ms-transition: all 0.5s ease-in-out; - -o-transition: all 0.5s ease-in-out; - transition: all 0.5s ease-in-out; - -webkit-border-radius: 5px 5px 5px 5px; - border-radius: 5px 5px 5px 5px; -} - - - -input[type=text]:focus, input[type=password]:focus { - background-color: #fff; - border-bottom: 2px solid #5fbae9; -} - -input[type=text]::placeholder, input[type=password]::placeholder { - color: #cccccc; -} - -.bg{ - margin: 0; - padding: 0; - height: 100vh; - width: 100vw; - overflow-y: hidden; - overflow-x: hidden; -} - -/* ANIMATIONS */ - -/* Simple CSS3 Fade-in-down Animation */ -.fadeInDown { - -webkit-animation-name: fadeInDown; - animation-name: fadeInDown; - -webkit-animation-duration: 1s; - animation-duration: 1s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} - -@-webkit-keyframes fadeInDown { - 0% { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } - 100% { - opacity: 1; - -webkit-transform: none; - transform: none; - } -} - -@keyframes fadeInDown { - 0% { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } - 100% { - opacity: 1; - -webkit-transform: none; - transform: none; - } -} - -/* Simple CSS3 Fade-in Animation */ -@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } } -@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } } -@keyframes fadeIn { from { opacity:0; } to { opacity:1; } } - -.fadeIn { - opacity:0; - -webkit-animation:fadeIn ease-in 1; - -moz-animation:fadeIn ease-in 1; - animation:fadeIn ease-in 1; - - -webkit-animation-fill-mode:forwards; - -moz-animation-fill-mode:forwards; - animation-fill-mode:forwards; - - -webkit-animation-duration:1s; - -moz-animation-duration:1s; - animation-duration:1s; -} - -.fadeIn.first { - -webkit-animation-delay: 0.4s; - -moz-animation-delay: 0.4s; - animation-delay: 0.4s; -} - -.fadeIn.second { - -webkit-animation-delay: 0.6s; - -moz-animation-delay: 0.6s; - animation-delay: 0.6s; -} - -.fadeIn.third { - -webkit-animation-delay: 0.8s; - -moz-animation-delay: 0.8s; - animation-delay: 0.8s; -} - -.fadeIn.fourth { - -webkit-animation-delay: 1s; - -moz-animation-delay: 1s; - animation-delay: 1s; -} - -/* Simple CSS3 Fade-in Animation */ -.underlineHover:after { - display: block; - left: 0; - bottom: -10px; - width: 0; - height: 2px; - //background-color: #5E89FF; - background-color: #5E89FF; - content: ""; - transition: width 0.2s; -} - -.underlineHover:hover { - color: #0d0d0d; -} - -.underlineHover:hover:after{ - width: 100%; -} - -h1{ - color: black; -} - -/* OTHERS */ - -*:focus { - outline: none; -} - -#icon { - width:30%; -} diff --git a/frontend/src/app/login/page-login/page-login.component.spec.ts b/frontend/src/app/login/page-login/page-login.component.spec.ts deleted file mode 100644 index 28d80c7..0000000 --- a/frontend/src/app/login/page-login/page-login.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PageConnexionComponent } from './page-connexion.component'; - -describe('PageConnexionComponent', () => { - let component: PageConnexionComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PageConnexionComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PageConnexionComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/login/page-login/page-login.component.ts b/frontend/src/app/login/page-login/page-login.component.ts deleted file mode 100644 index 54ce267..0000000 --- a/frontend/src/app/login/page-login/page-login.component.ts +++ /dev/null @@ -1,78 +0,0 @@ -import {Component} from '@angular/core'; -import {Router} from "@angular/router"; -import {MessageService} from "../../common/services/message/message.service"; -import {ProfilService} from "../../common/services/profil/profil.service"; - - - -@Component({ - selector: 'app-page-nickname', - templateUrl: './page-login.component.html', - styleUrls: ['./page-login.component.scss'] -}) -export class PageLoginComponent -{ - email: string = "" ; - password: string = "" ; - hasError: boolean = false; - errorMessage: string = ""; - - - constructor( private messageService: MessageService, - private router: Router, - private profilService: ProfilService ) { } - - - // Appuie sur le bouton "seConnecter" - onSeConnecter(): void - { - this.checkField(); - if(!this.hasError) - { - const data = { - email: this.email, - password: this.password - }; - this.messageService - .post('login', data) - .subscribe( retour => this.onSeConnecterCallback(retour), err => this.onSeConnecterCallback(err)); - } - } - - - // Callback de "onSeConnecter" - onSeConnecterCallback(retour: any): void - { - if(retour.status !== "success") - { - console.log(retour); - this.errorMessage = retour.error.message; - this.hasError = true; - } - else { - this.profilService.setId(retour.data.id); - this.profilService.setIsAdmin(retour.data.is_admin) - if(retour.data.is_admin) this.router.navigateByUrl('admin/userList'); - else this.router.navigateByUrl('user/registry'); - } - } - - - // Check les champs saisis par l'utilisateur - checkField(): void - { - if(this.email === "") { - this.errorMessage = "Veuillez remplir le champ email" ; - this.hasError = true; - } - else if(this.password === "") { - this.errorMessage = "Veuillez remplir le champ mot de passe" ; - this.hasError = true; - } - else { - this.errorMessage = "" ; - this.hasError = false; - } - } - -} diff --git a/frontend/src/app/register/page-register/page-register.component.html b/frontend/src/app/register/page-register/page-register.component.html deleted file mode 100644 index afa10a8..0000000 --- a/frontend/src/app/register/page-register/page-register.component.html +++ /dev/null @@ -1,49 +0,0 @@ -
- - - - - - - -
- - - - Pseudo - -
- - - - Email - -
- - - - Mot de passe - -
- - - - Confirmation mot de passe - -
- - -
- {{errorMessage}} -
- - - - -
- - - -
diff --git a/frontend/src/app/register/page-register/page-register.component.scss b/frontend/src/app/register/page-register/page-register.component.scss deleted file mode 100644 index 293c5a1..0000000 --- a/frontend/src/app/register/page-register/page-register.component.scss +++ /dev/null @@ -1,21 +0,0 @@ -.contenuContainer { - padding: 20px 20px 20px 20px; - width: 30%; - margin: auto auto; - margin-top: 50px; - border: solid 1px black; - text-align: center; -} - -.boite { - margin-left: auto; - margin-right: auto; - width: 50%; - margin-top: 10vh; - border: solid 3px; - border-radius: 10px; - padding: 20px 40px 20px 40px; - background-color: #ffffff; - text-align: center; - box-shadow: 10px 5px 5px black; -} diff --git a/frontend/src/app/register/page-register/page-register.component.spec.ts b/frontend/src/app/register/page-register/page-register.component.spec.ts deleted file mode 100644 index 847bd4f..0000000 --- a/frontend/src/app/register/page-register/page-register.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PageRegisterComponent } from './page-register.component'; - -describe('PageInscriptionComponent', () => { - let component: PageRegisterComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PageRegisterComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PageRegisterComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/register/page-register/page-register.component.ts b/frontend/src/app/register/page-register/page-register.component.ts deleted file mode 100644 index ebd1e62..0000000 --- a/frontend/src/app/register/page-register/page-register.component.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Component } from '@angular/core'; -import {HashageService} from "../../common/services/hashage/hashage.service"; -import {Router} from "@angular/router"; -import {CheckEmailService} from "../../common/services/checkEmail/check-email.service"; -import {MatDialog} from "@angular/material/dialog"; -import {PopupConfirmRegisterComponent} from "../popup-confirm-register/popup-confirm-register.component"; -import {MessageService} from "../../common/services/message/message.service"; - - - -@Component({ - selector: 'app-page-register', - templateUrl: './page-register.component.html', - styleUrls: ['./page-register.component.scss'] -}) -export class PageRegisterComponent -{ - email: string = ""; - nickname: string = ""; - password: string = ""; - confirmPassword: string = ""; - hasError: boolean = false; - errorMessage: string = ""; - - - constructor( private checkEmailService: CheckEmailService, - private messageService: MessageService, - private router: Router, - public dialog: MatDialog ) { } - - - // Envoie de l'utilisateur au backend - onValider(): void - { - this.checkField(); - if(!this.hasError) - { - const data = { - email: this.email, - nickname: this.nickname, - password: this.password, - is_admin: false - }; - this.messageService - .post('register', data) - .subscribe( retour => this.onValiderCallback(retour), err => this.onValiderCallback(err)); - } - } - - - // Callback de "onValider" - onValiderCallback(retour: any): void - { - if(retour.status !== "success") - { - console.log(retour); - this.errorMessage = retour.error.message; - this.hasError = true; - } - else { - this.dialog - .open(PopupConfirmRegisterComponent, {}) - .afterClosed() - .subscribe(retour => this.router.navigateByUrl("/login")); - } - } - - - // Check les champs saisis par l'utilisateur - checkField(): void - { - if(this.nickname.length === 0) { - this.errorMessage = "Veuillez remplir le champ 'pseudo'."; - this.hasError = true; - } - else if(this.email.length === 0) { - this.errorMessage = "Veuillez remplir le champ 'email'."; - this.hasError = true; - } - else if(!this.checkEmailService.isValidEmail(this.email)) { - this.errorMessage = "Email invalide."; - this.hasError = true; - } - else if(this.password.length === 0) { - this.errorMessage = "Veuillez remplir le champ 'mot de passe'."; - this.hasError = true; - } - else if(this.password !== this.confirmPassword) { - this.errorMessage = "Le mot de passe est différent de sa confirmation."; - this.hasError = true; - } - else { - this.errorMessage = "" ; - this.hasError = false; - } - } - -} diff --git a/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.html b/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.html deleted file mode 100644 index 6ecf288..0000000 --- a/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

Votre inscription a bien été pris en compte

- diff --git a/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.scss b/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.spec.ts b/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.spec.ts deleted file mode 100644 index 37dd0bc..0000000 --- a/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PopupConfirmRegisterComponent } from './popup-confirm-register.component'; - -describe('PopupConfirmRegisterComponent', () => { - let component: PopupConfirmRegisterComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PopupConfirmRegisterComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PopupConfirmRegisterComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.ts b/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.ts deleted file mode 100644 index f40b648..0000000 --- a/frontend/src/app/register/popup-confirm-register/popup-confirm-register.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {Component} from '@angular/core'; - - - -@Component({ - selector: 'app-popup-confirm-register', - templateUrl: './popup-confirm-register.component.html', - styleUrls: ['./popup-confirm-register.component.scss'] -}) -export class PopupConfirmRegisterComponent -{ - -} diff --git a/frontend/src/app/user/myProfil/commentary.txt b/frontend/src/app/user/myProfil/commentary.txt deleted file mode 100644 index 902847e..0000000 --- a/frontend/src/app/user/myProfil/commentary.txt +++ /dev/null @@ -1,7 +0,0 @@ -La page "admin/myProfil" contient: - - les informations de l'utilisateur (composant "page-profil") - - un bouton "modifier profil" pour modifier les informations de l'utilisateur (composant "popup-update-profil") - -Cette page est la même que la page de la partie admin. - -Ainsi, on a rangé cette page dans le dossier "common/components/profil". diff --git a/frontend/src/app/user/page-registry/page-registry.component.html b/frontend/src/app/user/page-registry/page-registry.component.html deleted file mode 100644 index 6c7f471..0000000 --- a/frontend/src/app/user/page-registry/page-registry.component.html +++ /dev/null @@ -1,45 +0,0 @@ -
- -

- - -
- - Filter - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Pseudo{{person.nickname}}Email{{person.email}}Rôle{{person.role}}
- - - - -
-

diff --git a/frontend/src/app/user/page-registry/page-registry.component.scss b/frontend/src/app/user/page-registry/page-registry.component.scss deleted file mode 100644 index 7440dcb..0000000 --- a/frontend/src/app/user/page-registry/page-registry.component.scss +++ /dev/null @@ -1,9 +0,0 @@ -mat-paginator, table { - width: 80%; - margin: auto 10%; -} - -.filtre { - text-align: center; - width: 33%; -} diff --git a/frontend/src/app/user/page-registry/page-registry.component.spec.ts b/frontend/src/app/user/page-registry/page-registry.component.spec.ts deleted file mode 100644 index 1851010..0000000 --- a/frontend/src/app/user/page-registry/page-registry.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PageRegistryComponent } from './page-registry.component'; - -describe('RegistryComponent', () => { - let component: PageRegistryComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PageRegistryComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PageRegistryComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/frontend/src/app/user/page-registry/page-registry.component.ts b/frontend/src/app/user/page-registry/page-registry.component.ts deleted file mode 100644 index 6fca3ed..0000000 --- a/frontend/src/app/user/page-registry/page-registry.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import {AfterViewInit, Component, ViewChild} from '@angular/core'; -import {MatTableDataSource} from "@angular/material/table"; -import {MatSort} from "@angular/material/sort"; -import {MatPaginator} from "@angular/material/paginator"; -import {MessageService} from "../../common/services/message/message.service"; - - - -@Component({ - selector: 'app-page-registry', - templateUrl: './page-registry.component.html', - styleUrls: ['./page-registry.component.scss'] -}) -export class PageRegistryComponent implements AfterViewInit -{ - displayedColumns: string[] = [ "nickname", "email", "role" ]; - dataSource: MatTableDataSource = new MatTableDataSource(); - @ViewChild(MatSort) sort: MatSort; - @ViewChild(MatPaginator) paginator: MatPaginator; - - - constructor( private messageService: MessageService ) { } - - - ngAfterViewInit(): void - { - this.messageService - .get('users?order_by=nickname') - .subscribe(retour => this.ngAfterViewInitCallback(retour), err => this.ngAfterViewInitCallback(err)); - } - - - ngAfterViewInitCallback(retour: any): void - { - if(retour.status !== "success") { - console.log(retour); - } - else { - let tabPerson: { id: number, email: string, nickname: string, is_admin: boolean }[] = retour.data; - tabPerson = tabPerson.map( person => { - if(!person.is_admin) return Object.assign(person, {role: "utilisateur"}); - else return Object.assign(person, {role: "admin"}); - }); - this.dataSource = new MatTableDataSource(tabPerson); - this.dataSource.sort = this.sort; - this.dataSource.paginator = this.paginator; - } - } - - - applyFilter(event: Event): void - { - const filterValue = (event.target as HTMLInputElement).value; - this.dataSource.filter = filterValue.trim().toLowerCase(); - } - -} diff --git a/frontend/src/assets/.gitkeep b/frontend/src/assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/src/assets/logo.png b/frontend/src/assets/logo.png deleted file mode 100644 index a229003..0000000 Binary files a/frontend/src/assets/logo.png and /dev/null differ diff --git a/frontend/src/assets/logo1.png b/frontend/src/assets/logo1.png deleted file mode 100644 index 93b9375..0000000 Binary files a/frontend/src/assets/logo1.png and /dev/null differ diff --git a/frontend/src/environments/environment.prod.ts b/frontend/src/environments/environment.prod.ts deleted file mode 100644 index 3612073..0000000 --- a/frontend/src/environments/environment.prod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const environment = { - production: true -}; diff --git a/frontend/src/environments/environment.ts b/frontend/src/environments/environment.ts deleted file mode 100644 index 0dfd866..0000000 --- a/frontend/src/environments/environment.ts +++ /dev/null @@ -1,18 +0,0 @@ -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. - - -export const environment = { - production: false, - debutUrl: 'http://127.0.0.1:5000/api/' -}; - -/* - * For easier debugging in development mode, you can import the following file - * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. - * - * This import should be commented out in production mode because it will have a negative impact - * on performance if an error is thrown. - */ -// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/frontend/src/favicon.ico b/frontend/src/favicon.ico deleted file mode 100644 index 997406a..0000000 Binary files a/frontend/src/favicon.ico and /dev/null differ diff --git a/frontend/src/index.html b/frontend/src/index.html deleted file mode 100644 index 3af61ec..0000000 --- a/frontend/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Frontend - - - - - - - - diff --git a/frontend/src/main.ts b/frontend/src/main.ts deleted file mode 100644 index c7b673c..0000000 --- a/frontend/src/main.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/frontend/src/polyfills.ts b/frontend/src/polyfills.ts deleted file mode 100644 index dcd18ea..0000000 --- a/frontend/src/polyfills.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js'; // Included with Angular CLI. - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss deleted file mode 100644 index 29ad8c8..0000000 --- a/frontend/src/styles.scss +++ /dev/null @@ -1,3 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -html, body { height: 100%; } -body { margin: 0; } diff --git a/frontend/src/test.ts b/frontend/src/test.ts deleted file mode 100644 index b4dd603..0000000 --- a/frontend/src/test.ts +++ /dev/null @@ -1,27 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: { - context(path: string, deep?: boolean, filter?: RegExp): { - keys(): string[]; - (id: string): T; - }; -}; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting(), - { teardown: { destroyAfterEach: true }}, -); - -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json deleted file mode 100644 index 82d91dc..0000000 --- a/frontend/tsconfig.app.json +++ /dev/null @@ -1,15 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/app", - "types": [] - }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ] -} diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json deleted file mode 100644 index 6815c14..0000000 --- a/frontend/tsconfig.json +++ /dev/null @@ -1,33 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "compileOnSave": false, - "compilerOptions": { - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "moduleResolution": "node", - "importHelpers": true, - "target": "es2017", - "module": "es2020", - "lib": [ - "es2018", - "dom" - ], - - "strictPropertyInitialization": false - }, - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictPropertyInitialization": false - //"strictInjectionParameters": true, - //"strictInputAccessModifiers": true, - //"strictTemplates": true - } -} diff --git a/frontend/tsconfig.spec.json b/frontend/tsconfig.spec.json deleted file mode 100644 index 092345b..0000000 --- a/frontend/tsconfig.spec.json +++ /dev/null @@ -1,18 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/spec", - "types": [ - "jasmine" - ] - }, - "files": [ - "src/test.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -}