Skip to content

Commit

Permalink
UAT Test fixes - 1 (#587)
Browse files Browse the repository at this point in the history
* UAT Test fixes - 1

* rm commented code
  • Loading branch information
ashwin1111 authored Feb 21, 2024
1 parent 5bcab77 commit 145f73b
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 54 deletions.
3 changes: 2 additions & 1 deletion src/app/core/models/db/accounting-export.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class AccountingExportModel {
}

static getfilteredAccountingExports(query: string, group: AccountingExportList): boolean {
query = query.toLowerCase();
query = query.toLowerCase().trim();
const employeeName = group.employee ? group.employee[0] : '';
const employeeID = group.employee ? group.employee[1] : '';
const expenseType = group.expenseType ? group.expenseType : '';
Expand Down Expand Up @@ -226,6 +226,7 @@ export class AccountingExportModel {

export class SkippedAccountingExportModel {
static getfilteredSkippedAccountingExports(query: string, group: SkipExportList): boolean {
query = query.toLowerCase().trim();
const employeeName = group.employee ? group.employee[0] : '';
const employeeID = group.employee ? group.employee[1] : '';
const expenseType = group.expenseType ? group.expenseType : '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,19 @@ export class BusinessCentralDashboardComponent implements OnInit {
CATEGORY_MAPPING: null
};
this.accountingExportSummary = responses[1];
this.failedExpenseGroupCount = res.results.filter(task => task.status === AccountingExportStatus.FAILED || task.status === AccountingExportStatus.FATAL).length;

this.exportableAccountingExportIds = res.results.filter(task => task.status === AccountingExportStatus.FAILED || task.status === AccountingExportStatus.FATAL).map(taskLog => taskLog.id);

this.isExportInProgress = false;
this.exportProgressPercentage = 0;
this.processedCount = 0;
if (this.failedExpenseGroupCount === 0) {
this.refinerService.triggerSurvey(
AppName.BUSINESS_CENTRAL, environment.refiner_survey.intacct.export_done_survery_id, RefinerSurveyType.EXPORT_DONE
);
}
});

this.failedExpenseGroupCount = res.results.filter(task => task.status === AccountingExportStatus.FAILED || task.status === AccountingExportStatus.FATAL).length;

this.exportableAccountingExportIds = res.results.filter(task => task.status === AccountingExportStatus.FAILED || task.status === AccountingExportStatus.FATAL).map(taskLog => taskLog.id);

this.isExportInProgress = false;
this.exportProgressPercentage = 0;
this.processedCount = 0;
if (this.failedExpenseGroupCount === 0) {
this.refinerService.triggerSurvey(
AppName.BUSINESS_CENTRAL, environment.refiner_survey.intacct.export_done_survery_id, RefinerSurveyType.EXPORT_DONE
);
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,14 @@ export class QboDashboardComponent implements OnInit {
CATEGORY_MAPPING: null
};
this.accountingExportSummary = AccountingExportSummaryModel.parseAPIResponseToAccountingSummary(responses[1]);
});

this.failedExpenseGroupCount = res.results.filter(task => task.status === TaskLogState.FAILED || task.status === TaskLogState.FATAL).length;
this.failedExpenseGroupCount = res.results.filter(task => task.status === TaskLogState.FAILED || task.status === TaskLogState.FATAL).length;

this.exportableAccountingExportIds = res.results.filter(task => task.status === TaskLogState.FAILED || task.status === TaskLogState.FATAL).map(taskLog => taskLog.expense_group);
this.exportableAccountingExportIds = res.results.filter(task => task.status === TaskLogState.FAILED || task.status === TaskLogState.FATAL).map(taskLog => taskLog.expense_group);

this.isExportInProgress = false;
this.exportProgressPercentage = 0;
this.processedCount = 0;
this.isExportInProgress = false;
this.exportProgressPercentage = 0;
this.processedCount = 0;
});
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ export class QboAdvancedSettingsComponent implements OnInit {
if (this.isOnboarding) {
this.workspaceService.setOnboardingState(QBOOnboardingState.COMPLETE);
this.router.navigate([`/integrations/qbo/onboarding/done`]);
} else {
this.router.navigate(['/integrations/qbo/main/dashboard']);
}
}, () => {
this.isSaveInProgress = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ export class QboEmployeeSettingsComponent implements OnInit {
this.router.navigate(['/integrations/qbo/onboarding/export_settings']);
} else if (this.exportSettingAffected()) {
this.router.navigate(['/integrations/qbo/main/configuration/export_settings']);
} else {
this.router.navigate(['/integrations/qbo/main/dashboard']);
}
}, () => {
this.isSaveInProgress = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ export class QboExportSettingsComponent implements OnInit {
this.router.navigate([`/integrations/qbo/onboarding/import_settings`]);
} else if (this.isAdvancedSettingAffected()) {
this.router.navigate(['/integrations/qbo/main/configuration/advanced_settings']);
} else {
this.router.navigate(['/integrations/qbo/main/dashboard']);
}
}, () => {
this.isSaveInProgress = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,20 @@ export class Sage300DashboardComponent implements OnInit {
CATEGORY_MAPPING: null
};
this.accountingExportSummary = responses[1];
});

