implement token exp
This commit is contained in:
@@ -7,6 +7,7 @@ import "chartist-plugin-tooltips";
|
||||
import { ModalExportComponent } from "./modal-export/modal-export.component";
|
||||
import { TableexcelService } from "src/app/_services/tableexcel.service";
|
||||
import { ToastrService } from "ngx-toastr";
|
||||
import { LoginService } from "../service/login.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-cost-management",
|
||||
@@ -49,9 +50,11 @@ export class CostManagementComponent implements OnInit {
|
||||
private modalService: NgbModal,
|
||||
private tableexcelService: TableexcelService,
|
||||
private toastr: ToastrService,
|
||||
private authService: LoginService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.authService.checkTokenAndRedirect();
|
||||
this.breadcrumb = {
|
||||
mainlabel: "Cost Management",
|
||||
links: [
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Component, Input } from "@angular/core";
|
||||
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
||||
import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap";
|
||||
import { CostManagementService } from "../../service/cost-management.service";
|
||||
import { LoginService } from "../../service/login.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-modal-add-actual",
|
||||
@@ -22,12 +23,14 @@ export class ModalAddActualComponent {
|
||||
constructor(
|
||||
public activeModal: NgbActiveModal,
|
||||
private fb: FormBuilder,
|
||||
private costService: CostManagementService
|
||||
private costService: CostManagementService,
|
||||
private authService: LoginService
|
||||
) {
|
||||
this.createForm();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.authService.checkTokenAndRedirect();
|
||||
const currentDate = new Date();
|
||||
this.dateCurrent = currentDate.toISOString().slice(0, 7);
|
||||
this.dateFormat();
|
||||
|
||||
@@ -3,6 +3,7 @@ import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap";
|
||||
import { DeviceService } from "../../service/device.service";
|
||||
import { CostManagementService } from "../../service/cost-management.service";
|
||||
import { TableexcelService } from "src/app/_services/tableexcel.service";
|
||||
import { LoginService } from "../../service/login.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-modal-export",
|
||||
@@ -24,10 +25,12 @@ export class ModalExportComponent {
|
||||
constructor(
|
||||
public activeModal: NgbActiveModal,
|
||||
private costService: CostManagementService,
|
||||
private tableexcelService: TableexcelService
|
||||
private tableexcelService: TableexcelService,
|
||||
private authService: LoginService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.authService.checkTokenAndRedirect();
|
||||
const dateRow = this.convertToUTC7(this.dataRow.endDate)
|
||||
this.formattedEndDate = dateRow.slice(0, 7);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user