Skip to content
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 connector setup UI changes #1060

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/core/models/common/helper.model.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FormGroup, Validators } from "@angular/forms";

export type checkBoxEmit = {
export type CheckBoxUpdate = {
id: number;
value: boolean;
}
Expand Down
6 changes: 6 additions & 0 deletions src/app/core/models/enum/enum.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -889,3 +889,9 @@ export enum QBDPreRequisiteState {
COMPLETE = 'COMPLETE',
INCOMPLETE = 'INCOMPLETE'
}

export enum QBDConnectionStatus {
SUCCESS = 'SUCCESS',
INCORRECT_COMPANY_PATH = 'INCORRECT_COMPANY_PATH',
IN_CORRECT_PASSWORD = 'IN_CORRECT_PASSWORD'
}
Comment on lines +893 to +897
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix inconsistent naming in enum value.

The enum value IN_CORRECT_PASSWORD uses inconsistent word separation compared to INCORRECT_COMPANY_PATH. Both represent incorrect states but use different patterns.

Apply this diff to maintain consistent naming:

 export enum QBDConnectionStatus {
   SUCCESS = 'SUCCESS',
   INCORRECT_COMPANY_PATH = 'INCORRECT_COMPANY_PATH',
-  IN_CORRECT_PASSWORD = 'IN_CORRECT_PASSWORD'
+  INCORRECT_PASSWORD = 'INCORRECT_PASSWORD'
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export enum QBDConnectionStatus {
SUCCESS = 'SUCCESS',
INCORRECT_COMPANY_PATH = 'INCORRECT_COMPANY_PATH',
IN_CORRECT_PASSWORD = 'IN_CORRECT_PASSWORD'
}
export enum QBDConnectionStatus {
SUCCESS = 'SUCCESS',
INCORRECT_COMPANY_PATH = 'INCORRECT_COMPANY_PATH',
INCORRECT_PASSWORD = 'INCORRECT_PASSWORD'
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ export type QBDPrerequisiteObject = {
externalLink?: string,
iconName: string,
state: QBDPreRequisiteState
}
}

export type SyncDataType = {
[key: string]: number | null;
};
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<app-qbd-direct-download-file></app-qbd-direct-download-file>
<!-- <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> -->
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h4 class="tw-text-14-px tw-text-text-secondary tw-font-500">{{step.label}}</h4>
[checkedText]="'Done'"
[unCheckedText]="'Mark as done'"
[id]="step.id"
(checkBoxUpdated)="qbdWebConnectorStatus($event)">
(checkBoxUpdated)="updateConnectorStatus($event)">
</app-chechbox-button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { ActivatedRoute, Router } from '@angular/router';
import { brandingContent, brandingKbArticles } from 'src/app/branding/branding-config';
import { brandingConfig } from 'src/app/branding/c1-contents-config';
import { BrandingConfiguration } from 'src/app/core/models/branding/branding-configuration.model';
import { checkBoxEmit } from 'src/app/core/models/common/helper.model';
import { ConfigurationCta, QBDPreRequisiteState } from 'src/app/core/models/enum/enum.model';
import { CheckBoxUpdate } from 'src/app/core/models/common/helper.model';
import { ConfigurationCta, QbdDirectOnboardingState, QBDPreRequisiteState } from 'src/app/core/models/enum/enum.model';
import { OnboardingStepper } from 'src/app/core/models/misc/onboarding-stepper.model';
import { QbdDirectWorkspace } from 'src/app/core/models/qbd-direct/db/qbd-direct-workspaces.model';
import { QBDPrerequisiteObject } from 'src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-connector.model';
import { QbdDirectOnboardingModel } from 'src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-onboarding.model';
import { IntegrationsToastService } from 'src/app/core/services/common/integrations-toast.service';
Expand Down Expand Up @@ -46,30 +47,37 @@ export class QbdDirectOnboardingPreRequisiteComponent {
caption: 'Download and install the QuickBooks Web Connector on the system where QuickBooks Desktop is installed.',
externalLink: 'https://qbd.com',
iconName: 'download-medium',
state: QBDPreRequisiteState.COMPLETE // INCOMPLETE
state: QBDPreRequisiteState.INCOMPLETE
},
{
id: 2,
label: 'Keep your Quickbooks company file open',
caption: 'Make sure the QuickBooks Company you want to connect to Fyle is open during the integration setup.',
externalLink: 'https://qbd.com',
iconName: 'expand',
state: QBDPreRequisiteState.INCOMPLETE // INCOMPLETE
state: QBDPreRequisiteState.INCOMPLETE
Comment on lines +50 to +58
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Update the QuickBooks Web Connector download URL

The hardcoded URL 'https://qbd.com' should be replaced with the official Intuit QuickBooks Web Connector download URL: 'https://downloads.quickbooks.com/qbwc/QuickBooksWebConnectorInstaller.exe'

🔗 Analysis chain

Update the placeholder QuickBooks Web Connector download URL.

The external link 'https://qbd.com' appears to be a placeholder. Please update it with the correct QuickBooks Web Connector download URL.

Let's verify if this URL is used elsewhere:


Let me search for the correct QuickBooks Web Connector download URL in the codebase:


Let me search for any configuration files or constants that might contain the correct URL:


Based on the search results, I found that there are help articles related to QuickBooks Desktop integration in the codebase. Let me check the specific article URL for the Web Connector download:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for hardcoded QBD URLs to ensure consistency
rg -i "https://qbd.com" --type ts --type html

Length of output: 401


Script:

#!/bin/bash
# Search for any QuickBooks Web Connector related URLs
rg -i "quickbooks.*web.*connector|qbwc" --type ts --type html -A 2

Length of output: 2963


Script:

#!/bin/bash
# Search for configuration files and constants related to QuickBooks
fd -e ts -e json "config|constant" --exec rg -i "quickbooks|qbwc|intuit" {} -C 2

Length of output: 34115


Script:

#!/bin/bash
# Search for the actual QuickBooks Web Connector download URL in help articles
rg -i "quickbooks.*web.*connector.*download|qbwc.*download" --type-add 'md:*.{md,mdx}' --type md

Length of output: 98

}
];

constructor(
private route: ActivatedRoute,
private router: Router,
private toastService: IntegrationsToastService,
private workspaceService: WorkspaceService,
private storageService: StorageService
private workspaceService: WorkspaceService
) { }

qbdWebConnectorStatus(status: checkBoxEmit): void {
updateConnectorStatus(status: CheckBoxUpdate): void {
this.preRequisitesteps[status.id-1].state = status.value ? QBDPreRequisiteState.COMPLETE : QBDPreRequisiteState.INCOMPLETE;
if (this.preRequisitesteps[0].state === QBDPreRequisiteState.COMPLETE && this.preRequisitesteps[1].state === QBDPreRequisiteState.COMPLETE) {
this.isContinueDisabled = false;
}
}

continueToNextStep(): void{
this.saveInProgress = true;
this.workspaceService.updateWorkspaceOnboardingState({onboarding_state: QbdDirectOnboardingState.CONNECTION}).subscribe((workspaceResponse: QbdDirectWorkspace) => {
this.workspaceService.setOnboardingState(workspaceResponse.onboarding_state);
this.saveInProgress = false;
this.router.navigate([`/integrations/qbd_direct/onboarding/connector`]);
});
Comment on lines 74 to +80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add error handling to continueToNextStep method.

The method should handle potential errors and ensure the saveInProgress flag is properly reset.

Here's a suggested implementation:

  continueToNextStep(): void {
    this.saveInProgress = true;
-   this.workspaceService.updateWorkspaceOnboardingState({onboarding_state: QbdDirectOnboardingState.CONNECTION}).subscribe((workspaceResponse: QbdDirectWorkspace) => {
-     this.workspaceService.setOnboardingState(workspaceResponse.onboarding_state);
-     this.saveInProgress = false;
-     this.router.navigate([`/integrations/qbd_direct/onboarding/connector`]);
-   });
+   this.workspaceService.updateWorkspaceOnboardingState({onboarding_state: QbdDirectOnboardingState.CONNECTION}).subscribe({
+     next: (workspaceResponse: QbdDirectWorkspace) => {
+       this.workspaceService.setOnboardingState(workspaceResponse.onboarding_state);
+       this.router.navigate(['/integrations/qbd_direct/onboarding/connector']);
+     },
+     error: (error: any) => {
+       console.error('Failed to update workspace state:', error);
+       // Consider adding error notification here
+     },
+     complete: () => {
+       this.saveInProgress = false;
+     }
+   });
  }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
continueToNextStep(): void{
this.saveInProgress = true;
this.workspaceService.updateWorkspaceOnboardingState({onboarding_state: QbdDirectOnboardingState.CONNECTION}).subscribe((workspaceResponse: QbdDirectWorkspace) => {
this.workspaceService.setOnboardingState(workspaceResponse.onboarding_state);
this.saveInProgress = false;
this.router.navigate([`/integrations/qbd_direct/onboarding/connector`]);
});
continueToNextStep(): void{
this.saveInProgress = true;
this.workspaceService.updateWorkspaceOnboardingState({onboarding_state: QbdDirectOnboardingState.CONNECTION}).subscribe({
next: (workspaceResponse: QbdDirectWorkspace) => {
this.workspaceService.setOnboardingState(workspaceResponse.onboarding_state);
this.router.navigate(['/integrations/qbd_direct/onboarding/connector']);
},
error: (error: any) => {
console.error('Failed to update workspace state:', error);
// Consider adding error notification here
},
complete: () => {
this.saveInProgress = false;
}
});

}

}
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
<p>qbd-direct-data-sync works!</p>
<div class="tw-border tw-border-border-info-lighter">
<div class="tw-p-24-px">
<div class="tw-flex tw-items-center tw-justify-between">
<div class="tw-flex tw-items-center tw-justify-start">
<div class="tw-w-20-px tw-h-20-px tw-rounded-sm tw-bg-bg-secondary tw-text-white tw-text-14-px tw-font-500 tw-text-center tw-mr-8-px">
3
</div>
<div class="tw-text-14-px tw-font-500 tw-text-text-tertiary tw-pt-4-px">
<span>Data sync</span>
</div>
</div>
</div>
<div class="tw-py-24-px">
<div *ngFor="let field of getKeys(qbdFields); let i = index" class="tw-flex tw-items-center tw-justify-between tw-p-14-px" [ngClass]=" i < fieldLength-1 ? 'tw-border-b tw-border-b-divider-border-color' : '' ">
<div>
<span class="tw-text-text-tertiary tw-font-400 tw-text-14-px">{{field}}</span>
</div>
<div>
<span *ngIf="qbdFields[field] !== null" class="tw-text-text-tertiary tw-font-400 tw-text-14-px">{{qbdFields[field]}}</span>
<div class="spin-icon tw-text-text-tertiary tw-font-400 tw-text-14-px">
<app-svg-icon *ngIf="qbdFields[field] === null" [svgSource]="'arrow-rotate-sync'" [width]="'14px'" [height]="'14px'" [isTextColorAllowed]="true" [styleClasses]="'tw-text-icon-tertiary'"></app-svg-icon>
</div>
</div>
</div>
</div>
<div>
<app-configuration-info-label [infoText]="'The values displayed here are synced from QuickBooks Desktop to Fyle. If you notice discrepancies in the synced values, you can continue onboarding; the sync will refresh automatically in 5 minutes to capture any missed values.'" [showIcon]="false"></app-configuration-info-label>
</div>
</div>
<div>
<app-configuration-step-footer [ctaText]="ConfigurationCtaText.CONTINUE" [isButtonDisabled]="!isCTAEnabled" (save)="onContinueClick()"></app-configuration-step-footer>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.spin-icon {
animation: rotate 2s linear infinite;
}

@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';

import { QbdDirectDataSyncComponent } from './qbd-direct-data-sync.component';

describe('QbdDirectDataSyncComponent', () => {
xdescribe('QbdDirectDataSyncComponent', () => {
let component: QbdDirectDataSyncComponent;
let fixture: ComponentFixture<QbdDirectDataSyncComponent>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ConfigurationCta } from 'src/app/core/models/enum/enum.model';
import { SyncDataType } from 'src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-connector.model';
import { SharedModule } from 'src/app/shared/shared.module';

@Component({
selector: 'app-qbd-direct-data-sync',
standalone: true,
imports: [],
imports: [CommonModule, SharedModule],
templateUrl: './qbd-direct-data-sync.component.html',
styleUrl: './qbd-direct-data-sync.component.scss'
})
export class QbdDirectDataSyncComponent {
export class QbdDirectDataSyncComponent implements OnInit {

@Input({required: true}) qbdFields: SyncDataType;

@Input({required: true}) isCTAEnabled: boolean;

@Output() continueClick = new EventEmitter();

fieldLength: number;

ConfigurationCtaText = ConfigurationCta;

onContinueClick() {
this.continueClick.emit();
}

getKeys(obj: any): string[] {
return Object.keys(obj);
}

ngOnInit() {
this.fieldLength = Object.keys(this.qbdFields).length;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Based on the verification results, I can now provide the final response:

Component integration appears incomplete

The QbdDirectDataSyncComponent is currently commented out in the onboarding connector template, and there's no evidence of proper data flow for the required SyncDataType input. This suggests the integration is not fully implemented yet.

  • qbd-direct-onboarding-connector.component.html: Component usage is commented out
  • No binding found for the required qbdFields input property
  • No binding found for the required isCTAEnabled input property
🔗 Analysis chain

Verify integration with QBD setup flow

Since this component is part of the QBD connector setup UI changes, let's verify its integration points.


Let me analyze the results and generate one more verification script to complete the analysis.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for component usage and related QBD setup components
echo "Checking component usage in QBD setup flow..."
rg -l "app-qbd-direct-data-sync" 

echo "Checking related QBD components..."
fd -e ts -e html . | rg "qbd-direct"

echo "Checking SyncDataType usage..."
rg "SyncDataType" -A 3

Length of output: 14267


Script:

#!/bin/bash
# Check the usage of QbdDirectDataSyncComponent in the onboarding connector
echo "Checking QbdDirectDataSyncComponent usage in onboarding connector..."
cat src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.html

# Check if SyncDataType is properly passed
echo -e "\nChecking SyncDataType data flow..."
rg "qbdFields" -A 3 src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/

Length of output: 687

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Component, Input } from '@angular/core';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { SharedModule } from "../../../../shared/shared.module";
import { QbdDirectSharedComponent } from '../qbd-direct-shared.component';
import { CardModule } from 'primeng/card';
import { ConfigurationCta } from 'src/app/core/models/enum/enum.model';
import { CommonModule } from '@angular/common';
import { required } from '@rxweb/reactive-form-validators';
import { ProgressSpinnerModule } from 'primeng/progressspinner';

@Component({
Expand All @@ -24,23 +23,32 @@ export class QbdDirectDownloadFileComponent {

@Input({required: true}) isCompanyPathInvalid: boolean;

@Output() nextStep = new EventEmitter();

@Output() downloadClick = new EventEmitter();

@Output() retryClick = new EventEmitter();

@Output() manualDownload = new EventEmitter();

downloadFilePath: string;

ConfigurationCtaText = ConfigurationCta;

continueToNextStep() {
this.nextStep.emit();
}

onDownloadClick() {
// Emit output
this.downloadClick.emit();
}

onManualDownload() {
// Emit output
this.manualDownload.emit();
}

onRetryClick() {
// Emit output
this.retryClick.emit();
}

}
Original file line number Diff line number Diff line change
@@ -1 +1,101 @@
<p>qbd-direct-setup-connection works!</p>
<div class="tw-border tw-border-border-info-lighter">
<div class="tw-p-24-px">
<div class="tw-flex tw-items-center tw-justify-between">
<div class="tw-flex tw-items-center tw-justify-start">
<div class="tw-w-20-px tw-h-20-px tw-rounded-sm tw-bg-bg-secondary tw-text-white tw-text-14-px tw-font-500 tw-text-center tw-mr-8-px">
2
</div>
<div class="tw-text-14-px tw-font-500 tw-text-text-tertiary tw-pt-4-px">
<span>Set up Quickbooks web connector</span>
</div>
</div>
<div *ngIf="isStepCompleted">
<div class="tw-w-24-px tw-h-24-px tw-bg-success-toast tw-rounded-full tw-flex tw-items-center tw-justify-center">
<app-svg-icon svgSource="check-medium" [width]="'20px'" [height]="'20px'" [isTextColorAllowed]="true" [styleClasses]="'tw-text-white '"></app-svg-icon>
</div>
</div>
</div>
<div *ngIf="!isLoading && connectionStatus !== qbdConnectionStatus.SUCCESS" class="tw-flex tw-items-center tw-justify-between tw-pt-24-px">
<div>
<div class="tw-pt-24-px">
<div class="tw-flex tw-items-center tw-justify-start">
<div class="!tw-w-45-px !tw-h-45-px tw-border tw-border-border-tertiary tw-flex tw-items-center tw-justify-center tw-bg-disabled-bg-color">
<app-svg-icon [svgSource]="'upload'" [width]="'16px'" [height]="'16px'"></app-svg-icon>
</div>
<div class="tw-ml-10-px">
<h4 class="tw-text-14-px tw-text-text-secondary tw-font-500">Open the integration file using QuickBooks Web Connector</h4>
<p class="tw-text-12-px tw-text-text-tertiary tw-font-400">Watch the video for guidance on opening the downloaded integration file in QuickBooks Web Connector.</p>
</div>
</div>
</div>
<div class="tw-pt-24-px">
<div class="tw-flex tw-items-center tw-justify-start">
<div class="!tw-w-45-px !tw-h-45-px tw-border tw-border-border-tertiary tw-flex tw-items-center tw-justify-center tw-bg-disabled-bg-color">
<app-svg-icon [svgSource]="'lock'" [width]="'16px'" [height]="'16px'"></app-svg-icon>
</div>
<div class="tw-ml-10-px">
<h4 class="tw-text-14-px tw-text-text-secondary tw-font-500">Use this password to set up the connection</h4>
<div class="tw-flex">
<div class="tw-pr-30-px">
<p *ngIf="!isPasswordShown" class="tw-text-16-px tw-text-text-tertiary tw-font-400">****{{password.slice(4)}}</p>
<p *ngIf="isPasswordShown" class="tw-text-16-px tw-text-text-tertiary tw-font-400">{{password}}</p>
</div>
Comment on lines +40 to +41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Enhance password security and handling

The current password visibility implementation has potential security concerns:

  1. The password is directly exposed in the DOM when shown
  2. The slice(4) operation assumes password length ≥ 4 characters

Consider using a more secure approach for password masking and handling.

-<p *ngIf="!isPasswordShown" class="tw-text-16-px tw-text-text-tertiary tw-font-400">****{{password.slice(4)}}</p>
-<p *ngIf="isPasswordShown" class="tw-text-16-px tw-text-text-tertiary tw-font-400">{{password}}</p>
+<p class="tw-text-16-px tw-text-text-tertiary tw-font-400">
+    {{isPasswordShown ? password : password?.replace(/./g, '*')}}
+</p>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<p *ngIf="!isPasswordShown" class="tw-text-16-px tw-text-text-tertiary tw-font-400">****{{password.slice(4)}}</p>
<p *ngIf="isPasswordShown" class="tw-text-16-px tw-text-text-tertiary tw-font-400">{{password}}</p>
<p class="tw-text-16-px tw-text-text-tertiary tw-font-400">
{{isPasswordShown ? password : password?.replace(/./g, '*')}}
</p>

<div class="tw-flex tw-items-center tw-justify-end">
<div class="tw-pr-10-px">
<app-svg-icon *ngIf="!isPasswordShown" [svgSource]="'eye-slash'" [width]="'24px'" [height]="'24px'" [isTextColorAllowed]="true" [styleClasses]="'tw-text-icon-muted tw-cursor-pointer'" (iconClick)="showPassword(true)"></app-svg-icon>
<app-svg-icon *ngIf="isPasswordShown" [svgSource]="'eye'" [width]="'24px'" [height]="'24px'" [isTextColorAllowed]="true" [styleClasses]="'tw-text-icon-muted tw-cursor-pointer'" (iconClick)="showPassword(false)"></app-svg-icon>
</div>
<div>
<app-svg-icon [svgSource]="'duplicate'" [width]="'22px'" [height]="'22px'" [isTextColorAllowed]="true" [styleClasses]="'tw-text-icon-muted tw-cursor-pointer'" (iconClick)="onClipboardCopy()"></app-svg-icon>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tw-pt-24-px">
<div class="tw-flex tw-items-center tw-justify-start">
<div class="!tw-w-45-px !tw-h-45-px tw-border tw-border-border-tertiary tw-flex tw-items-center tw-justify-center tw-bg-disabled-bg-color">
<app-svg-icon [svgSource]="'check'" [width]="'20px'" [height]="'20px'"></app-svg-icon>
</div>
<div class="tw-ml-10-px">
<h4 class="tw-text-14-px tw-text-text-secondary tw-font-500">Click on ‘Update Selected’ on QuickBooks Web Connector </h4>
<p class="tw-text-12-px tw-text-text-tertiary tw-font-400">Click the 'Update Selected' option to initiate a connection between Fyle and QuickBooks Desktop</p>
</div>
</div>
</div>
</div>
<div class="tw-rounded-border-radius-2xl">
<p-card>
<div class="tw-flex tw-justify-center">
<iframe width="427" height="259" src="https://www.youtube.com/embed/2oYdc8KcQnk" frameborder="0"></iframe>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Enhance iframe security and responsiveness

The YouTube video iframe needs security improvements and responsive sizing:

  1. Add loading="lazy" for performance
  2. Add title for accessibility
  3. Add allow attribute to control features
  4. Make dimensions responsive
-<iframe width="427" height="259" src="https://www.youtube.com/embed/2oYdc8KcQnk" frameborder="0"></iframe>
+<iframe
+    class="tw-w-full tw-aspect-video"
+    src="https://www.youtube.com/embed/2oYdc8KcQnk"
+    title="QuickBooks Web Connector Setup Guide"
+    loading="lazy"
+    allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
+    frameborder="0">
+</iframe>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<iframe width="427" height="259" src="https://www.youtube.com/embed/2oYdc8KcQnk" frameborder="0"></iframe>
<iframe
class="tw-w-full tw-aspect-video"
src="https://www.youtube.com/embed/2oYdc8KcQnk"
title="QuickBooks Web Connector Setup Guide"
loading="lazy"
allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
frameborder="0">
</iframe>

</p-card>
</div>
</div>
<div *ngIf="!isLoading && connectionStatus !== qbdConnectionStatus.SUCCESS">
<app-chechbox-button
[checkedText]="'Done'"
[unCheckedText]="'Mark as done'"
[id]="0"
(checkBoxUpdated)="onDoneClick($event)">
</app-chechbox-button>
</div>
Comment on lines +77 to +82
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix component name typo

The component name contains a typo: "chechbox" should be "checkbox".

-<app-chechbox-button
+<app-checkbox-button
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<app-chechbox-button
[checkedText]="'Done'"
[unCheckedText]="'Mark as done'"
[id]="0"
(checkBoxUpdated)="onDoneClick($event)">
</app-chechbox-button>
<app-checkbox-button
[checkedText]="'Done'"
[unCheckedText]="'Mark as done'"
[id]="0"
(checkBoxUpdated)="onDoneClick($event)">
</app-checkbox-button>

<div *ngIf="isLoading" class="tw-flex tw-flex-col tw-justify-center tw-items-center tw-h-[400px]">
<app-loader styleClass="spinner-30 tw-top-2-px"></app-loader>
<span class="tw-text-14-px tw-font-400 tw-text-text-primary">Connecting to QuickBooks Desktop...</span>
</div>
<div *ngIf="!isLoading && !isStepCompleted && connectionStatus === qbdConnectionStatus.SUCCESS" class="tw-flex tw-flex-col tw-justify-center tw-items-center tw-h-[400px] tw-text-center">
<div class="tw-text-center">
<app-svg-icon svgSource="check-circle-outline" [width]="'24px'" [height]="'24px'" [isTextColorAllowed]="true" [styleClasses]="'tw-text-success-toast tw-pr-6-px'"></app-svg-icon>
</div>
<div>
<p class="tw-pt-4-px tw-text-text-tertiary tw-text-16-px tw-font-500">Success!</p>
<span class="tw-pt-8-px tw-text-text-muted tw-text-12-px tw-font-400">You're now connected to QuickBooks Desktop.</span>
</div>
</div>
</div>
<div *ngIf="!isStepCompleted">
<app-configuration-step-footer [ctaText]="ConfigurationCtaText.NEXT" [isButtonDisabled]="!isCTAEnabled" (save)="onNextClick()"></app-configuration-step-footer>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:host ::ng-deep .p-card-body, :host ::ng-deep .p-card-content {
@apply tw-p-0 #{!important};
}

:host ::ng-deep .p-card-body {
@apply tw-rounded-border-radius-2xl #{!important}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';

import { QbdDirectSetupConnectionComponent } from './qbd-direct-setup-connection.component';

describe('QbdDirectSetupConnectionComponent', () => {
xdescribe('QbdDirectSetupConnectionComponent', () => {
let component: QbdDirectSetupConnectionComponent;
let fixture: ComponentFixture<QbdDirectSetupConnectionComponent>;

Expand Down
Loading
Loading