Skip to content

Commit 186d428

Browse files
authored
Merge pull request Expensify#65526 from samranahm/59157/add-guideBooking-in-free-trial-banner
fix: no Schedule call button to the chat header when free trial banner is no longer shown
2 parents 7d518bc + b171f98 commit 186d428

7 files changed

Lines changed: 4 additions & 32 deletions

File tree

src/libs/API/parameters/GetAssignedSupportDataParams.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/libs/API/parameters/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ export type {default as ExportReportCSVParams} from './ExportReportCSVParams';
296296
export type {default as UpdateExpensifyCardLimitParams} from './UpdateExpensifyCardLimitParams';
297297
export type {CreateWorkspaceApprovalParams, UpdateWorkspaceApprovalParams, RemoveWorkspaceApprovalParams} from './WorkspaceApprovalParams';
298298
export type {default as StartIssueNewCardFlowParams} from './StartIssueNewCardFlowParams';
299-
export type {default as GetAssignedSupportDataParams} from './GetAssignedSupportDataParams';
300299
export type {default as ConnectAsDelegateParams} from './ConnectAsDelegateParams';
301300
export type {default as SetPolicyRulesEnabledParams} from './SetPolicyRulesEnabledParams';
302301
export type {default as SetPolicyDefaultReportTitleParams} from './SetPolicyDefaultReportTitle';

