Skip to content

Commit 8dabbeb

Browse files
authored
feat: Expose QBD connector app conditionally (#1100)
* feat: Expose QBD connector app conditionally * fix test
1 parent 15d7163 commit 8dabbeb

File tree

7 files changed

+19
-5
lines changed

7 files changed

+19
-5
lines changed

src/app/branding/expose-app-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const exposeAppConfig: AllowedAppsConfiguration = {
3636
NETSUITE: true,
3737
QBD: true,
3838
BAMBOO: true,
39-
QBD_DIRECT: false
39+
QBD_DIRECT: true
4040
}
4141
},
4242
co: {

src/app/core/models/enum/enum.model.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export enum InAppIntegration {
3838
SAGE300 = 'Sage 300 CRE',
3939
BUSINESS_CENTRAL = 'Dynamics 365 Business Central',
4040
NETSUITE = 'NetSuite',
41-
XERO = 'Xero'
41+
XERO = 'Xero',
42+
QBD_DIRECT = 'QuickBooks Connector'
4243
}
4344

4445
export enum ToastSeverity {

src/app/core/models/integrations/integrations.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export type InAppIntegrationUrlMap = {
3131
[InAppIntegration.BUSINESS_CENTRAL]: string,
3232
[InAppIntegration.NETSUITE]: string,
3333
[InAppIntegration.XERO]: string
34+
[InAppIntegration.QBD_DIRECT]: string
3435
}
3536

3637
export type AppUrlMap = {

src/app/core/models/org/org.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type Org = {
1010
is_sendgrid_connected: boolean;
1111
allow_travelperk: boolean;
1212
allow_dynamics: boolean;
13+
allow_qbd_direct_integration: boolean;
1314
created_at: Date;
1415
updated_at: Date;
1516
}

src/app/core/services/org/org.fixture.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export const orgMockData: Org = {
1313
allow_travelperk: true,
1414
created_at: new Date(),
1515
updated_at: new Date(),
16-
allow_dynamics: true
16+
allow_dynamics: true,
17+
allow_qbd_direct_integration: true
1718
};
1819

1920
export const generateTokenData = {

src/app/integrations/landing/landing.component.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,21 @@
4040
NetSuite
4141
</span>
4242
</div>
43-
<div *ngIf="exposeApps.QBD" class="landing--accounting-app tw-mr-20-px tw-mt-20-px" [ngClass]="{'tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}" (click)="openInAppIntegration(InAppIntegration.QBD)">
43+
<!-- IIF -->
44+
<div *ngIf="!(exposeApps.QBD_DIRECT && org.allow_qbd_direct_integration) && exposeApps.QBD" class="landing--accounting-app tw-mr-20-px tw-mt-20-px" [ngClass]="{'tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}" (click)="openInAppIntegration(InAppIntegration.QBD)">
4445
<img src="assets/logos/quickbooks-logo.png" class="tw-mt-[-20px]" width="120px" height="60px" />
4546
<span class="landing--accounting-app-name">
4647
QuickBooks Desktop
4748
</span>
4849
</div>
50+
<!-- Direct -->
51+
<div *ngIf="exposeApps.QBD_DIRECT && org.allow_qbd_direct_integration" class="landing--accounting-app tw-mr-20-px tw-mt-20-px" [ngClass]="{'tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}" (click)="openInAppIntegration(InAppIntegration.QBD_DIRECT)">
52+
<img src="assets/logos/quickbooks-logo.png" class="tw-mt-[-20px]" width="120px" height="60px" />
53+
<span class="landing--accounting-app-name tw-gap-2 tw-px-4 tw-flex tw-items-center">
54+
QuickBooks Desktop
55+
<app-badge [theme]="ThemeOption.DARK" text="Beta"></app-badge>
56+
</span>
57+
</div>
4958
</div>
5059
<div>
5160
<div *ngIf="exposeApps.INTACCT" class="landing--accounting-app tw-mr-20-px" [ngClass]="{'tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}" (click)="openAccountingIntegrationApp(AccountingIntegrationApp.SAGE_INTACCT)">

src/app/integrations/landing/landing.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export class LandingComponent implements OnInit {
6666
[InAppIntegration.SAGE300]: '/integrations/sage300',
6767
[InAppIntegration.BUSINESS_CENTRAL]: '/integrations/business_central',
6868
[InAppIntegration.NETSUITE]: '/integrations/netsuite',
69-
[InAppIntegration.XERO]: '/integrations/xero'
69+
[InAppIntegration.XERO]: '/integrations/xero',
70+
[InAppIntegration.QBD_DIRECT]: '/integrations/qbd_direct'
7071
};
7172

7273
readonly brandingConfig = brandingConfig;

0 commit comments

Comments
 (0)