this.failedExpenseGroupCount = res.results.filter(task => task.status === AccountingExportStatus.FAILED || task.status === AccountingExportStatus.FATAL).length;
this.failedExpenseGroupCount = res.results.filter(task => task.status === AccountingExportStatus.FAILED || task.status === AccountingExportStatus.FATAL).length;

this.exportableAccountingExportIds = res.results.filter(task => task.status === AccountingExportStatus.FAILED || task.status === AccountingExportStatus.FATAL).map(taskLog => taskLog.id);
this.exportableAccountingExportIds = res.results.filter(task => task.status === AccountingExportStatus.FAILED || task.status === AccountingExportStatus.FATAL).map(taskLog => taskLog.id);

this.isExportInProgress = false;
this.exportProgressPercentage = 0;
this.processedCount = 0;
this.isExportInProgress = false;
this.exportProgressPercentage = 0;
this.processedCount = 0;

if (this.failedExpenseGroupCount === 0) {
this.refinerService.triggerSurvey(
AppName.SAGE300, environment.refiner_survey.intacct.export_done_survery_id, RefinerSurveyType.EXPORT_DONE
);
}
if (this.failedExpenseGroupCount === 0) {
this.refinerService.triggerSurvey(
AppName.SAGE300, environment.refiner_survey.intacct.export_done_survery_id, RefinerSurveyType.EXPORT_DONE
);
}
});
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ <h3 class="tw-text-20-px tw-font-500 tw-text-text-primary" *ngIf="!isExportInPro
</div>
<h5 class="tw-text-14-px tw-font-400 tw-text-text-secondary tw-pt-8-px" [ngClass]="{'tw-pl-0': !brandingFeatureConfig.illustrationsAllowed, 'tw-pl-34-px': brandingFeatureConfig.illustrationsAllowed}" *ngIf="!isExportInProgress && !exportableAccountingExportIds.length && !accountingExportSummary">
No new expenses to export right now
<br>
Once expenses are {{ importStates }}, they'll automatically be available here for export
<p class="tw-pt-4-px">
Once expenses are {{ importStates }}, they'll automatically be available here for export
</p>
</h5>
<h5 class="tw-text-14-px tw-font-400 tw-text-text-secondary tw-pt-8-px" [ngClass]="{'tw-pl-0': !brandingFeatureConfig.illustrationsAllowed, 'tw-pl-34-px': brandingFeatureConfig.illustrationsAllowed}" *ngIf="isExportInProgress">This may take a few minutes...</h5>
<h5 class="tw-text-14-px tw-font-400 tw-text-text-secondary tw-pt-8-px" [ngClass]="{'tw-pl-0': !brandingFeatureConfig.illustrationsAllowed, 'tw-pl-34-px': brandingFeatureConfig.illustrationsAllowed}" *ngIf="!isExportInProgress && !exportableAccountingExportIds.length && accountingExportSummary?.successful_accounting_export_count">
No new expenses to export right now
<br>
Once expenses are {{ importStates }}, they'll automatically be available here for export
<p class="tw-pt-4-px">
Once expenses are {{ importStates }}, they'll automatically be available here for export
</p>
</h5>
<div *ngIf="!isExportInProgress && failedExpenseGroupCount !== null && failedExpenseGroupCount > 0" fxLayout="row" fxFlex="4" class="tw-text-14-px tw-font-500 tw-text-text-secondary tw-pl-34-px tw-pt-8-px tw-flex">
<div *ngIf="!isExportInProgress && failedExpenseGroupCount !== null && failedExpenseGroupCount > 0" fxLayout="row" fxFlex="4" class="tw-text-14-px tw-font-500 tw-text-text-secondary tw-pt-8-px tw-flex" [ngClass]="{'tw-pl-0': !brandingFeatureConfig.illustrationsAllowed, 'tw-pl-34-px': brandingFeatureConfig.illustrationsAllowed}">
<h5>{{ exportableAccountingExportIds.length - failedExpenseGroupCount > 0 ? exportableAccountingExportIds.length - failedExpenseGroupCount : 0 }} new expense{{(exportableAccountingExportIds.length - failedExpenseGroupCount) > 1 ? 's' : ''}}, {{ failedExpenseGroupCount }} previously failed expense{{failedExpenseGroupCount > 1 ? 's' : ''}}</h5>
</div>
<div *ngIf="!isExportInProgress && exportableAccountingExportIds.length && (failedExpenseGroupCount === null || failedExpenseGroupCount === 0)" fxLayout="row" fxFlex="4" class="tw-text-14-px tw-font-500 tw-text-text-secondary tw-pl-34-px tw-pt-8-px tw-flex">
<div *ngIf="!isExportInProgress && exportableAccountingExportIds.length && (failedExpenseGroupCount === null || failedExpenseGroupCount === 0)" fxLayout="row" fxFlex="4" class="tw-text-14-px tw-font-500 tw-text-text-secondary tw-pt-8-px tw-flex" [ngClass]="{'tw-pl-0': !brandingFeatureConfig.illustrationsAllowed, 'tw-pl-34-px': brandingFeatureConfig.illustrationsAllowed}">
<h5>{{ exportableAccountingExportIds.length }} new expense{{(exportableAccountingExportIds.length) > 1 ? 's' : ''}}, {{ 0 }} previously failed expense</h5>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,28 @@
<span class="tw-font-400 !tw-text-12-px tw-text-text-muted">{{rowData.exportedAt | date : "HH:ss"}}</span>
</td>
<td>
<h4 class="tw-text-14-px tw-font-400 tw-text-text-secondary">
<h4 class="tw-text-14-px tw-font-400 tw-text-text-secondary"
[ngClass]="{'truncate': rowData.employee[0]?.length > 16 && !isExportLogTable}"
[pTooltip]="rowData.employee[0]?.length > 16 ? rowData.employee[0] : null"
tooltipPosition="top">
{{rowData.employee[0]}}
</h4>
<h5 class="tw-font-400 !tw-text-12-px tw-text-text-muted">
<h5 class="tw-font-400 !tw-text-12-px tw-text-text-muted"
[ngClass]="{'truncate': rowData.employee[1]?.length > 16 && !isExportLogTable}"
[pTooltip]="rowData.employee[1]?.length > 16 ? rowData.employee[1] : null"
tooltipPosition="top">
{{rowData.employee[1]}}
</h5>
</td>
<td class="tw-text-text-secondary" *ngIf="isExportLogTable && brandingFeatureConfig.featureFlags.exportLog.expenseType">{{rowData.expenseType | titlecase}}</td>
<td class="tw-text-text-secondary tw-underline" (click)="openUrl(rowData.fyleUrl)">{{rowData.referenceNumber}}</td>
<td class="tw-text-text-secondary" *ngIf="!isDashboardFailed">{{rowData.exportedAs | snakeCaseToSpaceCase | titlecase}}</td>
<td class="tw-text-text-secondary" *ngIf="!isDashboardFailed">
<span [ngClass]="{'truncate-export-type': rowData.exportedAs.length > 10 && !isExportLogTable}"
[pTooltip]="rowData.exportedAs.length > 10 ? rowData.exportedAs : null"
tooltipPosition="top">
{{brandingConfig.brandId === 'co' ? (rowData.exportedAs | snakeCaseToSpaceCase) : (rowData.exportedAs | snakeCaseToSpaceCase | titlecase)}}
</span>
</td>
<td *ngIf="!isDashboardFailed">
<div>
<button (click)="openUrl(rowData.integrationUrl)" pTooltip="Open in New Tab" tooltipPosition="top">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
@apply tw-bg-lv-table-hover-bg;
}
}

