[CAL-1008] Fix 'All Bookings' filter not getting selected after coming from 'Your Bookings'#8902
Conversation
…g from 'Your Bookings'
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@asadath1395 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Four Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
joeauyeung
left a comment
There was a problem hiding this comment.
Works as intended but please see comment
packages/lib/hooks/useTypedQuery.ts
Outdated
|
|
||
| return { data: parsedQuery, setQuery, removeByKey, pushItemToKey, removeItemByKeyAndValue }; | ||
| // Remove all query params from the URL | ||
| function removeAllQueryParams(keys: OutputOptionalKeys[]) { |
There was a problem hiding this comment.
I noticed there is a non-optional function param but when you call this function, you don't pass any params.
There was a problem hiding this comment.
@joeauyeung Initially i had planned to create a function to remove multiple keys from the query param, then later on decided on the current approach and my bad i forgot to remove the unnecessary param
| checked={!query.teamIds && !query.userIds?.includes(session.data?.user.id || 0)} | ||
| onChange={() => { | ||
| setDropdownTitle(t("all_bookings_filter_label")); | ||
| removeByKey("teamIds"); // Always clear on toggle or not toggle (seems weird but when you know the behviour it works well ) |
There was a problem hiding this comment.
@sean-brydon I saw that you made this comment. Are you ok with this approach?
joeauyeung
left a comment
There was a problem hiding this comment.
LGTM and working. Waiting for @sean-brydon's feedback
What does this PR do?
[CAL-1008] Fix 'All Bookings' filter not getting selected after coming from 'Your Bookings'
Fixes #6937
Screen.Recording.2023-05-15.at.4.37.26.PM.mov
Environment: Staging(main branch) / Production
Type of change
How should this be tested?
/bookings/upcomingAll Bookingsfilter