Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ShridharGoel committed Sep 15, 2024
2 parents e8be043 + 0c618ac commit 740c19d
Show file tree
Hide file tree
Showing 16 changed files with 235 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/ButtonWithDropdownMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,14 @@ function ButtonWithDropdownMenu<IValueType>({
disabledStyle={disabledStyle}
isLoading={isLoading}
text={selectedItem.text}
<<<<<<< HEAD

Check failure on line 170 in src/components/ButtonWithDropdownMenu/index.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.
onPress={(event) => {
const option = options.at(0);
return option ? onPress(event, option.value) : undefined;
}}
=======

Check failure on line 175 in src/components/ButtonWithDropdownMenu/index.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.
onPress={(event) => onPress(event, options[0].value)}
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52

Check failure on line 177 in src/components/ButtonWithDropdownMenu/index.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.
large={buttonSize === CONST.DROPDOWN_BUTTON_SIZE.LARGE}
medium={buttonSize === CONST.DROPDOWN_BUTTON_SIZE.MEDIUM}
small={buttonSize === CONST.DROPDOWN_BUTTON_SIZE.SMALL}
Expand Down
9 changes: 9 additions & 0 deletions src/components/LHNOptionsList/OptionRowLHN.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
if (!event) {
return;
}
<<<<<<< HEAD

Check failure on line 212 in src/components/LHNOptionsList/OptionRowLHN.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.
=======

Check failure on line 213 in src/components/LHNOptionsList/OptionRowLHN.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.

>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52

Check failure on line 215 in src/components/LHNOptionsList/OptionRowLHN.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.
// Prevent composer blur on left click
event.preventDefault();
}}
Expand Down Expand Up @@ -243,8 +247,13 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
(optionItem.shouldShowSubscript ? (
<SubscriptAvatar
backgroundColor={hovered && !isFocused ? hoveredBackgroundColor : subscriptAvatarBorderColor}
<<<<<<< HEAD

Check failure on line 250 in src/components/LHNOptionsList/OptionRowLHN.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.
mainAvatar={optionItem.icons.at(0)}
secondaryAvatar={optionItem.icons.at(1)}
=======

Check failure on line 253 in src/components/LHNOptionsList/OptionRowLHN.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.
mainAvatar={optionItem.icons[0]}
secondaryAvatar={optionItem.icons[1]}
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52

Check failure on line 256 in src/components/LHNOptionsList/OptionRowLHN.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.
size={isInFocusMode ? CONST.AVATAR_SIZE.SMALL : CONST.AVATAR_SIZE.DEFAULT}
/>
) : (
Expand Down
4 changes: 4 additions & 0 deletions src/libs/SearchUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,11 @@ function buildFilterString(filterName: string, queryFilters: QueryFilter[], deli
let filterValueString = '';
queryFilters.forEach((queryFilter, index) => {
// If the previous queryFilter has the same operator (this rule applies only to eq and neq operators) then append the current value
<<<<<<< HEAD

Check failure on line 717 in src/libs/SearchUtils.ts

View workflow job for this annotation

GitHub Actions / typecheck

Merge conflict marker encountered.
if ((queryFilter.operator === 'eq' && queryFilters.at(index - 1)?.operator === 'eq') || (queryFilter.operator === 'neq' && queryFilters.at(index - 1)?.operator === 'neq')) {
=======
if ((queryFilter.operator === 'eq' && queryFilters[index - 1]?.operator === 'eq') || (queryFilter.operator === 'neq' && queryFilters[index - 1]?.operator === 'neq')) {
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
filterValueString += `${delimiter}${sanitizeString(queryFilter.value.toString())}`;
} else {
filterValueString += ` ${filterName}${operatorToSignMap[queryFilter.operator]}${sanitizeString(queryFilter.value.toString())}`;
Expand Down
4 changes: 4 additions & 0 deletions src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,11 @@ function getOptionData({
const visibleParticipantAccountIDs = ReportUtils.getParticipantsAccountIDsForDisplay(report, true);

const participantPersonalDetailList = Object.values(OptionsListUtils.getPersonalDetailsForAccountIDs(participantAccountIDs, personalDetails));
<<<<<<< HEAD
const personalDetail = participantPersonalDetailList.at(0) ?? ({} as PersonalDetails);
=======
const personalDetail = participantPersonalDetailList[0] ?? {};
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
const hasErrors = Object.keys(result.allReportErrors ?? {}).length !== 0;

result.isThread = ReportUtils.isChatThread(report);
Expand Down
4 changes: 4 additions & 0 deletions src/libs/actions/Workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ function updateApprovalWorkflow(policyID: string, approvalWorkflow: ApprovalWork
}

const previousDefaultApprover = policy.approver ?? policy.owner;
<<<<<<< HEAD
const newDefaultApprover = approvalWorkflow.isDefault ? approvalWorkflow.approvers.at(0)?.email : undefined;
=======
const newDefaultApprover = approvalWorkflow.isDefault ? approvalWorkflow.approvers[0].email : undefined;
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
const previousEmployeeList = Object.fromEntries(Object.entries(policy.employeeList ?? {}).map(([key, value]) => [key, {...value, pendingAction: null}]));
const updatedEmployees = convertApprovalWorkflowToPolicyEmployees({
previousEmployeeList,
Expand Down
4 changes: 4 additions & 0 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,12 @@ function ReportScreen({route, currentReportID = '', navigation}: ReportScreenPro
// After creating the task report then navigating to task detail we don't have any report actions and the last read time is empty so We need to update the initial last read time when opening the task report detail.
Report.readNewestAction(report.reportID);
}, [report]);
<<<<<<< HEAD

const mostRecentReportAction = reportActions.at(0);
=======
const mostRecentReportAction = reportActions[0];
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
const shouldShowMostRecentReportAction =
!!mostRecentReportAction &&
!ReportActionsUtils.isActionOfType(mostRecentReportAction, CONST.REPORT.ACTIONS.TYPE.CREATED) &&
Expand Down
4 changes: 4 additions & 0 deletions src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ function ReportActionsList({
return;
}

<<<<<<< HEAD
const mostRecentReportActionCreated = sortedVisibleReportActions.at(0)?.created ?? '';
=======
const mostRecentReportActionCreated = sortedVisibleReportActions[0]?.created ?? '';
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
if (mostRecentReportActionCreated === unreadMarkerTime) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ function QuickbooksAdvancedPage({policy}: WithPolicyConnectionsProps) {
policyID,
CONST.POLICY.CONNECTIONS.NAME.QBO,
CONST.QUICKBOOKS_CONFIG.COLLECTION_ACCOUNT_ID,
<<<<<<< HEAD
isSyncReimbursedSwitchOn ? '' : [...qboAccountOptions, ...invoiceAccountCollectionOptions].at(0)?.id,
=======
isSyncReimbursedSwitchOn ? '' : [...qboAccountOptions, ...invoiceAccountCollectionOptions][0].id,
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
qboConfig?.collectionAccountID,
),
subscribedSetting: CONST.QUICKBOOKS_CONFIG.COLLECTION_ACCOUNT_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ function QuickbooksCompanyCardExpenseAccountSelectCardPage({policy}: WithPolicyC
CONST.POLICY.CONNECTIONS.NAME.QBO,
{
[CONST.QUICKBOOKS_CONFIG.NON_REIMBURSABLE_EXPENSES_EXPORT_DESTINATION]: row.value,
<<<<<<< HEAD
[CONST.QUICKBOOKS_CONFIG.NON_REIMBURSABLE_EXPENSES_ACCOUNT]: row.accounts.at(0),
=======
[CONST.QUICKBOOKS_CONFIG.NON_REIMBURSABLE_EXPENSES_ACCOUNT]: row.accounts[0],
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
[CONST.QUICKBOOKS_CONFIG.NON_REIMBURSABLE_BILL_DEFAULT_VENDOR]: row.defaultVendor,
},
{
Expand All @@ -96,7 +100,11 @@ function QuickbooksCompanyCardExpenseAccountSelectCardPage({policy}: WithPolicyC
listItem={RadioListItem}
onSelectRow={(selection: SelectorType) => selectExportCompanyCard(selection as MenuItem)}
shouldSingleExecuteRowSelect
<<<<<<< HEAD
initiallyFocusedOptionKey={sections.at(0)?.data.find((mode) => mode.isSelected)?.keyForList}
=======
initiallyFocusedOptionKey={sections[0]?.data.find((mode) => mode.isSelected)?.keyForList}
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
connectionName={CONST.POLICY.CONNECTIONS.NAME.QBO}
onBackButtonPress={() => Navigation.goBack(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_COMPANY_CARD_EXPENSE_ACCOUNT.getRoute(policyID))}
listFooterContent={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ function QuickbooksNonReimbursableDefaultVendorSelectPage({policy}: WithPolicyCo
listItem={RadioListItem}
onSelectRow={selectVendor}
shouldSingleExecuteRowSelect
<<<<<<< HEAD
initiallyFocusedOptionKey={sections.at(0)?.data.find((mode) => mode.isSelected)?.keyForList}
=======
initiallyFocusedOptionKey={sections[0]?.data.find((mode) => mode.isSelected)?.keyForList}
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
listEmptyContent={listEmptyContent}
connectionName={CONST.POLICY.CONNECTIONS.NAME.QBO}
onBackButtonPress={() => Navigation.goBack(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_COMPANY_CARD_EXPENSE_ACCOUNT.getRoute(policyID))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ function QuickbooksOutOfPocketExpenseEntitySelectPage({policy}: WithPolicyConnec
CONST.POLICY.CONNECTIONS.NAME.QBO,
{
[CONST.QUICKBOOKS_CONFIG.REIMBURSABLE_EXPENSES_EXPORT_DESTINATION]: row.value,
<<<<<<< HEAD
[CONST.QUICKBOOKS_CONFIG.REIMBURSABLE_EXPENSES_ACCOUNT]: row.accounts.at(0),
=======
[CONST.QUICKBOOKS_CONFIG.REIMBURSABLE_EXPENSES_ACCOUNT]: row.accounts[0],
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
},
{
[CONST.QUICKBOOKS_CONFIG.REIMBURSABLE_EXPENSES_EXPORT_DESTINATION]: qboConfig?.reimbursableExpensesExportDestination,
Expand Down
41 changes: 41 additions & 0 deletions src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function WorkspaceTagsSettingsPage({route, policyTags}: WorkspaceTagsSettingsPag
<View style={styles.flexGrow1}>
{!isMultiLevelTags && (
<OfflineWithFeedback
<<<<<<< HEAD
errors={policyTags?.[policyTagLists.at(0)?.name ?? '']?.errors}
onClose={() => Tag.clearPolicyTagListErrors(policyID, policyTagLists.at(0)?.orderWeight ?? 0)}
pendingAction={policyTags?.[policyTagLists.at(0)?.name ?? '']?.pendingAction}
Expand Down Expand Up @@ -112,6 +113,46 @@ function WorkspaceTagsSettingsPage({route, policyTags}: WorkspaceTagsSettingsPag
onToggle={() => toggleBillableExpenses(policy)}
/>
</View>
=======
errors={policyTags?.[policyTagLists[0]?.name]?.errors}
onClose={() => Tag.clearPolicyTagListErrors(policyID, policyTagLists[0].orderWeight)}
pendingAction={policyTags?.[policyTagLists[0]?.name]?.pendingAction}
errorRowStyles={styles.mh5}
>
<MenuItemWithTopDescription
title={policyTagLists[0]?.name}
description={translate(`workspace.tags.customTagName`)}
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_EDIT_TAGS.getRoute(policyID, policyTagLists[0].orderWeight))}
shouldShowRightIcon
/>
>>>>>>> 0c618acc8b5a0b77eb27dfa049a18e3135c51c52
</OfflineWithFeedback>
)}
<OfflineWithFeedback
errors={policy?.errorFields?.requiresTag}
pendingAction={policy?.pendingFields?.requiresTag}
errorRowStyles={styles.mh5}
>
<View style={[styles.flexRow, styles.mh5, styles.mv4, styles.alignItemsCenter, styles.justifyContentBetween]}>
<Text style={[styles.textNormal]}>{translate('workspace.tags.requiresTag')}</Text>
<Switch
isOn={policy?.requiresTag ?? false}
accessibilityLabel={translate('workspace.tags.requiresTag')}
onToggle={updateWorkspaceRequiresTag}
disabled={!policy?.areTagsEnabled || !hasEnabledOptions}
/>
</View>
</OfflineWithFeedback>
{canUseWorkspaceRules && policy?.areRulesEnabled && (
<OfflineWithFeedback pendingAction={billableExpensesPending(policy)}>
<View style={[styles.flexRow, styles.mh5, styles.mv4, styles.alignItemsCenter, styles.justifyContentBetween]}>
<Text style={[styles.textNormal]}>{translate('workspace.tags.trackBillable')}</Text>
<Switch
isOn={!(policy?.disabledFields?.defaultBillable ?? false)}
accessibilityLabel={translate('workspace.tags.trackBillable')}
onToggle={() => toggleBillableExpenses(policy)}
/>
</View>
</OfflineWithFeedback>
)}
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,22 @@ function WorkspaceWorkflowsApprovalsApproverPage({policy, personalDetails, isLoa
[translate, styles.textSupporting, styles.pb10],
);

const listEmptyContent = useMemo(
() => (
<BlockingView
icon={Illustrations.TurtleInShell}
iconWidth={variables.emptyListIconWidth}
iconHeight={variables.emptyListIconHeight}
title={translate('workflowsPage.emptyContent.title')}
subtitle={translate('workflowsPage.emptyContent.approverSubtitle')}
subtitleStyle={styles.textSupporting}
containerStyle={styles.pb10}
contentFitImage="contain"
/>
),
[translate, styles.textSupporting, styles.pb10],
);

return (
<AccessOrNotFoundWrapper
policyID={route.params.policyID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,22 @@ function WorkspaceWorkflowsApprovalsExpensesFromPage({policy, isLoadingReportDat
[translate, styles.textSupporting, styles.pb10],
);

const listEmptyContent = useMemo(
() => (
<BlockingView
icon={Illustrations.TurtleInShell}
iconWidth={variables.emptyListIconWidth}
iconHeight={variables.emptyListIconHeight}
title={translate('workflowsPage.emptyContent.title')}
subtitle={translate('workflowsPage.emptyContent.expensesFromSubtitle')}
subtitleStyle={styles.textSupporting}
containerStyle={styles.pb10}
contentFitImage="contain"
/>
),
[translate, styles.textSupporting, styles.pb10],
);

return (
<AccessOrNotFoundWrapper
policyID={route.params.policyID}
Expand Down
Loading

0 comments on commit 740c19d

Please sign in to comment.