Skip to content

Commit

Permalink
feat(sdk): show plan upgrade downgrade (#471)
Browse files Browse the repository at this point in the history
* chore: add weightage to plans and grouped plans

* test: add test for `plan_group_id`

* chore: show plan action based on weightage difference

* chore: sort invoice based on date

* chore: remove console log
  • Loading branch information
rsbh authored Jan 24, 2024
1 parent acba489 commit f266889
Show file tree
Hide file tree
Showing 6 changed files with 454 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ export default function Invoices({
? [...new Array(3)].map<V1Beta1Invoice>((_, i) => ({
id: i.toString()
}))
: invoices;
: invoices.sort((a, b) =>
dayjs(a.effective_at).isAfter(b.effective_at) ? -1 : 1
);
}, [invoices, isLoading]);

useEffect(() => {
Expand Down
Loading

0 comments on commit f266889

Please sign in to comment.