Skip to content

Commit

Permalink
C1: Fix for Sentence Cases Misses (#586)
Browse files Browse the repository at this point in the history
* Fix for Sentence Cases Misses

* step name for export

* step name and memoLabel

* custom field texts

* bill/ccp date as

* sentence case pipe and stepper

* updated the key

* stepper done for first two sentence cases

* pr comment

* lint fix
  • Loading branch information
anishfyle authored Feb 21, 2024
1 parent 145f73b commit 8da584f
Show file tree
Hide file tree
Showing 18 changed files with 130 additions and 35 deletions.
39 changes: 33 additions & 6 deletions src/app/branding/branding-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ export const brandingDemoVideoLinks = demoVideoLinks[brandingConfig.brandId];
const content: ContentConfiguration = {
fyle: {
configuration: {
connector: {
stepName: 'Connect to Quickbooks Online'
},
employeeSetting: {
stepName: 'Map Employees'
},
exportSetting: {
stepName: 'Export Settings',
headerText: 'Export Corporate Card Expenses',
Expand All @@ -211,7 +217,8 @@ const content: ContentConfiguration = {
sectionLabel: '',
subLabel: '',
exportSubLabel: '',
defaultCCCAccountLabel: '',
defaultCCCAccountLabel: 'Set Default Credit Card Account as',
defaultDebitCardAccountLabel: 'Set Default Debit Card Account as',
defaultCCCVendorLabel: 'Set default corporate Card Vendor as',
accountsPayableLabel: 'To which Accounts Payable account should the ',
accountsPayableSubLabel: ' to the selected Accounts Payable Account.',
Expand Down Expand Up @@ -243,7 +250,8 @@ const content: ContentConfiguration = {
singleCreditLineJELabel: 'Create a single itemized offset credit entry for Journal',
singleCreditLineJESubLabel: 'Merge all Credits in a Journal to create a single entry.',
billPaymentAccountLabel: 'To which Payment account should the payment entries be posted?',
billPaymentAccountSubLabel: ', the payment entries will be posted to the selected Payment account in '
billPaymentAccountSubLabel: ', the payment entries will be posted to the selected Payment account in ',
memoStructureLabel: 'Set the line item-level Description Field in QuickBooks Online'
},
done: {
ctaText: 'Launch Integration',
Expand Down Expand Up @@ -288,11 +296,22 @@ const content: ContentConfiguration = {
viewExpenseText: 'View Expense',
corporateCard: 'Corporate Card',
errors: 'Errors',
autoMap: 'Auto Map'
autoMap: 'Auto Map',
customField: 'Add new Custom Field',
customFieldName: 'Field Name',
customFieldPlaceholderName: 'Placeholder Name',
customFieldType: 'Field Type',
customFieldCreateandSave: 'Create and save'
}
},
co: {
configuration: {
connector: {
stepName: 'Connect to Quickbooks Online'
},
employeeSetting: {
stepName: 'Map employees'
},
exportSetting: {
stepName: 'Export settings',
headerText: 'Export corporate card expenses',
Expand All @@ -301,7 +320,8 @@ const content: ContentConfiguration = {
sectionLabel: '',
subLabel: '',
exportSubLabel: '',
defaultCCCAccountLabel: '',
defaultCCCAccountLabel: 'Set default credit card account as',
defaultDebitCardAccountLabel: 'Set default debit card account as',
defaultCCCVendorLabel: 'Set default corporate card vendor as',
accountsPayableLabel: 'To which accounts payable account should the ',
accountsPayableSubLabel: ' to the selected accounts payable Account.',
Expand Down Expand Up @@ -333,7 +353,8 @@ const content: ContentConfiguration = {
singleCreditLineJELabel: 'Create a single itemized offset credit entry for journal',
singleCreditLineJESubLabel: 'Merge all credits in a journal to create a single entry.',
billPaymentAccountLabel: 'To which payment account should the payment entries be posted?',
billPaymentAccountSubLabel: ', the payment entries will be posted to the selected payment account in '
billPaymentAccountSubLabel: ', the payment entries will be posted to the selected payment account in ',
memoStructureLabel: 'Set the line item-level description field in QuickBooks Online'
},
done: {
ctaText: 'Launch integration',
Expand Down Expand Up @@ -378,7 +399,13 @@ const content: ContentConfiguration = {
viewExpenseText: 'View expense',
corporateCard: 'Corporate card',
errors: 'errors',
autoMap: 'Auto map'
autoMap: 'Auto map',
customField: 'Add new custom field',
customFieldName: 'Field name',
customFieldPlaceholderName: 'Placeholder name',
customFieldType: 'Field type',
customFieldCreateandSave: 'Create and save'

}
}
};
Expand Down
13 changes: 13 additions & 0 deletions src/app/core/models/branding/content-configuration.model.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
export type ContentConfiguration = {
[brandingId: string]: {
configuration: {
connector: {
stepName: string;
},
employeeSetting: {
stepName: string;
},
exportSetting: {
stepName: string;
headerText: string;
Expand All @@ -10,6 +16,7 @@ export type ContentConfiguration = {
subLabel: string;
exportSubLabel: string;
defaultCCCAccountLabel: string;
defaultDebitCardAccountLabel: string;
defaultCCCVendorLabel: string;
accountsPayableLabel: string;
accountsPayableSubLabel: string;
Expand Down Expand Up @@ -42,6 +49,7 @@ export type ContentConfiguration = {
singleCreditLineJESubLabel: string;
billPaymentAccountLabel: string;
billPaymentAccountSubLabel: string;
memoStructureLabel: string;
},
done: {
ctaText: string;
Expand Down Expand Up @@ -87,6 +95,11 @@ export type ContentConfiguration = {
corporateCard: string;
errors: string;
autoMap: string;
customField: string;
customFieldName: string;
customFieldPlaceholderName: string;
customFieldType: string;
customFieldCreateandSave: string;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { brandingFeatureConfig } from "src/app/branding/branding-config";
import { brandingContent, brandingFeatureConfig } from "src/app/branding/branding-config";
import { QBOOnboardingState } from "../../enum/enum.model";
import { OnboardingStepper } from "../../misc/onboarding-stepper.model";

Expand All @@ -13,43 +13,45 @@ type QBOOnboardingStepperMap = {
}

export class QBOOnboardingModel {
brandingContent = brandingContent.configuration;

private onboardingSteps: OnboardingStepper[] = [
{
active: false,
completed: false,
step: 'Connect to QuickBooks Online',
step: brandingContent.configuration.connector.stepName,
icon: 'link-vertical-medium',
route: '/integrations/qbo/onboarding/connector',
styleClasses: ['step-name-connector--text']
},
{
active: false,
completed: false,
step: 'Map Employees',
step: brandingContent.configuration.employeeSetting.stepName,
icon: 'mapping-medium',
route: '/integrations/qbo/onboarding/employee_settings',
styleClasses: ['step-name-export--text']
},
{
active: false,
completed: false,
step: 'Export Settings',
step: brandingContent.configuration.exportSetting.stepName,
icon: 'arrow-tail-up-medium',
route: '/integrations/qbo/onboarding/export_settings',
styleClasses: ['step-name-export--text']
},
{
active: false,
completed: false,
step: 'Import Settings',
step: brandingContent.configuration.importSetting.stepName,
icon: 'arrow-tail-down-medium',
route: '/integrations/qbo/onboarding/import_settings',
styleClasses: ['step-name-export--text']
},
{
active: false,
completed: false,
step: 'Advanced Settings',
step: brandingContent.configuration.advancedSettings.stepName,
icon: 'gear-medium',
route: '/integrations/qbo/onboarding/advanced_settings',
styleClasses: ['step-name-advanced--text']
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { brandingContent } from 'src/app/branding/branding-config';
import { OnboardingStepper } from 'src/app/core/models/misc/onboarding-stepper.model';
import { QBOOnboardingModel } from 'src/app/core/models/qbo/qbo-configuration/qbo-onboarding.model';
import { WorkspaceService } from 'src/app/core/services/common/workspace.service';
Expand All @@ -10,7 +11,9 @@ import { WorkspaceService } from 'src/app/core/services/common/workspace.service
})
export class QboOnboardingAdvancedSettingsComponent implements OnInit {

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps('Advanced Settings', this.workspaceService.getOnboardingState());
brandingContent = brandingContent.configuration.advancedSettings;

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps(this.brandingContent.stepName, this.workspaceService.getOnboardingState());

constructor(
private workspaceService: WorkspaceService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ConfirmEventType } from 'primeng/api';
import { Subscription } from 'rxjs';
import { brandingConfig, brandingFeatureConfig, brandingKbArticles } from 'src/app/branding/branding-config';
import { brandingConfig, brandingContent, brandingFeatureConfig, brandingKbArticles } from 'src/app/branding/branding-config';
import { BrandingConfiguration } from 'src/app/core/models/branding/branding-configuration.model';
import { CloneSettingExist } from 'src/app/core/models/common/clone-setting.model';
import { ConfigurationCta, ConfigurationWarningEvent, QBOOnboardingState, ToastSeverity } from 'src/app/core/models/enum/enum.model';
Expand All @@ -28,7 +28,9 @@ import { environment } from 'src/environments/environment';
})
export class QboOnboardingConnectorComponent implements OnInit, OnDestroy {

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps('Connect to QuickBooks Online', this.workspaceService.getOnboardingState());
brandingContent = brandingContent.configuration.connector;

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps(this.brandingContent.stepName, this.workspaceService.getOnboardingState());

isLoading: boolean = true;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { brandingContent } from 'src/app/branding/branding-config';
import { OnboardingStepper } from 'src/app/core/models/misc/onboarding-stepper.model';
import { QBOOnboardingModel } from 'src/app/core/models/qbo/qbo-configuration/qbo-onboarding.model';
import { WorkspaceService } from 'src/app/core/services/common/workspace.service';
Expand All @@ -10,7 +11,9 @@ import { WorkspaceService } from 'src/app/core/services/common/workspace.service
})
export class QboOnboardingEmployeeSettingsComponent implements OnInit {

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps('Map Employees', this.workspaceService.getOnboardingState());
brandingContent = brandingContent.configuration.employeeSetting;

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps(this.brandingContent.stepName, this.workspaceService.getOnboardingState());

constructor(
private workspaceService: WorkspaceService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { brandingContent } from 'src/app/branding/branding-config';
import { OnboardingStepper } from 'src/app/core/models/misc/onboarding-stepper.model';
import { QBOOnboardingModel } from 'src/app/core/models/qbo/qbo-configuration/qbo-onboarding.model';
import { WorkspaceService } from 'src/app/core/services/common/workspace.service';
Expand All @@ -10,7 +11,9 @@ import { WorkspaceService } from 'src/app/core/services/common/workspace.service
})
export class QboOnboardingExportSettingsComponent implements OnInit {

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps('Export Settings', this.workspaceService.getOnboardingState());
brandingContent = brandingContent.configuration.exportSetting;

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps(this.brandingContent.stepName, this.workspaceService.getOnboardingState());

constructor(
private workspaceService: WorkspaceService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { brandingContent } from 'src/app/branding/branding-config';
import { OnboardingStepper } from 'src/app/core/models/misc/onboarding-stepper.model';
import { QBOOnboardingModel } from 'src/app/core/models/qbo/qbo-configuration/qbo-onboarding.model';
import { WorkspaceService } from 'src/app/core/services/common/workspace.service';
Expand All @@ -10,7 +11,9 @@ import { WorkspaceService } from 'src/app/core/services/common/workspace.service
})
export class QboOnboardingImportSettingsComponent implements OnInit {

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps('Import Settings', this.workspaceService.getOnboardingState());
brandingContent = brandingContent.configuration.importSetting;

onboardingSteps: OnboardingStepper[] = new QBOOnboardingModel().getOnboardingSteps(this.brandingContent.stepName, this.workspaceService.getOnboardingState());

constructor(
private workspaceService: WorkspaceService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div *ngIf="!isLoading" class="configuration--contents tw-border-border-tertiary tw-mt-6" [ngClass]="{'tw-mx-120-px tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-mx-60-px tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}">
<div>
<app-configuration-step-header
[headerText]="'Advanced Settings'"
[headerText]="brandingContent.stepName"
[contentText]="'In this section, you can customize the integration based on your accounting requirements. '"
[redirectLink]="supportArticleLink"
[showSyncButton]="isOnboarding"
Expand Down Expand Up @@ -120,7 +120,7 @@
[form]="advancedSettingForm"
[isFieldMandatory]="false"
[mandatoryErrorListName]="'Item level description'"
[label]="'Set the line item-level Description Field in QuickBooks Online'"
[label]="brandingContent.memoStructureLabel"
[subLabel]="'You can choose from a list of available data points that you\'d like to export to the description field in QuickBooks Online and re-order them as per your requirement.'"
[options]="defaultMemoOptions"
[iconPath]="'list'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div *ngIf="!isLoading" class="configuration--contents tw-border-border-tertiary tw-mt-6" [ngClass]="{'tw-mx-120-px tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-mx-60-px tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}">
<div>
<app-configuration-step-header
[headerText]="'Export Settings'"
[headerText]="brandingContent.stepName"
[contentText]="'In this section, you will configure how and when expenses from ' + brandingConfig.brandName + ' can be exported to QuickBooks Online'"
[redirectLink]="redirectLink"
[showSyncButton]="isOnboarding"
Expand Down Expand Up @@ -182,7 +182,7 @@
[iconPath]="'list'"
[isFieldMandatory]="true"
[mandatoryErrorListName]="'credit card account'"
[label]="'Set Default Credit Card Account as'"
[label]="brandingContent.corporateCard.defaultCCCAccountLabel"
[subLabel]="'Post all your company corporate card transactions to a default credit card account.'"
[placeholder]="'Select Default Credit Card Account'"
[formControllerName]="'defaultCCCAccount'">
Expand All @@ -197,7 +197,7 @@
[iconPath]="'list'"
[isFieldMandatory]="true"
[mandatoryErrorListName]="'debit card account'"
[label]="'Set Default Debit Card Account as'"
[label]="brandingContent.corporateCard.defaultDebitCardAccountLabel"
[subLabel]="'Post all your company debit card transactions to a default debit card account.'"
[placeholder]="'Select Default Debit Card Account'"
[formControllerName]="'defaultDebitCardAccount'">
Expand Down Expand Up @@ -268,7 +268,7 @@
[form]="exportSettingForm"
[isFieldMandatory]="true"
[mandatoryErrorListName]="'export date'"
[label]="'Set the ' + (exportSettingForm.value.creditCardExportType | snakeCaseToSpaceCase | titlecase) + ' date as'"
[label]=" 'Set the ' + (brandingConfig.brandId === 'fyle' ? (exportSettingForm.value.creditCardExportType | snakeCaseToSpaceCase | titlecase) : (exportSettingForm.value.creditCardExportType | lowercase)) + ' date as'"
[subLabel]="'The selected date will reflect in the corporate card expenses exported to QuickBooks Online.'"
[options]="cccExpenseGroupingDateOptions"
[iconPath]="'calendar'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</div>
<div *ngIf="!isLoading" class="configuration--contents tw-border-border-tertiary tw-mt-6" [ngClass]="{'tw-mx-120-px tw-shadow-app-card': brandingConfig.brandId === 'fyle', 'tw-mx-60-px tw-shadow-shadow-level-1': brandingConfig.brandId === 'co'}">
<div>
<app-configuration-step-header [headerText]="'Import Settings'"
<app-configuration-step-header [headerText]="brandingContent.stepName"
[contentText]="'In this section, you can choose the fields required to be imported from QuickBooks Online to ' + brandingConfig.brandName + '. '"
[redirectLink]="supportArticleLink" [showSyncButton]="isOnboarding" [appName]="appName"
(refreshDimension)="refreshDimensions()">
Expand Down
Loading

0 comments on commit 8da584f

Please sign in to comment.