moved to angular 6
This commit is contained in:
parent
0c2e9762dc
commit
d0625eb557
22 changed files with 4350 additions and 3113 deletions
|
@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
|||
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { ApiService } from '../providers/api-service';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'login.component.html',
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
|||
import { ValidationManager } from 'ng2-validation-manager';
|
||||
import { ApiService } from '../providers/api-service';
|
||||
import {Router } from '@angular/router';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'register.component.html',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { ApiService } from '../providers/api-service';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'account-edit.component.html',
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
|||
import { ApiService } from '../providers/api-service';
|
||||
import { OrgTableComponent } from '../shared/org-table.component';
|
||||
import * as moment from 'moment';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'add-data.component.html',
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Directive, Component, OnInit } from '@angular/core';
|
|||
import { ApiService } from '../providers/api-service';
|
||||
import { DataType } from '../shared/data-types.enum';
|
||||
import * as moment from 'moment';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
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 { DataType } from '../shared/data-types.enum';
|
||||
import * as moment from 'moment';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'dashboard-customer.component.html'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { ApiService } from '../providers/api-service';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'feedback.component.html',
|
||||
|
|
|
@ -5,7 +5,7 @@ import {PaginationInstance} from 'ngx-pagination';
|
|||
// import { PaginationControlsComponent } from 'ngx-pagination';
|
||||
// import { PaginationControlsDirective } from 'ngx-pagination';
|
||||
// import { TransactionResultComponent } from '../shared/transaction-result.component';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'leaderboard.component.html',
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ApiService } from '../providers/api-service';
|
|||
import { AgmCoreModule } from '@agm/core';
|
||||
import { BsModalService, ModalDirective } from 'ngx-bootstrap/modal';
|
||||
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'map.component.html',
|
||||
|
|
|
@ -6,7 +6,7 @@ import {PaginationInstance} from 'ngx-pagination';
|
|||
// import { PaginationControlsDirective } from 'ngx-pagination';
|
||||
// import { TransactionResultComponent } from '../shared/transaction-result.component';
|
||||
import * as moment from 'moment';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'payroll-log.component.html',
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ApiService } from '../providers/api-service';
|
|||
import { AgmCoreModule } from '@agm/core';
|
||||
import { BsModalService, ModalDirective } from 'ngx-bootstrap/modal';
|
||||
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
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 { PaginationInstance } from 'ngx-pagination';
|
||||
import * as moment from 'moment';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'transaction-log.component.html',
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ApiService } from '../providers/api-service';
|
|||
import { CustPiesService } from '../providers/cust-pies.service';
|
||||
import { DataType } from '../shared/data-types.enum';
|
||||
import { ChartData } from '../_interfaces/chart-data';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'panel-pie',
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { map } from 'rxjs/operators';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { environment } from '../../environments/environment';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
/* this provider handles the interaction between server and client */
|
||||
|
||||
|
@ -57,8 +58,8 @@ export class ApiService {
|
|||
.post<any>(
|
||||
this.apiUrl + '/login',
|
||||
data
|
||||
)
|
||||
.map(
|
||||
).pipe(
|
||||
map(
|
||||
result => {
|
||||
const json = result;
|
||||
this.setSessionKey(json.session_key);
|
||||
|
@ -69,7 +70,7 @@ export class ApiService {
|
|||
this.setUserType(json.user_type);
|
||||
return json;
|
||||
}
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
public logout() {
|
||||
|
@ -79,14 +80,14 @@ export class ApiService {
|
|||
.post<any>(
|
||||
this.apiUrl + '/logout',
|
||||
{ session_key : key },
|
||||
)
|
||||
.map(
|
||||
).pipe(
|
||||
map(
|
||||
response => {
|
||||
localStorage.clear();
|
||||
this.sessionKey = null;
|
||||
return response;
|
||||
}
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
// Submits feedback
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
import {filter} from 'rxjs/operators';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
|
||||
import 'rxjs/add/operator/filter';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-breadcrumbs',
|
||||
|
@ -18,7 +20,7 @@ export class BreadcrumbsComponent implements OnInit {
|
|||
breadcrumbs: Array<Object>;
|
||||
constructor(private router: Router, private route: ActivatedRoute) {}
|
||||
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 = [];
|
||||
let currentRoute = this.route.root,
|
||||
url = '';
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
]
|
||||
},
|
||||
"files": [
|
||||
"test.ts"
|
||||
"test.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
|
|
Reference in a new issue