@@ -27,7 +27,7 @@ export class BambooHrComponent implements OnInit {
27
27
28
28
isLoading : boolean = true ;
29
29
30
- hideRefreshIcon : boolean ;
30
+ hideRefreshIcon : boolean = true ;
31
31
32
32
isConfigurationSaveInProgress : boolean ;
33
33
@@ -98,6 +98,7 @@ export class BambooHrComponent implements OnInit {
98
98
this . isConfigurationSaveInProgress = true ;
99
99
this . bambooHrService . postConfigurations ( payload ) . subscribe ( ( updatedConfiguration : BambooHRConfiguration ) => {
100
100
this . bambooHrConfiguration = updatedConfiguration ;
101
+ this . hideRefreshIcon = false ;
101
102
this . isConfigurationSaveInProgress = false ;
102
103
this . displayToastMessage ( ToastSeverity . SUCCESS , 'Configuration saved successfully' ) ;
103
104
this . trackingService . trackTimeSpent ( Page . CONFIGURE_BAMBOO_HR , this . sessionStartTime ) ;
@@ -123,45 +124,6 @@ export class BambooHrComponent implements OnInit {
123
124
} ) ;
124
125
}
125
126
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
- }
165
127
166
128
private getBambooHrConfiguration ( ) : void {
167
129
const data = merge (
@@ -175,9 +137,11 @@ export class BambooHrComponent implements OnInit {
175
137
this . additionalEmails = response ;
176
138
} else if ( response ?. hasOwnProperty ( 'additional_email_options' ) ) {
177
139
this . bambooHrConfiguration = response ;
140
+ this . hideRefreshIcon = false ;
178
141
}
179
142
} ) ;
180
- this . setupBambooHr ( ) ;
143
+ this . isLoading = false ;
144
+
181
145
} ) ;
182
146
}
183
147
0 commit comments