Skip to content

Commit

Permalink
Merge branch 'c1-bg' into design-tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 committed Feb 6, 2024
2 parents 6ebd532 + b16430a commit 38f4f46
Show file tree
Hide file tree
Showing 183 changed files with 395 additions and 298 deletions.
4 changes: 2 additions & 2 deletions src/app/core/models/db/accounting-export.model.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SnakeCaseToSpaceCasePipe } from "src/app/shared/pipes/snake-case-to-space-case.pipe";
import { AccountingExportStatus, AccountingExportType, FundSource, FyleReferenceType } from "../enum/enum.model";
import { ExpenseGroupDescription, SkipExportList, SkipExportLog } from "../si/db/expense-group.model";
import { Expense } from "../si/db/expense.model";
import { ExpenseGroupDescription, SkipExportList, SkipExportLog } from "../intacct/db/expense-group.model";
import { Expense } from "../intacct/db/expense.model";
import { TitleCasePipe } from "@angular/common";
import { ExportLogService } from "../../services/common/export-log.service";
import { DateFilter } from "../qbd/misc/date-filter.model";
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/models/db/expense-group.model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Expense } from "../si/db/expense.model";
import { Expense } from "../intacct/db/expense.model";
import { PaginatedResponse } from "./paginated-response.model";

export type ExpenseGroupDescription = {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export type ExportSettingConfiguration = {
employee_field_mapping: string,
auto_map_employees: string,
reimbursable_expenses_object: IntacctReimbursableExpensesObject | null,
corporate_credit_card_expenses_object: CorporateCreditCardExpensesObject | null
corporate_credit_card_expenses_object: CorporateCreditCardExpensesObject | null,
use_merchant_in_journal_line: boolean
}

export type ExportSettingGeneralMapping = {
Expand Down Expand Up @@ -79,7 +80,8 @@ export type ExportSettingOptionSearch = {
reimbursable_expenses_object: getValueOrDefault(exportSettingsForm.get('reimbursableExportType')),
corporate_credit_card_expenses_object: cccExportType,
employee_field_mapping: exportSettingsForm.get('employeeFieldMapping')?.value ? exportSettingsForm.get('employeeFieldMapping')?.value.toUpperCase() : null,
auto_map_employees: getValueOrDefault(exportSettingsForm.get('autoMapEmployees'))
auto_map_employees: getValueOrDefault(exportSettingsForm.get('autoMapEmployees')),
use_merchant_in_journal_line: exportSettingsForm.get('useMerchantInJournalLine')?.value
},
general_mappings: {
default_gl_account: exportSettingsForm.get('glAccount')?.value?.value ? {id: exportSettingsForm.get('glAccount')?.value.destination_id, name: exportSettingsForm.get('glAccount')?.value.value} : emptyDestinationAttribute,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { brandingFeatureConfig } from "src/app/branding/branding-config";
import { IntacctOnboardingState } from "../../enum/enum.model";
import { OnboardingStepper } from "../../misc/onboarding-stepper.model";

type IntacctOnboardingStepperMap = {
[IntacctOnboardingState.CONNECTION]: number,
[IntacctOnboardingState.LOCATION_ENTITY]: number,
[IntacctOnboardingState.EXPORT_SETTINGS]: number,
[IntacctOnboardingState.IMPORT_SETTINGS]: number,
[IntacctOnboardingState.ADVANCED_CONFIGURATION]: number,
[IntacctOnboardingState.COMPLETE]: number,
}

export class IntacctOnboardingModel {
private onboardingSteps: OnboardingStepper[] = [
{
active: false,
completed: false,
step: 'Connect to Sage Intacct',
icon: 'link-vertical-medium',
route: '/integrations/intacct/onboarding/connector',
styleClasses: ['step-name-connector--text']
},
{
active: false,
completed: false,
step: 'Export Settings',
icon: 'arrow-tail-up-medium',
route: '/integrations/intacct/onboarding/export_settings',
styleClasses: ['step-name-export--text']
},
{
active: false,
completed: false,
step: 'Import Settings',
icon: 'arrow-tail-down-medium',
route: '/integrations/intacct/onboarding/import_settings',
styleClasses: ['step-name-export--text']
},
{
active: false,
completed: false,
step: 'Advanced Settings',
icon: 'gear-medium',
route: '/integrations/intacct/onboarding/advanced_settings',
styleClasses: ['step-name-advanced--text']
}
];

private readonly onboardingStateStepMap: IntacctOnboardingStepperMap = {
[IntacctOnboardingState.CONNECTION]: 1,
[IntacctOnboardingState.LOCATION_ENTITY]: 2,
[IntacctOnboardingState.EXPORT_SETTINGS]: 3,
[IntacctOnboardingState.IMPORT_SETTINGS]: 4,
[IntacctOnboardingState.ADVANCED_CONFIGURATION]: 5,
[IntacctOnboardingState.COMPLETE]: 6
};

getOnboardingSteps(currentStep: string, onboardingState: IntacctOnboardingState): OnboardingStepper[] {
this.onboardingSteps.forEach(step => {
if (step.step.toLowerCase() === currentStep.toLowerCase()) {
step.active = true;
} else {
step.active = false;
}
});

for (let index = this.onboardingStateStepMap[onboardingState] - 1; index > 0; index--) {
this.onboardingSteps[index - 1].completed = true;
}

if (!brandingFeatureConfig.featureFlags.mapEmployees) {
this.onboardingSteps.splice(1, 1);
}

return this.onboardingSteps;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConditionField, JoinOption, Operator } from "../si-configuration/advanced-settings.model";
import { ConditionField, JoinOption, Operator } from "../intacct-configuration/advanced-settings.model";


export type SkipExport = {
Expand Down
6 changes: 3 additions & 3 deletions src/app/core/models/misc/tracking.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { QBDFieldMappingGet } from "../qbd/qbd-configuration/field-mapping.model
import { Sage300AdvancedSettingGet } from "../sage300/sage300-configuration/sage300-advanced-settings.model";
import { Sage300ExportSettingGet } from "../sage300/sage300-configuration/sage300-export-setting.model";
import { Sage300ImportSettingGet } from "../sage300/sage300-configuration/sage300-import-settings.model";
import { AdvancedSettingsGet } from "../si/si-configuration/advanced-settings.model";
import { ExportSettingGet } from "../si/si-configuration/export-settings.model";
import { ImportSettingGet, ImportSettings } from "../si/si-configuration/import-settings.model";
import { AdvancedSettingsGet } from "../intacct/intacct-configuration/advanced-settings.model";
import { ExportSettingGet } from "../intacct/intacct-configuration/export-settings.model";
import { ImportSettingGet, ImportSettings } from "../intacct/intacct-configuration/import-settings.model";

export type UpdateEventAdditionalProperty = {
phase: ProgressPhase,
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/export-log.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ApiService } from './api.service';
import { UserService } from '../misc/user.service';
import { WorkspaceService } from './workspace.service';
import { environment } from 'src/environments/environment';
import { SkipExportLogResponse } from '../../models/si/db/expense-group.model';
import { SkipExportLogResponse } from '../../models/intacct/db/expense-group.model';
import { FyleReferenceType, TaskLogState } from '../../models/enum/enum.model';
import { Observable } from 'rxjs';
import { AccountingExport } from '../../models/db/accounting-export.model';
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/integration/appcues.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { UserService } from '../misc/user.service';
import { AppName } from '../../models/enum/enum.model';
import { SiWorkspaceService } from '../si/si-core/si-workspace.service';
import { MinimalUser } from '../../models/db/user.model';
import { IntacctWorkspace } from '../../models/si/db/workspaces.model';
import { IntacctWorkspace } from '../../models/intacct/db/workspaces.model';

@Injectable({
providedIn: 'root'
Expand Down
8 changes: 4 additions & 4 deletions src/app/core/services/integration/tracking.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { MappingAlphabeticalFilterAdditionalProperty, ResolveMappingErrorPropert
import { QBDAdvancedSettingsPost } from '../../models/qbd/qbd-configuration/advanced-setting.model';
import { QBDExportSettingPost } from '../../models/qbd/qbd-configuration/export-setting.model';
import { QBDFieldMappingPost } from '../../models/qbd/qbd-configuration/field-mapping.model';
import { LocationEntityPost } from '../../models/si/si-configuration/connector.model';
import { ExportSettingPost } from '../../models/si/si-configuration/export-settings.model';
import { ImportSettingPost } from '../../models/si/si-configuration/import-settings.model';
import { AdvancedSettingsPost } from '../../models/si/si-configuration/advanced-settings.model';
import { LocationEntityPost } from '../../models/intacct/intacct-configuration/connector.model';
import { ExportSettingPost } from '../../models/intacct/intacct-configuration/export-settings.model';
import { ImportSettingPost } from '../../models/intacct/intacct-configuration/import-settings.model';
import { AdvancedSettingsPost } from '../../models/intacct/intacct-configuration/advanced-settings.model';
import { Sage300ExportSettingPost } from '../../models/sage300/sage300-configuration/sage300-export-setting.model';
import { Sage300ImportSettingPost } from '../../models/sage300/sage300-configuration/sage300-import-settings.model';
import { Sage300AdvancedSettingPost } from '../../models/sage300/sage300-configuration/sage300-advanced-settings.model';
Expand Down
4 changes: 2 additions & 2 deletions src/app/core/services/si/export-log/export-log.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { UserService } from '../../misc/user.service';
import { SiWorkspaceService } from '../si-core/si-workspace.service';
import { FyleReferenceType, TaskLogState } from 'src/app/core/models/enum/enum.model';
import { SelectedDateFilter } from 'src/app/core/models/qbd/misc/date-filter.model';
import { ExpenseGroup, ExpenseGroupDescription, ExpenseGroupResponse, SkipExportLogResponse } from 'src/app/core/models/si/db/expense-group.model';
import { ExpenseGroup, ExpenseGroupDescription, ExpenseGroupResponse, SkipExportLogResponse } from 'src/app/core/models/intacct/db/expense-group.model';
import { ExpenseGroupSetting } from 'src/app/core/models/db/expense-group-setting.model';
import { Expense } from 'src/app/core/models/si/db/expense.model';
import { Expense } from 'src/app/core/models/intacct/db/expense.model';
import { ApiService } from '../../common/api.service';

@Injectable({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { SiWorkspaceService } from '../si-core/si-workspace.service';
import { Observable } from 'rxjs';
import { AdvancedSettingsGet, AdvancedSettingsPost, ConditionField, ExpenseFilterResponse, SkipExport } from 'src/app/core/models/si/si-configuration/advanced-settings.model';
import { AdvancedSettingsGet, AdvancedSettingsPost, ConditionField, ExpenseFilterResponse, SkipExport } from 'src/app/core/models/intacct/intacct-configuration/advanced-settings.model';
import { EmailOption } from 'src/app/core/models/bamboo-hr/bamboo-hr.model';
import { StorageService } from '../../common/storage.service';
import { ApiService } from '../../common/api.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { SiWorkspaceService } from '../si-core/si-workspace.service';
import { Observable } from 'rxjs';
import { ExportSettingGet, ExportSettingPost } from 'src/app/core/models/si/si-configuration/export-settings.model';
import { ExportSettingGet, ExportSettingPost } from 'src/app/core/models/intacct/intacct-configuration/export-settings.model';
import { ApiService } from '../../common/api.service';

@Injectable({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { SiWorkspaceService } from '../si-core/si-workspace.service';
import { Observable } from 'rxjs';
import { ImportSettingGet, ImportSettingPost, MappingSetting } from 'src/app/core/models/si/si-configuration/import-settings.model';
import { ImportSettingGet, ImportSettingPost, MappingSetting } from 'src/app/core/models/intacct/intacct-configuration/import-settings.model';
import { ApiService } from '../../common/api.service';


Expand Down
8 changes: 4 additions & 4 deletions src/app/core/services/si/si-core/dashboard.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { Injectable } from '@angular/core';
import { firstValueFrom, from, Observable } from 'rxjs';
import { Cacheable } from 'ts-cacheable';
import { SiWorkspaceService } from './si-workspace.service';
import { LastExport } from 'src/app/core/models/si/db/last-export.model';
import { LastExport } from 'src/app/core/models/intacct/db/last-export.model';
import { TaskLogState, TaskLogType } from 'src/app/core/models/enum/enum.model';
import { TaskGetParams, TaskResponse } from 'src/app/core/models/si/db/task-log.model';
import { Error } from 'src/app/core/models/si/db/error.model';
import { ExportableExpenseGroup } from 'src/app/core/models/si/db/expense-group.model';
import { TaskGetParams, TaskResponse } from 'src/app/core/models/intacct/db/task-log.model';
import { Error } from 'src/app/core/models/intacct/db/error.model';
import { ExportableExpenseGroup } from 'src/app/core/models/intacct/db/expense-group.model';
import { ApiService } from '../../common/api.service';

@Injectable({
Expand Down
4 changes: 2 additions & 2 deletions src/app/core/services/si/si-core/intacct-connector.service.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { LocationEntityMapping } from 'src/app/core/models/si/db/location-entity-mapping.model';
import { LocationEntityMapping } from 'src/app/core/models/intacct/db/location-entity-mapping.model';
import { DestinationAttribute } from 'src/app/core/models/db/destination-attribute.model';
import { SiWorkspaceService } from './si-workspace.service';
import { StorageService } from '../../common/storage.service';
import { Cacheable, CacheBuster, globalCacheBusterNotifier } from 'ts-cacheable';
import { SageIntacctCredential } from 'src/app/core/models/si/db/sage-credentials.model';
import { SageIntacctCredential } from 'src/app/core/models/intacct/db/sage-credentials.model';
import { ApiService } from '../../common/api.service';


Expand Down
18 changes: 9 additions & 9 deletions src/app/core/services/si/si-core/si-mappings.service.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Injectable } from '@angular/core';
import { Observable, from } from 'rxjs';
import { SiWorkspaceService } from './si-workspace.service';
import { ExpenseField } from 'src/app/core/models/si/db/expense-field.model';
import { ExpenseField } from 'src/app/core/models/intacct/db/expense-field.model';
import { Configuration } from 'src/app/core/models/db/configuration.model';
import { MappingSetting, MappingSettingResponse } from 'src/app/core/models/si/db/mapping-setting.model';
import { CategoryMappingsResponse } from 'src/app/core/models/si/db/category-mapping-response.model';
import { EmployeeMapping, EmployeeMappingPost, EmployeeMappingsResponse } from 'src/app/core/models/si/db/employee-mapping.model';
import { MappingSource } from 'src/app/core/models/si/db/mapping-source.model';
import { MappingIntacct, MappingPost, MappingStats } from 'src/app/core/models/si/db/mapping.model';
import { MappingSetting, MappingSettingResponse } from 'src/app/core/models/intacct/db/mapping-setting.model';
import { CategoryMappingsResponse } from 'src/app/core/models/intacct/db/category-mapping-response.model';
import { EmployeeMapping, EmployeeMappingPost, EmployeeMappingsResponse } from 'src/app/core/models/intacct/db/employee-mapping.model';
import { MappingSource } from 'src/app/core/models/intacct/db/mapping-source.model';
import { MappingIntacct, MappingPost, MappingStats } from 'src/app/core/models/intacct/db/mapping.model';
import { MappingState } from 'src/app/core/models/enum/enum.model';
import { CategoryMapping, CategoryMappingPost } from 'src/app/core/models/si/db/category-mapping.model';
import { ExtendedExpenseAttributeResponse } from 'src/app/core/models/si/db/expense-attribute.model';
import { GroupedDestinationAttribute, IntacctDestinationAttribute, PaginatedintacctDestinationAttribute } from 'src/app/core/models/si/db/destination-attribute.model';
import { CategoryMapping, CategoryMappingPost } from 'src/app/core/models/intacct/db/category-mapping.model';
import { ExtendedExpenseAttributeResponse } from 'src/app/core/models/intacct/db/expense-attribute.model';
import { GroupedDestinationAttribute, IntacctDestinationAttribute, PaginatedintacctDestinationAttribute } from 'src/app/core/models/intacct/db/destination-attribute.model';
import { ApiService } from '../../common/api.service';

@Injectable({
Expand Down
4 changes: 2 additions & 2 deletions src/app/core/services/si/si-core/si-workspace.service.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { IntacctOnboardingState } from 'src/app/core/models/enum/enum.model';
import { IntacctWorkspace } from 'src/app/core/models/si/db/workspaces.model';
import { IntacctWorkspace } from 'src/app/core/models/intacct/db/workspaces.model';
import { Cacheable } from 'ts-cacheable';
import { StorageService } from '../../common/storage.service';
import { Configuration } from 'src/app/core/models/si/db/configuration.model';
import { Configuration } from 'src/app/core/models/intacct/db/configuration.model';
import { HelperService } from '../../common/helper.service';
import { ApiService } from '../../common/api.service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AccountingExport, AccountingExportList, AccountingExportModel } from 's
import { AccountingExportStatus, AccountingExportType, AppName, BusinessCentralExportType, PaginatorPage, TrackingApp } from 'src/app/core/models/enum/enum.model';
import { Paginator } from 'src/app/core/models/misc/paginator.model';
import { DateFilter, SelectedDateFilter } from 'src/app/core/models/qbd/misc/date-filter.model';
import { Expense } from 'src/app/core/models/si/db/expense.model';
import { Expense } from 'src/app/core/models/intacct/db/expense.model';
import { AccountingExportService } from 'src/app/core/services/common/accounting-export.service';
import { ExportLogService } from 'src/app/core/services/common/export-log.service';
import { PaginatorService } from 'src/app/core/services/common/paginator.service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AccountingExportModel, SkippedAccountingExportModel } from 'src/app/cor
import { PaginatorPage, TrackingApp } from 'src/app/core/models/enum/enum.model';
import { Paginator } from 'src/app/core/models/misc/paginator.model';
import { DateFilter, SelectedDateFilter } from 'src/app/core/models/qbd/misc/date-filter.model';
import { SkipExportList, SkipExportLog, SkipExportLogResponse } from 'src/app/core/models/si/db/expense-group.model';
import { SkipExportList, SkipExportLog, SkipExportLogResponse } from 'src/app/core/models/intacct/db/expense-group.model';
import { ExportLogService } from 'src/app/core/services/common/export-log.service';
import { PaginatorService } from 'src/app/core/services/common/paginator.service';
import { TrackingService } from 'src/app/core/services/integration/tracking.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<app-intacct-stepper [currentStep]="'Connect to Sage Intacct'"></app-intacct-stepper>
<app-onboarding-steppers [onboardingSteps]="onboardingSteps"></app-onboarding-steppers>
<app-intacct-connector (setupConnectionStatus)="setupConnectionStatus($event)" *ngIf="!isIntacctConnected"></app-intacct-connector>
<app-intacct-location-entity *ngIf="isIntacctConnected"></app-intacct-location-entity>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Component, OnInit } from '@angular/core';
import { IntacctOnboardingModel } from 'src/app/core/models/intacct/intacct-configuration/intacct-onboarding.model';
import { OnboardingStepper } from 'src/app/core/models/misc/onboarding-stepper.model';
import { WorkspaceService } from 'src/app/core/services/common/workspace.service';

@Component({
selector: 'app-onboarding-intacct-connector',
templateUrl: './intacct-onboarding-connector.component.html',
styleUrls: ['./intacct-onboarding-connector.component.scss']
})
export class IntacctOnboardingConnectorComponent implements OnInit {

isLoading: boolean;

isIntacctConnected: boolean = false;

onboardingSteps: OnboardingStepper[] = new IntacctOnboardingModel().getOnboardingSteps('Connect to Sage Intacct', this.workspaceService.getOnboardingState());

constructor(
private workspaceService: WorkspaceService
) { }

setupConnectionStatus(eventData: boolean) {
this.isIntacctConnected = eventData;
}

ngOnInit(): void {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<app-onboarding-steppers [onboardingSteps]="onboardingSteps"></app-onboarding-steppers>
<app-intacct-export-settings></app-intacct-export-settings>
Loading

0 comments on commit 38f4f46

Please sign in to comment.