-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36495 from software-mansion-labs/ts/migrate-reimb…
…ursement-account [TS migration] Migrate 'ReimbursementAccount' to TypeScript
- Loading branch information
Showing
16 changed files
with
207 additions
and
245 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type RestartBankAccountSetupParams = { | ||
bankAccountID: number; | ||
ownerEmail: string; | ||
policyID: string; | ||
}; | ||
|
||
export default RestartBankAccountSetupParams; |
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
18 changes: 0 additions & 18 deletions
18
src/libs/actions/ReimbursementAccount/deleteFromBankAccountList.js
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Onyx from 'react-native-onyx'; | ||
import ONYXKEYS from '@src/ONYXKEYS'; | ||
import type {ErrorFields} from '@src/types/onyx/OnyxCommon'; | ||
|
||
/** | ||
* Set the current fields with errors. | ||
*/ | ||
function setBankAccountFormValidationErrors(errorFields: ErrorFields) { | ||
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {errorFields: null}); | ||
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {errorFields}); | ||
} | ||
|
||
/** | ||
* Clear validation messages from reimbursement account | ||
*/ | ||
function resetReimbursementAccount() { | ||
setBankAccountFormValidationErrors({}); | ||
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, { | ||
errors: null, | ||
pendingAction: null, | ||
}); | ||
} | ||
|
||
export {setBankAccountFormValidationErrors, resetReimbursementAccount}; |
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
85 changes: 0 additions & 85 deletions
85
src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.