Skip to content
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

[No QA][TS Migration] Follow up - Add comments for remaining properties in Onyx types #43499

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libs/TransactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ function hasViolation(transactionID: string, transactionViolations: OnyxCollecti
* Checks if any violations for the provided transaction are of type 'notice'
*/
function hasNoticeTypeViolation(transactionID: string, transactionViolations: OnyxCollection<TransactionViolation[]>): boolean {
return !!transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === 'notice');
return !!transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === CONST.VIOLATION_TYPES.NOTICE);
}

/**
Expand Down
16 changes: 8 additions & 8 deletions src/types/onyx/OriginalMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ type OriginalMessageApproved = {

/** Content of the original message */
originalMessage: {
/** Approved expense amount */
/** Approved expense report amount */
amount: number;

/** Currency of the approved expense amount */
/** Currency of the approved expense report amount */
currency: string;

/** Report ID of the expense */
/** Report ID of the expense report */
expenseReportID: string;
};
};
Expand Down Expand Up @@ -91,7 +91,7 @@ type IOUDetails = {
amount: number;

/** Optional comment */
comment?: string;
comment: string;

/** Currency of the money sent */
currency: string;
Expand Down Expand Up @@ -179,7 +179,7 @@ type Decision = {
/** Name of the decision */
decision: DecisionName;

/** When was the decision name */
/** When was the decision made */
timestamp?: string;
};

Expand Down Expand Up @@ -283,13 +283,13 @@ type OriginalMessageSubmitted = {

/** Content of the original message */
originalMessage: {
/** Approved expense amount */
/** Approved expense report amount */
amount: number;

/** Currency of the approved expense amount */
/** Currency of the approved expense report amount */
currency: string;

/** Report ID of the expense */
/** Report ID of the expense report */
expenseReportID: string;
};
};
Expand Down
4 changes: 2 additions & 2 deletions src/types/onyx/TransactionViolation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ type TransactionViolationData = {

/** Model of a transaction violation */
type TransactionViolation = {
/** Type of transaction violation ('violation', 'notice', 'warning', ...) */
type: string;
/** Type of transaction violation */
type: ValueOf<typeof CONST.VIOLATION_TYPES>;

/** Name of the transaction violation */
name: ViolationName;
Expand Down
Loading