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

Update customUnit and customUnitRate types #37023

Merged
merged 2 commits into from
Feb 21, 2024
Merged
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
3 changes: 3 additions & 0 deletions src/types/onyx/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type Rate = {
customUnitRateID?: string;
errors?: OnyxCommon.Errors;
pendingAction?: OnyxCommon.PendingAction;
enabled?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we give these bools a default value? Is this just because we're part way through the TS migration?

};

type Attributes = {
Expand All @@ -22,6 +23,8 @@ type CustomUnit = {
customUnitID: string;
attributes: Attributes;
rates: Record<string, Rate>;
defaultCategory?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, do we depend on this being null to detect a case where no defaultCategory is set?

enabled?: boolean;
pendingAction?: OnyxCommon.PendingAction;
errors?: OnyxCommon.Errors;
};
Expand Down
Loading