Skip to content

Commit

Permalink
feat: hide qbd iif from landing, disable export cta
Browse files Browse the repository at this point in the history
  • Loading branch information
Hrishabh17 committed Jan 17, 2025
1 parent 6265028 commit bfac858
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/app/core/models/qbd/db/qbd-workspace.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export interface QBDWorkspace extends Workspace {
reimbursable_last_synced_at: Date | null;
ccc_last_synced_at: Date | null;
onboarding_state: QBDOnboardingState;
migrated_to_qbd_direct: boolean;
}
2 changes: 1 addition & 1 deletion src/app/integrations/landing/landing.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
Xero
</span>
</div>
<div *ngIf="exposeApps.QBD" class="landing--accounting-app tw-mt-20-px" [ngClass]="{'tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}" (click)="openInAppIntegration(InAppIntegration.QBD)">
<div *ngIf="exposeApps.QBD && showQBDIIFIntegration" class="landing--accounting-app tw-mt-20-px" [ngClass]="{'tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}" (click)="openInAppIntegration(InAppIntegration.QBD)">
<img src="assets/logos/quickbooks-logo.png" width="120px" height="60px" />
<span class="landing--accounting-app-name">
QuickBooks Desktop (IIF)
Expand Down
2 changes: 2 additions & 0 deletions src/app/integrations/landing/landing.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export class LandingComponent implements OnInit {
'orRuH2BEKRnW'
];

readonly showQBDIIFIntegration = new Date(this.org.created_at) < new Date('2025-01-17T00:00:00Z');

readonly ThemeOption = ThemeOption;

constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h5 class="tw-text-14-px tw-font-400 tw-text-slightly-normal-text-color tw-pt-2-
</div>
<div class="tw-flex tw-items-end tw-justify-end">
<div>
<button type="button" class="export-btn tw-float-right tw-flex tw-justify-end tw-items-center tw-text-white tw-text-500 tw-px-24-px tw-py-12-px tw-bg-mandatory-field-color tw-rounded-4-px" (click)="triggerExports()" [disabled]="exportInProgress" >
<button type="button" class="export-btn tw-float-right tw-flex tw-justify-end tw-items-center tw-text-white tw-text-500 tw-px-24-px tw-py-12-px tw-bg-mandatory-field-color tw-rounded-4-px" (click)="triggerExports()" [disabled]="exportInProgress || disableQBDExportButton" >
<p class="tw-flex tw-text-14-px tw-font-400 tw-pl-5px" *ngIf="!exportInProgress">Export IIF file
<app-svg-icon *ngIf="brandingFeatureConfig.isIconsInsideButtonAllowed" [svgSource]="'arrow-tail-right-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="'tw-pl-10-px tw-pt-2-px !tw-text-12-px'"></app-svg-icon>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { IntegrationsToastService } from 'src/app/core/services/common/integrati
import { TrackingService } from 'src/app/core/services/integration/tracking.service';
import { brandingConfig, brandingFeatureConfig } from 'src/app/branding/branding-config';
import { AccountingExportModel } from 'src/app/core/models/db/accounting-export.model';
import { StorageService } from 'src/app/core/services/common/storage.service';

@Component({
selector: 'app-qbd-dashboard',
Expand Down Expand Up @@ -69,12 +70,15 @@ export class QbdDashboardComponent implements OnInit {

hideCalendar: boolean;

disableQBDExportButton: boolean = false;

constructor(
private iifLogsService: QbdIifLogsService,
@Inject(FormBuilder) private formBuilder: FormBuilder,
private advancedSettingService: QbdAdvancedSettingService,
private toastService: IntegrationsToastService,
private trackingService: TrackingService
private trackingService: TrackingService,
private storageService: StorageService
) { }

showCalendar(event: Event) {
Expand Down Expand Up @@ -226,6 +230,7 @@ export class QbdDashboardComponent implements OnInit {

setUpDashboard(): void {
this.isLoading = true;
this.disableQBDExportButton = this.storageService.get('disableQBDExportButton');
this.exportLogForm = this.formBuilder.group({
searchOption: [''],
dateRange: [null],
Expand Down
1 change: 1 addition & 0 deletions src/app/integrations/qbd/qbd.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class QbdComponent implements OnInit {
this.workspace = workspace;
this.storageService.set('workspaceId', this.workspace.id);
this.storageService.set('QBDOnboardingState', this.workspace.onboarding_state);
this.storageService.set('disableQBDExportButton', this.workspace.migrated_to_qbd_direct)

Check failure on line 69 in src/app/integrations/qbd/qbd.component.ts

View workflow job for this annotation

GitHub Actions / lint

Missing semicolon
this.workspaceService.syncFyleDimensions().subscribe();
this.isLoading = false;
this.navigate();
Expand Down

0 comments on commit bfac858

Please sign in to comment.