Skip to content

Commit 98f46b6

Browse files
Remove Workato related API calls (#437)
* Remove workato related API calls * comment resolved and bug fix * resolved comments * remove workato related code * minor debugs * removed debug * sync button disable before configuration save
1 parent a25c816 commit 98f46b6

File tree

4 files changed

+10
-47
lines changed

4 files changed

+10
-47
lines changed

src/app/integrations/bamboo-hr/bamboo-hr.component.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
[isLoading]="isLoading"
2121
[hideRefreshIcon]="hideRefreshIcon"
2222
[showErrorScreen]="showErrorScreen"
23-
[isRecipeRunning]="bambooHrConfiguration?.recipe_status ? true : false"
2423
[isIntegrationSetupInProgress]="isBambooSetupInProgress"
2524
[isIntegrationConnected]="isBambooConnected"
2625
(connectIntegration)="openDialog()"
@@ -87,4 +86,4 @@
8786
<p-skeleton shape="rectangle"></p-skeleton>
8887
</div>
8988
</div>
90-
</div>
89+
</div>

src/app/integrations/bamboo-hr/bamboo-hr.component.ts

+5-41
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class BambooHrComponent implements OnInit {
2727

2828
isLoading: boolean = true;
2929

30-
hideRefreshIcon: boolean;
30+
hideRefreshIcon: boolean = true;
3131

3232
isConfigurationSaveInProgress: boolean;
3333

@@ -98,6 +98,7 @@ export class BambooHrComponent implements OnInit {
9898
this.isConfigurationSaveInProgress = true;
9999
this.bambooHrService.postConfigurations(payload).subscribe((updatedConfiguration: BambooHRConfiguration) => {
100100
this.bambooHrConfiguration = updatedConfiguration;
101+
this.hideRefreshIcon = false;
101102
this.isConfigurationSaveInProgress = false;
102103
this.displayToastMessage(ToastSeverity.SUCCESS, 'Configuration saved successfully');
103104
this.trackingService.trackTimeSpent(Page.CONFIGURE_BAMBOO_HR, this.sessionStartTime);
@@ -123,45 +124,6 @@ export class BambooHrComponent implements OnInit {
123124
});
124125
}
125126

126-
private setupBambooHr(): void {
127-
const syncData = [];
128-
129-
if (!this.org.managed_user_id) {
130-
syncData.push(this.orgService.createWorkatoWorkspace());
131-
}
132-
133-
if (!this.bambooHrData || !this.bambooHrData.folder_id) {
134-
syncData.push(this.bambooHrService.createFolder());
135-
}
136-
137-
if (!this.bambooHrData || !this.bambooHrData.package_id) {
138-
syncData.push(this.bambooHrService.uploadPackage());
139-
}
140-
141-
if (!this.org.is_fyle_connected) {
142-
syncData.push(this.orgService.connectFyle());
143-
}
144-
145-
if (!this.org.is_sendgrid_connected) {
146-
syncData.push(this.orgService.connectSendgrid());
147-
}
148-
149-
if (syncData.length) {
150-
this.isBambooSetupInProgress = true;
151-
concat(...syncData).pipe(
152-
toArray()
153-
).subscribe(() => {
154-
this.isLoading = false;
155-
this.isBambooSetupInProgress = false;
156-
}, () => {
157-
this.isLoading = false;
158-
this.isBambooSetupInProgress = false;
159-
this.showErrorScreen = true;
160-
});
161-
} else {
162-
this.isLoading = false;
163-
}
164-
}
165127

166128
private getBambooHrConfiguration(): void {
167129
const data = merge(
@@ -175,9 +137,11 @@ export class BambooHrComponent implements OnInit {
175137
this.additionalEmails = response;
176138
} else if (response?.hasOwnProperty('additional_email_options')) {
177139
this.bambooHrConfiguration = response;
140+
this.hideRefreshIcon = false;
178141
}
179142
});
180-
this.setupBambooHr();
143+
this.isLoading = false;
144+
181145
});
182146
}
183147

src/app/shared/components/helper/app-landing-page-header/app-landing-page-header.component.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="tw-pl-16-px tw-flex tw-flex-col">
1111
<div class="tw-flex tw-pt-6-px">
1212
<p class="tw-text-20-px tw-font-500 tw-text-normal-text-color">{{ appName }}</p>
13-
<svg-icon-sprite *ngIf="isIntegrationConnected && !isLoading && isRecipeRunning && !hideRefreshIcon" pTooltip="Sync Data" tooltipPosition="right" src="sync" width="18px" height="14px" class="tw-cursor-pointer tw-ml-10-px tw-pt-6-px tw-text-faded-text-color" (click)="syncData()"></svg-icon-sprite>
13+
<svg-icon-sprite *ngIf="isIntegrationConnected && !isLoading && !hideRefreshIcon" pTooltip="Sync Data" tooltipPosition="right" src="sync" width="18px" height="14px" class="tw-cursor-pointer tw-ml-10-px tw-pt-6-px tw-text-faded-text-color" (click)="syncData()"></svg-icon-sprite>
1414
</div>
1515
<p *ngIf="!isIntegrationSetupInProgress" class="tw-text-slightly-normal-text-color tw-pt-2-px tw-text-14-px tw-font-400 tw-flex">{{ appDescription }}
1616
<span *ngIf="redirectLink" class="tw-text-hyperlink-color tw-flex tw-pl-4-px tw-cursor-pointer" (click)="windowService.openInNewTab(redirectLink)">
@@ -30,7 +30,7 @@
3030
<i *ngIf="!isConnectionInProgress" class="tw-pl-10-px tw-pt-2-px !tw-text-12-px pi pi-arrow-right"></i>
3131
<app-loader class="tw-ml-10-px" *ngIf="isConnectionInProgress" [styleClass]="'spinner-16-white tw-top-2-px'"></app-loader>
3232
</button>
33-
<button *ngIf="isIntegrationConnected && isRecipeRunning && appName !== AppName.GUSTO" pButton type="button" class="!tw-text-alert-toast remove-bg disconnect !tw-bg-white" (click)="disconnect()">
33+
<button *ngIf="isIntegrationConnected && appName !== AppName.GUSTO" pButton type="button" class="!tw-text-alert-toast remove-bg disconnect !tw-bg-white" (click)="disconnect()">
3434
{{ isConnectionInProgress ? 'Disconnecting' : 'Disconnect' }}
3535
</button>
3636
<button *ngIf="(appName === AppName.QBD || appName === AppName.INTACCT || appName === AppName.SAGE300 || appName === AppName.BUSINESS_CENTRAL)" pButton type="button" class="p-button-raised" (click)="connect()">
@@ -49,4 +49,4 @@
4949
</div>
5050
</div>
5151

52-
<p class="tw-h-1-px tw-w-[100%] tw-bg-separator"></p>
52+
<p class="tw-h-1-px tw-w-[100%] tw-bg-separator"></p>

src/app/shared/components/helper/app-landing-page-header/app-landing-page-header.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class AppLandingPageHeaderComponent implements OnInit {
8181

8282
connect(): void {
8383

84-
if (this.appName === this.AppName.TRAVELPERK) {
84+
if (this.appName === this.AppName.TRAVELPERK || this.appName === this.AppName.BAMBOO_HR) {
8585
this.initiateOAuth();
8686
return;
8787
} else if (this.postConnectionRoute === 'qbd/onboarding/export_settings') {

0 commit comments

Comments
 (0)