src/libs/API/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,6 @@ const READ_COMMANDS = {
10621062
OPEN_DRAFT_DISTANCE_EXPENSE: 'OpenDraftDistanceExpense',
10631063
START_ISSUE_NEW_CARD_FLOW: 'StartIssueNewCardFlow',
10641064
OPEN_CARD_DETAILS_PAGE: 'OpenCardDetailsPage',
1065-
GET_ASSIGNED_SUPPORT_DATA: 'GetAssignedSupportData',
10661065
GET_CORPAY_ONBOARDING_FIELDS: 'GetCorpayOnboardingFields',
10671066
OPEN_WORKSPACE_PLAN_PAGE: 'OpenWorkspacePlanPage',
10681067
OPEN_SECURITY_SETTINGS_PAGE: 'OpenSecuritySettingsPage',
@@ -1138,7 +1137,6 @@ type ReadCommandParameters = {
11381137
[READ_COMMANDS.OPEN_DRAFT_DISTANCE_EXPENSE]: null;
11391138
[READ_COMMANDS.START_ISSUE_NEW_CARD_FLOW]: Parameters.StartIssueNewCardFlowParams;
11401139
[READ_COMMANDS.OPEN_CARD_DETAILS_PAGE]: Parameters.OpenCardDetailsPageParams;
1141-
[READ_COMMANDS.GET_ASSIGNED_SUPPORT_DATA]: Parameters.GetAssignedSupportDataParams;
11421140
[READ_COMMANDS.GET_CORPAY_ONBOARDING_FIELDS]: Parameters.GetCorpayOnboardingFieldsParams;
11431141
[READ_COMMANDS.OPEN_WORKSPACE_PLAN_PAGE]: Parameters.OpenWorkspacePlanPageParams;
11441142
[READ_COMMANDS.OPEN_SECURITY_SETTINGS_PAGE]: null;

src/libs/actions/Policy/Policy.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import type {
2424
EnablePolicyReportFieldsParams,
2525
EnablePolicyTaxesParams,
2626
EnablePolicyWorkflowsParams,
27-
GetAssignedSupportDataParams,
2827
LeavePolicyParams,
2928
OpenDraftWorkspaceRequestParams,
3029
OpenPolicyEditCardLimitTypePageParams,
@@ -5262,13 +5261,6 @@ function updateInvoiceCompanyWebsite(policyID: string, companyWebsite: string) {
52625261
API.write(WRITE_COMMANDS.UPDATE_INVOICE_COMPANY_WEBSITE, parameters, {optimisticData, successData, failureData});
52635262
}
52645263

5265-
function getAssignedSupportData(policyID: string) {
5266-
const parameters: GetAssignedSupportDataParams = {
5267-
policyID,
5268-
};
5269-
API.read(READ_COMMANDS.GET_ASSIGNED_SUPPORT_DATA, parameters);
5270-
}
5271-
52725264
/**
52735265
* Validates user account and returns a list of accessible policies.
52745266
*/
@@ -5495,7 +5487,6 @@ export {
54955487
updateInvoiceCompanyName,
54965488
updateInvoiceCompanyWebsite,
54975489
updateDefaultPolicy,
5498-
getAssignedSupportData,
54995490
downgradeToTeam,
55005491
getAccessiblePolicies,
55015492
clearGetAccessiblePoliciesErrors,

src/pages/ProfilePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function ProfilePage({route}: ProfilePageProps) {
7171
const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false});
7272
const [account] = useOnyx(ONYXKEYS.ACCOUNT, {canBeMissing: true});
7373
const isDebugModeEnabled = !!account?.isDebugModeEnabled;
74-
const guideCalendarLink = account?.guideCalendarLink ?? '';
74+
const guideCalendarLink = account?.guideDetails?.calendarLink ?? '';
7575

7676
const accountID = Number(route.params?.accountID ?? CONST.DEFAULT_NUMBER_ID);
7777
const isCurrentUser = session?.accountID === accountID;

src/pages/workspace/accounting/PolicyAccountingPage.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import useThemeStyles from '@hooks/useThemeStyles';
3131
import useThreeDotsAnchorPosition from '@hooks/useThreeDotsAnchorPosition';
3232
import {isAuthenticationError, isConnectionInProgress, isConnectionUnverified, removePolicyConnection, syncConnection} from '@libs/actions/connections';
3333
import {shouldShowQBOReimbursableExportDestinationAccountError} from '@libs/actions/connections/QuickbooksOnline';
34-
import {getAssignedSupportData} from '@libs/actions/Policy/Policy';
3534
import {isExpensifyCardFullySetUp} from '@libs/CardUtils';
3635
import {
3736
areSettingsInErrorFields,
@@ -179,13 +178,6 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
179178
setDateTimeToRelative('');
180179
}, [getDatetimeToRelative, successfulDate]);
181180

182-
useEffect(() => {
183-
if (!policyID) {
184-
return;
185-
}
186-
getAssignedSupportData(policyID);
187-
}, [policyID]);
188-
189181
const calculateAndSetThreeDotsMenuPosition = useCallback(() => {
190182
if (shouldUseNarrowLayout) {
191183
return Promise.resolve({horizontal: 0, vertical: 0});
@@ -512,8 +504,8 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
512504

513505
const [chatTextLink, chatReportID] = useMemo(() => {
514506
// If they have an onboarding specialist assigned display the following and link to the #admins room with the setup specialist.
515-
if (account?.adminsRoomReportID) {
516-
return [translate('workspace.accounting.talkYourOnboardingSpecialist'), account?.adminsRoomReportID];
507+
if (policy?.chatReportIDAdmins) {
508+
return [translate('workspace.accounting.talkYourOnboardingSpecialist'), policy?.chatReportIDAdmins];
517509
}
518510

519511
// If not, if they have an account manager assigned display the following and link to the DM with their account manager.
@@ -626,7 +618,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
626618
/>
627619
<View style={[!isLargeScreenWidth ? styles.flexColumn : styles.flexRow]}>
628620
<Text style={styles.textSupporting}>{translate('workspace.accounting.needAnotherAccounting')}</Text>
629-
<TextLink onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chatReportID))}>{chatTextLink}</TextLink>
621+
<TextLink onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(String(chatReportID)))}>{chatTextLink}</TextLink>
630622
</View>
631623
</View>
632624
)}

src/types/onyx/Account.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ type Account = {
8080
/** Is this account having trouble receiving emails? */
8181
hasEmailDeliveryFailure?: boolean;
8282

83-
/** URL to the assigned guide's appointment booking calendar */
84-
guideCalendarLink?: string;
85-
8683
/** User recovery codes for setting up 2-FA */
8784
recoveryCodes?: string;
8885

0 commit comments

Comments
 (0)