From 768c9ee6cac9e33cd5890c59c966aade74cfe4b3 Mon Sep 17 00:00:00 2001 From: Fuzi_fauzia Date: Tue, 16 Jul 2024 15:53:22 +0700 Subject: [PATCH] perbaikan service --- .../hemat-app/cost-management/cost-management.component.html | 2 +- .../device/device-control/device-control.component.html | 2 +- src/app/content/hemat-app/service/login.service.ts | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/content/hemat-app/cost-management/cost-management.component.html b/src/app/content/hemat-app/cost-management/cost-management.component.html index 71b7114..4b4eff2 100644 --- a/src/app/content/hemat-app/cost-management/cost-management.component.html +++ b/src/app/content/hemat-app/cost-management/cost-management.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/src/app/content/hemat-app/device/device-control/device-control.component.html b/src/app/content/hemat-app/device/device-control/device-control.component.html index ae97838..52c5db6 100644 --- a/src/app/content/hemat-app/device/device-control/device-control.component.html +++ b/src/app/content/hemat-app/device/device-control/device-control.component.html @@ -162,7 +162,7 @@ style="border-color: #bef264 !important" class="switchery" switchColor="black" - color="rgb(190, 242, 100)" + color="rgb(55, 166, 71)" size="small" [checked]="item.status_id === 2" (change)="switchChanged($event, item)" diff --git a/src/app/content/hemat-app/service/login.service.ts b/src/app/content/hemat-app/service/login.service.ts index 05343c1..4ba6f8b 100644 --- a/src/app/content/hemat-app/service/login.service.ts +++ b/src/app/content/hemat-app/service/login.service.ts @@ -14,6 +14,7 @@ import { jwtDecode } from "jwt-decode"; import { Router } from "@angular/router"; import { switchMap, debounceTime, mapTo, startWith } from "rxjs/operators"; import { AuthService } from "src/app/_services/auth.service"; +import { error } from "console"; const BASE_URL = "https://kapi.absys.ninja/hemat"; interface CustomJwtPayload { @@ -167,6 +168,9 @@ export class LoginService { JSON.stringify(userProfile) ); window.location.reload(); + }, (error) => { + console.error(error); + this.checkTokenAndRedirect(); } ); }