Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import ROUTES from '@src/ROUTES';
function QuickbooksCompanyCardExpenseAccountPage({policy}: WithPolicyConnectionsProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
const policyID = policy?.id ?? '-1';
const policyID = policy?.id ?? `${CONST.DEFAULT_NUMBER_ID}`;

@s77rt s77rt Jan 26, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still violates the lint rule. Please check https://expensify.slack.com/archives/C01GTK53T8Q/p1737913879440099

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thank you. I only recently learnt that the rule doesn't apply for strings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be fair this was implemented not long after the rule was implemented 😄

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR: #55804

const qboConfig = policy?.connections?.quickbooksOnline?.config;
const {vendors} = policy?.connections?.quickbooksOnline?.data ?? {};
const nonReimbursableBillDefaultVendorObject = vendors?.find((vendor) => vendor.id === qboConfig?.nonReimbursableBillDefaultVendor);
Expand Down Expand Up @@ -73,6 +73,7 @@ function QuickbooksCompanyCardExpenseAccountPage({policy}: WithPolicyConnections
switchAccessibilityLabel={translate('workspace.qbo.defaultVendorDescription')}
wrapperStyle={[styles.ph5, styles.mb3, styles.mt1]}
isActive={!!qboConfig?.autoCreateVendor}
shouldPlaceSubtitleBelowSwitch
pendingAction={PolicyUtils.settingsPendingAction([CONST.QUICKBOOKS_CONFIG.AUTO_CREATE_VENDOR], qboConfig?.pendingFields)}
errors={ErrorUtils.getLatestErrorField(qboConfig, CONST.QUICKBOOKS_CONFIG.AUTO_CREATE_VENDOR)}
onToggle={(isOn) =>
Expand Down