implement refresh token
This commit is contained in:
@@ -41,7 +41,8 @@ export class AddEditDeviceComponent implements OnInit{
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.authService.checkTokenAndRedirect();
|
||||
this.authService.startTokenCheck();
|
||||
this.authService.startTrackingActivity();
|
||||
this.route.params.subscribe(params => {
|
||||
const id = params['id'];
|
||||
this.deviceId = id;
|
||||
@@ -79,27 +80,27 @@ export class AddEditDeviceComponent implements OnInit{
|
||||
const dataCategory = data.data.find(
|
||||
(item) => item.name === "master_category"
|
||||
).headerDetailParam;
|
||||
this.dataMasterCategori = dataCategory.filter(item => item.statusName.toLowerCase() === "aktif")
|
||||
this.dataMasterCategori = dataCategory.filter(item => item.statusName.toLowerCase() === "aktif" || item.status.toLowerCase() === "71")
|
||||
|
||||
const dataVoltage = data.data.find(
|
||||
(item) => item.name === "master_voltage"
|
||||
).headerDetailParam;
|
||||
this.dataMasterVoltage = dataVoltage.filter(item => item.statusName.toLowerCase() === "aktif")
|
||||
this.dataMasterVoltage = dataVoltage.filter(item => item.statusName.toLowerCase() === "aktif" || item.status.toLowerCase() === "71")
|
||||
|
||||
const dataType = data.data.find(
|
||||
(item) => item.name === "master_type"
|
||||
).headerDetailParam;
|
||||
this.dataMasterType = dataType.filter(item => item.statusName.toLowerCase() === "aktif")
|
||||
this.dataMasterType = dataType.filter(item => item.statusName.toLowerCase() === "aktif" || item.status.toLowerCase() === "71")
|
||||
|
||||
const dataDuration = data.data.find(
|
||||
(item) => item.name === "master_duration"
|
||||
).headerDetailParam;
|
||||
this.dataMasterDuration = dataDuration.filter(item => item.statusName.toLowerCase() === "aktif")
|
||||
this.dataMasterDuration = dataDuration.filter(item => item.statusName.toLowerCase() === "aktif" || item.status.toLowerCase() === "71")
|
||||
|
||||
const dataStatus = data.data.find(
|
||||
(item) => item.name === "master_status"
|
||||
).headerDetailParam;
|
||||
this.dataMasterStatus = dataStatus.filter(item => item.statusName.toLowerCase() === "aktif")
|
||||
this.dataMasterStatus = dataStatus.filter(item => item.statusName.toLowerCase() === "aktif" || item.status.toLowerCase() === "71")
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ export class DeviceControlComponent {
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.authService.checkTokenAndRedirect();
|
||||
this.authService.startTokenCheck();
|
||||
this.authService.startTrackingActivity();
|
||||
this.breadcrumb = {
|
||||
mainlabel: "Device",
|
||||
links: [
|
||||
|
||||
@@ -53,7 +53,8 @@ export class DeviceComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.authService.checkTokenAndRedirect();
|
||||
this.authService.startTokenCheck();
|
||||
this.authService.startTrackingActivity();
|
||||
this.breadcrumb = {
|
||||
mainlabel: "Device",
|
||||
links: [
|
||||
|
||||
Reference in New Issue
Block a user