-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/50907-GR-Phase3-Step5-nav-api-call
- Loading branch information
Showing
110 changed files
with
1,307 additions
and
563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Mobile-Expensify
updated
from 943507 to 5cdb24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import type {PusherEvent} from '@pusher/pusher-websocket-react-native'; | ||
import CONST from '@src/CONST'; | ||
|
||
type OnSubscriptionSucceeded = () => void; | ||
|
||
type OnEvent = (event: PusherEvent) => void; | ||
|
||
type ChannelCallbacks = { | ||
onSubscriptionSucceeded: OnSubscriptionSucceeded; | ||
onEvent: OnEvent; | ||
}; | ||
|
||
type InitProps = { | ||
onConnectionStateChange: (currentState: string, previousState: string) => void; | ||
}; | ||
|
||
type SubscribeProps = { | ||
channelName: string; | ||
onEvent: OnEvent; | ||
onSubscriptionSucceeded: OnSubscriptionSucceeded; | ||
}; | ||
|
||
type UnsubscribeProps = { | ||
channelName: string; | ||
}; | ||
|
||
class MockedPusher { | ||
static instance: MockedPusher | null = null; | ||
|
||
channels = new Map<string, ChannelCallbacks>(); | ||
|
||
socketId = 'mock-socket-id'; | ||
|
||
connectionState: string = CONST.PUSHER.STATE.DISCONNECTED; | ||
|
||
static getInstance() { | ||
if (!MockedPusher.instance) { | ||
MockedPusher.instance = new MockedPusher(); | ||
} | ||
return MockedPusher.instance; | ||
} | ||
|
||
init({onConnectionStateChange}: InitProps) { | ||
onConnectionStateChange(CONST.PUSHER.STATE.CONNECTED, CONST.PUSHER.STATE.DISCONNECTED); | ||
return Promise.resolve(); | ||
} | ||
|
||
connect() { | ||
this.connectionState = CONST.PUSHER.STATE.CONNECTED; | ||
return Promise.resolve(); | ||
} | ||
|
||
disconnect() { | ||
this.connectionState = CONST.PUSHER.STATE.DISCONNECTED; | ||
this.channels.clear(); | ||
return Promise.resolve(); | ||
} | ||
|
||
subscribe({channelName, onEvent, onSubscriptionSucceeded}: SubscribeProps) { | ||
if (!this.channels.has(channelName)) { | ||
this.channels.set(channelName, {onEvent, onSubscriptionSucceeded}); | ||
onSubscriptionSucceeded(); | ||
} | ||
return Promise.resolve(); | ||
} | ||
|
||
unsubscribe({channelName}: UnsubscribeProps) { | ||
this.channels.delete(channelName); | ||
} | ||
|
||
trigger({channelName, eventName, data}: PusherEvent) { | ||
this.channels.get(channelName)?.onEvent({channelName, eventName, data: data as Record<string, unknown>}); | ||
} | ||
|
||
getChannel(channelName: string) { | ||
return this.channels.get(channelName); | ||
} | ||
|
||
getSocketId() { | ||
return Promise.resolve(this.socketId); | ||
} | ||
} | ||
|
||
// eslint-disable-next-line import/prefer-default-export | ||
export {MockedPusher as Pusher}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: Edit Expenses | ||
description: Learn how to edit expenses in Expensify, including restrictions and permissions. | ||
--- | ||
|
||
You can edit expenses in Expensify to update details like category, description, or attendees. However, some fields have restrictions based on the expense type and report status. | ||
|
||
# Edit an Expense | ||
|
||
{% include selector.html values="desktop, mobile" %} | ||
|
||
{% include option.html value="desktop" %} | ||
|
||
1. Click the **Expenses** tab. | ||
2. Select the expense you want to edit. | ||
3. Click the field you want to change (e.g., category, description, attendees). | ||
4. Make your changes and click **Save**. | ||
|
||
{% include end-option.html %} | ||
|
||
{% include option.html value="mobile" %} | ||
|
||
1. Tap the **Expenses** tab. | ||
2. Select the expense you want to edit. | ||
3. Tap **More Options**. | ||
4. Update the relevant fields and tap **Save**. | ||
|
||
{% include end-option.html %} | ||
|
||
{% include end-selector.html %} | ||
|
||
# Expense Editing Rules | ||
|
||
Editing restrictions apply based on expense type and report status. | ||
|
||
## General Editing Rules | ||
- **Category, description, attendees, and report assignment** can be edited by the expense owner, approvers, and Workspace Admins. | ||
- **Amount** can be edited for most manually entered expenses, except for company card transactions. | ||
- **Tag and billable status** can be updated as long as the report is in an editable state. | ||
|
||
## Company Card Expenses | ||
- **Amount cannot be edited** for expenses imported from a company card. | ||
- **Category, tag, and billable status** can be edited if the report is in the Open or Processing state. | ||
- **Receipt images** can be added or replaced at any time. | ||
|
||
## Submitted and Approved Expenses | ||
- **Submitted expenses** can only be edited by an approver or Workspace Admin. | ||
- **Approved expenses** cannot be edited unless they are reopened. | ||
- **Expenses in a Closed report** cannot be edited. | ||
|
||
# Delete an Expense | ||
|
||
Expenses can only be deleted by the submitter, and the report must be in the Open state. | ||
|
||
1. Navigate to the **Expenses** tab. | ||
2. Select the expense you want to delete. | ||
3. Click **Delete** and confirm. | ||
|
||
{% include info.html %} | ||
If the report has been submitted, you must retract it before deleting an expense. | ||
{% include end-info.html %} | ||
|
||
# FAQ | ||
|
||
## Who can edit an expense? | ||
- **Expense owner**: Can edit expenses if the report is Open. | ||
- **Approvers and Workspace Admins**: Can edit submitted expenses before final approval. | ||
- **Finance teams**: May have additional permissions based on workspace settings. | ||
|
||
## Why can’t I edit my expense amount? | ||
Company card expenses have a fixed amount based on imported transaction data and cannot be changed. | ||
|
||
## Can I edit an expense after it has been approved? | ||
No, approved expenses cannot be edited unless the report is reopened. | ||
|
||
## How do I update an expense in a submitted report? | ||
If you need to edit an expense in a submitted report, contact an approver or Workspace Admin to reopen the report. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
docs/new-expensify/hubs/connect-credit-cards/company-cards.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.