.truncate {
@apply tw-w-100-px tw-whitespace-nowrap tw-overflow-hidden tw-text-ellipsis tw-block;
}

.truncate-export-type {
@apply tw-w-60-px tw-whitespace-nowrap tw-overflow-hidden tw-text-ellipsis tw-block;
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ export class GenericMappingV2Component implements OnInit {

mappingSearchFilter(searchValue: string) {
if (searchValue.length > 0) {
searchValue = searchValue.toLowerCase();
this.filteredMappings = this.filteredMappings.filter((mapping) =>
mapping.value?.toLowerCase().includes(searchValue)
);
const query = searchValue.toLowerCase().trim();
this.filteredMappings = this.mappings.filter((mapping) => mapping.value?.toLowerCase().includes(query));
} else {
this.filteredMappings = this.mappings.concat();
}
Expand Down
2 changes: 1 addition & 1 deletion src/assets/themes/co/c1dl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@

--border-date-picker-border: var(--border-primary);

--app-line-height: 1.6;
--app-line-height: 16px;

--label-text-size: 12px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/assets/themes/fyle/fdl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@

--lv-pagination-icon-disable-color: var(--icon-disable);

--app-line-height: 1.9;
--app-line-height: 19.6px;

--divider-border-color: var(--border-tertiary);

Expand Down

0 comments on commit 145f73b

Please sign in to comment.