Skip to content

Commit

Permalink
Merge branch 'refs/heads/war-in/sage-intacct-export-config' into war-…
Browse files Browse the repository at this point in the history
…in/sage-intacct-export-config-offline-error

# Conflicts:
#	src/libs/actions/connections/SageIntacct.ts
#	src/pages/workspace/accounting/intacct/export/SageIntacctNonReimbursableExpensesPage.tsx
#	src/pages/workspace/accounting/intacct/export/SageIntacctReimbursableExpensesPage.tsx
#	src/types/onyx/Policy.ts
  • Loading branch information
war-in committed Jul 9, 2024
2 parents 452d279 + 4f62db5 commit 759c350
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
type UpdateSageIntacctNonreimbursableExpensesCreditCardChargeExportDefaultVendorParams = {
policyID: string;
vendorID: string | null;
vendorID: string;
};

export default UpdateSageIntacctNonreimbursableExpensesCreditCardChargeExportDefaultVendorParams;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
type UpdateSageIntacctNonreimbursableExpensesExportVendorParams = {
policyID: string;
vendorID: string | null;
vendorID: string;
};

export default UpdateSageIntacctNonreimbursableExpensesExportVendorParams;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
type UpdateSageIntacctReimbursableExpensesReportExportDefaultVendorParams = {
policyID: string;
vendorID: string | null;
vendorID: string;
};

export default UpdateSageIntacctReimbursableExpensesReportExportDefaultVendorParams;
8 changes: 4 additions & 4 deletions src/libs/actions/connections/SageIntacct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function updateSageIntacctNonreimbursableExpensesExportDestination(policyID: str
API.write(WRITE_COMMANDS.UPDATE_SAGE_INTACCT_NON_REIMBURSABLE_EXPENSES_EXPORT_DESTINATION, parameters, {optimisticData, failureData, successData});
}

function updateSageIntacctReimbursableExpensesReportExportDefaultVendor(policyID: string, vendor: string | null) {
function updateSageIntacctReimbursableExpensesReportExportDefaultVendor(policyID: string, vendor: string) {
const {optimisticData, failureData, successData} = prepareOnyxDataForExportUpdate(policyID, CONST.SAGE_INTACCT_CONFIG.REIMBURSABLE_VENDOR, vendor);
const parameters: UpdateSageIntacctReimbursableExpensesReportExportDefaultVendorParams = {
policyID,
Expand All @@ -151,7 +151,7 @@ function updateSageIntacctReimbursableExpensesReportExportDefaultVendor(policyID
API.write(WRITE_COMMANDS.UPDATE_SAGE_INTACCT_REIMBURSABLE_EXPENSES_REPORT_EXPORT_DEFAULT_VENDOR, parameters, {optimisticData, failureData, successData});
}

function updateSageIntacctNonreimbursableExpensesCreditCardChargeExportDefaultVendor(policyID: string, vendor: string | null) {
function updateSageIntacctNonreimbursableExpensesCreditCardChargeExportDefaultVendor(policyID: string, vendor: string) {
const {optimisticData, failureData, successData} = prepareOnyxDataForExportUpdate(policyID, CONST.SAGE_INTACCT_CONFIG.NON_REIMBURSABLE_CREDIT_CARD_VENDOR, vendor);
const parameters: UpdateSageIntacctNonreimbursableExpensesCreditCardChargeExportDefaultVendorParams = {
policyID,
Expand All @@ -171,7 +171,7 @@ function updateSageIntacctNonreimbursableExpensesExportAccount(policyID: string,
API.write(WRITE_COMMANDS.UPDATE_SAGE_INTACCT_NON_REIMBURSABLE_EXPENSES_EXPORT_ACCOUNT, parameters, {optimisticData, failureData, successData});
}

function updateSageIntacctNonreimbursableExpensesExportVendor(policyID: string, vendor: string | null) {
function updateSageIntacctNonreimbursableExpensesExportVendor(policyID: string, vendor: string) {
const {optimisticData, failureData, successData} = prepareOnyxDataForExportUpdate(policyID, CONST.SAGE_INTACCT_CONFIG.NON_REIMBURSABLE_VENDOR, vendor);
const parameters: UpdateSageIntacctNonreimbursableExpensesExportVendorParams = {
policyID,
Expand All @@ -181,7 +181,7 @@ function updateSageIntacctNonreimbursableExpensesExportVendor(policyID: string,
API.write(WRITE_COMMANDS.UPDATE_SAGE_INTACCT_NON_REIMBURSABLE_EXPENSES_EXPORT_VENDOR, parameters, {optimisticData, failureData, successData});
}

function updateSageIntacctDefaultVendor(policyID: string, settingName: keyof SageIntacctExportConfig, vendor: string | null) {
function updateSageIntacctDefaultVendor(policyID: string, settingName: keyof SageIntacctExportConfig, vendor: string) {
if (settingName === CONST.SAGE_INTACCT_CONFIG.REIMBURSABLE_VENDOR) {
updateSageIntacctReimbursableExpensesReportExportDefaultVendor(policyID, vendor);
} else if (settingName === CONST.SAGE_INTACCT_CONFIG.NON_REIMBURSABLE_CREDIT_CARD_VENDOR) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function SageIntacctReimbursableExpensesPage({policy}: WithPolicyProps) {

const defaultVendor = useMemo(() => {
const defaultVendorName = getDefaultVendorName(reimbursableExpenseReportDefaultVendor, intacctData?.vendors);

const defaultVendorSection = {
description: translate('workspace.sageIntacct.defaultVendor'),
action: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_SAGE_INTACCT_DEFAULT_VENDOR.getRoute(policyID, CONST.SAGE_INTACCT_CONFIG.REIMBURSABLE)),
Expand Down

0 comments on commit 759c350

Please sign in to comment.