├── .editorconfig ├── .eslintrc.json ├── .gitignore ├── README.md ├── angular.json ├── browserslist ├── e2e ├── protractor.conf.js ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── src ├── app │ ├── app-routing.module.ts │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── components │ │ ├── cash-info │ │ │ ├── cash-info.component.spec.ts │ │ │ └── cash-info.component.ts │ │ ├── charts │ │ │ ├── inventory │ │ │ │ ├── inventory.component.spec.ts │ │ │ │ └── inventory.component.ts │ │ │ └── monthly-cash │ │ │ │ ├── monthly-cash.component.spec.ts │ │ │ │ └── monthly-cash.component.ts │ │ └── live-table │ │ │ ├── live-table.component.html │ │ │ ├── live-table.component.scss │ │ │ ├── live-table.component.spec.ts │ │ │ └── live-table.component.ts │ ├── resources │ │ └── models │ │ │ └── trade.ts │ └── services │ │ ├── data.service.spec.ts │ │ └── data.service.ts ├── assets │ ├── .gitkeep │ ├── AUD.png │ ├── EUR.png │ ├── USD.png │ ├── bowling.png │ ├── bowling2.jpg │ ├── bowling3.jpg │ ├── bowling4.jpg │ ├── fonts │ │ ├── Proxima Nova Alt Bold.otf │ │ ├── Proxima Nova Alt Light.otf │ │ ├── Proxima Nova Alt Thin.otf │ │ ├── Proxima Nova Black.otf │ │ ├── Proxima Nova Bold.otf │ │ ├── Proxima Nova Extrabold.otf │ │ ├── Proxima Nova Thin.otf │ │ └── ProximaNova-Regular.otf │ ├── giphy.gif │ └── mock-data.json ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── main.ts ├── polyfills.ts ├── styles.scss └── test.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.spec.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "ignorePatterns": [ 4 | "projects/**/*" 5 | ], 6 | "overrides": [ 7 | { 8 | "files": [ 9 | "*.ts" 10 | ], 11 | "extends": [ 12 | "eslint:recommended", 13 | "plugin:@typescript-eslint/recommended", 14 | "plugin:@angular-eslint/recommended", 15 | "plugin:@angular-eslint/template/process-inline-templates" 16 | ], 17 | "rules": { 18 | "@angular-eslint/directive-selector": [ 19 | "error", 20 | { 21 | "type": "attribute", 22 | "prefix": "app", 23 | "style": "camelCase" 24 | } 25 | ], 26 | "@angular-eslint/component-selector": [ 27 | "error", 28 | { 29 | "type": "element", 30 | "prefix": "app", 31 | "style": "kebab-case" 32 | } 33 | ] 34 | } 35 | }, 36 | { 37 | "files": [ 38 | "*.html" 39 | ], 40 | "extends": [ 41 | "plugin:@angular-eslint/template/recommended", 42 | "plugin:@angular-eslint/template/accessibility" 43 | ], 44 | "rules": {} 45 | } 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.angular/cache 36 | /.sass-cache 37 | /connect.lock 38 | /coverage 39 | /libpeerconnection.log 40 | npm-debug.log 41 | yarn-error.log 42 | testem.log 43 | /typings 44 | 45 | # System Files 46 | .DS_Store 47 | Thumbs.db 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ClientAngular 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17. 4 | 5 | ## Development server 6 | 7 | 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. 8 | 9 | ## Code scaffolding 10 | 11 | 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`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "client-angular": { 7 | "projectType": "application", 8 | "schematics": { 9 | "@schematics/angular:component": { 10 | "style": "scss" 11 | } 12 | }, 13 | "root": "", 14 | "sourceRoot": "src", 15 | "prefix": "app", 16 | "architect": { 17 | "build": { 18 | "builder": "@angular-devkit/build-angular:browser", 19 | "options": { 20 | "outputPath": "dist/client-angular", 21 | "index": "src/index.html", 22 | "main": "src/main.ts", 23 | "polyfills": "src/polyfills.ts", 24 | "tsConfig": "tsconfig.app.json", 25 | "aot": false, 26 | "assets": [ 27 | "src/favicon.ico", 28 | "src/assets" 29 | ], 30 | "styles": [ 31 | "src/styles.scss", 32 | "node_modules/primeicons/primeicons.css", 33 | "node_modules/primeng/resources/themes/lara-light-blue/theme.css", 34 | "node_modules/primeng/resources/primeng.min.css" 35 | ], 36 | "scripts": [ 37 | "node_modules/chart.js/dist/Chart.js" 38 | ], 39 | "vendorChunk": true, 40 | "extractLicenses": false, 41 | "buildOptimizer": false, 42 | "sourceMap": true, 43 | "optimization": false, 44 | "namedChunks": true 45 | }, 46 | "configurations": { 47 | "production": { 48 | "fileReplacements": [ 49 | { 50 | "replace": "src/environments/environment.ts", 51 | "with": "src/environments/environment.prod.ts" 52 | } 53 | ], 54 | "optimization": true, 55 | "outputHashing": "all", 56 | "sourceMap": false, 57 | "namedChunks": false, 58 | "aot": true, 59 | "extractLicenses": true, 60 | "vendorChunk": false, 61 | "buildOptimizer": true, 62 | "budgets": [ 63 | { 64 | "type": "initial", 65 | "maximumWarning": "2mb", 66 | "maximumError": "5mb" 67 | }, 68 | { 69 | "type": "anyComponentStyle", 70 | "maximumWarning": "6kb", 71 | "maximumError": "10kb" 72 | } 73 | ] 74 | } 75 | }, 76 | "defaultConfiguration": "" 77 | }, 78 | "serve": { 79 | "builder": "@angular-devkit/build-angular:dev-server", 80 | "options": { 81 | "buildTarget": "client-angular:build" 82 | }, 83 | "configurations": { 84 | "production": { 85 | "buildTarget": "client-angular:build:production" 86 | } 87 | } 88 | }, 89 | "extract-i18n": { 90 | "builder": "@angular-devkit/build-angular:extract-i18n", 91 | "options": { 92 | "buildTarget": "client-angular:build" 93 | } 94 | }, 95 | "test": { 96 | "builder": "@angular-devkit/build-angular:karma", 97 | "options": { 98 | "main": "src/test.ts", 99 | "polyfills": "src/polyfills.ts", 100 | "tsConfig": "tsconfig.spec.json", 101 | "karmaConfig": "karma.conf.js", 102 | "assets": [ 103 | "src/favicon.ico", 104 | "src/assets" 105 | ], 106 | "styles": [ 107 | "src/styles.scss" 108 | ], 109 | "scripts": [] 110 | } 111 | }, 112 | "e2e": { 113 | "builder": "@angular-devkit/build-angular:protractor", 114 | "options": { 115 | "protractorConfig": "e2e/protractor.conf.js", 116 | "devServerTarget": "client-angular:serve" 117 | }, 118 | "configurations": { 119 | "production": { 120 | "devServerTarget": "client-angular:serve:production" 121 | } 122 | } 123 | }, 124 | "lint": { 125 | "builder": "@angular-eslint/builder:lint", 126 | "options": { 127 | "lintFilePatterns": [ 128 | "src/**/*.ts", 129 | "src/**/*.html" 130 | ] 131 | } 132 | } 133 | } 134 | } 135 | }, 136 | "cli": { 137 | "schematicCollections": [ 138 | "@angular-eslint/schematics" 139 | ] 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | 'browserName': 'chrome' 17 | }, 18 | directConnect: true, 19 | baseUrl: 'http://localhost:4200/', 20 | framework: 'jasmine', 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000, 24 | print: function() {} 25 | }, 26 | onPrepare() { 27 | require('ts-node').register({ 28 | project: require('path').join(__dirname, './tsconfig.json') 29 | }); 30 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 31 | } 32 | }; -------------------------------------------------------------------------------- /e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to client-angular!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, './coverage/client-angular'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false, 30 | restartOnFileChange: true 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client-angular", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "~17.0.4", 15 | "@angular/cdk": "^12.0.5", 16 | "@angular/common": "~17.0.4", 17 | "@angular/compiler": "~17.0.4", 18 | "@angular/core": "~17.0.4", 19 | "@angular/forms": "~17.0.4", 20 | "@angular/platform-browser": "~17.0.4", 21 | "@angular/platform-browser-dynamic": "~17.0.4", 22 | "@angular/router": "~17.0.4", 23 | "@ngrx/core": "^1.2.0", 24 | "@ngrx/effects": "^17.0.0", 25 | "@ngrx/router-store": "^17.0.0", 26 | "@ngrx/store": "^17.0.0", 27 | "@ngrx/store-devtools": "^17.0.0", 28 | "chart.js": "^3.3.2", 29 | "primeicons": "^6.0.0", 30 | "primeng": "^15.4.1", 31 | "rxjs": "~7.8.1", 32 | "tslib": "^2.0.0", 33 | "zone.js": "~0.14.2" 34 | }, 35 | "devDependencies": { 36 | "@angular-devkit/build-angular": "~17.0.3", 37 | "@angular-eslint/builder": "17.1.0", 38 | "@angular-eslint/eslint-plugin": "17.1.0", 39 | "@angular-eslint/eslint-plugin-template": "17.1.0", 40 | "@angular-eslint/schematics": "17.1.0", 41 | "@angular-eslint/template-parser": "17.1.0", 42 | "@angular/cli": "~17.0.3", 43 | "@angular/compiler-cli": "~17.0.4", 44 | "@angular/language-service": "~17.0.4", 45 | "@types/jasmine": "~3.6.0", 46 | "@types/jasminewd2": "~2.0.8", 47 | "@types/node": "~14.0.14", 48 | "@typescript-eslint/eslint-plugin": "6.11.0", 49 | "@typescript-eslint/parser": "6.11.0", 50 | "codelyzer": "^6.0.0", 51 | "eslint": "^8.53.0", 52 | "jasmine-core": "~3.6.0", 53 | "jasmine-spec-reporter": "~5.0.0", 54 | "karma": "~6.3.4", 55 | "karma-chrome-launcher": "~3.1.0", 56 | "karma-coverage-istanbul-reporter": "~3.0.3", 57 | "karma-jasmine": "~4.0.0", 58 | "karma-jasmine-html-reporter": "^1.5.0", 59 | "protractor": "~7.0.0", 60 | "ts-node": "~8.10.2", 61 | "tslint": "~6.1.2", 62 | "typescript": "~5.2.2" 63 | } 64 | } -------------------------------------------------------------------------------- /src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | 5 | const routes: Routes = []; 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forRoot(routes, {})], 9 | exports: [RouterModule] 10 | }) 11 | export class AppRoutingModule { } 12 | -------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, waitForAsync } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(waitForAsync(() => { 7 | TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | })); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.debugElement.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'client-angular'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.debugElement.componentInstance; 26 | expect(app.title).toEqual('client-angular'); 27 | }); 28 | 29 | it('should render title in a h1 tag', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.debugElement.nativeElement; 33 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to client-angular!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | template: ` 6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 |
14 | 15 |
16 |
17 | 18 | 19 | `, 20 | }) 21 | export class AppComponent { 22 | 23 | constructor() { 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import {FormsModule} from '@angular/forms'; 4 | import { AppRoutingModule } from './app-routing.module'; 5 | import { AppComponent } from './app.component'; 6 | import {ButtonModule} from 'primeng/button'; 7 | import { LiveTableComponent } from './components/live-table/live-table.component'; 8 | import {TableModule} from 'primeng/table'; 9 | import { HttpClientModule } from '@angular/common/http'; 10 | import {CardModule} from 'primeng/card'; 11 | import {ChartModule} from 'primeng/chart'; 12 | import {ProgressBarModule} from 'primeng/progressbar'; 13 | import { CashInfoComponent } from './components/cash-info/cash-info.component'; 14 | import { InventoryComponent } from './components/charts/inventory/inventory.component'; 15 | import { MonthlyCashComponent } from './components/charts/monthly-cash/monthly-cash.component'; 16 | 17 | @NgModule({ 18 | declarations: [ 19 | AppComponent, 20 | LiveTableComponent, 21 | InventoryComponent, 22 | MonthlyCashComponent, 23 | CashInfoComponent 24 | ], 25 | imports: [ 26 | BrowserModule, 27 | AppRoutingModule, 28 | FormsModule, 29 | ButtonModule, 30 | TableModule, 31 | CardModule, 32 | ChartModule, 33 | ProgressBarModule, 34 | HttpClientModule 35 | ], 36 | providers: [], 37 | bootstrap: [AppComponent] 38 | }) 39 | export class AppModule { } 40 | -------------------------------------------------------------------------------- /src/app/components/cash-info/cash-info.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { CashInfoComponent } from './cash-info.component'; 4 | 5 | describe('CashInfoComponent', () => { 6 | let component: CashInfoComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CashInfoComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CashInfoComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/cash-info/cash-info.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-cash-info', 5 | template: ` 6 | 7 |
CASH BALANCE
8 |
€ 183,308.85
9 |
10 |
IN
11 |
€ 311,625.05
12 |
13 |
14 |
OUT
15 |
€ 311,625.05
16 |
17 |
`, 18 | }) 19 | export class CashInfoComponent { 20 | 21 | constructor() { } 22 | } 23 | -------------------------------------------------------------------------------- /src/app/components/charts/inventory/inventory.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { InventoryComponent } from './inventory.component'; 4 | 5 | describe('InventoryComponent', () => { 6 | let component: InventoryComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ InventoryComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(InventoryComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/charts/inventory/inventory.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-inventory', 5 | template: ` 6 | 7 |
DAYS INVENTORY OUTSTANDING
8 | 9 |
10 | `, 11 | }) 12 | export class InventoryComponent { 13 | 14 | data = { 15 | labels: ['January', 'February', 'March'], 16 | datasets: [ 17 | { 18 | data: [50, 100, 50], 19 | backgroundColor: ['#4F33FF', '#6E33FF', '#A833FF'] 20 | } 21 | ] 22 | }; 23 | 24 | options = { 25 | responsive: false, 26 | maintainAspectRatio: false, 27 | legend: { 28 | position: 'bottom' 29 | }, 30 | }; 31 | 32 | constructor() { } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/app/components/charts/monthly-cash/monthly-cash.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { MonthlyCashComponent } from './monthly-cash.component'; 4 | 5 | describe('MonthlyCashComponent', () => { 6 | let component: MonthlyCashComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ MonthlyCashComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(MonthlyCashComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/charts/monthly-cash/monthly-cash.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ViewChild } from '@angular/core'; 2 | import { DataService } from 'src/app/services/data.service'; 3 | import { UIChart } from 'primeng/chart'; 4 | 5 | @Component({ 6 | selector: 'app-monthly-cash', 7 | template: ` 8 | 9 |
CASH
10 |
at end of month
11 | 12 |
13 | `, 14 | }) 15 | export class MonthlyCashComponent { 16 | @ViewChild('chart', { static: false }) chart: UIChart; 17 | 18 | barData = { 19 | labels: [ 20 | 'Jan 2019', 21 | 'Feb 2019', 22 | 'Mar 2019', 23 | 'Apr 2019', 24 | 'May 2019', 25 | 'Jun 2019', 26 | 'Aug 2019', 27 | 'Sep 2019', 28 | 'Oct 2019', 29 | 'Nov 2019', 30 | 'Dec 2019' 31 | ], 32 | datasets: [ 33 | { 34 | label: 'First Dataset', 35 | data: [18, 17, 19, 19, 17, 18, 16, 17, 17, 18, 16, 17, 15], 36 | backgroundColor: [ 37 | '#4F33FF', 38 | '#6E33FF', 39 | '#A833FF', 40 | '#4F33FF', 41 | '#6E33FF', 42 | '#A833FF', 43 | '#4F33FF', 44 | '#6E33FF', 45 | '#A833FF', 46 | '#4F33FF', 47 | '#6E33FF', 48 | '#A833FF' 49 | ] 50 | } 51 | ] 52 | }; 53 | barOptions = { 54 | responsive: false, 55 | maintainAspectRatio: false, 56 | legend: { 57 | display: false 58 | } 59 | }; 60 | copy: { 61 | labels: string[]; 62 | datasets: { label: string; data: number[]; backgroundColor: string[] }[]; 63 | }; 64 | constructor(private service: DataService) { } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/app/components/live-table/live-table.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Type 5 | AccountID 6 | Progress 7 | Status 8 | CutOff 9 | ValueDate 10 | Currency 11 | Amount 12 | TransactionID 13 | Beneficiary 14 | Notional 15 | Coupon 16 | 17 | 18 | 19 | 20 | 21 | {{ trade.type }} 22 | 23 | {{ trade.accountID }} 24 | 25 | 26 | 27 | 33 | 34 | {{ trade.status }} 35 | 36 | {{ trade['cutOff'] }} 37 | 38 | {{ trade.valueDate }} 39 | 40 | 41 | The currency of the trade 42 | {{ trade.Currency }} 43 | 44 | {{ trade.amount }} 45 | {{ trade.transactionID }} 46 | {{ trade.beneficiary }} 47 | 48 | 52 | {{ trade.notional }} 53 | 54 | {{ trade.coupon }} 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/app/components/live-table/live-table.component.scss: -------------------------------------------------------------------------------- 1 | .orange-color{ 2 | color:#ff6600 !important; 3 | } 4 | 5 | .red-color{ 6 | color:red !important; 7 | } 8 | 9 | 10 | .green-color { 11 | color:green !important; 12 | } 13 | 14 | .blue-color { 15 | color: #4F33FF !important; 16 | } 17 | 18 | .gray-color { 19 | color: dimgray !important; 20 | } 21 | 22 | .ng-cancel-button { 23 | margin-right: -32px; 24 | } 25 | -------------------------------------------------------------------------------- /src/app/components/live-table/live-table.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { LiveTableComponent } from './live-table.component'; 4 | 5 | describe('LiveTableComponent', () => { 6 | let component: LiveTableComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ LiveTableComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(LiveTableComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/live-table/live-table.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, ViewEncapsulation, AfterViewInit } from '@angular/core'; 2 | import { map, tap, catchError } from 'rxjs/operators'; 3 | import { DataService } from '../../services/data.service'; 4 | 5 | @Component({ 6 | selector: 'app-live-table', 7 | templateUrl: './live-table.component.html', 8 | styleUrls: ['./live-table.component.scss'], 9 | encapsulation: ViewEncapsulation.None, 10 | changeDetection: ChangeDetectionStrategy.OnPush 11 | }) 12 | export class LiveTableComponent implements AfterViewInit { 13 | 14 | transactions$ = this.service.messages$.pipe( 15 | map(rows => rows), 16 | catchError(error => { throw error }), 17 | tap({ 18 | next: message=>console.log(message), 19 | error: error => console.log('[Live Table component] Error:', error), 20 | complete: () => console.log('[Live Table component] Connection Closed') 21 | }) 22 | ); 23 | 24 | constructor(private service: DataService) { 25 | } 26 | 27 | ngAfterViewInit() { 28 | this.service.connect(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/app/resources/models/trade.ts: -------------------------------------------------------------------------------- 1 | export interface Trade { 2 | type: string, 3 | accountID: number, 4 | progress: number, 5 | status: string, 6 | cutOff: string, 7 | valueDate: Date, 8 | currency: string, 9 | amount: number, 10 | transactionID: number, 11 | beneficiary: string, 12 | notional: number, 13 | coupon: number, 14 | } 15 | -------------------------------------------------------------------------------- /src/app/services/data.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { DataService } from './data.service'; 4 | 5 | describe('DataService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: DataService = TestBed.get(DataService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/app/services/data.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { webSocket } from 'rxjs/webSocket'; 3 | import { environment } from '../../environments/environment'; 4 | import { Observable, timer, Subject, EMPTY } from 'rxjs'; 5 | import { retryWhen, tap, delayWhen, switchAll, catchError } from 'rxjs/operators'; 6 | import { Trade } from '../resources/models/trade'; 7 | import {WebSocketSubject} from 'rxjs/WebSocket'; 8 | export const WS_ENDPOINT = environment.wsEndpoint; 9 | export const RECONNECT_INTERVAL = environment.reconnectInterval; 10 | 11 | 12 | @Injectable({ 13 | providedIn: 'root' 14 | }) 15 | export class DataService { 16 | 17 | private socket$; 18 | private messagesSubject$ = new Subject(); 19 | public messages$ = this.messagesSubject$.pipe(switchAll(), catchError(e => { throw e })); 20 | 21 | constructor() { 22 | } 23 | 24 | /** 25 | * Creates a new WebSocket subject and send it to the messages subject 26 | * @param cfg if true the observable will be retried. 27 | */ 28 | public connect(cfg: { reconnect: boolean } = { reconnect: false }): void { 29 | 30 | if (!this.socket$ || this.socket$.closed) { 31 | this.socket$ = this.getNewWebSocket(); 32 | const messages = this.socket$.pipe(cfg.reconnect ? this.reconnect : o => o, 33 | tap({ 34 | error: error => console.log(error), 35 | }), catchError(_ => EMPTY)) 36 | this.messagesSubject$.next(messages); 37 | } 38 | } 39 | 40 | /** 41 | * Retry a given observable by a time span 42 | * @param observable the observable to be retried 43 | */ 44 | private reconnect(observable: Observable>): Observable> { 45 | return observable.pipe(retryWhen(errors => errors.pipe(tap(val => console.log('[Data Service] Try to reconnect', val)), 46 | delayWhen(_ => timer(RECONNECT_INTERVAL))))); 47 | } 48 | 49 | close() { 50 | this.socket$.complete(); 51 | this.socket$ = undefined; 52 | } 53 | 54 | 55 | /** 56 | * Return a custom WebSocket subject which reconnects after failure 57 | */ 58 | private getNewWebSocket() { 59 | return webSocket({ 60 | url: WS_ENDPOINT, 61 | openObserver: { 62 | next: () => { 63 | console.log('[DataService]: connection ok'); 64 | } 65 | }, 66 | closeObserver: { 67 | next: () => { 68 | console.log('[DataService]: connection closed'); 69 | this.socket$ = undefined; 70 | this.connect({ reconnect: true }); 71 | } 72 | }, 73 | 74 | }); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/assets/AUD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/AUD.png -------------------------------------------------------------------------------- /src/assets/EUR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/EUR.png -------------------------------------------------------------------------------- /src/assets/USD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/USD.png -------------------------------------------------------------------------------- /src/assets/bowling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/bowling.png -------------------------------------------------------------------------------- /src/assets/bowling2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/bowling2.jpg -------------------------------------------------------------------------------- /src/assets/bowling3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/bowling3.jpg -------------------------------------------------------------------------------- /src/assets/bowling4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/bowling4.jpg -------------------------------------------------------------------------------- /src/assets/fonts/Proxima Nova Alt Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/fonts/Proxima Nova Alt Bold.otf -------------------------------------------------------------------------------- /src/assets/fonts/Proxima Nova Alt Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/fonts/Proxima Nova Alt Light.otf -------------------------------------------------------------------------------- /src/assets/fonts/Proxima Nova Alt Thin.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/fonts/Proxima Nova Alt Thin.otf -------------------------------------------------------------------------------- /src/assets/fonts/Proxima Nova Black.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/fonts/Proxima Nova Black.otf -------------------------------------------------------------------------------- /src/assets/fonts/Proxima Nova Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/fonts/Proxima Nova Bold.otf -------------------------------------------------------------------------------- /src/assets/fonts/Proxima Nova Extrabold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/fonts/Proxima Nova Extrabold.otf -------------------------------------------------------------------------------- /src/assets/fonts/Proxima Nova Thin.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/fonts/Proxima Nova Thin.otf -------------------------------------------------------------------------------- /src/assets/fonts/ProximaNova-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/fonts/ProximaNova-Regular.otf -------------------------------------------------------------------------------- /src/assets/giphy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/assets/giphy.gif -------------------------------------------------------------------------------- /src/assets/mock-data.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "TradeId": "1", 5 | "TradeDate": "11/02/2016", 6 | "BuySell": "Sell", 7 | "Notional": "50000000", 8 | "Coupon": "500", 9 | "Currency": "EUR", 10 | "Ticker": "LINDE", 11 | "ShortName": "Linde AG", 12 | "MaturityDate": "20/03/2023", 13 | "Sector": "Basic Materials", 14 | "Trader": "Yael Rich", 15 | "Status": "Pending" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | wsEndpoint: 'ws://localhost:8081', 4 | reconnectInterval: 2000 5 | }; 6 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false, 7 | wsEndpoint: 'ws://localhost:8081', 8 | reconnectInterval: 2000 9 | }; 10 | 11 | /* 12 | * For easier debugging in development mode, you can import the following file 13 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 14 | * 15 | * This import should be commented out in production mode because it will have a negative impact 16 | * on performance if an error is thrown. 17 | */ 18 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 19 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamisChebbi/ng-realtime-dashboard/e40542b6aef77d083b73d14ed897afd3b83db0fe/src/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ClientAngular 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** 22 | * By default, zone.js will patch all possible macroTask and DomEvents 23 | * user can disable parts of macroTask/DomEvents patch by setting following flags 24 | * because those flags need to be set before `zone.js` being loaded, and webpack 25 | * will put import in the top of bundle, so user need to create a separate file 26 | * in this directory (for example: zone-flags.ts), and put the following flags 27 | * into that file, and then add the following code before importing zone.js. 28 | * import './zone-flags.ts'; 29 | * 30 | * The flags allowed in zone-flags.ts are listed here. 31 | * 32 | * The following flags will work for all browsers. 33 | * 34 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 35 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 36 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 37 | * 38 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 39 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 40 | * 41 | * (window as any).__Zone_enable_cross_context_check = true; 42 | * 43 | */ 44 | 45 | /*************************************************************************************************** 46 | * Zone JS is required by default for Angular itself. 47 | */ 48 | import 'zone.js'; // Included with Angular CLI. 49 | 50 | 51 | /*************************************************************************************************** 52 | * APPLICATION IMPORTS 53 | */ 54 | -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | .ng-inventor-chart .ui-card { 2 | background-color: rgb(248, 248, 248); 3 | } 4 | .ng-cash-chart .ui-card, .ng-cash-month-column .ui-card { 5 | background-color: rgb(248, 248, 248); 6 | } 7 | .ng-cash-balance { 8 | font-size: 17.5px; 9 | height: 19.5px; 10 | text-align: center; 11 | color: rgb(31, 33, 33); 12 | font-weight: bold; 13 | font-style: normal; 14 | text-decoration: none; 15 | } 16 | 17 | 18 | .ng-inventor-column { 19 | width: 29%; 20 | padding: 8px; 21 | 22 | } 23 | 24 | .ng-cash-column { 25 | width: 29%; 26 | padding: 8px; 27 | } 28 | 29 | .ng-cash-month-column { 30 | width: 42%; 31 | padding: 8px; 32 | 33 | } 34 | 35 | .row { 36 | margin: 0; 37 | display: flex; 38 | flex-wrap: wrap; 39 | align-items: center; 40 | } 41 | 42 | .ng-inventor-label { 43 | font-family: 'Montserrat', sans-serif; 44 | font-size: 17.5px; 45 | height: 19.5px; 46 | text-align: center; 47 | color: rgb(31, 33, 33); 48 | font-weight: bold; 49 | font-style: normal; 50 | text-decoration: none; 51 | } 52 | 53 | .ui-card { 54 | height: 210px; 55 | } 56 | 57 | 58 | .ng-cash-amount { 59 | color: #1f2121; 60 | font-family: "Montserrat", sans-serif; 61 | font-weight: bold; 62 | font-style: normal; 63 | text-decoration: none; 64 | font-size: -webkit-xxx-large !important; 65 | text-align: center !important; 66 | padding-top: 25px !important; 67 | } 68 | 69 | .ui-card-header { 70 | text-align: center; 71 | padding-top: 10px; 72 | } 73 | 74 | .ng-cash-label, .ng-cash-balance-label { 75 | font-family: 'Montserrat', sans-serif; 76 | font-size: 17.5px; 77 | height: 19.5px; 78 | text-align: center; 79 | color: rgb(31, 33, 33); 80 | font-weight: bold; 81 | font-style: normal; 82 | text-decoration: none; 83 | } 84 | 85 | .ng-end-of-month-label { 86 | font-family: 'Montserrat', sans-serif; 87 | font-size: 13px; 88 | height: 16px; 89 | text-align: center; 90 | color: rgb(31, 33, 33); 91 | } 92 | 93 | body .ui-table .ui-table-tbody > tr > td { 94 | border: none !important; 95 | text-align: center; 96 | font-family: 'Montserrat', sans-serif; 97 | font-style: normal; 98 | font-weight: bold; 99 | } 100 | body .ui-table .ui-table-thead > tr > th { 101 | border: none !important; 102 | font-family: 'Montserrat', sans-serif; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | body .ui-progressbar .ui-progressbar-value { 108 | background: #A833FF !important; 109 | } 110 | 111 | body .ui-widget { 112 | font-family: 'Montserrat', sans-serif; 113 | } 114 | 115 | body .ui-progressbar{ 116 | height: 14px !important; 117 | } 118 | 119 | body .ui-progressbar .ui-progressbar-label{ 120 | line-height: 14px !important; 121 | } 122 | 123 | body .pi { 124 | font-size: 1em !important; 125 | } 126 | 127 | .pi.pi-arrow-up.green-arrow{ 128 | color: forestgreen !important; 129 | } 130 | .pi.pi-arrow-down.red-arrow{ 131 | color: red !important; 132 | } 133 | body .ui-table .ui-table-tbody > tr > td { 134 | padding: 0.271em 0.457em !important; 135 | } 136 | .flex-container { 137 | display: flex; 138 | padding-left: 100px; 139 | } 140 | .ui-table.ui-widget { 141 | margin: 8px; 142 | } 143 | .ng-cash-in, .ng-cash-out { 144 | text-align: center; 145 | font-size: 15.504px; 146 | padding-top: 11.5px; 147 | padding-right: 40px; 148 | } 149 | 150 | .ng-cash-in-amount { 151 | text-align: center; 152 | font-size: 15.504px; 153 | padding-top: 11.5px; 154 | } 155 | 156 | .ng-cash-out { 157 | padding-right: 25px; 158 | } 159 | 160 | .ng-currency { 161 | vertical-align: middle; 162 | } 163 | 164 | body .ui-button { 165 | font-size: 12px !important; 166 | } 167 | 168 | body .ui-button.ui-button-icon-only .ui-button-text, .ui-button-icon-only .ui-button-text { 169 | padding: 0 !important; 170 | } 171 | 172 | 173 | body .ui-button { 174 | color: #ffffff !important; 175 | background-color: red !important; 176 | border: 1px solid transparent !important; 177 | } -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | // First, initialize the Angular testing environment. 11 | getTestBed().initTestEnvironment( 12 | BrowserDynamicTestingModule, 13 | platformBrowserDynamicTesting(), { 14 | teardown: { destroyAfterEach: false } 15 | } 16 | ); 17 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [] 6 | }, 7 | "files": [ 8 | "src/main.ts", 9 | "src/polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.ts" 13 | ], 14 | "exclude": [ 15 | "src/test.ts", 16 | "src/**/*.spec.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "module": "esnext", 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "ES2022", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom" 20 | ], 21 | "useDefineForClassFields": false 22 | }, 23 | "angularCompilerOptions": { 24 | "fullTemplateTypeCheck": true, 25 | "strictInjectionParameters": true 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rules": { 4 | "array-type": false, 5 | "arrow-parens": false, 6 | "deprecation": { 7 | "severity": "warning" 8 | }, 9 | "component-class-suffix": true, 10 | "contextual-lifecycle": true, 11 | "directive-class-suffix": true, 12 | "directive-selector": [ 13 | true, 14 | "attribute", 15 | "app", 16 | "camelCase" 17 | ], 18 | "component-selector": [ 19 | true, 20 | "element", 21 | "app", 22 | "kebab-case" 23 | ], 24 | "import-blacklist": [ 25 | true, 26 | "rxjs/Rx" 27 | ], 28 | "interface-name": false, 29 | "max-classes-per-file": false, 30 | "max-line-length": [ 31 | true, 32 | 140 33 | ], 34 | "member-access": false, 35 | "member-ordering": [ 36 | true, 37 | { 38 | "order": [ 39 | "static-field", 40 | "instance-field", 41 | "static-method", 42 | "instance-method" 43 | ] 44 | } 45 | ], 46 | "no-consecutive-blank-lines": false, 47 | "no-console": [ 48 | true, 49 | "debug", 50 | "info", 51 | "time", 52 | "timeEnd", 53 | "trace" 54 | ], 55 | "no-empty": false, 56 | "no-inferrable-types": [ 57 | true, 58 | "ignore-params" 59 | ], 60 | "no-non-null-assertion": true, 61 | "no-redundant-jsdoc": true, 62 | "no-switch-case-fall-through": true, 63 | "no-use-before-declare": true, 64 | "no-var-requires": false, 65 | "object-literal-key-quotes": [ 66 | true, 67 | "as-needed" 68 | ], 69 | "object-literal-sort-keys": false, 70 | "ordered-imports": false, 71 | "quotemark": [ 72 | true, 73 | "single" 74 | ], 75 | "trailing-comma": false, 76 | "no-conflicting-lifecycle": true, 77 | "no-host-metadata-property": true, 78 | "no-input-rename": true, 79 | "no-inputs-metadata-property": true, 80 | "no-output-native": true, 81 | "no-output-on-prefix": true, 82 | "no-output-rename": true, 83 | "no-outputs-metadata-property": true, 84 | "template-banana-in-box": true, 85 | "template-no-negated-async": true, 86 | "use-lifecycle-interface": true, 87 | "use-pipe-transform-interface": true 88 | }, 89 | "rulesDirectory": [ 90 | "codelyzer" 91 | ] 92 | } --------------------------------------------------------------------------------