Front project started

This commit is contained in:
marcin-szczepanski 2020-05-17 21:04:36 +02:00
parent 28655cb674
commit 5ee8f74025
39 changed files with 13869 additions and 1 deletions

View File

@ -1,4 +1,4 @@
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/ekstraklasa spring.datasource.url=jdbc:mysql://localhost:3306/ekstraklasa?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=ekstra spring.datasource.username=ekstra
spring.datasource.password=YnBDC0hqqhKaxt94 spring.datasource.password=YnBDC0hqqhKaxt94

13
Front/.editorconfig Normal file
View File

@ -0,0 +1,13 @@
# 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
[*.md]
max_line_length = off
trim_trailing_whitespace = false

46
Front/.gitignore vendored Normal file
View File

@ -0,0 +1,46 @@
# 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
speed-measure-plugin*.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/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db

128
Front/angular.json Normal file
View File

@ -0,0 +1,128 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"EkstraklasaPrzewidywanieWynikow": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/EkstraklasaPrzewidywanieWynikow",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css",
"./node_modules/primeng/resources/primeng.min.css",
"./node_modules/primeicons/primeicons.css",
"./node_modules/primeng/resources/themes/luna-blue/theme.css",
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "EkstraklasaPrzewidywanieWynikow:build"
},
"configurations": {
"production": {
"browserTarget": "EkstraklasaPrzewidywanieWynikow:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "EkstraklasaPrzewidywanieWynikow: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",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "EkstraklasaPrzewidywanieWynikow:serve"
},
"configurations": {
"production": {
"devServerTarget": "EkstraklasaPrzewidywanieWynikow:serve:production"
}
}
}
}
}},
"defaultProject": "EkstraklasaPrzewidywanieWynikow"
}

12
Front/browserslist Normal file
View File

@ -0,0 +1,12 @@
# 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
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.

View File

@ -0,0 +1,32 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};

View File

@ -0,0 +1,23 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('EkstraklasaPrzewidywanieWynikow app is running!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});

11
Front/e2e/src/app.po.ts Normal file
View File

@ -0,0 +1,11 @@
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}
getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}

13
Front/e2e/tsconfig.json Normal file
View File

@ -0,0 +1,13 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}

32
Front/karma.conf.js Normal file
View File

@ -0,0 +1,32 @@
// 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-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/EkstraklasaPrzewidywanieWynikow'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

12643
Front/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

55
Front/package.json Normal file
View File

@ -0,0 +1,55 @@
{
"name": "ekstraklasa-przewidywanie-wynikow",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^9.0.2",
"@angular/cdk": "^9.2.3",
"@angular/common": "^9.0.2",
"@angular/compiler": "^9.0.2",
"@angular/core": "^9.0.2",
"@angular/forms": "^9.0.2",
"@angular/platform-browser": "^9.0.2",
"@angular/platform-browser-dynamic": "^9.0.2",
"@angular/router": "^9.0.2",
"@angular/material": "^9.2.3",
"@fortawesome/angular-fontawesome": "^0.6.1",
"@fortawesome/fontawesome-svg-core": "^1.2.28",
"@fortawesome/free-brands-svg-icons": "^5.13.0",
"@fortawesome/free-solid-svg-icons": "^5.13.0",
"primeicons": "3.0.0-rc.1",
"primeng": "9.0.6",
"rxjs": "^6.5.4",
"tslib": "^1.10.0",
"zone.js": "^0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.3",
"@angular/cli": "^9.0.3",
"@angular/compiler-cli": "^9.0.2",
"@angular/language-service": "^9.0.2",
"@types/node": "^12.11.1",
"@types/jasmine": "^3.5.0",
"@types/jasminewd2": "^2.0.3",
"codelyzer": "^5.1.2",
"jasmine-core": "^3.5.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.3.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "^5.4.3",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"typescript": "^3.7.5"
}
}

View File

@ -0,0 +1,11 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }

View File

View File

