Skip to content

Commit

Permalink
QA fixes (#800)
Browse files Browse the repository at this point in the history
* QA fixes
  • Loading branch information
DhaaraniCIT authored May 16, 2024
1 parent 66bd747 commit 5057a0f
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 59 deletions.
2 changes: 1 addition & 1 deletion src/app/branding/fyle-contents-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const fyleContents = {
notes: 'NOTE: To export billable expenses from Fyle, import Customers from NetSuite as Projects in Fyle.',
toggleToastMessage: 'You have already mapped a tracking category from NetSuite to the Project field in '+ brandingConfig.brandName +'. Change the configured mapping to a new field to be able to import Customers in the Project field.',
importVendorsAsMerchantsLabel: 'Import Vendors from NetSuite',
importNetsuiteEmployeesLabel: 'Import Netsuite Employee as Employee in ' + brandingConfig.brandName,
importNetsuiteEmployeesLabel: 'Import NetSuite Employee as Employee in ' + brandingConfig.brandName,
importNetsuiteEmployeesSubLabel: 'Imported NetSuite Employee will be available as Employee in ' + brandingConfig.brandName+ '.',
customSegmentHeader: 'Add Custom Segment/List/Record',
importProjectsLabel: 'Import Projects from NetSuite',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export class NetsuiteConnectorModel {

static constructPayload(form: FormGroup): NetsuiteConnectorPost {
return {
ns_account_id: form.value.accountId,
ns_token_id: form.value.tokenId,
ns_token_secret: form.value.tokenSecret
ns_account_id: form.controls.accountId.value,
ns_token_id: form.controls.tokenId.value,
ns_token_secret: form.controls.tokenSecret.value
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class NetsuiteMainComponent implements OnInit {
this.netsuiteHelperService.refreshNetsuiteDimensions().subscribe();
this.netsuiteHelperService.refreshFyleDimensions().subscribe();
this.accountingExportService.importExpensesFromFyle('v1').subscribe();
this.toastServeice.displayToastMessage(ToastSeverity.SUCCESS, 'Syncing data dimensions from Netsuite');
this.toastServeice.displayToastMessage(ToastSeverity.SUCCESS, 'Syncing data dimensions from NetSuite');
}

private setupPage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class NetsuiteOnboardingConnectorComponent implements OnInit {

isNetsuiteConnected: boolean = false;

onboardingSteps: OnboardingStepper[] = new NetsuiteOnboardingModel().getOnboardingSteps('Connect to Netsuite', this.workspaceService.getOnboardingState());
onboardingSteps: OnboardingStepper[] = new NetsuiteOnboardingModel().getOnboardingSteps('Connect to NetSuite', this.workspaceService.getOnboardingState());

constructor(
private workspaceService: WorkspaceService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<app-landing-page-header [iconPath]="'assets/logos/netsuite-logo-onboarding.png'" [appName]="'NetSuite'" [appDescription]="'Import data from NetSuite to ' + brandingConfig.brandName + ' and Export expenses from ' + brandingConfig.brandName + ' to NetSuite. '" [isLoading]="false" [isIntegrationSetupInProgress]="false" [isIntegrationConnected]="false" [redirectLink]="redirectLink" [buttonText]="'Connect'" [postConnectionRoute]="'netsuite/onboarding/connector'"></app-landing-page-header>
</div>
<div>
<app-landing-page-body [headlineText]="brandingContent.guideHeaderText" [headerText]="'A quick guide to help you set up your Netsuite integration.'" [svgPath]="'assets/flow-charts/' + brandingConfig.brandId + '-netsuite-data-flow.svg'"></app-landing-page-body>
<app-landing-page-body [headlineText]="brandingContent.guideHeaderText" [headerText]="'A quick guide to help you set up your NetSuite integration.'" [svgPath]="'assets/flow-charts/' + brandingConfig.brandId + '-netsuite-data-flow.svg'"></app-landing-page-body>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
</div>
</div>

<div class="tw-rounded-12-px tw-border-border-tertiary tw-border tw-bg-white tw-mb-16-px">
<app-configuration-select-field *ngIf="isPaymentSyncFieldVisible() && brandingFeatureConfig.featureFlags.advancedSettings.paymentsSync"
<div class="tw-rounded-12-px tw-border-border-tertiary tw-border tw-bg-white tw-mb-16-px" *ngIf="isPaymentSyncFieldVisible() && brandingFeatureConfig.featureFlags.advancedSettings.paymentsSync">
<app-configuration-select-field
[form]="advancedSettingForm"
[options]="paymentSyncOptions"
[iconPath]="'arrow-rotate'"
Expand Down

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</div>
<div>
<app-configuration-info-label
[infoText]="'Follow the steps as shown below to access the necessary details on your Netsuite account.'">
[infoText]="'Follow the steps as shown below to access the necessary details on your NetSuite account.'">
</app-configuration-info-label>
<video controls="controls" width="800" height="600" name="sample video" class="tw-mt-16-px" loop autoplay>
<source [src]="setImagesForCustomSegment()">
Expand All @@ -59,7 +59,7 @@
</div>
<div>
<app-configuration-info-label
[infoText]="'Follow the steps as shown below to access the necessary details on your Netsuite account.'">
[infoText]="'Follow the steps as shown below to access the necessary details on your NetSuite account.'">
</app-configuration-info-label>
<img class="tw-mt-16-px" width="800" height="600" [src]="setImagesForCustomSegment()" alt="">
</div>
Expand All @@ -76,7 +76,7 @@
</div>
<div>
<app-configuration-info-label
[infoText]="'Follow the steps as shown below to access the necessary details on your Netsuite account.'">
[infoText]="'Follow the steps as shown below to access the necessary details on your NetSuite account.'">
</app-configuration-info-label>
<img width="800" height="600" class="tw-mt-16-px" [src]="setImagesForCustomSegment()" alt="">
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ export class NetsuiteCustomSegmentDialogComponent implements OnInit {

getInternalIDLabel(): string {
if (brandingConfig.brandId === 'co') {
return 'Enter ' + new SentenceCasePipe().transform(new SnakeCaseToSpaceCasePipe().transform(this.form.controls.customFieldType.value)) + ' internal ID';
return new SentenceCasePipe().transform(new SnakeCaseToSpaceCasePipe().transform('Enter ' + this.form.controls.customFieldType.value)) + ' internal ID';
}
return 'Enter ' + new TitleCasePipe().transform(new SnakeCaseToSpaceCasePipe().transform(this.form.controls.customFieldType.value)) + ' Internal ID';
}

getTransactionIdLabel(): string {
return this.brandingConfig.brandId === 'co' ? new SnakeCaseToSpaceCasePipe().transform('Enter Transaction Line Field ID') : 'Enter Transaction Line Field ID';
return this.brandingConfig.brandId === 'co' ? new SentenceCasePipe().transform('Enter Transaction Line Field') + ' ID' : 'Enter Transaction Line Field ID';
}

setImagesForCustomSegment(): string {
Expand Down
4 changes: 1 addition & 3 deletions src/app/integrations/netsuite/netsuite.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ import { CommonModule } from '@angular/common';

import { NetsuiteRoutingModule } from './netsuite-routing.module';
import { NetsuiteComponent } from './netsuite.component';
import { NetsuiteConnectorComponent } from './netsuite-shared/netsuite-connector/netsuite-connector.component';
import { SharedModule } from 'src/app/shared/shared.module';


@NgModule({
declarations: [
NetsuiteComponent,
NetsuiteConnectorComponent
NetsuiteComponent
],
imports: [
CommonModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export class NetsuiteConnectorComponent implements OnInit {

readonly brandingConfig = brandingConfig;

netsuiteCredential: NetsuiteConnectorGet | null = null;

constructor(
private router: Router,
private formBuilder: FormBuilder,
Expand All @@ -54,7 +56,6 @@ export class NetsuiteConnectorComponent implements OnInit {

save() {
const connectorPayload = NetsuiteConnectorModel.constructPayload(this.connectNetsuiteForm);

this.isLoading = true;
this.connectorService.connectNetsuite(connectorPayload).subscribe((response) => {
this.mappingsService.refreshNetsuiteDimensions(['subsidiaries']).subscribe(() => {
Expand All @@ -64,7 +65,7 @@ export class NetsuiteConnectorComponent implements OnInit {
});
}, () => {
this.setupConnectionStatus.emit(false);
this.clearField();
this.connectNetsuiteForm = NetsuiteConnectorModel.mapAPIResponseToFormGroup(this.netsuiteCredential);
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.ERROR, 'Error while connecting, please try again later.');
});
Expand All @@ -74,6 +75,7 @@ export class NetsuiteConnectorComponent implements OnInit {
this.isLoading = true;
this.isOnboarding = this.router.url.includes('onboarding');
this.connectorService.getNetsuiteCredentials().subscribe((netsuiteCredential: NetsuiteConnectorGet) => {
this.netsuiteCredential = netsuiteCredential;
this.connectNetsuiteForm = NetsuiteConnectorModel.mapAPIResponseToFormGroup(netsuiteCredential);
this.setupConnectionStatus.emit(true);
this.isLoading = false;
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/pipes/search.pipe.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('SearchPipe', () => {

it('SearchPipe Transform function check 3', () => {
const names = [{value: 'FyleIntegrations'}, {value: 'Fyle'}, {value: 'Integrations'}, {value: 'QBO'}, {value: 'fyle-integration'}];
const text = "Netsuite";
const text = "NetSuite";
const result = [{ id: null, value: 'No result found' }];
const pipe = new SearchPipe();
expect(pipe.transform(names, text)).toEqual(result);
Expand Down

0 comments on commit 5057a0f

Please sign in to comment.