-
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
feat: qbd direct tracking for export and sync on click #1134
Changes from all commits
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 |
---|---|---|
|
@@ -3,7 +3,8 @@ import { ApiService } from '../../common/api.service'; | |
import { WorkspaceService } from '../../common/workspace.service'; | ||
import { Observable } from 'rxjs'; | ||
import { IntegrationsToastService } from '../../common/integrations-toast.service'; | ||
import { ToastSeverity } from 'src/app/core/models/enum/enum.model'; | ||
import { ClickEvent, ToastSeverity, TrackingApp } from 'src/app/core/models/enum/enum.model'; | ||
import { TrackingService } from '../../integration/tracking.service'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
|
@@ -13,14 +14,16 @@ export class QbdDirectHelperService { | |
constructor( | ||
private apiService: ApiService, | ||
private workspaceService: WorkspaceService, | ||
private toastService: IntegrationsToastService | ||
private toastService: IntegrationsToastService, | ||
private trackingService: TrackingService | ||
) { } | ||
|
||
importQBDAttributes(refresh: boolean): Observable<{}> { | ||
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 Replace {} type with a more specific return type Using - importQBDAttributes(refresh: boolean): Observable<{}> {
+ importQBDAttributes(refresh: boolean): Observable<void> {
🧰 Tools🪛 Biome (1.9.4)[error] 21-21: Don't use '{}' as a type. Prefer explicitly define the object shape. '{}' means "any non-nullable value". (lint/complexity/noBannedTypes) |
||
return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/qbd/import_attributes/`, {refresh}); | ||
} | ||
|
||
importAttributes(refresh: boolean): void { | ||
this.trackingService.onClickEvent(TrackingApp.QBD_DIRECT, ClickEvent.QBD_DIRECT_SYNC); | ||
this.workspaceService.importFyleAttributes(refresh).subscribe(); | ||
this.importQBDAttributes(refresh).subscribe(); | ||
this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'Syncing data dimensions from Quickbooks Desktop'); | ||
|
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.
🛠️ Refactor suggestion
Maintain consistent naming conventions for enum values
The new enum values have inconsistent naming patterns compared to existing QuickBooks-related entries:
Apply this diff to maintain consistency:
📝 Committable suggestion