Skip to content

Commit 791b0c7

Browse files
authored
c1: Expose Intacct (#596)
* c1: Expose Intacct * update callback url * add loggers * rm log
1 parent 7216c31 commit 791b0c7

File tree

8 files changed

+20
-31
lines changed

8 files changed

+20
-31
lines changed

run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ do
2323
sed -i $SED_EXTRA_ARGS "s?{{SEGMENT_ID}}?${SEGMENT_ID}?g" $f;
2424
sed -i $SED_EXTRA_ARGS "s?{{QBO_CALLBACK_URL}}?${QBO_CALLBACK_URL}?g" $f;
2525
sed -i $SED_EXTRA_ARGS "s?{{NS_CALLBACK_URL}}?${NS_CALLBACK_URL}?g" $f;
26-
sed -i $SED_EXTRA_ARGS "s?{{SI_CALLBACK_URL}}?${SI_CALLBACK_URL}?g" $f;
2726
sed -i $SED_EXTRA_ARGS "s?{{XERO_CALLBACK_URL}}?${XERO_CALLBACK_URL}?g" $f;
2827
sed -i $SED_EXTRA_ARGS "s?{{QBO_CLIENT_ID}}?${QBO_CLIENT_ID}?g" $f;
2928
sed -i $SED_EXTRA_ARGS "s?{{NS_CLIENT_ID}}?${NS_CLIENT_ID}?g" $f;

scripts/setup_env.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const environment = {
1616
sentry_env: `${process.env.SENTRY_ENV ? process.env.SENTRY_ENV : '{{SENTRY_ENV}}'}`,
1717
qbo_callback_url: `${process.env.QBO_CALLBACK_URL ? process.env.QBO_CALLBACK_URL : '{{QBO_CALLBACK_URL}}'}`,
1818
ns_callback_url: `${process.env.NS_CALLBACK_URL ? process.env.NS_CALLBACK_URL : '{{NS_CALLBACK_URL}}'}`,
19-
si_callback_url: `${process.env.SI_CALLBACK_URL ? process.env.SI_CALLBACK_URL : '{{SI_CALLBACK_URL}}'}`,
2019
xero_callback_url: `${process.env.XERO_CALLBACK_URL ? process.env.XERO_CALLBACK_URL : '{{XERO_CALLBACK_URL}}'}`,
2120
qbo_client_id: `${process.env.QBO_CLIENT_ID ? process.env.QBO_CLIENT_ID : '{{QBO_CLIENT_ID}}'}`,
2221
ns_client_id: `${process.env.NS_CLIENT_ID ? process.env.NS_CLIENT_ID : '{{NS_CLIENT_ID}}'}`,

src/app/branding/branding-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const featureConfigs: FeatureConfiguration = {
1212
illustrationsAllowed: true,
1313
isGradientAllowed: true,
1414
isIconsInsideButtonAllowed: true,
15-
exposeOnlyQBOApp: false,
15+
exposeC1Apps: false,
1616
isBackgroundColorAllowed: false,
1717
isAsterikAllowed: true,
1818
featureFlags: {
@@ -45,7 +45,7 @@ const featureConfigs: FeatureConfiguration = {
4545
illustrationsAllowed: false,
4646
isGradientAllowed: false,
4747
isIconsInsideButtonAllowed: false,
48-
exposeOnlyQBOApp: true,
48+
exposeC1Apps: true,
4949
isBackgroundColorAllowed: true,
5050
isAsterikAllowed: false,
5151
featureFlags: {

src/app/core/models/branding/feature-configuration.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export type FeatureConfiguration = {
33
illustrationsAllowed: boolean;
44
isGradientAllowed: boolean;
55
isIconsInsideButtonAllowed: boolean;
6-
exposeOnlyQBOApp: boolean;
6+
exposeC1Apps: boolean;
77
isBackgroundColorAllowed: boolean;
88
isAsterikAllowed: boolean;
99
featureFlags: {

src/app/core/services/common/events.service.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import { WorkatoConnectionStatus } from '../../models/travelperk/travelperk.mode
44
import { WindowService } from './window.service';
55
import { NavigationStart, Router } from '@angular/router';
66
import { Location } from '@angular/common';
7-
import { brandingFeatureConfig } from 'src/app/branding/branding-config';
87

9-
export const EXPOSE_INTACCT_NEW_APP = true;
8+
109
const MODULE_PATHS = ['mapping', 'export_log', 'configuration', 'intacct', 'qbd'];
1110

1211
@Injectable({
@@ -18,8 +17,6 @@ export class EventsService {
1817

1918
@Output() sageIntacctLogin: EventEmitter<string> = new EventEmitter();
2019

21-
@Output() redirectToOldIntacctApp: EventEmitter<string> = new EventEmitter();
22-
2320
@Output() qboLogin: EventEmitter<string> = new EventEmitter();
2421

2522
history: string[] = [];
@@ -52,9 +49,8 @@ export class EventsService {
5249
receiveEvent(): void {
5350
this.windowService.nativeWindow.addEventListener('message', (message) => {
5451
if (message.data && message.data.redirectUri && message.origin === environment.fyle_app_url) {
55-
if (EXPOSE_INTACCT_NEW_APP && message.data.redirectUri.includes('sage-intacct')) {
52+
if (message.data.redirectUri.includes('sage-intacct')) {
5653
this.sageIntacctLogin.emit(message.data.redirectUri);
57-
this.redirectToOldIntacctApp.emit(message.data.redirectUri);
5854
} else if (message.data.redirectUri.includes('quickbooks')) {
5955
this.qboLogin.emit(message.data.redirectUri);
6056
} else {

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="tw-text-slightly-normal-text-color">
2-
<div *ngIf="!exposeOnlyQBOApp" class="tw-flex tw-text-14-px tw-h-56-px">
2+
<div *ngIf="!exposeC1Apps" class="tw-flex tw-text-14-px tw-h-56-px">
33
<div class="tw-pl-24-px tw-pr-48-px landing--tab" (click)="switchView(IntegrationsView.ALL)">
44
All
55
<p *ngIf="integrationTabs.ALL" class="landing--active-tag"></p>
@@ -18,7 +18,7 @@
1818
</div>
1919
</div>
2020

21-
<p *ngIf="!exposeOnlyQBOApp" class="tw-mt-1-px landing--divider"></p>
21+
<p *ngIf="!exposeC1Apps" class="tw-mt-1-px landing--divider"></p>
2222

2323
<div class="tw-pt-40-px" [ngClass]="{'tw-mx-120-px': brandingConfig.brandId === 'fyle', 'tw-mx-60-px': brandingConfig.brandId === 'co'}">
2424
<div *ngIf="integrationTabs.ALL || integrationTabs.ACCOUNTING">
@@ -30,7 +30,7 @@
3030
</p>
3131

3232
<div class="tw-flex">
33-
<div *ngIf="!exposeOnlyQBOApp">
33+
<div *ngIf="!exposeC1Apps">
3434
<div 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.NETSUITE)">
3535
<img src="assets/logos/netsuite-logo.png" width="120px" height="60px" />
3636
<span class="landing--accounting-app-name">
@@ -47,14 +47,11 @@
4747
</span>
4848
</div>
4949
</div>
50-
<div *ngIf="!exposeOnlyQBOApp">
50+
<div>
5151
<div 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)">
5252
<img src="assets/logos/intacct-logo.png" width="120px" height="60px" />
5353
<span class="landing--accounting-app-name">
5454
Sage Intacct
55-
<div class="landing--accounting-app-open">
56-
<app-svg-icon *ngIf="!exposeIntacctNewApp" [svgSource]="'open-in-new-tab'" [width]="'16px'" [height]="'16px'"></app-svg-icon>
57-
</div>
5855
</span>
5956
</div>
6057
<!-- <div *ngIf="!isINCluster" 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.BUSINESS_CENTRAL)">
@@ -66,8 +63,8 @@
6663
</div>
6764
<div>
6865
<div 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.QBO)">
69-
<img src="assets/logos/quickbooks-logo.png" width="120px" />
70-
<span class="landing--accounting-app-name">
66+
<img class="tw-mt-10-px" src="assets/logos/quickbooks-logo.png" width="120px" />
67+
<span class="landing--accounting-app-name !tw-pt-30-px">
7168
QuickBooks Online
7269
</span>
7370
</div>
@@ -78,7 +75,7 @@
7875
</span>
7976
</div> -->
8077
</div>
81-
<div *ngIf="!exposeOnlyQBOApp" class="landing--accounting-app" [ngClass]="{'tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}" (click)="openAccountingIntegrationApp(AccountingIntegrationApp.XERO)">
78+
<div *ngIf="!exposeC1Apps" class="landing--accounting-app" [ngClass]="{'tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}" (click)="openAccountingIntegrationApp(AccountingIntegrationApp.XERO)">
8279
<img src="assets/logos/xero-logo.png" class="tw-mt-[-20px]" width="65px" height="60px" />
8380
<span class="landing--accounting-app-name">
8481
Xero
@@ -90,7 +87,7 @@
9087
</div>
9188
</div>
9289

93-
<div *ngIf="(integrationTabs.ALL || integrationTabs.HRMS) && !exposeOnlyQBOApp">
90+
<div *ngIf="(integrationTabs.ALL || integrationTabs.HRMS) && !exposeC1Apps">
9491
<p *ngIf="integrationTabs.ALL" class="tw-mt-1-px landing--section-divider"></p>
9592
<p class="landing--section-heading">
9693
HRMS
@@ -109,7 +106,7 @@
109106
</div>
110107
</div>
111108

112-
<div *ngIf="isTravelperkAllowed && !exposeOnlyQBOApp">
109+
<div *ngIf="isTravelperkAllowed && !exposeC1Apps">
113110
<p *ngIf="integrationTabs.ALL" class="tw-mt-1-px landing--section-divider"></p>
114111
<p class="landing--section-heading">
115112
Travel
@@ -128,7 +125,7 @@
128125
</div>
129126
</div>
130127

131-
<div *ngIf="integrationTabs.ALL && !exposeOnlyQBOApp" class="tw-pb-100-px">
128+
<div *ngIf="integrationTabs.ALL && !exposeC1Apps" class="tw-pb-100-px">
132129
<p class="tw-my-40-px landing--divider"></p>
133130

134131
<p class="landing--section-heading">

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
22
import { Router } from '@angular/router';
33
import { AccountingIntegrationApp, ClickEvent, InAppIntegration, IntegrationView, Page } from 'src/app/core/models/enum/enum.model';
44
import { AccountingIntegrationEvent, InAppIntegrationUrlMap, IntegrationCallbackUrl, IntegrationsView } from 'src/app/core/models/integrations/integrations.model';
5-
import { EXPOSE_INTACCT_NEW_APP, EventsService } from 'src/app/core/services/common/events.service';
5+
import { EventsService } from 'src/app/core/services/common/events.service';
66
import { TrackingService } from 'src/app/core/services/integration/tracking.service';
77
import { OrgService } from 'src/app/core/services/org/org.service';
88
import { environment } from 'src/environments/environment';
@@ -31,9 +31,7 @@ export class LandingComponent implements OnInit {
3131

3232
isTravelperkAllowed: boolean = this.org.allow_travelperk;
3333

34-
exposeIntacctNewApp: boolean = EXPOSE_INTACCT_NEW_APP;
35-
36-
readonly exposeOnlyQBOApp = brandingFeatureConfig.exposeOnlyQBOApp;
34+
readonly exposeC1Apps = brandingFeatureConfig.exposeC1Apps;
3735

3836
private readonly integrationTabsInitialState: IntegrationsView = {
3937
[IntegrationView.ACCOUNTING]: false,
@@ -52,7 +50,7 @@ export class LandingComponent implements OnInit {
5250
private readonly integrationCallbackUrlMap: IntegrationCallbackUrl = {
5351
[AccountingIntegrationApp.NETSUITE]: [environment.ns_callback_url, environment.ns_client_id],
5452
[AccountingIntegrationApp.QBO]: [`${environment.fyle_app_url}/quickbooks`, environment.qbo_client_id],
55-
[AccountingIntegrationApp.SAGE_INTACCT]: [environment.si_callback_url, environment.si_client_id],
53+
[AccountingIntegrationApp.SAGE_INTACCT]: [`${environment.fyle_app_url}/sage-intacct`, environment.si_client_id],
5654
[AccountingIntegrationApp.XERO]: [environment.xero_callback_url, environment.xero_client_id]
5755
};
5856

src/app/shared/components/configuration/configuration-step-header/configuration-step-header.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ <h5 class="tw-text-text-muted tw-text-14-px tw-pt-8-px !tw-font-400 tw-text-pret
2525
Sync
2626
</span>
2727
</button>
28-
<div>
29-
<span (click)="refreshDimensions()" class="p-button primary-outline tw-mr-12-px" *ngIf="showSyncButton && !brandingFeatureConfig.isIconsInsideButtonAllowed" [pTooltip]="'The integration will import all the newly updated '+ appName +' dimensions and ' + brandingConfig.brandName + ' expenses in the configured state of export'">
28+
<div *ngIf="showSyncButton && !brandingFeatureConfig.isIconsInsideButtonAllowed">
29+
<span (click)="refreshDimensions()" class="p-button primary-outline tw-mr-12-px" [pTooltip]="'The integration will import all the newly updated '+ appName +' dimensions and ' + brandingConfig.brandName + ' expenses in the configured state of export'">
3030
Sync
3131
</span>
3232
</div>

0 commit comments

Comments
 (0)