Skip to content

Commit

Permalink
c1 QA Fixes - 10 (#634)
Browse files Browse the repository at this point in the history
* c1 QA Fixes - 10

* qa fixes

* fix lint

* minor

* reset time
  • Loading branch information
ashwin1111 authored Mar 8, 2024
1 parent cba194c commit 884bebc
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 81 deletions.
1 change: 0 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ do
sed -i $SED_EXTRA_ARGS "s?{{SENTRY_ENV}}?${SENTRY_ENV}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{CLARITY_PROJECT_ID}}?${CLARITY_PROJECT_ID}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{SEGMENT_ID}}?${SEGMENT_ID}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{QBO_CALLBACK_URL}}?${QBO_CALLBACK_URL}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{NS_CALLBACK_URL}}?${NS_CALLBACK_URL}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{XERO_CALLBACK_URL}}?${XERO_CALLBACK_URL}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{QBO_CLIENT_ID}}?${QBO_CLIENT_ID}?g" $f;
Expand Down
1 change: 0 additions & 1 deletion scripts/setup_env.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const environment = {
fyle_app_url: `${process.env.FYLE_APP_URL ? process.env.FYLE_APP_URL : '{{FYLE_APP_URL}}'}`,
sentry_dsn: `${process.env.SENTRY_DSN ? process.env.SENTRY_DSN : '{{SENTRY_DSN}}'}`,
sentry_env: `${process.env.SENTRY_ENV ? process.env.SENTRY_ENV : '{{SENTRY_ENV}}'}`,
qbo_callback_url: `${process.env.QBO_CALLBACK_URL ? process.env.QBO_CALLBACK_URL : '{{QBO_CALLBACK_URL}}'}`,
ns_callback_url: `${process.env.NS_CALLBACK_URL ? process.env.NS_CALLBACK_URL : '{{NS_CALLBACK_URL}}'}`,
xero_callback_url: `${process.env.XERO_CALLBACK_URL ? process.env.XERO_CALLBACK_URL : '{{XERO_CALLBACK_URL}}'}`,
qbo_client_id: `${process.env.QBO_CLIENT_ID ? process.env.QBO_CLIENT_ID : '{{QBO_CLIENT_ID}}'}`,
Expand Down
5 changes: 3 additions & 2 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
</router-outlet>
<p-toast position="bottom-center" [baseZIndex]="5000">
<ng-template let-message pTemplate="message">
<div class="tw-flex tw-justify-between tw-items-center tw-h-44-px tw-text-14-px tw-p-12-px" [ngClass]="message.severity === 'success' ? 'tw-bg-toast-success-bg' : 'tw-bg-toast-error-bg'">
<div class="tw-flex tw-justify-between tw-items-center tw-h-44-px tw-text-14-px tw-p-12-px" [ngClass]="{'tw-bg-toast-success-bg': message.severity === 'success', 'tw-bg-toast-error-bg': message.severity === 'error', 'tw-bg-bg-info': 'info'}">
<div class="tw-inline-flex tw-items-center">
<app-svg-icon *ngIf="message.severity === 'success'" [svgSource]="'check-circle-outline-medium'" [c1SvgSource]="'grv-checkmark-encircled-success-medium'" [width]="'20px'" [height]="'20px'" [styleClasses]="'tw-text-alerts-success-icon-color'" [isTextColorAllowed]="true"></app-svg-icon>
<app-svg-icon *ngIf="message.severity !== 'success'" [svgSource]="'warning-outline-medium'" [c1SvgSource]="'grv-caution-triangle-critical-medium'" [width]="'20px'" [height]="'20px'" [styleClasses]="'tw-text-toast-text-color'" [isTextColorAllowed]="true"></app-svg-icon>
<app-svg-icon *ngIf="message.severity === 'error'" [svgSource]="'warning-outline-medium'" [c1SvgSource]="'grv-caution-triangle-critical-medium'" [width]="'20px'" [height]="'20px'" [styleClasses]="'tw-text-toast-text-color'" [isTextColorAllowed]="true"></app-svg-icon>
<app-svg-icon *ngIf="message.severity === 'info'" [svgSource]="'danger-outline'" [c1SvgSource]="'grv-info-informational-medium'" [width]="'20px'" [height]="'20px'" [styleClasses]="'tw-text-toast-text-color'" [isTextColorAllowed]="true"></app-svg-icon>
<span class="tw-text-toast-text-color tw-pl-8-px">{{ message.summary }}</span>
</div>
<div class="tw-inline-flex tw-items-center tw-cursor-pointer">
Expand Down
4 changes: 2 additions & 2 deletions src/app/branding/branding-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ const content: ContentConfiguration = {
accountsPayableSubLabel: ' to the selected Accounts Payable Account.',
creditCardExpenseSubLabel: 'You could choose to export CCC expenses when they have been approved and are awaiting payment clearance, OR simply when they have been paid out.',
creditCardExportTypeSubLabel: 'Expense can either be exported as single line items (Expense) or as a grouped report with multiple line items (Expense Report).',
journalOptionLabel: 'Name in Journal Entry (CCC)',
journalOptionLabel: 'Name in Journal Entry',
journalOptionSubLabel: 'You can select either the \'Merchant Name\' or the \'Employee Name\' to appear in the \'Name\' field of your Journal Entries.'
}
},
Expand Down Expand Up @@ -490,7 +490,7 @@ const content: ContentConfiguration = {
accountsPayableSubLabel: ' to the selected accounts payable Account.',
creditCardExpenseSubLabel: 'You could choose to export ccc expenses when they have been approved and are awaiting payment clearance, or simply when they have been paid out.',
creditCardExportTypeSubLabel: 'Expense can either be exported as single line items (expense) or as a grouped report with multiple line items (expense report).',
journalOptionLabel: 'Name in journal entry (ccc)',
journalOptionLabel: 'Name in journal entry',
journalOptionSubLabel: 'You can select either the \'merchant name\' or the \'employee name\' to appear in the \'name\' field of your journal entries.'
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/models/common/employee-settings.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export class EmployeeSettingModel {
static getEmployeeFieldMappingOptions(): SelectFormOption[] {
return [
{
label: 'Employees',
label: 'Employee',
value: FyleField.EMPLOYEE
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/app/core/models/enum/enum.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export enum InAppIntegration {

export enum ToastSeverity {
SUCCESS = 'success',
ERROR = 'error'
ERROR = 'error',
INFO = 'info'
}

export enum UpdateEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class BusinessCentralBaseMappingComponent implements OnInit {
this.isLoading = true;
this.mappingService.triggerAutoMapEmployees().subscribe(() => {
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'Auto mapping of employees may take few minutes');
this.toastService.displayToastMessage(ToastSeverity.INFO, 'Auto mapping of employees may take few minutes');
}, () => {
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.ERROR, 'Something went wrong, please try again');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
[formControllerName]="'reimbursableEmployeeMapping'">
</app-configuration-select-field>
</div>
<div class="remove-padding">
<div>
<app-configuration-select-field
[form]="exportSettingForm"
[isFieldMandatory]="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class IntacctBaseMappingComponent implements OnInit {
this.isLoading = true;
this.mappingService.triggerAutoMapEmployees().subscribe(() => {
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'Auto mapping of employees may take few minutes');
this.toastService.displayToastMessage(ToastSeverity.INFO, 'Auto mapping of employees may take few minutes');
}, () => {
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.ERROR, 'Something went wrong, please try again');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class QboBaseMappingComponent implements OnInit {
this.isLoading = true;
this.mappingService.triggerAutoMapEmployees().subscribe(() => {
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'Auto mapping of employees may take few minutes');
this.toastService.displayToastMessage(ToastSeverity.INFO, 'Auto mapping of employees may take few minutes');
}, () => {
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.ERROR, 'Something went wrong, please try again');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@

<div class="clone-setting--dependent-field" *ngIf="exportSettingForm.value.creditCardExportType">
<app-clone-setting-field *ngIf="showNameInJournalOption"
[label]="'Name in Journal Entry (CCC)'"
[label]="'Name in Journal Entry'"
[options]="nameInJournalOptions"
[placeholder]="'Select a name'"
[form]="exportSettingForm"
Expand Down Expand Up @@ -214,16 +214,18 @@
[tooltipText]="'The default vendor will apply to all corporate card transactions upon export'">
</app-clone-setting-field>

<app-clone-setting-field *ngIf="(exportSettingForm.value.creditCardExportType === QBOCorporateCreditCardExpensesObject.BILL) && !((exportSettingForm.controls.reimbursableExportType.value === QBOReimbursableExpensesObject.BILL || (exportSettingForm.controls.reimbursableExportType.value === QBOReimbursableExpensesObject.JOURNAL_ENTRY && exportSettingForm.value.employeeMapping === EmployeeFieldMapping.VENDOR)))"
[label]="'To which Accounts Payable account should the ' + (exportSettingForm.value.creditCardExportType | snakeCaseToSpaceCase | titlecase) + ' be posted to?'"
[options]="accountsPayables"
[placeholder]="'Select accounts payable'"
[form]="exportSettingForm"
[isFieldMandatory]="true"
[formControllerName]="'accountsPayable'"
[dropdownDisplayKey]="'name'"
[tooltipText]="'The integration will post the offset credit entry in ' + (exportSettingForm.value.creditCardExportType | snakeCaseToSpaceCase | titlecase) + ' to the selected Accounts Payable Account.'">
</app-clone-setting-field>
<div [ngClass]="{'clone-setting--dependent-field': helperService.isFieldRequired(exportSettingForm, 'defaultCreditCardVendor')}">
<app-clone-setting-field *ngIf="(exportSettingForm.value.creditCardExportType === QBOCorporateCreditCardExpensesObject.BILL) && !((exportSettingForm.controls.reimbursableExportType.value === QBOReimbursableExpensesObject.BILL || (exportSettingForm.controls.reimbursableExportType.value === QBOReimbursableExpensesObject.JOURNAL_ENTRY && exportSettingForm.value.employeeMapping === EmployeeFieldMapping.VENDOR)))"
[label]="'To which Accounts Payable account should the ' + (exportSettingForm.value.creditCardExportType | snakeCaseToSpaceCase | titlecase) + ' be posted to?'"
[options]="accountsPayables"
[placeholder]="'Select accounts payable'"
[form]="exportSettingForm"
[isFieldMandatory]="true"
[formControllerName]="'accountsPayable'"
[dropdownDisplayKey]="'name'"
[tooltipText]="'The integration will post the offset credit entry in ' + (exportSettingForm.value.creditCardExportType | snakeCaseToSpaceCase | titlecase) + ' to the selected Accounts Payable Account.'">
</app-clone-setting-field>
</div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class Sage300BaseMappingComponent implements OnInit {
this.isLoading = true;
this.mappingService.triggerAutoMapEmployees().subscribe(() => {
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'Auto mapping of employees may take few minutes');
this.toastService.displayToastMessage(ToastSeverity.INFO, 'Auto mapping of employees may take few minutes');
}, () => {
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.ERROR, 'Something went wrong, please try again');
Expand Down
Loading

0 comments on commit 884bebc

Please sign in to comment.