@ -0,0 +1,11 @@
<div class="cover-container d-flex w-100 h-100 p-3 flex-column">
<header class="masthead">
<div class="inner">
<h3 class="masthead-brand" routerLink="/">Przewidywanie wyników ekstraklasy</h3>
</div>
</header>
<main role="main" class="inner cover">
<router-outlet (activate)="onActivate()"></router-outlet>
</main>
</div>

View File

@ -0,0 +1,35 @@
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
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 'EkstraklasaPrzewidywanieWynikow'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('EkstraklasaPrzewidywanieWynikow');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('EkstraklasaPrzewidywanieWynikow app is running!');
});
});

View File

@ -0,0 +1,18 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'EkstraklasaPrzewidywanieWynikow';
constructor() {}
ngOnInit() {}
onActivate() {
window.scroll(0, 0);
}
}

View File

@ -0,0 +1,44 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { library } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { ApiHelper } from './services/apiHelper';
import { ConfigService } from './services/config.service';
import { GlobalConfig } from './common/globalConfig';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
library.add(fas);
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
BrowserAnimationsModule,
FontAwesomeModule,
MatSnackBarModule
],
providers: [
ApiHelper,
ConfigService,
GlobalConfig
],
bootstrap: [AppComponent]
})
export class AppModule { }

View File

@ -0,0 +1,22 @@
import { ConfigService } from '../services/config.service';
import { Injectable, EventEmitter } from '@angular/core';
@Injectable()
export class GlobalConfig {
apiAdress = '';
loaded: EventEmitter<boolean> = new EventEmitter<boolean>();
constructor(private configService: ConfigService) {}
public setEnvironments() {
this.configService.getJSON().subscribe(
data => {
console.log(data);
this.apiAdress = data.apiAdress;
this.loaded.emit(true);
}
);
}
}

View File

@ -0,0 +1,8 @@
export class ApiResponse<T = any> {
public status: string;
public result: T;
public errorCode: string;
public errorDescription: string;
constructor(status: string, result: T, errorCode?: string, errorDescription?: string) {}
}

View File

@ -0,0 +1,11 @@
import { Team } from './team';
export class Match {
public result: number;
public date: string;
public teamsMatchStatistics1: Team;
public teamsMatchStatistics2: Team;
constructor() {}
}

View File

@ -0,0 +1,25 @@
export class Team {
public team: TeamName;
public formation: string;
public shootsOnTarget: number;
public possession: number;
public goals: number;
// tslint:disable-next-line:variable-name
public red_cards: number;
public penaltyAreaEntries: number;
public penalties: number;
public goalkeeperSavesPercent: number;
// tslint:disable-next-line:variable-name
public goals_lost: number;
constructor() {}
}
export class TeamName {
public name: string;
constructor() {}
}

View File

@ -0,0 +1,90 @@
import { Injectable } from '@angular/core';
import { HttpErrorResponse, HttpClient, HttpHeaders } from '@angular/common/http';
import { throwError, Observable, Subject } from 'rxjs';
import { map, catchError } from 'rxjs/operators';
import { ApiResponse } from '../models/apiResponse';
import { GlobalConfig } from '../common/globalConfig';
@Injectable()
export class ApiHelper {
public authErrors: Subject<any>;
constructor(private http: HttpClient, private globalConfig: GlobalConfig) {
this.authErrors = new Subject();
}
public handleError = this.handleErrorUnbinded.bind(this);
generateRequestOptionsJSON(authorized: boolean) {
const headers = new HttpHeaders({});
headers.append('Content-Type', 'application/json');
headers.append('Accept', 'application/json');
if (authorized === true && localStorage.getItem('authentication') ) {
headers.append('Authorization', localStorage.getItem('authentication'));
}
const options = { headers };
return options;
}
public getJson(urlPart, authorized = false): Observable<ApiResponse> {
const url = urlPart;
const options = this.generateRequestOptionsJSON(authorized);
return this.http.get(url, options).pipe(
map((res: Response) => res.json()),
catchError(this.handleError)
);
}
public postJson(urlPart, object, authorized = false): Observable<ApiResponse> {
const body = JSON.stringify(object);
const url = urlPart;
const options = this.generateRequestOptionsJSON(authorized);
return this.http.post(url, body, options).pipe(
map((res: Response) => res.json()),
catchError(this.handleError)
);
}
public putJson(urlPart, object, authorized = false): Observable<ApiResponse> {
const body = JSON.stringify(object);
const url = urlPart;
const options = this.generateRequestOptionsJSON(authorized);
return this.http.put(url, body, options).pipe(
map((res: Response) => res.json()),
catchError(this.handleError)
);
}
public deleteJson(urlPart, authorized = false): Observable<ApiResponse> {
const url = urlPart;
const options = this.generateRequestOptionsJSON(authorized);
return this.http.delete(url, options).pipe(
map((res: Response) => res.json()),
catchError(this.handleError)
);
}
public handleErrorUnbinded(error: HttpErrorResponse) {
if (error.error instanceof ErrorEvent) {
// A client-side or network error occurred. Handle it accordingly.
console.error('An error occurred:', error.error.message);
} else {
// The backend returned an unsuccessful response code.
// The response body may contain clues as to what went wrong,
console.error(
`Backend returned code ${error.status}, ` +
`details: ${error.error}`);
}
// return an observable with a user-facing error message
if (error.status === 403) {
console.log('authError');
this.authErrors.next('error');
}
return throwError(
'Something bad happened; please try again later.');
}
}

