Skip to content

Commit

Permalink
UAT fixes 2 (#797)
Browse files Browse the repository at this point in the history
UAT fixes 2
  • Loading branch information
DhaaraniCIT authored May 15, 2024
1 parent 864e6dc commit 62e12c6
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export class DashboardExportSummarySectionComponent implements OnInit {
}

private getExpenseGroups(limit: number, offset: number, status: AccountingExportStatus, lastExportedAt?: string | null): void {
this.exportLogService.getExpenseGroups((status as unknown as TaskLogState), limit, offset, null, lastExportedAt, '', this.appName).subscribe((accountingExportResponse: ExpenseGroupResponse) => {
const dateFilter:SelectedDateFilter = {
startDate: lastExportedAt ? new Date(lastExportedAt) : new Date(),
endDate: new Date()
};
this.exportLogService.getExpenseGroups((status as unknown as TaskLogState), limit, offset, lastExportedAt ? dateFilter : null, lastExportedAt, '', this.appName).subscribe((accountingExportResponse: ExpenseGroupResponse) => {
const accountingExports: AccountingExportList[] = accountingExportResponse.results.map((accountingExport: ExpenseGroup) =>
AccountingExportModel.parseExpenseGroupAPIResponseToExportLog(accountingExport, this.org_id, this.appName)
);
Expand All @@ -69,7 +73,11 @@ export class DashboardExportSummarySectionComponent implements OnInit {
}

private getAccountingExports(limit: number, offset: number, status: AccountingExportStatus, lastExportedAt?: string | null) {
this.accountingExportService.getAccountingExports(this.accountingExportType, [status], null, limit, offset, null, lastExportedAt).subscribe(accountingExportResponse => {
const dateFilter:SelectedDateFilter = {
startDate: lastExportedAt ? new Date(lastExportedAt) : new Date(),
endDate: new Date()
};
this.accountingExportService.getAccountingExports(this.accountingExportType, [status], null, limit, offset, lastExportedAt ? dateFilter : null, lastExportedAt).subscribe(accountingExportResponse => {
const accountingExports: AccountingExportList[] = accountingExportResponse.results.map((accountingExport: AccountingExport) =>
AccountingExportModel.parseAPIResponseToExportLog(accountingExport, this.org_id)
);
Expand All @@ -80,7 +88,6 @@ export class DashboardExportSummarySectionComponent implements OnInit {
private setupAccountingExports(limit: number, offset: number, status: AccountingExportStatus) {
if (this.accountingExportSummary) {
const lastExportedAt = status === AccountingExportStatus.COMPLETE ? this.accountingExportSummary.last_exported_at : null;

if (this.exportLogVersion === 'v1') {
this.getExpenseGroups(limit, offset, status, lastExportedAt);
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p-table [value]="filteredMappings" [tableStyle]="{ 'min-width': '50rem'}">
<ng-template pTemplate="header">
<tr>
<th class="!tw-pl-40-px">{{sourceField | snakeCaseToSpaceCase | titlecase}} in {{brandingConfig.brandName}}</th>
<th>{{destinationField | snakeCaseToSpaceCase | titlecase}} in {{appName}}</th>
<th class="!tw-pl-40-px">{{helper.sentenseCaseConversion(sourceField | snakeCaseToSpaceCase | titlecase)}} in {{brandingConfig.brandName}}</th>
<th>{{helper.sentenseCaseConversion(destinationField | snakeCaseToSpaceCase | titlecase)}} in {{appName}}</th>
<th *ngIf="!isDashboardMappingResolve">Status</th>
</tr>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { TitleCasePipe } from '@angular/common';
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { Subject, debounceTime, interval } from 'rxjs';
Expand All @@ -7,9 +8,11 @@ import { ExtendedGenericMapping } from 'src/app/core/models/db/extended-generic-
import { GenericMapping, MappingClass } from 'src/app/core/models/db/generic-mapping.model';
import { MappingStats } from 'src/app/core/models/db/mapping.model';
import { AppName, IntacctCorporateCreditCardExpensesObject, FyleField, IntacctReimbursableExpensesObject, ToastSeverity } from 'src/app/core/models/enum/enum.model';
import { HelperService } from 'src/app/core/services/common/helper.service';
import { IntegrationsToastService } from 'src/app/core/services/common/integrations-toast.service';
import { MappingService } from 'src/app/core/services/common/mapping.service';
import { WorkspaceService } from 'src/app/core/services/common/workspace.service';
import { SentenceCasePipe } from 'src/app/shared/pipes/sentence-case.pipe';

@Component({
selector: 'app-generic-mapping-table',
Expand Down Expand Up @@ -67,7 +70,8 @@ export class GenericMappingTableComponent implements OnInit {
constructor(
private mappingService: MappingService,
private toastService: IntegrationsToastService,
private workspaceService: WorkspaceService
private workspaceService: WorkspaceService,
public helper: HelperService
) { }

isOverflowing(element: any, mapping: DestinationAttribute): string {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scss/tab-secondary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}

:host ::ng-deep .p-tabmenu .p-tabmenu-nav .p-tabmenuitem:not(.p-highlight) .p-menuitem-link{
@apply tw-border-b-nav-tabs-active-border tw-text-nav-tabs-inactive-text-color tw-bg-nav-tabs-active-bg #{!important};
@apply tw-border-b-nav-tabs-active-border tw-text-nav-tabs-inactive-text-color tw-bg-nav-tabs-inactive-bg #{!important};
}

:host ::ng-deep .p-tabmenu .p-tabmenu-nav {
Expand Down
1 change: 1 addition & 0 deletions src/assets/themes/co/c1dl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@
--nav-tabs-active-bg: #{$white};
--nav-tabs-active-border: var(--border-secondary);
--nav-tabs-inactive-text-color: var(--text-primary);
--nav-tabs-inactive-bg: var(--bg-disable-lighter);
--nav-tabs-border: var(--border-secondary);
--nav-tabs-hover: var(--text-primary);
--nav-tabs-hover-bg: var(--bg-tertiary);
Expand Down
2 changes: 2 additions & 0 deletions src/assets/themes/fyle/fdl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@

--nav-tabs-active-bg: transparent;

--nav-tabs-inactive-bg: transparent;

--nav-tabs-inactive-text-color: var(--text-disable);

--search-default-filled-text: var(--text-primary);
Expand Down
1 change: 1 addition & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ const componentVariables = {
// Tabs - Nav Tabs (Secondary)
'nav-tabs-active': 'var(--nav-tabs-active)',
'nav-tabs-active-bg': 'var(--nav-tabs-active-bg)',
'nav-tabs-inactive-bg': 'var(--nav-tabs-inactive-bg)',
'nav-tabs-active-border': 'var(--nav-tabs-active-border)',
'nav-tabs-border': 'var(--nav-tabs-border)',
'nav-tabs-hover': 'var(--nav-tabs-hover)',
Expand Down

0 comments on commit 62e12c6

Please sign in to comment.