-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[TS migration] Follow up on improving the form #36532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
roryabraham
merged 14 commits into
Expensify:main
from
software-mansion-labs:ts/improve-form-v2
Feb 22, 2024
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e2d87f5
Follow up on improving the form
blazejkustra 230460d
Remove getDraftKey
blazejkustra aa35fe5
Merge branch 'main' into ts/improve-form-v2
blazejkustra 4b84b15
Fix errors after making form values required
blazejkustra df8ba24
Use a singular name for inputIDs
blazejkustra 415b9f1
Merge branch 'main' into ts/improve-form-v2
blazejkustra 25dc010
Fix typerrors and lint
blazejkustra 01c465c
Remove reapeated form key
blazejkustra 7cd7706
Use FormValue type
blazejkustra 2545d7e
Remove test code
blazejkustra b0ca4fb
Merge branch 'main' into ts/improve-form-v2
blazejkustra 45f10e3
Fix error related to hold form
blazejkustra 758781f
Merge branch 'main' into ts/improve-form-v2
blazejkustra ece3e6d
Merge branch 'main' into ts/improve-form-v2
blazejkustra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
src/libs/API/parameters/UpdateBeneficialOwnersForBankAccountParams.ts
This file contains hidden or 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import type {BeneficialOwnersStepProps} from '@src/types/form/ReimbursementAccountForm'; | ||
import type {ACHContractStepProps} from '@src/types/form/ReimbursementAccountForm'; | ||
|
||
type UpdateBeneficialOwnersForBankAccountParams = BeneficialOwnersStepProps & {bankAccountID: number; policyID: string; canUseNewVbbaFlow?: boolean}; | ||
type UpdateBeneficialOwnersForBankAccountParams = Partial<ACHContractStepProps> & {bankAccountID: number; policyID: string; canUseNewVbbaFlow?: boolean}; | ||
|
||
export default UpdateBeneficialOwnersForBankAccountParams; |
6 changes: 4 additions & 2 deletions
6
src/libs/API/parameters/UpdateCompanyInformationForBankAccountParams.ts
This file contains hidden or 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import type {CompanyStepProps} from '@src/types/form/ReimbursementAccountForm'; | ||
import type {BankAccountStepProps, CompanyStepProps, ReimbursementAccountProps} from '@src/types/form/ReimbursementAccountForm'; | ||
|
||
type UpdateCompanyInformationForBankAccountParams = CompanyStepProps & {bankAccountID: number; policyID: string; canUseNewVbbaFlow?: boolean}; | ||
type BankAccountCompanyInformation = BankAccountStepProps & CompanyStepProps & ReimbursementAccountProps; | ||
|
||
type UpdateCompanyInformationForBankAccountParams = Partial<BankAccountCompanyInformation> & {bankAccountID: number; policyID: string; canUseNewVbbaFlow?: boolean}; | ||
|
||
export default UpdateCompanyInformationForBankAccountParams; |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import type {ValueOf} from 'type-fest'; | ||
import type Form from './Form'; | ||
|
||
const INPUT_IDS = { | ||
DOB: 'dob', | ||
} as const; | ||
|
||
type DateOfBirthForm = Form<{ | ||
/** Date of birth */ | ||
[INPUT_IDS.DOB]: string; | ||
}>; | ||
type InputID = ValueOf<typeof INPUT_IDS>; | ||
|
||
type DateOfBirthForm = Form< | ||
InputID, | ||
{ | ||
/** Date of birth */ | ||
[INPUT_IDS.DOB]: string; | ||
} | ||
>; | ||
|
||
export type {DateOfBirthForm}; | ||
export default INPUT_IDS; |
This file contains hidden or 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 |
---|---|---|
@@ -1,14 +1,20 @@ | ||
import type {ValueOf} from 'type-fest'; | ||
import type Form from './Form'; | ||
|
||
const INPUT_IDS = { | ||
FIRST_NAME: 'firstName', | ||
LAST_NAME: 'lastName', | ||
} as const; | ||
|
||
type DisplayNameForm = Form<{ | ||
[INPUT_IDS.FIRST_NAME]: string; | ||
[INPUT_IDS.LAST_NAME]: string; | ||
}>; | ||
type InputID = ValueOf<typeof INPUT_IDS>; | ||
|
||
type DisplayNameForm = Form< | ||
InputID, | ||
{ | ||
[INPUT_IDS.FIRST_NAME]: string; | ||
[INPUT_IDS.LAST_NAME]: string; | ||
} | ||
>; | ||
|
||
export type {DisplayNameForm}; | ||
export default INPUT_IDS; |
This file contains hidden or 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 |
---|---|---|
@@ -1,14 +1,20 @@ | ||
import type {ValueOf} from 'type-fest'; | ||
import type Form from './Form'; | ||
|
||
const INPUT_IDS = { | ||
TITLE: 'title', | ||
DESCRIPTION: 'description', | ||
} as const; | ||
|
||
type EditTaskForm = Form<{ | ||
[INPUT_IDS.TITLE]: string; | ||
[INPUT_IDS.DESCRIPTION]: string; | ||
}>; | ||
type InputID = ValueOf<typeof INPUT_IDS>; | ||
|
||
type EditTaskForm = Form< | ||
InputID, | ||
{ | ||
[INPUT_IDS.TITLE]: string; | ||
[INPUT_IDS.DESCRIPTION]: string; | ||
} | ||
>; | ||
|
||
export type {EditTaskForm}; | ||
export default INPUT_IDS; |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.