View File

@ -0,0 +1,20 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class ConfigService {
private configUrl = 'assets/config/config-{mode}.json';
constructor(private http: HttpClient) {}
public getJSON(): Observable<any> {
console.log(this.configUrl.replace('{mode}', environment.name));
return this.http.get(this.configUrl.replace('{mode}', environment.name));
}
}

View File

View File

@ -0,0 +1,4 @@
{
"name": "dev",
"apiAdress": "http://localhost:8080/"
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
export const environment = {
production: true,
name: 'prod'
};

View File

@ -0,0 +1,17 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false,
name: 'dev'
};
/*
* 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/dist/zone-error'; // Included with Angular CLI.

BIN
Front/src/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

13
Front/src/index.html Normal file
View File

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>EkstraklasaPrzewidywanieWynikow</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>

12
Front/src/main.ts Normal file
View File

@ -0,0 +1,12 @@
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));

63
Front/src/polyfills.ts Normal file
View File

@ -0,0 +1,63 @@
/**
* 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
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* 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/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

268
Front/src/styles.css Normal file
View File

@ -0,0 +1,268 @@
/* You can add global styles to this file, and also import other style files */
@import './assets/styles/bootstrap.min.css';
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
/* Globals */
*, *:active, *:disabled, *:focus {
outline: 0;
}
body > .cover-container, body > .cover-container > .cover-container {
padding-bottom: 0 !important;
}
* {
border-radius: 0 !important;
text-shadow: none !important;
box-shadow: none !important;
}
body .ui-widget-overlay {
background-color: rgba(0, 0, 0, 0.7) !important;
}
.view-title {
margin-bottom: 3rem;
}
.form-group {
text-align: left;
}
body .ui-button {
background-color: #003959 !important;
border-color: #003959 !important;
color: #FFF !important;
}
body .ui-togglebutton.ui-state-active,
body .ui-progressbar .ui-progressbar-value,
body .ui-table .ui-sortable-column.ui-state-highlight,
body .ui-table .ui-table-tbody > tr.ui-state-highlight,
body .ui-paginator .ui-paginator-pages .ui-paginator-page.ui-state-active,
body .ui-dropdown-panel .ui-dropdown-items .ui-dropdown-item.ui-state-highlight {
background-color: #003959 !important;
border-color: #003959 !important;
}
body .ui-table .ui-table-summary {
font-weight: 400 !important;
}
body .ui-table .ui-table-summary {
background-color: #252525 !important;
padding: 0 !important;
border: none !important;
}
body .ui-table .ui-table-summary .ui-paginator {
border-top: none !important;
}
.btn:hover {
color: #333 !important
}
.btn-special-hover {
color: #FFF !important;
}
.btn-special-hover:hover {
color: #9A9DA0 !important;
}
.primary-btn {
background-color: #003959 !important;
border-color: #003959 !important;
color: #FFF !important;
}
.primary-btn:hover {
background-color: #002a42 !important;
border-color: #002a42 !important;
color: #FFF !important;
}
.edit-btn {
background-color: #00591d !important;
border-color: #00591d !important;
color: #FFF !important;
}
.edit-btn:hover {
background-color: #004416 !important;
border-color: #004416 !important;
color: #FFF !important;
}
.remove-btn {
background-color: #7b0000 !important;
border-color: #7b0000 !important;
color: #FFF !important;
}
.remove-btn:hover {
background-color: #640000 !important;
border-color: #640000 !important;
color: #FFF !important;
}
.choose-btn {
background-color: #93730b !important;
border-color: #93730b !important;
color: #FFF !important;
}
.choose-btn:hover {
background-color: #715a11 !important;
border-color: #715a11 !important;
color: #FFF !important;
}
/* Snackbars */
.cdk-overlay-container {
z-index: 9999999999999 !important;
}
snack-bar-container span {
margin: auto;
color: #FFF !important;
font-size: 1rem !important;
text-align: center;
}
.snackbar-success {
background-color: #00591d !important;
}
.snackbar-warning {
background-color: rgb(172, 123, 0) !important;
}
.snackbar-error {
background-color: #7b0000 !important;
}
.snackbar-info {
background-color: #003959 !important;
}
/* Links */
a {
transition: 300ms;
color: #FFF;
}
a:hover {
cursor: pointer !important;
color: #9A9DA0 !important;
}
/*
* Base structure
*/
html,
body {
height: 100%;
background-color: #1e1e2f;
}
body {
display: -ms-flexbox;
display: flex;
color: #fff;
text-shadow: 0 .05rem .1rem rgba(0, 0, 0, .5);
box-shadow: inset 0 0 5rem rgba(0, 0, 0, .5);
}
.cover-container {
max-width: 115em;
margin: 0 auto;
}
/*
* Header
*/
.masthead {
margin-bottom: 2rem;
}
.masthead-brand {
margin-bottom: 0;
color: #FFF;
transition: 300ms;
font-variant: petite-caps;
}
.masthead-brand:hover {
cursor: pointer;
color: #9A9DA0;
}
.nav-masthead .nav-link {
padding: .25rem 0;
color: #FFF;
background-color: transparent;
/*border-bottom: .25rem solid transparent;*/
}
.nav-masthead .nav-link:hover,
.nav-masthead .nav-link:focus {
color: #9A9DA0;
}
.nav-masthead .nav-link + .nav-link {
margin-left: 1rem;
}
.nav-masthead .active {
color: #9A9DA0;
border-bottom-color: #9A9DA0;
}
@media (min-width: 48em) {
.masthead-brand {
float: left;
}
.nav-masthead {
float: right;
}
}
/*
* Cover
*/
.cover {
padding: 0 1.5rem;
}
.cover .btn-lg {
padding: .75rem 1.25rem;
font-weight: 700;
}
/*
* Footer
*/
.mastfoot {
color: #FFF;
}

25
Front/src/test.ts Normal file
View File

@ -0,0 +1,25 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-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[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

17
Front/tsconfig.app.json Normal file
View File

@ -0,0 +1,17 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
],
"angularCompilerOptions": {
"enableIvy": false
}
}

26
Front/tsconfig.json Normal file
View File

@ -0,0 +1,26 @@
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}

18
Front/tsconfig.spec.json Normal file
View File

@ -0,0 +1,18 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}

91
Front/tslint.json Normal file
View File

@ -0,0 +1,91 @@
{
"extends": "tslint:recommended",
"rules": {
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warning"
},
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"import-blacklist": [
true,
"rxjs/Rx"
],
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-consecutive-blank-lines": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": [
true,
"single"
],
"trailing-comma": false,
"no-conflicting-lifecycle": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"template-banana-in-box": true,
"template-no-negated-async": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true
},
"rulesDirectory": [
"codelyzer"
]
}