moved to angular 6
This commit is contained in:
parent
0c2e9762dc
commit
d0625eb557
22 changed files with 4350 additions and 3113 deletions
|
@ -1,59 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
||||||
"project": {
|
|
||||||
"version": "1.0.0-alpha.4",
|
|
||||||
"name": "coreui-angular"
|
|
||||||
},
|
|
||||||
"apps": [
|
|
||||||
{
|
|
||||||
"root": "src",
|
|
||||||
"outDir": "dist",
|
|
||||||
"assets": ["assets"],
|
|
||||||
"index": "index.html",
|
|
||||||
"main": "main.ts",
|
|
||||||
"polyfills": "polyfills.ts",
|
|
||||||
"test": "test.ts",
|
|
||||||
"tsconfig": "tsconfig.app.json",
|
|
||||||
"testTsconfig": "tsconfig.spec.json",
|
|
||||||
"prefix": "app",
|
|
||||||
"scripts": [
|
|
||||||
"../node_modules/moment/min/moment.min.js"
|
|
||||||
],
|
|
||||||
"styles": [
|
|
||||||
"scss/style.scss"
|
|
||||||
],
|
|
||||||
"environmentSource": "environments/environment.ts",
|
|
||||||
"environments": {
|
|
||||||
"dev": "environments/environment.dev.ts",
|
|
||||||
"prod": "environments/environment.prod.ts",
|
|
||||||
"local": "environments/environment.local.ts",
|
|
||||||
"ci": "environments/environment.ci.ts"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"e2e": {
|
|
||||||
"protractor": {
|
|
||||||
"config": "./protractor.conf.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint": [
|
|
||||||
{
|
|
||||||
"project": "src/tsconfig.app.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"project": "src/tsconfig.spec.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"project": "e2e/tsconfig.e2e.json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"test": {
|
|
||||||
"karma": {
|
|
||||||
"config": "./karma.conf.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaults": {
|
|
||||||
"styleExt": "scss",
|
|
||||||
"prefixInterfaces": false
|
|
||||||
}
|
|
||||||
}
|
|
181
angular.json
Normal file
181
angular.json
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
{
|
||||||
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||||
|
"version": 1,
|
||||||
|
"newProjectRoot": "projects",
|
||||||
|
"projects": {
|
||||||
|
"coreui-angular": {
|
||||||
|
"root": "",
|
||||||
|
"sourceRoot": "src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
|
"options": {
|
||||||
|
"outputPath": "dist",
|
||||||
|
"index": "src/index.html",
|
||||||
|
"main": "src/main.ts",
|
||||||
|
"tsConfig": "src/tsconfig.app.json",
|
||||||
|
"polyfills": "src/polyfills.ts",
|
||||||
|
"assets": [
|
||||||
|
"src/assets"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"src/scss/style.scss"
|
||||||
|
],
|
||||||
|
"scripts": [
|
||||||
|
"node_modules/moment/min/moment.min.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"dev": {
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/environments/environment.ts",
|
||||||
|
"with": "src/environments/environment.dev.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"production": {
|
||||||
|
"optimization": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
|
"namedChunks": false,
|
||||||
|
"aot": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/environments/environment.ts",
|
||||||
|
"with": "src/environments/environment.prod.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"local": {
|
||||||
|
"optimization": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
|
"namedChunks": false,
|
||||||
|
"aot": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/environments/environment.ts",
|
||||||
|
"with": "src/environments/environment.local.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ci": {
|
||||||
|
"optimization": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
|
"namedChunks": false,
|
||||||
|
"aot": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/environments/environment.ts",
|
||||||
|
"with": "src/environments/environment.ci.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve": {
|
||||||
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "coreui-angular:build"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"dev": {
|
||||||
|
"browserTarget": "coreui-angular:build:dev"
|
||||||
|
},
|
||||||
|
"production": {
|
||||||
|
"browserTarget": "coreui-angular:build:production"
|
||||||
|
},
|
||||||
|
"local": {
|
||||||
|
"browserTarget": "coreui-angular:build:local"
|
||||||
|
},
|
||||||
|
"ci": {
|
||||||
|
"browserTarget": "coreui-angular:build:ci"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extract-i18n": {
|
||||||
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "coreui-angular:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "src/test.ts",
|
||||||
|
"karmaConfig": "./karma.conf.js",
|
||||||
|
"polyfills": "src/polyfills.ts",
|
||||||
|
"tsConfig": "src/tsconfig.spec.json",
|
||||||
|
"scripts": [
|
||||||
|
"node_modules/moment/min/moment.min.js"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"src/scss/style.scss"
|
||||||
|
],
|
||||||
|
"assets": [
|
||||||
|
"src/assets"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"src/tsconfig.app.json",
|
||||||
|
"src/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"coreui-angular-e2e": {
|
||||||
|
"root": "",
|
||||||
|
"sourceRoot": "",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"e2e": {
|
||||||
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
|
"options": {
|
||||||
|
"protractorConfig": "./protractor.conf.js",
|
||||||
|
"devServerTarget": "coreui-angular:serve"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"e2e/tsconfig.e2e.json"
|
||||||
|
],
|
||||||
|
"exclude": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultProject": "coreui-angular",
|
||||||
|
"schematics": {
|
||||||
|
"@schematics/angular:component": {
|
||||||
|
"prefix": "app",
|
||||||
|
"styleext": "scss"
|
||||||
|
},
|
||||||
|
"@schematics/angular:directive": {
|
||||||
|
"prefix": "app"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,28 +4,28 @@
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
config.set({
|
config.set({
|
||||||
basePath: '',
|
basePath: '',
|
||||||
frameworks: ['jasmine', '@angular/cli'],
|
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||||
plugins: [
|
plugins: [
|
||||||
require('karma-jasmine'),
|
require('karma-jasmine'),
|
||||||
require('karma-chrome-launcher'),
|
require('karma-chrome-launcher'),
|
||||||
require('karma-jasmine-html-reporter'),
|
require('karma-jasmine-html-reporter'),
|
||||||
require('karma-coverage-istanbul-reporter'),
|
require('karma-coverage-istanbul-reporter'),
|
||||||
require('@angular/cli/plugins/karma')
|
require('@angular-devkit/build-angular/plugins/karma')
|
||||||
],
|
],
|
||||||
client:{
|
client:{
|
||||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||||
},
|
},
|
||||||
files: [
|
files: [
|
||||||
{ pattern: './src/test.ts', watched: false }
|
|
||||||
],
|
],
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'./src/test.ts': ['@angular/cli']
|
|
||||||
},
|
},
|
||||||
mime: {
|
mime: {
|
||||||
'text/x-typescript': ['ts','tsx']
|
'text/x-typescript': ['ts','tsx']
|
||||||
},
|
},
|
||||||
coverageIstanbulReporter: {
|
coverageIstanbulReporter: {
|
||||||
reports: [ 'html', 'lcovonly' ],
|
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
|
||||||
fixWebpackSourcePaths: true
|
fixWebpackSourcePaths: true
|
||||||
},
|
},
|
||||||
angularCli: {
|
angularCli: {
|
||||||
|
|
7125
package-lock.json
generated
7125
package-lock.json
generated
File diff suppressed because it is too large
Load diff
36
package.json
36
package.json
|
@ -10,24 +10,24 @@
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"test:ci": "ng test --watch=false --env=ci",
|
"test:ci": "ng test --watch=false --configuration=ci",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e",
|
"e2e": "ng e2e",
|
||||||
"e2e:ci": "ng e2e --env=ci",
|
"e2e:ci": "ng e2e --configuration=ci",
|
||||||
"ci": "npm run test:ci && npm run e2e:ci"
|
"ci": "npm run test:ci && npm run e2e:ci"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@agm/core": "1.0.0-beta.2",
|
"@agm/core": "1.0.0-beta.3",
|
||||||
"@agm/js-marker-clusterer": "1.0.0-beta.2",
|
"@agm/js-marker-clusterer": "1.0.0-beta.3",
|
||||||
"@angular/common": "5.2.0",
|
"@angular/common": "6.0.3",
|
||||||
"@angular/compiler": "5.2.0",
|
"@angular/compiler": "6.0.3",
|
||||||
"@angular/core": "5.2.0",
|
"@angular/core": "6.0.3",
|
||||||
"@angular/forms": "5.2.0",
|
"@angular/forms": "6.0.3",
|
||||||
"@angular/platform-browser": "5.2.0",
|
"@angular/platform-browser": "6.0.3",
|
||||||
"@angular/platform-browser-dynamic": "5.2.0",
|
"@angular/platform-browser-dynamic": "6.0.3",
|
||||||
"@angular/router": "5.2.0",
|
"@angular/router": "6.0.3",
|
||||||
"@angular/upgrade": "5.2.0",
|
"@angular/upgrade": "6.0.3",
|
||||||
"@types/moment": "2.13.0",
|
"@types/moment": "2.13.0",
|
||||||
"chart.js": "2.7.1",
|
"chart.js": "2.7.1",
|
||||||
"core-js": "2.5.1",
|
"core-js": "2.5.1",
|
||||||
|
@ -37,14 +37,16 @@
|
||||||
"ng2-validation-manager": "0.5.3",
|
"ng2-validation-manager": "0.5.3",
|
||||||
"ngx-bootstrap": "2.0.0-rc.1",
|
"ngx-bootstrap": "2.0.0-rc.1",
|
||||||
"ngx-pagination": "3.0.3",
|
"ngx-pagination": "3.0.3",
|
||||||
"rxjs": "5.5.6",
|
"rxjs": "6.2.0",
|
||||||
"ts-helpers": "1.1.2",
|
"ts-helpers": "1.1.2",
|
||||||
"webpack-dev-server": "3.1.0",
|
"webpack-dev-server": "3.1.0",
|
||||||
"zone.js": "0.8.18"
|
"zone.js": "0.8.26",
|
||||||
|
"rxjs-compat": "^6.0.0-rc.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/cli": "1.7.3",
|
"@angular-devkit/build-angular": "~0.6.6",
|
||||||
"@angular/compiler-cli": "5.2.0",
|
"@angular/cli": "^6.0.7",
|
||||||
|
"@angular/compiler-cli": "6.0.3",
|
||||||
"@types/jasmine": "2.8.2",
|
"@types/jasmine": "2.8.2",
|
||||||
"@types/jasminewd2": "2.0.3",
|
"@types/jasminewd2": "2.0.3",
|
||||||
"@types/node": "8.0.52",
|
"@types/node": "8.0.52",
|
||||||
|
@ -60,6 +62,6 @@
|
||||||
"protractor": "5.2.0",
|
"protractor": "5.2.0",
|
||||||
"ts-node": "3.3.0",
|
"ts-node": "3.3.0",
|
||||||
"tslint": "5.8.0",
|
"tslint": "5.8.0",
|
||||||
"typescript": "2.6.x"
|
"typescript": "^2.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||||
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||||
import { ApiService } from '../providers/api-service';
|
import { ApiService } from '../providers/api-service';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'login.component.html',
|
templateUrl: 'login.component.html',
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||||
import { ValidationManager } from 'ng2-validation-manager';
|
import { ValidationManager } from 'ng2-validation-manager';
|
||||||
import { ApiService } from '../providers/api-service';
|
import { ApiService } from '../providers/api-service';
|
||||||
import {Router } from '@angular/router';
|
import {Router } from '@angular/router';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'register.component.html',
|
templateUrl: 'register.component.html',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||||
import { ApiService } from '../providers/api-service';
|
import { ApiService } from '../providers/api-service';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'account-edit.component.html',
|
templateUrl: 'account-edit.component.html',
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||||
import { ApiService } from '../providers/api-service';
|
import { ApiService } from '../providers/api-service';
|
||||||
import { OrgTableComponent } from '../shared/org-table.component';
|
import { OrgTableComponent } from '../shared/org-table.component';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'add-data.component.html',
|
templateUrl: 'add-data.component.html',
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Directive, Component, OnInit } from '@angular/core';
|
||||||
import { ApiService } from '../providers/api-service';
|
import { ApiService } from '../providers/api-service';
|
||||||
import { DataType } from '../shared/data-types.enum';
|
import { DataType } from '../shared/data-types.enum';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'category-month.component.html'
|
templateUrl: 'category-month.component.html'
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { CustBarSnippetComponent } from '../snippets/cust-snippet-bar.component'
|
||||||
import { PiePanel } from '../panels/pie-panel.component';
|
import { PiePanel } from '../panels/pie-panel.component';
|
||||||
import { DataType } from '../shared/data-types.enum';
|
import { DataType } from '../shared/data-types.enum';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'dashboard-customer.component.html'
|
templateUrl: 'dashboard-customer.component.html'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||||
import { ApiService } from '../providers/api-service';
|
import { ApiService } from '../providers/api-service';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'feedback.component.html',
|
templateUrl: 'feedback.component.html',
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {PaginationInstance} from 'ngx-pagination';
|
||||||
// import { PaginationControlsComponent } from 'ngx-pagination';
|
// import { PaginationControlsComponent } from 'ngx-pagination';
|
||||||
// import { PaginationControlsDirective } from 'ngx-pagination';
|
// import { PaginationControlsDirective } from 'ngx-pagination';
|
||||||
// import { TransactionResultComponent } from '../shared/transaction-result.component';
|
// import { TransactionResultComponent } from '../shared/transaction-result.component';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'leaderboard.component.html',
|
templateUrl: 'leaderboard.component.html',
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { ApiService } from '../providers/api-service';
|
||||||
import { AgmCoreModule } from '@agm/core';
|
import { AgmCoreModule } from '@agm/core';
|
||||||
import { BsModalService, ModalDirective } from 'ngx-bootstrap/modal';
|
import { BsModalService, ModalDirective } from 'ngx-bootstrap/modal';
|
||||||
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'map.component.html',
|
templateUrl: 'map.component.html',
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {PaginationInstance} from 'ngx-pagination';
|
||||||
// import { PaginationControlsDirective } from 'ngx-pagination';
|
// import { PaginationControlsDirective } from 'ngx-pagination';
|
||||||
// import { TransactionResultComponent } from '../shared/transaction-result.component';
|
// import { TransactionResultComponent } from '../shared/transaction-result.component';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'payroll-log.component.html',
|
templateUrl: 'payroll-log.component.html',
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { ApiService } from '../providers/api-service';
|
||||||
import { AgmCoreModule } from '@agm/core';
|
import { AgmCoreModule } from '@agm/core';
|
||||||
import { BsModalService, ModalDirective } from 'ngx-bootstrap/modal';
|
import { BsModalService, ModalDirective } from 'ngx-bootstrap/modal';
|
||||||
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'trail-map.component.html',
|
templateUrl: 'trail-map.component.html',
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { BsModalService, ModalDirective } from 'ngx-bootstrap/modal';
|
||||||
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
||||||
import { PaginationInstance } from 'ngx-pagination';
|
import { PaginationInstance } from 'ngx-pagination';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'transaction-log.component.html',
|
templateUrl: 'transaction-log.component.html',
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { ApiService } from '../providers/api-service';
|
||||||
import { CustPiesService } from '../providers/cust-pies.service';
|
import { CustPiesService } from '../providers/cust-pies.service';
|
||||||
import { DataType } from '../shared/data-types.enum';
|
import { DataType } from '../shared/data-types.enum';
|
||||||
import { ChartData } from '../_interfaces/chart-data';
|
import { ChartData } from '../_interfaces/chart-data';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'panel-pie',
|
selector: 'panel-pie',
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
|
|
||||||
/* this provider handles the interaction between server and client */
|
/* this provider handles the interaction between server and client */
|
||||||
|
|
||||||
|
@ -57,8 +58,8 @@ export class ApiService {
|
||||||
.post<any>(
|
.post<any>(
|
||||||
this.apiUrl + '/login',
|
this.apiUrl + '/login',
|
||||||
data
|
data
|
||||||
)
|
).pipe(
|
||||||
.map(
|
map(
|
||||||
result => {
|
result => {
|
||||||
const json = result;
|
const json = result;
|
||||||
this.setSessionKey(json.session_key);
|
this.setSessionKey(json.session_key);
|
||||||
|
@ -69,7 +70,7 @@ export class ApiService {
|
||||||
this.setUserType(json.user_type);
|
this.setUserType(json.user_type);
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public logout() {
|
public logout() {
|
||||||
|
@ -79,14 +80,14 @@ export class ApiService {
|
||||||
.post<any>(
|
.post<any>(
|
||||||
this.apiUrl + '/logout',
|
this.apiUrl + '/logout',
|
||||||
{ session_key : key },
|
{ session_key : key },
|
||||||
)
|
).pipe(
|
||||||
.map(
|
map(
|
||||||
response => {
|
response => {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
this.sessionKey = null;
|
this.sessionKey = null;
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Submits feedback
|
// Submits feedback
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
|
import {filter} from 'rxjs/operators';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
|
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
|
||||||
import 'rxjs/add/operator/filter';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-breadcrumbs',
|
selector: 'app-breadcrumbs',
|
||||||
|
@ -18,7 +20,7 @@ export class BreadcrumbsComponent implements OnInit {
|
||||||
breadcrumbs: Array<Object>;
|
breadcrumbs: Array<Object>;
|
||||||
constructor(private router: Router, private route: ActivatedRoute) {}
|
constructor(private router: Router, private route: ActivatedRoute) {}
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.router.events.filter(event => event instanceof NavigationEnd).subscribe(event => {
|
this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(event => {
|
||||||
this.breadcrumbs = [];
|
this.breadcrumbs = [];
|
||||||
let currentRoute = this.route.root,
|
let currentRoute = this.route.root,
|
||||||
url = '';
|
url = '';
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"test.ts"
|
"test.ts",
|
||||||
|
"polyfills.ts"
|
||||||
],
|
],
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"curly": true,
|
"curly": true,
|
||||||
"eofline": true,
|
"eofline": true,
|
||||||
"forin": true,
|
"forin": true,
|
||||||
"import-blacklist": [true, "rxjs"],
|
"import-blacklist": [true],
|
||||||
"import-spacing": true,
|
"import-spacing": true,
|
||||||
"indent": [
|
"indent": [
|
||||||
true,
|
true,
|
||||||
|
|
Reference in a new issue