-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add ReportNameValuePairs key to Report Type #40661
Changes from 5 commits
09f4b6a
90e68d2
8f1a2e7
d55a329
2a6712a
a8694d1
2990a7d
9899133
108b99c
c80ef8b
675f944
64544aa
85e9375
01b7d31
f880524
1f01ef6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -852,6 +852,9 @@ const CONST = { | |
// The minimum number of typed lines needed to enable the full screen composer | ||
FULL_COMPOSER_MIN_LINES: 3, | ||
}, | ||
REPORT_NAME_KEYS: { | ||
isArchived: 'isArchived', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, the keys in this file are typically always |
||
}, | ||
MODAL: { | ||
MODAL_TYPE: { | ||
CONFIRM: 'confirm', | ||
|
@@ -4620,6 +4623,8 @@ type Country = keyof typeof CONST.ALL_COUNTRIES; | |
type IOUType = ValueOf<typeof CONST.IOU.TYPE>; | ||
type IOUAction = ValueOf<typeof CONST.IOU.ACTION>; | ||
|
||
export type {Country, IOUAction, IOUType, RateAndUnit, OnboardingPurposeType}; | ||
type ReportNameKeys = keyof typeof CONST.REPORT_NAME_KEYS; | ||
|
||
export type {Country, IOUAction, IOUType, RateAndUnit, OnboardingPurposeType, ReportNameKeys}; | ||
|
||
export default CONST; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import type {ValueOf} from 'type-fest'; | ||
import type CONST from '@src/CONST'; | ||
import {ReportNameKeys} from '@src/CONST'; | ||
import type ONYXKEYS from '@src/ONYXKEYS'; | ||
import type CollectionDataSet from '@src/types/utils/CollectionDataSet'; | ||
import type * as OnyxCommon from './OnyxCommon'; | ||
|
@@ -186,6 +187,9 @@ | |
transactionThreadReportID?: string; | ||
|
||
fieldList?: Record<string, PolicyReportField>; | ||
|
||
/** The reports name value pairs */ | ||
reportNameValuePairs?: Record<ReportNameKeys, string>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This type seems pretty sus - are all rNVP values strings? |
||
}, | ||
PolicyReportField['fieldID'] | ||
>; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend putting this under
REPORT.NVPS
rather thanREPORT_NAME_KEYS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also wondering if the same thing we did for nameValuePairs we should do for reportNameValuePairs. cc @iwiznia
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but rNVPs should be _a bit simpler since we always want to send all of them, right?
Anyway, I assume it should be easy to do by queuing the update at the lowest level in auth, probably in Report::setNameValuePair