-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qbd direct connector data sync up ts #1070
Changes from all commits
f961523
87daad8
d02b468
3c2fe05
20665aa
5ecf737
31ce719
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,9 +1,24 @@ | ||||||||||||||||||
import { Injectable } from '@angular/core'; | ||||||||||||||||||
import { ApiService } from '../../common/api.service'; | ||||||||||||||||||
import { WorkspaceService } from '../../common/workspace.service'; | ||||||||||||||||||
import { Observable } from 'rxjs'; | ||||||||||||||||||
import { QbdConnectorPost, QbdConnectorGet, SyncDataType } from 'src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-connector.model'; | ||||||||||||||||||
|
||||||||||||||||||
@Injectable({ | ||||||||||||||||||
providedIn: 'root' | ||||||||||||||||||
}) | ||||||||||||||||||
export class QbdDirectConnectorService { | ||||||||||||||||||
|
||||||||||||||||||
constructor() { } | ||||||||||||||||||
constructor( | ||||||||||||||||||
private apiService: ApiService, | ||||||||||||||||||
private workspaceService: WorkspaceService | ||||||||||||||||||
) { } | ||||||||||||||||||
|
||||||||||||||||||
postQbdDirectConntion(payload: QbdConnectorPost): Observable<QbdConnectorGet> { | ||||||||||||||||||
return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/connector_settings/`, payload); | ||||||||||||||||||
} | ||||||||||||||||||
Comment on lines
+17
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix typo in method name and consider endpoint path constant.
+private readonly QBD_CONNECTOR_SETTINGS_ENDPOINT = 'connector_settings/';
+
-postQbdDirectConntion(payload: QbdConnectorPost): Observable<QbdConnectorGet> {
+postQbdDirectConnection(payload: QbdConnectorPost): Observable<QbdConnectorGet> {
- return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/connector_settings/`, payload);
+ return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/${this.QBD_CONNECTOR_SETTINGS_ENDPOINT}`, payload);
} 📝 Committable suggestion
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
syncAttribuites(): Observable<SyncDataType[]> { | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. getSyncedAttributeStats |
||||||||||||||||||
return this.apiService.get(`/workspaces/${this.workspaceService.getWorkspaceId()}/qbd/attribute_stats/`, {}); | ||||||||||||||||||
} | ||||||||||||||||||
Comment on lines
+21
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix typo in method name and improve method implementation.
+private readonly QBD_ATTRIBUTE_STATS_ENDPOINT = 'qbd/attribute_stats/';
+
-syncAttribuites(): Observable<SyncDataType[]> {
+syncAttributes(): Observable<SyncDataType[]> {
- return this.apiService.get(`/workspaces/${this.workspaceService.getWorkspaceId()}/qbd/attribute_stats/`, {});
+ return this.apiService.get(`/workspaces/${this.workspaceService.getWorkspaceId()}/${this.QBD_ATTRIBUTE_STATS_ENDPOINT}`);
} 📝 Committable suggestion
Suggested change
Comment on lines
+17
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Fix typos in method names and update all references The methods with typos are only used in two files:
Required changes:
No other usages or interfaces were found in the codebase, and the correctly spelled versions of these methods don't exist elsewhere. 🔗 Analysis chainVerify method name changes across the codebase. The proposed method name corrections ( The search results show that both methods with typos are used in the Let me try one more search with different flags to ensure we catch all possible usages and test mocks: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for current method names usage
echo "Searching for current method usage..."
rg "postQbdDirectConntion|syncAttribuites" --type ts
# Search for potential test files
echo "Searching for related test files..."
fd -e spec.ts -e test.ts qbd-direct
Length of output: 4713 Script: #!/bin/bash
# Search within test files for these method names
echo "Searching in test files..."
rg "postQbdDirectConntion|syncAttribuites" $(fd -e spec.ts -e test.ts qbd-direct)
# Also search for similar method names to see if correct spelling exists elsewhere
echo "Searching for similar method names..."
rg "postQbdDirectConnection|syncAttributes" --type ts
Length of output: 3922 Script: #!/bin/bash
# Search with context in test files
echo "Searching test files with context..."
rg -B2 -A2 "postQbdDirectConntion|syncAttribuites" src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.spec.ts src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.spec.ts
# Search for method declarations in interface files
echo "Searching interface files..."
fd -e interface.ts -e types.ts | xargs rg "postQbdDirectConntion|syncAttribuites|postQbdDirectConnection|syncAttributes"
Length of output: 1376 |
||||||||||||||||||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,3 +1,61 @@ | ||||||||||||||||||||||||||
<!-- <app-qbd-direct-download-file></app-qbd-direct-download-file> --> | ||||||||||||||||||||||||||
<!-- <app-qbd-direct-setup-connection></app-qbd-direct-setup-connection> --> | ||||||||||||||||||||||||||
<!-- <app-qbd-direct-data-sync></app-qbd-direct-data-sync> --> | ||||||||||||||||||||||||||
<div class="tw-pb-48-px"> | ||||||||||||||||||||||||||
<app-onboarding-steppers [onboardingSteps]="onboardingSteps"></app-onboarding-steppers> | ||||||||||||||||||||||||||
<div> | ||||||||||||||||||||||||||
<div *ngIf="isLoading" class="tw-flex tw-justify-center tw-items-center tw-pt-80-px"> | ||||||||||||||||||||||||||
<app-loader></app-loader> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
<div *ngIf="!isLoading" class="configuration--contents tw-border-border-tertiary tw-mt-24-px" [ngClass]="{'tw-mx-120-px tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-mx-60-px tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}"> | ||||||||||||||||||||||||||
<div> | ||||||||||||||||||||||||||
<app-configuration-step-header | ||||||||||||||||||||||||||
[headerText]="brandingContent.configurationHeaderText" | ||||||||||||||||||||||||||
[contentText]="brandingContent.configurationSubHeaderText" | ||||||||||||||||||||||||||
[redirectLink]="redirectLink"> | ||||||||||||||||||||||||||
</app-configuration-step-header> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
<div class="tw-px-24-px"> | ||||||||||||||||||||||||||
<div class="tw-py-24-px"> | ||||||||||||||||||||||||||
<app-qbd-direct-download-file | ||||||||||||||||||||||||||
[isLoading]="isDownloadfileLoading" | ||||||||||||||||||||||||||
[showDownloadLink]="showDownloadLink" | ||||||||||||||||||||||||||
[isStepCompleted]="isDownloadStepCompleted" | ||||||||||||||||||||||||||
[isCompanyPathInvalid]="isCompanyPathInvalid" | ||||||||||||||||||||||||||
(nextStep)="proceedToConnection()" | ||||||||||||||||||||||||||
(downloadClick)="triggerDownload($event)" | ||||||||||||||||||||||||||
(retryClick)="retry()" | ||||||||||||||||||||||||||
(manualDownload)="triggerManualDownload()"></app-qbd-direct-download-file> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
<div class="tw-py-24-px"> | ||||||||||||||||||||||||||
<app-qbd-direct-setup-connection | ||||||||||||||||||||||||||
[showSection]="isDownloadStepCompleted" | ||||||||||||||||||||||||||
[password]="password" | ||||||||||||||||||||||||||
[isLoading]="isConnectionLoading" | ||||||||||||||||||||||||||
[connectionStatus]="connectionStatus" | ||||||||||||||||||||||||||
[isStepCompleted]="isConnectionStepCompleted" | ||||||||||||||||||||||||||
[isCTAEnabled]="isConnectionCTAEnabled" | ||||||||||||||||||||||||||
(doneClick)="onConnectionDone($event)" | ||||||||||||||||||||||||||
(nextClick)="proceedToSyncData()"></app-qbd-direct-setup-connection> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
<div class="tw-py-24-px"> | ||||||||||||||||||||||||||
<app-qbd-direct-data-sync | ||||||||||||||||||||||||||
[isLoading]="isDataSyncLoading" | ||||||||||||||||||||||||||
[qbdFields]="qbdFields" | ||||||||||||||||||||||||||
[isCTAEnabled]="isDataSyncCTADisabled" | ||||||||||||||||||||||||||
[showSection]="isConnectionStepCompleted" | ||||||||||||||||||||||||||
(continueClick)="proceedToExportSetting()"></app-qbd-direct-data-sync> | ||||||||||||||||||||||||||
Comment on lines
+39
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix inconsistent property naming. The property binding Consider renaming for consistency: -[isCTAEnabled]="isDataSyncCTADisabled"
+[isCTADisabled]="isDataSyncCTADisabled" or -[isCTAEnabled]="isDataSyncCTADisabled"
+[isCTAEnabled]="!isDataSyncCTADisabled" 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
<div *ngIf="isDialogVisible"> | ||||||||||||||||||||||||||
<app-configuration-confirmation-dialog | ||||||||||||||||||||||||||
(warningAccepted)="closeDialog($event)" | ||||||||||||||||||||||||||
[isWarningVisible]="isDialogVisible" | ||||||||||||||||||||||||||
[headerText]="'Connection failed'" | ||||||||||||||||||||||||||
[contextText]="warningDialogText" | ||||||||||||||||||||||||||
[confirmBtnText]="'Got it'" | ||||||||||||||||||||||||||
[appName]="appName" | ||||||||||||||||||||||||||
[showSecondaryCTA]="false"> | ||||||||||||||||||||||||||
</app-configuration-confirmation-dialog> | ||||||||||||||||||||||||||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postConnectorSettings