Skip to content

Commit

Permalink
refactor: capitalization
Browse files Browse the repository at this point in the history
  • Loading branch information
JustARatherRidiculouslyLongUsername committed Dec 12, 2024
1 parent c3e870b commit 433638e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export type BusinessCentralExportSetting = {
credit_card_expense_date: ExportDateType,
default_bank_account_name: string,
default_bank_account_id: string,
default_CCC_bank_account_name: string,
default_CCC_bank_account_id: string,
default_ccc_bank_account_name: string,
default_ccc_bank_account_id: string,
name_in_journal_entry: string,
employee_field_mapping: string,
auto_map_employees: string,
Expand Down Expand Up @@ -186,7 +186,7 @@ export class BusinessCentralExportSettingModel {
cccExportDate: new FormControl(exportSettings?.credit_card_expense_date ? exportSettings?.credit_card_expense_date.toLowerCase() : null),
cccExportGroup: new FormControl(exportSettings?.credit_card_expense_grouped_by ? exportSettings?.credit_card_expense_grouped_by: null),
defaultBankName: new FormControl(exportSettings?.default_bank_account_name ? findObjectByDestinationId(accounts, exportSettings?.default_bank_account_id) : null),
cccDefaultBankName: new FormControl(exportSettings?.default_CCC_bank_account_name ? findObjectByDestinationId(accounts, exportSettings?.default_CCC_bank_account_id) : null),
cccDefaultBankName: new FormControl(exportSettings?.default_ccc_bank_account_name ? findObjectByDestinationId(accounts, exportSettings?.default_ccc_bank_account_id) : null),
reimbursableEmployeeMapping: new FormControl(exportSettings?.employee_field_mapping ? exportSettings?.employee_field_mapping : null, Validators.required),
journalEntryNamePreference: new FormControl(exportSettings?.name_in_journal_entry ? exportSettings?.name_in_journal_entry : null),
autoMapEmployee: new FormControl(exportSettings?.auto_map_employees ? exportSettings?.auto_map_employees : null),
Expand All @@ -207,8 +207,8 @@ export class BusinessCentralExportSettingModel {
credit_card_expense_date: exportSettingsForm.get('cccExportDate')?.value ? exportSettingsForm.get('cccExportDate')?.value.toUpperCase() : null,
default_bank_account_name: exportSettingsForm.get('defaultBankName')?.value ? exportSettingsForm.get('defaultBankName')?.value.value : null,
default_bank_account_id: exportSettingsForm.get('defaultBankName')?.value ? exportSettingsForm.get('defaultBankName')?.value.destination_id : null,
default_CCC_bank_account_name: exportSettingsForm.get('cccDefaultBankName')?.value ? exportSettingsForm.get('cccDefaultBankName')?.value.value : null,
default_CCC_bank_account_id: exportSettingsForm.get('cccDefaultBankName')?.value ? exportSettingsForm.get('cccDefaultBankName')?.value.destination_id : null,
default_ccc_bank_account_name: exportSettingsForm.get('cccDefaultBankName')?.value ? exportSettingsForm.get('cccDefaultBankName')?.value.value : null,
default_ccc_bank_account_id: exportSettingsForm.get('cccDefaultBankName')?.value ? exportSettingsForm.get('cccDefaultBankName')?.value.destination_id : null,
name_in_journal_entry: exportSettingsForm.get('journalEntryNamePreference')?.value ? exportSettingsForm.get('journalEntryNamePreference')?.value : null,
employee_field_mapping: exportSettingsForm.get('reimbursableEmployeeMapping')?.value ? exportSettingsForm.get('reimbursableEmployeeMapping')?.value : null,
auto_map_employees: exportSettingsForm.get('autoMapEmployee')?.value ? exportSettingsForm.get('autoMapEmployee')?.value : null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ export class BusinessCentralExportSettingsComponent implements OnInit {
if (this.exportSettings) {
this.helperService.addDestinationAttributeIfNotExists({
options: this.bankAccountOptions,
value: this.exportSettings.default_CCC_bank_account_name,
destination_id: this.exportSettings.default_CCC_bank_account_id
value: this.exportSettings.default_ccc_bank_account_name,
destination_id: this.exportSettings.default_ccc_bank_account_id
});
this.helperService.addDestinationAttributeIfNotExists({
options: this.bankAccountOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export const exportSettingsResponse: BusinessCentralExportSettingGet = {
"reimbursable_expenses_export_type": BusinessCentralExportType.JOURNAL_ENTRY,
"default_bank_account_name": "XYZ",
"default_bank_account_id": "1232",
"default_CCC_bank_account_name": "ABC",
"default_CCC_bank_account_id": "2321",
"default_ccc_bank_account_name": "ABC",
"default_ccc_bank_account_id": "2321",
"reimbursable_expense_state": ExpenseState.PAYMENT_PROCESSING,
"reimbursable_expense_date": ExportDateType.LAST_SPENT_AT,
"reimbursable_expense_grouped_by": ExpenseGroupedBy.EXPENSE,
Expand Down

0 comments on commit 433638e

Please sign in to comment.