Skip to content

Commit

Permalink
Fix Bamboo HR and Travelperk urls (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 authored Feb 2, 2024
1 parent bc09fc5 commit 823d4c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/app/integrations/bamboo-hr/bamboo-hr.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { MessageService } from 'primeng/api';
import { catchError, concat, merge, of, toArray } from 'rxjs';
import { brandingConfig, brandingKbArticles } from 'src/app/branding/branding-config';
import { BambooHr, BambooHRConfiguration, BambooHRConfigurationPost, BambooHrModel, EmailOption } from 'src/app/core/models/bamboo-hr/bamboo-hr.model';
import { AppName, ClickEvent, Page, ToastSeverity, TrackingApp } from 'src/app/core/models/enum/enum.model';
import { AppName, AppUrl, ClickEvent, Page, ToastSeverity, TrackingApp } from 'src/app/core/models/enum/enum.model';
import { Org } from 'src/app/core/models/org/org.model';
import { BambooHrService } from 'src/app/core/services/bamboo-hr/bamboo-hr.service';
import { HelperService } from 'src/app/core/services/common/helper.service';
import { TrackingService } from 'src/app/core/services/integration/tracking.service';
import { OrgService } from 'src/app/core/services/org/org.service';

Expand Down Expand Up @@ -57,6 +58,7 @@ export class BambooHrComponent implements OnInit {
constructor(
private bambooHrService: BambooHrService,
private formBuilder: FormBuilder,
private helperService: HelperService,
private messageService: MessageService,
private orgService: OrgService,
private trackingService: TrackingService
Expand Down Expand Up @@ -148,6 +150,7 @@ export class BambooHrComponent implements OnInit {
}

private setupPage(): void {
this.helperService.setBaseApiURL(AppUrl.BAMBOO_HR);
this.bambooHrService.getBambooHRData().subscribe((bambooHrData: BambooHr) => {
this.isBambooConnected = bambooHrData.sub_domain && bambooHrData.api_token ? true : false;
this.bambooHrData = bambooHrData;
Expand Down
5 changes: 4 additions & 1 deletion src/app/integrations/travelperk/travelperk.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs';
import { Location } from '@angular/common';
import { ToastSeverity } from 'src/app/core/models/enum/enum.model';
import { AppUrl, ToastSeverity } from 'src/app/core/models/enum/enum.model';
import { AppName } from 'src/app/core/models/enum/enum.model';
import { Org } from 'src/app/core/models/org/org.model';
import { Travelperk } from 'src/app/core/models/travelperk/travelperk.model';
Expand All @@ -12,6 +12,7 @@ import { environment } from 'src/environments/environment';
import { brandingConfig, brandingKbArticles } from 'src/app/branding/branding-config';
import { WindowService } from 'src/app/core/services/common/window.service';
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
import { HelperService } from 'src/app/core/services/common/helper.service';

@Component({
selector: 'app-travelperk',
Expand Down Expand Up @@ -42,6 +43,7 @@ export class TravelperkComponent implements OnInit {
readonly brandingConfig = brandingConfig;

constructor(
private helperService: HelperService,
private router: Router,
private route: ActivatedRoute,
private location: Location,
Expand All @@ -52,6 +54,7 @@ export class TravelperkComponent implements OnInit {
) { }

private setupPage(): void {
this.helperService.setBaseApiURL(AppUrl.TRAVELPERK);
this.travelperkService.getTravelperkData().subscribe((travelperkData : Travelperk) => {
this.travelperkData = travelperkData;
this.isIntegrationConnected = travelperkData.is_travelperk_connected;
Expand Down

0 comments on commit 823d4c0

Please sign in to comment.